Ontology modeling process

This page is a chapter from our teaching guide
"Introduction to Ontology Modeling" (click to go to the full version in PDF format).

Selecting objects

The first of the cognitive processes necessary to build an information model of any area of ​​reality can be called decomposition. It consists of dividing the modeled fragment of reality into separate elements that will become the basic units of the information model. IN above example we made do with three objects; however, the decomposition can be continued - a leash, details of people’s clothing, etc. can be identified as separate objects. Let us pay attention to the fact that at first glance we assessed the person depicted in the picture as a complete object - along with clothes and shoes. If he runs, the clothes will move with him, so at the simplest level of modeling such a generalization is acceptable. However, if we want to predict the possible actions of this person in more detail, the decomposition will need to be continued: for example, the person might take off a cap or glove and throw it to the dog to try to distract it for a second. The composition of the object may not be fully known to us: what if the person has a pistol hidden in his bosom? Then the results of our thought experiment will change significantly, and events may follow a completely different scenario. This is a question, among other things, of the integrity of the information message we received and the sufficiency of information for modeling.

When decomposing, it is necessary to take into account the possible nonstationarity of the existence of objects. If the dog jerks violently and breaks the leash, instead of one object two new ones will appear. On the other hand, if a dog bites off a person's finger, a new separate object (the finger) will appear, but the old one will not cease to exist (the person). By the way, physical continuity does not always serve as the basis for the logical unification or separation of objects. In addition, not all objects are physically inseparable, or even have an unambiguous material embodiment.

The depth of decomposition, determining the boundaries of objects, as well as the decision about whether to create (delete) objects in the model when their state changes significantly depend only on pragmatics - the practical purpose of the model. If we look at our picture in order to practice the actions of law enforcement officers during an arrest, then, of course, the suspect will remain a suspect no matter what damage is inflicted on him. If clothes or other objects he has with him can be used by him to change the course of events (influence the outcome of the arrest), we must include these objects in the model as separate entities. It is also clear that if we model in detail all the items a suspect has, then compiling and interpreting the model will require too much time and resources, which is not practical from an economic point of view. The task of correct modeling is to find a practically justified and optimal relationship between the level of detail of the model (and, as a consequence, the reliability of the modeling results) and the resources required for this.

We will call each object we select during the decomposition process an individual object.

To express information about objects that will allow us to draw logical conclusions based on our model, stating the existence of the objects themselves is not enough. The model will contain elements of at least three other types - various types of grouping of objects, descriptions of their properties and connections. We will discuss them in detail further, for now we only state that a holistic information model built according to the methodology we are considering will contain entities of the following types:

  • Individual (specific) objects;
  • Definitions of classes (groups) of objects;
  • Definitions of static object attributes;
  • Definitions of connections between objects.
The model will also contain the values ​​of specific properties for specific individual objects, specific connections between them, but these types of information are not independent concepts.

Object Identification

The second step in constructing a conceptual model will be called object identification. In order to think about an object, we must identify it, that is, unambiguously designate it. In social life, identifiers are the names of people, in geography - the names of cities and countries, and so on. We may not be aware of the process of identifying nameless objects, such as the dog and people in our picture, but, undoubtedly, these identifiers exist in our brain - the process is simply too “low-level” for us and not amenable to reflection. So, the first step in constructing a model of any particular area of ​​reality is to divide it into objects, and the second is to identify these objects.

When we build a model for pragmatic purposes, it is very important to respect the principle of identifier neutrality. The identifier itself should not carry any meaning and has no right to be based on any properties of the object. It is well known that people’s names as identifiers are unreliable: you can change your first name, last name, as well as gender, any other properties of a person, including biometric ones (under certain circumstances), but the person will remain the same. Therefore, it is strictly unacceptable to attach any meaning to the identifier. By the way, almost all catalogs of industrial products suffer from this drawback. The bearing identifier may include information about its inner and outer diameter, type, material, etc.; This is why such catalogs inevitably become outdated and turn out to be insufficient to provide information about new types of products that have a different set of properties.

All elements of the information model must have unique identifiers: individual objects, class definitions, and property definitions.

Classification

The third step in formalizing a model is usually classification—the inclusion of each object in one or more classes. Of course, to begin classification, we must first define the set of classes available to us.

The term “class” as applied to the information models discussed in our book means a certain symbol (information signal) that is used to generally designate a collection of objects:

A class is a collection of individual objects, and nothing more
Rice. 3. Class as a collection of individual objects, and nothing more

It is very important to understand that in the basic case, the class itself is just a sign, symbol, intension, concept, concept, definition (for example, the word “dogs”), with the help of which we designate a group of certain individual objects or other concepts. The simplest definition of a class does not include the characteristics by which we attribute objects to it, nor its relationships with other classes, nor the general characteristics that all members of the class have. There is no “idea” (remember Plato) behind the definition of class.

In fact, would a porcelain dog be classified as a “dog”? This depends entirely on the subjective point of view, on pragmatics, that is, on how exactly we will use our model. In the model designed to practice actions when detaining suspects, it will not. In the model that we are building for choosing a gift for a child’s birthday, the dog can be either live, porcelain, or plush. Thus, the extension (called, scope of a concept) of the same intension (sign, concept) varies depending on the context and the subject.

Conceptualization in mental models, and classification in information models is needed in order to be able to formulate knowledge and build logical conclusions. To do this, we need to include in the model class statements that correspond to the arsenal of first-order logic. One type of such statement is expressions of the format “All members of class X are members of class Y” (for example, “all dogs are animals”).

Using such statements, you can build a hierarchy of classes, from general to more specific. Thus, classes form a hierarchy, or taxonomy. A person tends to simplify the solution of his mental problems as much as possible. Therefore, the natural organization of classes for us is a simple hierarchy - a “tree”, in which each element has only one parent. This limitation is natural for people (especially programmers), but you need to understand that it is artificial and has no pragmatic basis. A non-normalized hierarchy, where any class can have two or more disjoint superclasses, may be useful in practice.

Since the compilation of classifiers is an important part of practical modeling, let us dwell on this topic in a little more detail. Another common misconception among classification compilers is the combination of different bases for class differentiation in one hierarchy. Let's imagine that we are building a classification of store goods. At the same time, we limit our thought process to the fact that in the warehouse program, where the classifier will ultimately end up, the product directory represents one hierarchy, and a normalized one. This forces us to build trees like this:

Incorrectly constructed hierarchy
Rice. 4. Incorrectly constructed hierarchy

What did the analyst proceed from when constructing such a hierarchy? He most likely followed the departmental structure of the store. The top level of the hierarchy corresponds to the functional division of goods, since people most often enter a store for a specific purpose (for example, on the way to the country). The second level partly reflects the technology of production of goods, and partly continues their functional division. Finally, the third level corresponds to how it is easier to group products on shelves.

Such a hierarchy may seem convenient for navigating through a real store, but in an information system designed to help in choosing the right product (for example, in an online store) it will be extremely unsuccessful. It is easy to notice that, for example, a kitchen towel will end up in the “Kitchen Products” -> “Towels” section, although based on technology it could end up in the “Textiles” section.

To avoid such difficulties, it is necessary to understand the basis of classification, and then construct one or more class hierarchies. We can simultaneously classify each individual object into several classes. This classification principle is called facet.

Let us illustrate this with an example. Suppose we want to build a hierarchy of classes for goods of a large store, and determine the place in this hierarchy for a specific product - an electric drill. We use the following classification grounds:

  • Scope of application of the product;
  • Method of use;
  • Functional purpose.

Note that we should, if possible, avoid such names for the bases of classification as “species” and “type”: these words themselves do not carry any information, but hide behind them some other bases for which we simply have not found a suitable definition. By area of ​​application, we can divide products as follows:

Classification by area of ​​application
Rice. 5. Classification by area of ​​application

By method of use:

Classification by method of use
Rice. 6. Classification by method of use

Note that the classification of an instrument can be based on many different factors; For our goal - building a store navigation system - we can divide it by intended users, which is what is done in Fig. 6, but it is possible - for some other reasons, for example, for cutting, drilling, etc.

Finally, according to their functional purpose, we classify products as follows:

Classification by functional purpose
Rice. 7. Classification by functional purpose

Of course, in each case we showed only a small part of the product hierarchy. We emphasize that the classification methods shown are not “correct” or “preferable” in themselves - they can only be rational in the light of some specific tasks. If the goals change, the classification must change.

To complete this example, let’s look at what classes the product “electric drill XYZ” will be classified into:

Example: classification of electric drill
Rice. 8. Classification of electric drill

The XYZ electric drill is an amateur tool that can be used both at home and in the garden, when working on interior or exterior decoration.

As we see, the same individual object can be classified into several classes at once, even within the same hierarchy (“household goods” and “garden goods”).

The attentive reader probably already has a question - why do we call electric drill XYZ an individual object? After all, if XYZ is a model designation, then “Electric Drill XYZ” must be a class that includes specific electric drills, each with its own serial number.

In fact, the division into classes and individual objects also depends on the context of use of the model. When we build a product catalog, nothing prevents us from considering “Electric Drill XYZ” an individual object - in the processes of sales and warehouse movement of goods, we are not interested in its specific units. Of course, this is only true if we are absolutely sure that we will not have to use the same model to describe other business processes where tracking individual items becomes relevant. In the context of a service business process that deals with the repair of drills, "Electric Drill XYZ" would certainly be the class to which specific devices belong.

Another important point is related to the depth of detail of the classifications. For example, we can classify a dog as an animal, or we can build a “matryoshka doll” using all the elements of biological classification: Animals – Chordata – Mammals – Carnivores – Canids – Wolves (genus) – Wolf (species) – Dog (subspecies). But will such a classification have practical meaning? In the vast majority of cases, no, although it may be, for example, if we are building a model for genetic or medical research. Thus, when constructing classifications, it is important to adhere to the principle of parsimony, in other words, to cut off, using Occam’s razor, all entities and meanings, the presence of which is not justified by pragmatics.

Nesting, which makes it possible to build class hierarchies, is the most “intuitive”, but far from the only way to establish relationships between classes. As a first approximation, we can list the following types of relationships between two or more classes that are allowed within the framework of the modeling methodology we are considering:

  • Equivalence. Essentially means that two class names are synonymous, and refer to the same set of individuals - for example, "dogs" and "dogs".
  • Separation. States that no object belonging to one class can simultaneously belong to another class (“dogs” and “cats”).
  • Association. Argues that the totality of objects of two or more classes forms the entire set of objects of the third class (the totality of “men” and “women” gives all the elements of the class “people” - to some approximation).

Such relationships are expressed through logical statements ("no dog is a cat"), and are used in the process of obtaining logical conclusions ("My friend is a dog; therefore he is not a cat").

Description of properties

A model consisting only of classes and individual objects has little practical meaning. Mentally operating with objects, we attribute certain properties to them, and the rules for the interaction of objects almost always depend on the values ​​of these properties. Thus, the fourth step in building a model will most likely be identifying the properties of objects.

In the structure of our ideas about the property, it is easy to identify its main characteristics:

  • name (for example, "temperature in Celsius");
  • restrictions on the type and range of values ​​(possible temperature values ​​in Celsius are real numbers from -273.15 to +∞);
  • a set of objects that can and/or must be the bearer of this property (all physical bodies necessarily have temperature, and a period of time cannot have temperature).

The idea of ​​dividing properties into two types is quite natural for our consciousness. Some serve to describe the characteristics of objects that, as a rule, have a continuous spectrum of values ​​(temperature, size, duration). Others serve to connect objects with each other, expressing, for example, information that object A is part of object B, or that these objects interact in some other way.

Within the framework of the modeling methodology we are considering, property definitions can be in certain relationships with each other, and also have characteristics that allow us to draw logical conclusions:

  • Equivalence ("duration" and "duration").
  • Inversion. This relation is relevant for two properties expressing the relations of objects. For example, the relation “is a son” is inverse to the relation “is a parent.”
  • Transitivity. If any property is transitive, and it is known that object A is connected by this property with object B, and B is connected with C, then A is connected by the same property with B. For example, the property “is part” is transitive. So, if the engine is part of the car, and the piston is part of the engine, then it is also true that the piston is part of the car.
  • Symmetry. If A is related to B by a symmetrical property, this automatically means that B is related to A by the same property. Thus, the property “is a spouse” is symmetrical, that is, if Ivan is the husband of Mary, then Maria is the wife of Ivan (for comparison, the property “is a parent” is not symmetrical).

The restrictions imposed on the possible values ​​of properties can be formalized as follows:

  • The type of value received (number, string, objects of certain types, etc.).
  • Range of values ​​(range boundaries, one of a specific set of objects, etc.).
  • Number of possible values. This is an unintuitive but very important limitation. The property “is a spouse” can take only one meaning for citizens of European countries, but several for Arab countries. A person can have several names, a city can have several names. At the same time, the property “temperature” will always have only one value, but determined by a specific measurement point and moment in time. To be more precise, in some cases it will be incorrect to assign the property "temperature" to physical objects; it is more correct to assign it to objects belonging to the class “measurement act”. Each such object will have properties that tie the measurement to the moment in time and the point where it was performed.
  • Commitment. Each property for each object can have 0, 1, or more required values.

Neither the listed relationships and characteristics of properties, nor the list of possible restrictions are exhaustive - they are given, rather, as an example of logical axioms that can be used when creating models. At the same time, all these axioms have a concrete expression in semantic technologies, which we will talk about in the next section.

It is worth emphasizing the important difference between the meaning of the concept “property” that we use and properties in object-oriented programming. In OOP, a property is inextricably linked to the class in which it is defined. In the modeling paradigm we are considering, properties exist independently of classes; the same property can apply to objects belonging to different classes. By the way, the concept of “class” in OOP and in the context of our presentation has a different meaning: in OOP it is a template that defines the structure of information about objects of a certain type, and permissible operations with them. In our case, a class is just a way to group objects.

However, for each property, we must define a set of classes to whose objects the property applies, as noted above when discussing the basic characteristics of the property.

Finally, recall that property definitions, just like individual objects and classes, must have unique identifiers.

The belonging of an individual object to a class is expressed using the property of this object (that is, “is an instance of the class” - this is also a property inherent in all individual objects).

The definition of the type of a model element - a class, an individual object, or a property - is also expressed using a property (that is, “has the type of a model element” - this is a property inherent in all model elements without exception).

It is important to understand that to describe the structure and conceptual apparatus of the model (definitions of classes and properties), we use the same tools as to fill the model with subject content.

Information Model Example

Let's apply the described modeling methodology in practice. Let us recall the figure with which we began our discussion of information models. Let's create an information model of the static scene depicted on it, implying that it is created in order to work out scenarios of possible actions when detaining a suspect.

Initial information for modeling
Rice. 9. Initial information for modeling

1. Let us identify four individual objects in this figure: man, dog, leash, man.

2. Let’s assign them unique identifiers – A1, A2, A3 and A4, respectively.

3. Let’s define a set of classes that will be needed to classify the objects we have selected and combine them into hierarchies:

Hierarchies

4. Let’s set logical axioms for the created classes:

No character is the subject, and vice versa.

The classes person, dog, leash also have non-overlapping sets of meanings.

All people (within our model) are either suspects or dog handlers.

All suspects are human. All dog handlers are human.

All objects (within our model) are either actors or static objects.

All characters are objects. All static items are items.

5. We classify our individual objects:

A1 belongs to the Actor and Suspect classes.

A2 belongs to the classes Actor and Dog.

A3 belongs to the classes Object and Leash.

A4 belongs to the classes Actor and Dog Handler.

6. Let’s define a set of properties that will be needed to describe the interaction of objects (property names are in italics):

A is holding B in his hand.

A is wearing B.

A is guarding B.

A is in B's custody.

7. Let's describe the characteristics and limitations for the properties.

“Hold in hand” refers to objects of the Person class, and its values ​​are objects of the Static Item class.

"Wearing on" refers to objects of the Actor class, and its values ​​are objects of the Item class.

"Guard" and "In custody" refer to objects of the Actor class, and their values ​​are also objects of the Actor class.

All listed properties can have from 0 to any number of values.

8. Let us describe the logical axioms for properties:

If A is guarding B, then B is in A's custody.

9. Let’s write down the property values ​​for our objects:

A4 holds A3 in his hand. A3 is dressed on A2. A2 is guarding A1.

Thus, we received a description of the scene shown in Fig. 1, which is minimal in content but complete in structure. 9. As presented, the model allows us to draw only one conclusion - that A1 is in the custody of A2. To give this model practical meaning, it needs to be significantly expanded - for example, to describe the facts that a dog will rush at a detainee if he tries to run, and the dog handler gives a command and stops holding the leash. A complete model from a pragmatic point of view should contain:

  • description of the goals (for the suspect the goal is to escape, for the dog handler - to prevent escape),
  • possible actions (run, attack), and
  • their consequences (immobilized, wounded).

In such a model, goals, actions, consequences will be represented using classes and objects. For example, the object "escape" would be of class "target". The property “has a goal” will be inherent in each object of the “actor” class, and specifically for object A1 its value is “escape”. Logical axioms can have the following form, for example: “If an object is immobilized, then it cannot run”; “If a dog holds an object, that object is immobilized.”

Using such a model, it will be possible to simulate the development of events under different initial conditions (for example, with different variants of the suspect’s behavior), and, as a result, receive instructions for the dog handler to prevent escape.

Such a model will be much broader in content, but will consist of elements of the same types that we used in our simplest version of the model.

Next section: Using Ontological Models