1.66k likes | 1.9k Vues
Knowledge Representation. Grigoris Antoniou FORTH-ICS, Greece. Week’s Objectives. Get an idea of what Knowledge Representation (KR) is about Get a taste of the area through a couple of concrete languages/systems See how KR plays a role in contemporary ICT areas: Web, pervasive computing
E N D
Knowledge Representation Grigoris Antoniou FORTH-ICS, Greece Knowledge Representation
Week’s Objectives • Get an idea of what Knowledge Representation (KR) is about • Get a taste of the area through a couple of concrete languages/systems • See how KR plays a role in contemporary ICT areas: Web, pervasive computing • Get motivated for more? Knowledge Representation
Week’s Outline • KR Basics • KR on the Web: Semantic Web • Defeasible Reasoning • KR in e-Commerce and Pervasive Computing • Summary Knowledge Representation
Part I:Knowledge Representation Basics Knowledge Representation
Artificial Intelligence • The design and study of systems that behave intelligently • Focus on hard problems, often with no, or very inefficient full algorithmic solution • Focus on problems that require “reasoning” (“intelligence”) and a large amount of knowledge about the world • Critical: • Representknowledge about the world • Reason with these representations to obtain meaningful answers/solutions Knowledge Representation
Symbolic Knowledge Representation: Basic Assumptions • Important objects (collections of objects) and their relationships are represented explicitly by internal symbols • Symbolic manipulation of internal symbolic representations achieves results meaningful in the real world. Knowledge Representation
Symbolic Knowledge Representation: Basic Assumptions (2) Real World Real World Map back to real world Symbolic representation Symbolic Representation New conclusions Manipulation Knowledge Representation
KR Goals Find representations that are: • Rich enough to express the important knowledge relevant to the problem at hand • Close to problem at hand: compact, natural, maintainable • Amenable to efficient computation Knowledge Representation
Representational Adequacy • Consider the following facts: • Most children believe in Santa. • John will have to finish his assignment before he can start working on his project. • Can all be represented as a string! But hard then to manipulate and draw conclusions. • How do we represent these formally in a way that can be manipulated in a computer program? Knowledge Representation
Well-defined Syntax & Semantics • Precise syntax: what can be expressed in the language • Formal language, unlike natural language • Prerequisite for precise manipulation through computation • Precise semantics: formal meaning of expression Knowledge Representation
Naturalness of Expression • Also helpful if our representation scheme is quite intuitive and natural for human readers! • Could represent the fact that my car is red using the notation: • “xyzzy ! Zing” • where xyzzy refers to redness, Zing refers to by car, and ! used in some way to assign properties. • But this wouldn’t be very helpful... Knowledge Representation
Inferential Adequacy • Representing knowledge not very interesting unless you can use it to make inferences: • Draw new conclusions from existing facts. • “If its raining John never goes out” + “It’s raining today” so... • Come up with solutions to complex problems, using the represented knowledge. • Inferential adequacy refers to how easy it is to draw inferences using represented knowledge. Knowledge Representation
Inferential Efficiency • You may be able, in principle, to make complex deductions, but it may be just too inefficient. • The basic tradeoff of all KR: • Generally the more complex the possible deductions, the less efficient will be the reasoning process (in the worst case). • The eternal quest of KR: • Need representation and inference system sufficient for the task, without being hopelessly inefficient. Knowledge Representation
Inferential Adequacy (2) • Representing everything as natural language strings has good representational adequacy and naturalness, but very poor inferential adequacy. Knowledge Representation
Requirements for KR Languages: Summary • Representational Adequacy • Clear syntax/semantics • Inferential adequacy • Inferential efficiency • Naturalness In practice no one language is perfect, and different languages are suitable for different problems. Knowledge Representation
Why Reasoning? Example: Patient x is allergic to medication m Anybody allergic to medication m is also allergic to medication n Is it ok to prescribe n for x? • Reasoning uncovers implicit knowledge not represented explicitly • Beyond database systems technology Knowledge Representation
Syntactic vs Semantic Reasoning Semantic reasoning: • Sentences P1,…, Pn entail sentence P iff the truth of P is implicit in the truth of P1, …, Pn • Or: if the world satisfies P1,…, Pn then it must also satisfy P • Reasoning usually done by humans Syntactic reasoning: • Sentences P1,…, Pn infer sentence P iff there is a syntactic manipulation of P1,…,Pn that results in P • Reasoning done by humans and machines Knowledge Representation
Reasoning: Soundness and Completeness • Sound (syntactic) reasoning: • If P is inferred by P1,…, Pn then it is also entailed semantically • Only semantically valid conclusions are drawn • Complete (syntactic) reasoning: • If P is entailed semantically by P1,…, Pn then it can also be inferred • All semantically valid conclusions can be drawn • Usually interested in sound and complete reasoning • But sometimes we have to give up one for the sake of efficiency (usually completeness) Knowledge Representation
Main KR Approaches • Logic-Based • Focus on clean, mathematical semantics: declarativity • Explainability • Frames / Semantic Networks / Objects • Focus on structure of objects • Rule-based systems • Focus on efficiency • A B in logic and rule-based systems Knowledge Representation
The Landscape of KR • Predicate logic (first order logic) and its sublanguages • Logic programming, (pure) Prolog • Description logics • Web ontology languages • Predicate logic (first order logic) extensions • Modal and epistemic logics • Temporal logics • Spatial logics • Inconsistency-tolerant logics: • Paraconsistency • Nonmonotonic reasoning Knowledge Representation
The Landscape of KR (2) • Representing vagueness • Probabilistic logics • Bayesian networks • Markov chains • Planning and reasoning about action • Extensions of logic to reason about the prerequisites and effects of actions • … Knowledge Representation
Part II:KR on the Web: Semantic Web Knowledge Representation
The Semantic Web • The Semantic Web vision • RDF • OWL • Rules Knowledge Representation
Today’s Web • Most of today’s Web content is suitable for human consumption • Even Web content that is generated automatically from databases is usually presented without the original structural information found in databases • Typical Web uses today people’s • seeking and making use of information, searching for and getting in touch with other people, reviewing catalogs of online stores and ordering products by filling out forms Knowledge Representation
Keyword-Based Search Engines • Current Web activities are not particularly well supported by software tools • Except forkeyword-based search engines(e.g. Google, AltaVista, Yahoo) • The Web would not have been the huge success it was, were it not for search engines Knowledge Representation
Problems of Keyword-Based Search Engines • High recall, low precision. • Low or no recall • Results are highly sensitive to vocabulary • Results are single Web pages • Human involvement is necessary to interpret and combine results • Results of Web searches are not readily accessible by other software tools Knowledge Representation
On HTML • Web content is currently formatted for human readers rather than programs • HTML is the predominant language in which Web pages are written (directly or using tools) • Vocabulary describes presentation Knowledge Representation
An HTML Example <h1>Agilitas Physiotherapy Centre</h1> Welcome to the home page of the Agilitas Physiotherapy Centre. Do you feel pain? Have you had an injury? Let our staff Lisa Davenport, Kelly Townsend (our lovely secretary) and Steve Matthews take care of your body and soul. <h2>Consultation hours</h2> Mon 11am - 7pm<br> Tue 11am - 7pm<br> Wed 3pm - 7pm<br> Thu 11am - 7pm<br> Fri 11am - 3pm<p> But note that we do not offer consultation during the weeks of the <a href=". . .">State Of Origin</a> games. Knowledge Representation
Problems with HTML • Humans have no problem with this • Machines (software agents) do: • How distinguish therapists from the secretary, • How determine exact consultation hours • They would have to follow the link to the State Of Origin games to find when they take place. Knowledge Representation
A Better Representation <company> <treatmentOffered>Physiotherapy</treatmentOffered> <companyName>Agilitas Physiotherapy Centre</companyName> <staff> <therapist>Lisa Davenport</therapist> <therapist>Steve Matthews</therapist> <secretary>Kelly Townsend</secretary> </staff> </company> Knowledge Representation
Semantic Web Technologies • Explicit Metadata • Ontologies • Logic and Inference • Agents Knowledge Representation
Explicit Metadata • This representation is far more easily processable by machines • Metadata: data about data • Metadata capture part of the meaning of data • Semantic Web does not rely on text-based manipulation, but rather on machine-processable metadata Knowledge Representation
Ontologies The term ontology originates from philosophy • The study of the nature of existence Different meaning from computer science • An ontology is an explicit and formal specification of a conceptualization Knowledge Representation
Typical Components of Ontologies • Terms denote important concepts (classes of objects) of the domain • e.g. professors, staff, students, courses, departments • Relationships between these terms: typically class hierarchies • a class C to be a subclass of another class C' if every object in C is also included in C' • e.g. all professors are staff members • Value restrictions • e.g. only faculty members can teach courses Knowledge Representation
Example of a Class Hierarchy Knowledge Representation
The Role of Ontologies on the Web • Ontologies provide a shared understanding of a domain: semantic interoperability • overcome differences in terminology • mappings between ontologies • Ontologies are useful for the organization and navigation of Web sites Knowledge Representation
Typical Ontology Use Case: Image Search • A person searches for photos of an “orange ape” • An image collection of animal photographs contains snapshots of orang-utans. • The search engine finds the photos, despite the fact that the words “orange” and “ape” do not appear in annotations Knowledge Representation
Example Semantic Annotation Knowledge Representation
RDF Annotation of A Web Resource WordNet ape08.jpg young life stage active agent chimpanzee scratching the head Species ontology posture ICONCLASS Knowledge Representation
Ontologies Describe Concepts Used great ape geographical range Africa subClassOf chimpanzee typical habitat rain forest grass lands
Logic versus Ontologies • The previous example involves knowledge typically found in ontologies • Logic can be used to uncover ontological knowledge that is implicitly given • It can also help uncover unexpected relationships and inconsistencies • Logic is more general than ontologies • It can also be used by intelligent agents for making decisions and selecting courses of action Knowledge Representation
The Semantic Web Layer Tower Knowledge Representation
Semantic Web Layers • XML layer • Syntactic basis • RDF layer • RDF basic data model for facts • RDF Schema simple ontology language • Ontology layer • More expressive languages than RDF Schema • Current Web standard: OWL Knowledge Representation
Semantic Web Layers (2) • Logic layer • enhance ontology languages further • application-specific declarative knowledge • Proof layer • Proof generation, exchange, validation • Trust layer • Digital signatures • recommendations, rating agencies …. Knowledge Representation
The Semantic Web • The Semantic Web vision • RDF • OWL • Rules Knowledge Representation
Basic Ideas of RDF • Basic building block: object-attribute-value triple • It is called a statement • Sentence about Billingtonis such a statement • RDF has been given a syntax in XML • This syntax inherits the benefits of XML • Other syntactic representations of RDF possible Knowledge Representation
Basic Ideas of RDF (2) • The fundamental concepts of RDF are: • resources • properties • statements Knowledge Representation
Resources • We can think of a resource as an object, a “thing” we want to talk about • E.g. authors, books, publishers, places, people, hotels • Every resource has a URI, a Universal Resource Identifier • A URI can be • a URL (Web address) or • some other kind of unique identifier Knowledge Representation
Properties • Properties are a special kind of resources • They describe relations between resources • E.g. “written by”, “age”, “title”, etc. • Properties are also identified by URIs • Advantages of using URIs: • Α global, worldwide, unique naming scheme • Reduces the homonym problem of distributed data representation Knowledge Representation
Statements • Statements assert the properties of resources • A statement is an object-attribute-value triple • It consists of a resource, a property, and a value • Values can be resources or literals • Literals are atomic values (strings) Knowledge Representation