オントロジーは、エンティティ、関係、プロパティをグラフに表します。ここでは、そのグラフに「関係はどのように振る舞うか」「どの値が許されるか」という規則を加えます。話者は、RDFSやOWL(Web Ontology Language)を、グラフの横で推論(inference)や制約(constraint)を行う支援技術として紹介します。
Ontologies represent entities, relationships, and properties in a graph. Here, we add rules about how a relationship behaves and which values are allowed. The speaker introduces RDFS and OWL (Web Ontology Language) as supporting technologies that work beside the graph to perform inference and apply constraints.
この章で大切なのは、書かれた事実と、規則から導かれた事実を分けることです。グラフに最初から保存された関係だけでなく、OWLのプロパティ特性から新しい関係を導けます。また、値の数や組み合わせに関する制約を使って、矛盾したデータや提案を見つけられます。
It is important in this chapter to separate written facts from facts derived by rules. The graph contains not only relationships stored from the beginning; the characteristics of OWL properties can also derive new relationships. Constraints about the number of values or about allowed combinations can reveal contradictory data or proposals.
推移性:関係の鎖をつなぐ
Transitivity: connecting a chain of relationships
ある関係が**推移的(transitive)**であるとは、同じ関係が二段続いたときに、その両端にも同じ関係が成り立つことです。祖先(ancestor)の関係がその例です。人間関係では、Aの祖先がBで、Bの祖先がCなら、Aの祖先はCでもあります。
A relationship is transitive when, if the same relationship occurs in two consecutive steps, that relationship also holds between the two endpoints. An ancestor relationship is an example. In a family relationship, if A is an ancestor of B and B is an ancestor of C, then A is also an ancestor of C.
話者は、次の三人の鎖を使って説明します。
- SueはMaryの祖先です。
- MaryはAnnの祖先です。
- 祖先の関係が推移的なら、SueはAnnの祖先だと導けます。
The speaker explains this with a chain of three people.
- Sue is an ancestor of Mary.
- Mary is an ancestor of Ann.
- If the ancestor relationship is transitive, we can derive that Sue is an ancestor of Ann.
三つ目の関係は、最初から別の事実として書かれているわけではありません。最初の二つの事実と「ancestorは推移的である」というOWLの特性から、システムが推論した事実です。このような導出によって、利用者がすべての間接的な関係を一つずつ登録しなくても、グラフから使える情報を増やせます。
The third relationship was not originally written as a separate fact. It is an inferred fact produced from the first two facts and the OWL characteristic that ancestor is transitive. This kind of derivation increases the usable information in the graph without requiring a person to register every indirect relationship one by one.
ただし、推移性はすべての関係に当てはまる性質ではありません。たとえば「知り合いである」や「電話をかける」が、二段つながれば必ず成り立つとは限りません。したがって、どのプロパティを推移的にするかは、ドメインの意味に基づいて決める必要があります。ここでの祖先の例は、話者が示した推移的な関係の例です。
However, transitivity does not apply to every relationship. For example, being acquainted or making a phone call does not necessarily hold between the endpoints just because two such links form a chain. Therefore, which properties are made transitive must be decided from the meaning of the domain. The ancestor example is the transitive relationship shown by the speaker.
機能性:一つの対象に許す値を一つにする
Functionality: allowing one value for one subject
**機能的プロパティ(functional property)**は、ある対象について値を一つだけ許すプロパティです。重要なのは、「グラフ全体で値が一つ」という意味ではなく、「一つの対象に対して値が一つ」という意味です。普通のプロパティなら複数の値を持てますが、機能的プロパティでは複数の値が現れると、整合性(consistency)の問題が起こります。
A functional property allows only one value for a given subject. The important point is that this does not mean there can be only one value in the whole graph. It means there can be one value for one subject. An ordinary property can have multiple values, but multiple values for a functional property create a consistency problem.
話者は、人の父親または母親を例にします。ある人Jimについて、父親の関係に二つの異なるラベルが付いているとします。父親というプロパティが機能的なら、Jimには父親が二人いると単純に受け入れません。二つのラベルは、同じ一人の個人を指す別名だと推論できます。
The speaker uses a person's father or mother as an example. Suppose two different labels are attached to the father relationship for a person named Jim. If father is functional, the system does not simply accept that Jim has two fathers. It can infer that the two labels are different names for the same individual.
これは、二つの文字列が似ているから同一だと判断する処理ではありません。「この関係には一つの値しかない」というドメイン上の制約があるため、二つのラベルが同じ個人を指すという帰結が生まれます。なお、話者の発話では、この例の識別子がBobまたはBBのように異なって聞こえる箇所があります。その正確な表記ではなく、一つの父親という制約から同一性を推論する点が重要です。
This is not a decision that the two strings are identical because they look similar. The conclusion that the two labels refer to the same individual follows from the domain constraint that this relationship has only one value. In the speaker's transcript, the identifier in this example sounds different in different places, like Bob or BB. The important point is the identity inference from the one-father constraint, not the exact spelling.
RDFSの型推論とOWLのプロパティ特性
RDFS type inference and OWL property characteristics
前の例で扱ったRDFSのドメインとレンジは、関係の両側にいるものの型を導きます。たとえば、teachesのドメインをTeacher、レンジをStudentとすれば、「Bob teaches Scooter」から、Bobは教師でScooterは学生だと推論できます。一方、ここでのOWLのプロパティ特性は、関係そのものの振る舞いを表します。推移性は関係の鎖から新しい関係を導き、機能性は一つの対象が持てる値の数を制限します。
The RDFS domain and range from the earlier example derive the types of the things on the two sides of a relationship. For example, if the domain of teaches is Teacher and its range is Student, then “Bob teaches Scooter” allows us to infer that Bob is a teacher and Scooter is a student. The OWL property characteristics discussed here instead describe how the relationship itself behaves. Transitivity derives a new relationship from a chain, while functionality limits the number of values that one subject may have.
つまり、RDFSのドメインとレンジは「これは何の種類か」を増やす規則です。OWLの推移性や機能性は、「この関係はどうつながるか」「この関係にいくつの値が許されるか」を扱う規則です。どちらも、グラフに明示的に書かれていない情報を扱ったり、後の検証に使ったりできます。
In short, an RDFS domain and range rule adds information about “what kind of thing this is.” OWL transitivity and functionality deal with “how this relationship connects” and “how many values this relationship allows.” Both can work with information that is not explicitly written in the graph and can support later validation.
これらの規則は、保存されたグラフの事実と同じ形で、最初から一つ一つ記録されているとは限りません。規則を使う推論器(reasoner)や検証器(validator)がグラフの横で働き、必要な導出を行い、制約に違反していないかを調べます。そのため、グラフは事実を保持し、別の規則層が意味に基づく計算とチェックを担当する、という分担ができます。
These rules are not always recorded one by one in the same form as the stored graph facts. A reasoner or validator using the rules works beside the graph, performs the needed derivations, and checks for violations of constraints. This creates a division of labor: the graph holds facts, while a separate rule layer performs meaning-based calculations and checks.
エージェントを支える規則層
A rule layer that supports agents
この分担は、エージェントにも役立ちます。確率的なLLMは、次に出す言葉や、呼び出したいツールとそのパラメーターを柔軟に提案できます。しかし、その提案がドメインの事実や制約に合うとは限りません。オントロジーの推論と制約チェックを提案の近くに置けば、推移性から得られる関係や、一つの値しか許さない規則を使って、提案の問題を検出できます。
This division also helps agents. A probabilistic LLM can flexibly propose the next words, or a tool and its parameters that it wants to call. But its proposal does not necessarily fit the facts or constraints of the domain. If ontology-based inference and constraint checking are placed near the proposal, the system can use relationships derived by transitivity and rules that allow only one value to detect problems in the proposal.
例(補足):実行前に矛盾を見つける
Example (supplement): finding a contradiction before execution
たとえば、エージェントがある人物の父親を二つの個人として登録する操作を提案したとします。LLMが文章として自然な説明を返しても、機能的プロパティの制約とは合いません。システムは、二つのラベルが同じ個人を指す可能性を推論するか、提案をそのまま通さずに再確認へ回せます。これは、OWLがLLMの生成を置き換えるという意味ではありません。柔軟な提案の後ろで、ドメインに基づく確認を加えるという意味です。
For example, suppose an agent proposes an operation that registers one person's father as two separate individuals. The LLM may return an explanation that sounds natural, but it does not fit the functional-property constraint. The system can infer that the two labels may refer to the same individual, or it can stop the proposal from passing unchanged and send it for another check. This does not mean that OWL replaces LLM generation. It means that a domain-based check is added after a flexible proposal.
読み違えやすい点
Points that are easy to misread
- 推移性は、関係を自動的に何でもつなぐ機能ではありません。推移的だと定義した関係だけに使われます。
- 機能性は、値の文字列を比較して一番もっともらしいものを選ぶ機能ではありません。一つの対象に一つの値という制約から、整合性や同一性に関する帰結を導きます。
- 推論された事実は、元のグラフに明示された事実とは別です。どの事実が主張され、どの事実が規則から導かれたかを確認する必要があります。
- Transitivity does not automatically connect every relationship. It applies only to relationships defined as transitive.
- Functionality does not compare value strings and choose the most plausible one. It derives consequences about consistency or identity from the constraint that one subject has one value.
- An inferred fact is different from a fact explicitly stated in the original graph. We need to check which facts were asserted and which were derived by rules.
話者の例が示すOWLの役割は、グラフを単なるリンクの集まりにしないことです。推移性は間接的な関係を導き、機能性のような制約は不整合を見つけます。こうした規則をグラフの横に置くことで、エージェントの提案をドメインの意味に照らして調べる土台ができます。
The speaker's examples show how OWL keeps a graph from being merely a collection of links. Transitivity derives indirect relationships, and constraints such as functionality reveal inconsistencies. Placing these rules beside the graph creates a basis for checking an agent's proposals against the meaning of the domain.