Teadmiste formaliseerimine

Allikas: Lambda
Mine navigeerimisribale Mine otsikasti
teadmised
teadmised

Name: Knowlege representation
Code: ITI8700
Link: http://lambda.ee/Teadmiste_formaliseerimine
Lecturer: Tanel Tammet
Practice work: Priit Järv
Contact: tanel.tammet@ttu.ee, 6203457, TTÜ ICT-426
Archives of previous years: 2019.


Väike lisaülesanne

Palun vaata loeng 10 loengu (17 aprilli) materjale: seal on mh ülesanded ise katsetamiseks. Tulemused tuleb saata õppejõu meilile!

Teise ja kolmanda praksi tähtajad ja seminar

Teise praksi tähtaeg on nihutatud edasi 17. aprillile (10 aprill on riigipüha).

17. aprillil kell 10:15 (loenguaeg) on plaanis MS Teamsi kaudu ühine seminar teise praksi aruannete ja kolmanda praksi ülesande progressi arutamiseks. Link/info ilmub siiasamasse. Osavõtt väga soovitav, pane palun kalendrisse.

NB! Tutvu palun kolmanda praksi ülesandega, alusta selle tegemist, ära oota sellega jägmist nädalat ja ära unusta submittimast oma teise praksi aruannet. Süvene taustaks 9. loengu materjalidesse käesoleval nädalal: need toetavad kolmandat praksi

Aine õppimine piirangurezhiimis

Loengud

Praktikumid

Priit andis praktikumide jaoks järgmised juhtnöörid:

Kodutööde esitamiseks avasime moodles lehe:

https://ained.ttu.ee/course/view.php?id=320

Kõik üliõpilased, kes on midagi juba esitanud, on ka ainesse enrollitud ja gruppidesse pandud. Kui keegi on kogemata vales grupis (või ei õpi enda teada üldse seda ainet :) siis andke palun teada.

Kodutööd esitage kirjalikult, vajalik info on olemas moodles. Õppematerjalid, näited jne on endiselt lambda wikis http://lambda.ee/wiki/Teadmiste_formaliseerimine

Diskussioon kodutööde kohta võiks toimuda esialgu siin:

https://ained.ttu.ee/mod/forum/view.php?id=11102

Katsetame selle formaadi sobivust. See toimib eelkõige siis, kui küsite ja kommenteerite julgesti.

Time, place, result

Lectures: Friday 10:15-11:45 room ICT-315
Practical work: Friday 12:00-13:30 room ICT-315
Practical work will give 40% and exam 60% of points underlying the final grade. The exam will consist of several small excercises.

The first practical work time on 31. January at 12:00 will be used for introducing the practice work. Some of the last lecture times at the end of the course may be used as additional seminars/labs.

Focus

The main focus of the course is on knowledge representation and reasoning (KR), a part of symbolic AI, on a spectrum from simple (representing and using knowledge in databases) to complex (meaning of sentences in natural language and commonsense knowledge).

The overall goal of the labwork to understand issues facing a task of building a natural language question answering system a la Watson and to see and experiment with existing parts of the solution.

The course contains the following blocks:

  • Representing knowledge in the SQL and document databases and hybrids.
  • Representing and using simple facts and rules in symbolic AI and logic.
  • General-knowledge databases: wikidata, wordnet, yago, conceptnet, nell, cyc.
  • Knowledge conveyed by natural sentences: both statistical methods like word2vec and logic-based methods.
  • More about reasoners and question answering systems.
  • Confidence and relevance.
  • Context, time, location, events, causality.

Check out this description of the whole KR area.

Books to use


Observe that a noticeable part of the course contents are not covered by these books: use the course materials and links to papers, standards and tutorials provided.

Practical work

There are three labs. They are all steps in a single project: build a simple natural-language question-answering system about geography.

The labs have to be presented to the course teachers and all students present at labwork time.

The labs can be prepared alone or by teams of two or three people.


Each lab is evaluated independently and gives the same number of points. NB! When you do not meet the lab deadline, you will be awarded half of the points for this lab.

First lab

Please read about the task for the first lab. Deadline: 28. February. It is better to present it earlier to have more time for the following labs.

Second lab

Deadline: 10 april (shifted one week from the original 3. april)

The task in the second lab is to

  • write a small set of additonal, nontrivial rules for geography not present in Yago or Wordnet,
  • actually answering simple questions using logic and rules with the help of a reasoner.

See Details of the KR second lab in 2020


Third lab

Deadline: 8. may.

Add a simple NLP component to the second lab to answer questions posed in natural language. I.e, the NLP component should convert a natural language query to logic usable by your system and the full system should be able to answer the questions.

See Details of the KR third lab in 2020


Block 1: knowledge in the SQL and document databases and hybrids.

Lecture: Intro and background, 31. Jan

Lecture materials:

Lecture: Nosql, json and rdf in databases. 7. Feb


Block 2: simple facts and rules in symbolic AI and logic

Lecture: simple rules in rdfs, logic and owl. 14. Feb

Have a brief a look of these, no need to read thoroughly:

More resources:

Lecture: rules in logic with provers to answer questions, 21. Feb

These should be looked at in parallel:

Lecture: what the reasoner does, 28. Feb

We will look in detail into the same presentation:

and will explain details of the second practice work.

Block 3: General-knowledge databases

Lecture: looking into main large knowledge bases. 6. March

We will have a look at the goals, main content and differences between:

Lecture 6: Big annotation systems. 13. March.

First, big annotation systems:

Importantly, see also:

Block 4: natural language and question answering

Lecture 7: Intro to NLP. 20 March and the following self-study week

A lot of reading this week. The main material is in the following chapters 25 and 26 of the Jurafsky and Manning book, the rest is relevant overviews/background. Lecture materials for the week:

Not obligatory, but highly recommended:

Lecture 8: vector representation of words. 27 March and the following self-study week

Now, you may have had a course on NLP and machine learning, in which case you should already know a lot about vector semantics. If so, consider yourself lucky :) and just skim through the following materials to check whether there are any new things or old friends for you. If not so, consider yourself extra lucky: you have come to the core of machine-learning-based NLP, and this is both pretty cool and quite understandable at the same time! Most of the machine-learning-based NLP is built on top of the ideas of vector representation of words.

Obligatory study materials:

Additional supporting non-obligatory materials from (roughly) easier to more complex:


Also interesting to look and read:

Block 5: More about semantic parsing. symbolic question answering and reasoners

Lecture 9: supporting materials for the third practical work: 3. April and the following week.

Please first listen and read in this order:

You may want to have a look at the AllenAI tutorial

Additionally you may want to read some papers about semantic parsing:

  • Read a paper about building a semantic parser in a relatively simple way.
  • Another paper about semantic parsing

There is an interesting specific method for semantic parsing, called AMR, worth having a brief look into:

There is a very good fairly deep NLP-and-commonsense series of podcasts and other interesting stuff from the Allen Institute for AI:


Lecture 10: planning, frame problem and the blocks world: 17 april and the following week

This week is about planning and the frame problem. The standard example for these is a blocks world: some blocks are on the table and the robot arm can lift single blocks and put them on other blocks or on the table. The arm cannot lift several blocks or a tower of blocks. Then, given a position of blocks at initial situation, can the robot arm create a required new position of blocks? Can we get the steps required? For getting the steps we use the $ans predicate.

One hard issue arising is that how do we know that doing some action like lifting a block does not create side effects like stumbling existing towers, moving other blocks etc? This issue is called the frame problem and it has no easy solutions.

Please look at and read these materials about the frame problem:

  • tiny video of the Boston Dynamics robot failing: looks like a frame problem :)
  • overview presentation: must read.
  • a classic AI philosophy paper about the frame problem: must read.
  • wikipedia about frame problem: skim it through (no need to read all the details) to get a rough idea about different approaches to the frame problem. None of these are really good.
  • another classic about frame problem: read this only if you became interested about the whole issue: it goes quite deep, although it is not especially technical.

Next, importantly, you should experiment yourself with gkc and both of the following files. Please copy and read the files and understand the encoding. At the end of the files are several queries to experiment with: instructions are also there.

In both of them the predicate holds(X,Y) is used to describe something X about the blocks world (like, one block is on another or robot holds some block) and the second argument Y describes the state we have arrived to via robot actions from the original state (like, picked up a block in the initial state and then did put the block down on top of another).

NB!Please email me tanel.tammet at taltech.ee a short description of (a) with which of the queries in the files were you successful and how long did they approximately take, (b) what queries did you pose yourself and what happened with these. Please put a word "formaliseerimine" into the email subject so I can easily find them.


Block 6: confidence and relevance

Lecture: various classical ideas for discrete reasoning with uncertainty

We will look at some discrete ways:

And start with numeric:

Lecture: various classical ideas for numeric reasoning with uncertainty

Classical numeric ways to reason about uncertainty:

Some newer approaches:

Block 7: context, time, location, events, causality.

To be filled.