CITS3005 Knowledge Representation

2023 version, for reference only!
Current students should use LMS

Home

This website is for CITS3005 Knowledge Representation.

Knowledge Representation will cover tools and methodologies for the formal representation of knowledge in a machine readable format, as well as automated reasoning technologies. These technologies are important for capturing domain specific details and supporting and automating decision making processes. The course will cover: logical foundations of artificial intelligence, including first order, probabilistic and fuzzy logics; formal representation of knowledge domains, including description logics, ontologies and graphical models; reasoning techniques including logic programming and theorem proving; and and applications to various problem domains.

The handbook entry and general unit policies are all available from the online LMS and we will use (MSTeams) for discussion and class management.

Contact Hours

Each student should attend (or view) the two hour lecture, and attend a workshop every week (workshops from week 2). Attendance will not be taken.

TypeTimeDayLocation
Lecture 11:00 am - 1:00 pm Wednesday GGGL:G21 Webb LT
Workshop 11:00am - noon Thursday CSSE Lab 2.07
Workshop 1:00pm-2:00pm Thursday Robert Street LT

Assessment

The assessment for CITS3005 consists of homework exercises, a project and an end of semester exam.

Assessment% of Final MarkDue Date
Homework 11025-08-2023
Homework 21006-10-2023
Project4020-10-2023
Final Exam40S2 Exam Period

Please make special note of the UWA AI Tools Policy when completing assessments. In CITS3005, Generative AI tools like Chat-GTP are permitted in assessments, but their use must be acknowledged.

Unit Schedule

PDF files of the individual lectures will be made available from here as the semester progresses, as well as the files used for demonstrations. Lecture recordings are also available via LMS

Project

The UWA Book of Knowledge

This project is due on 5pm October 20, 2023 and is worth 40% of your final grade. You may choose to complete the project in a pair, or as an individual. If you complete the project as a pair, you must each submit an individual report. Each student should submit their work to cssubmit. If working in a pair, each student should submit the full set of files, but each file should clearly indicate both students who contributed to it.


Overview:

The UWA handbook contains critical high level information about all of the University's degree programs, majors and units. This project requires you to build a knowledge graph representing a fragment of that information, and providing an OWL ontology with some basic reasoning capabilities. The knowledge graph onlky need to contain information on units, and degrees. Courses, students, grades, staff, campus's etc are out of scope and can be represented by literals.

Deliverables:

You should deliver the following elements:

  1. 25% A knowledge graph, implemented in python using rdflib. The data should be contained in a single file, with a python script provided to load the data into RDFLib and execute some SPARQL queries, including:
    • Find all units with more than 6 outcomes.
    • Find all level 3 units that do not have an exam, and where none of their prerequisites have an exam.
    • Find all units that appear in more than 3 majors.
    • Basic search functionality: Given a query string (eg "environmental policy"), can you find the units that contain this string in the description or outcomes?
  2. 15% A SHACL Constraints File representing the following constraints:
    • Every prerequisite for a level X unit should have a level less than X
    • No unit should be its own prerequisite
    • No major should require more than 40 contact hours per week
    This should be submitted as a shapes graph and a python script for running validation.
  3. 25% An OWL ontology describing the concepts in the graph, including: unit, major, outcome, prerequisite, assessment, contact. These should natural and useful queries over the knowledge graph, and should enforce, at least:
    • A prerequisite of a prerequisite is a prerequisite.
    • An outcome of a core unit is an outcome of a major
    • A required text of a core unit is a required text for a major
    This should be submitted as an owl file, with an python script for loading the ontology with the knowledge graph.
  4. 25% A User Manual that:
    • Gives an overview of the schema, constraints and ontology rules.
    • Example queries, describing how to form the queries and interpret the output.
    • Instructions on how to add, update or remove data and rules to the knowledge graph.
    • Instructions on how to check consistency on the knowledge graph, and identify errors.
    The user manual maybe presented as a pdf file, or using HTML/Markdown.
  5. 10% An individual report describing the process of building the project, including:
    • The design choices made in the project. Which options were considered and why di you make the choice you did?
    • What tools you used in the project, how effective were they, and what you would recommend people use in the future
    • .
    • An estimate of time spent on the different tasks in the project.
    • If you worked in pairs, describe how work was divided, how effective you thought the collaboration was, and an honest assessment of the relative contribution of both team members.
    The individual report should be a pdf file.
The marking criterion gives a rough indication of what is expected.

Resources:
The resources page will be updated as the project progress. The basic tools that should be used when completing this project are:
  • RDFLib and Python for building the knowledge graph and executing SPARQL queries.
  • pYSHACL for applying and validating constraints on the graph.
  • owlready2 for representing the ontology and applying reasoning.
You can acces unit information and major information extracted from the University handbook. These were derived using beautifulsoup, with the unit-crawler.py and major-crawler.py scripts.

Exams

Exam details:

  • 2 hour in person exam.
  • No calculators, but you may bring 1 double sided page of notes.
  • There are 4 questions titled: logic, logic programming, knowledge graphs and ontologies.
  • Each question is worth 10 marks, and all questions must be answered in the provided answer booklet.

The 2022 Exam and 2022 Sample Exam are available.

We will update a list of resources as we go through semester. Please feel free to suggest any additional resources to include here.

Logic and Logic Programming

Knowledge Representation and Reasoning
by Ronald Brachman and Hector Levesque
2004, Elsevier
Knowledge Representation and Reasoning is a standard text for knowledge representation in AI. It is useful, but not essential to have a copy. We will focus on chapters 1-5, and 9-12.

Simply Logical - Intelligent Reasoning by Example
by Peter Flach
1994, John Wiley
Simply Logical is a good basic introduction to reasoning with prolog. It is available as an e-book with executable examples.

Knowledge Graphs and Ontologies

Knowledge Graphs
by Aidan Hogan, Eva Blomqvist, Michael Cochez, Claudia d’Amato, Gerard de Melo, Claudio Gutierrez, Sabrina Kirrane, José Emilio Labra Gayo, Roberto Navigli, Sebastian Neumaier, Axel-Cyrille Ngonga Ngomo, Axel Polleres, Sabbir M. Rashid, Anisa Rula, Lukas Schmelzeisen, Juan Sequeda, Steffen Staab, Antoine Zimmermann
2021, Synthesis Lectures on Data, Semantics, and Knowledge
Knowledge graphs is a free online book giving a good overview of the theory and technologies of knowledge graphs.

Ontologies with Python: Programming OWL 2.0 Ontologies with Python and Owlready2 —
Lamy Jean-Baptiste
2021, Apress
A good practical overview of OWL, Ontologies and how to implement them in python.

Contacts


Dr Tim French
Unit coordinator and lecturer
CSSE Rm 2.14
Office hours: 12-13 Thursday
[email protected]
Ph: 64882794