Humans learn using rules and relationships, so can computers

mediumThis post was originally published by Felicity Mulford at Medium [AI]

Artificial Intelligence and Semantic Reasoning

Many have strived to make computers ‘think’, ‘learn’ and therefore ‘act’ like humans, all with varying levels of success to date; from machine learning and deep neural networks to knowledge graphs with semantic reasoning.

Artificial intelligence (AI) is the “scientific field of study which aims to understand and build intelligent entities by automating human intellectual tasks”. This trending term is frequently seen in reports, papers, articles and news stories, as interest in AI continues to increase.

There are many parallels between the process of learning in humans, and the work undertaken by computer scientists while creating AI applications. One of the most fundamental human processes is our ability to store information in our memory, and how we then use that information to navigate through the world around us. But our brains do not store this information in tables with rows and columns, with foreign and primary keys like a SQL database… so why should computers?

Knowledge graphs are graph databases, within which data is stored as richly connected entities. Storing information as relationships between data, reflects a natural way of dealing with information. To learn more about Knowledge Graphs, read the article here.

Knowledge Graphs may have a semantic reasoning layer. This article explains how Knowledge graphs with cutting edge Semantic Reasoning technology can be used within the field of Artificial Intelligence, to train computers to think more like human beings, resulting in intelligent applications.

Learning with rules and relationships

The world around us is a rich, interconnected environment of natural and man-made entities. As we grow up we learn how to interact with the world, and we store information within our memory which helps us navigate through our daily lives.

For hundreds of years, biologists have researched and documented the relationships between various species, in what we call ‘ontologies’. To this day, ontologies feature as part of the school biology curriculum for classifying information on the natural world, in a logical way.

Let’s demystify the word ‘ontology’ now:

An ontology is a set of rules, such as “lions eat the antelopes”, “antelopes eat grass”, “the grass can’t eat lions”. These rules are embedded into the natural fabric of the world around us.

Image for post

Over time, Children learn the rules which govern language formation, and their linguistic capabilities improve over time, until these rules are memorised. Similarly, learning to drive a car requires learning rules. When driving a car safely, the rules of the road are required in-memory (as opposed to reading them from a book). For instance, the driver must drive on the correct side of the road, go the correct way around roundabouts, stop at red lights, not exceed the speed limits etc. Once these rules are committed to memory (and we’ve practised our driving) we can pass our driving test, and drive legally, independently, and safely.

When we are tasked with changing a light bulb in our home, we must find a light bulb that provides the correct voltage and shape for the fitting. If we do not do this, then the lightbulb won’t work. To get the correct lightbulb we must understand the relationship between the bulb and the fitting, and the logic of compatibility — all of which may be encoded in rules.

Image for post

These examples are all instances where humans learn using rules and relationships. This new information is stored in memory and enable humans to carry out their daily lives.

What does this mean for computers?

Similarly to humans, computers can learn how to achieve certain outcomes using rules and relationships, with advanced semantic reasoning technology. In brief, semantic reasoning is the process of making “logical deductions from the information that is explicitly available”. The set of deductions we will make is encoded in rules, which can be written in the Datalog rule language.

By encoding knowledge, such as domain expertise, rules and ontologies, we can determine the relationships between the stored data. We can then use this knowledge as a basis for scientific study or modern-day applications.

We can understand the structure of food chains and other datasets, using ontologies and hierarchies. Similarly, to learning language or how to drive, we can encode the rules for word and tense formation, or the rules of the road, into the system. We can include logic and therefore determine the compatibility of different lightbulbs with the fitting. This can be extended to commercial scale compatibility assessments, answering questions like “What components do I need to pick in order to assemble a machine?” or “Which products should I show to a user of my website?” The use cases are endless.

Semantic reasoning engine

RDFox is a semantic reasoning engine and a high-performance knowledge graph which “enables intelligent information processing by providing means for representing and reasoning with domain knowledge in the form of rules and ontologies”.

Datalog rules can be used to link data sources, verify data sets, and improve the richness of a graph database. For example, if I told a human that I live in Oxford, they could determine that I live in England, thus in the UK. However, when a normal graph database is asked if I lived in the UK, it would say no — as inside the database it says I live in Oxford. Although humans know Oxford is a city located in the UK, if the relationship is not explicitly stored in the system, it won’t know the link.

Similarly to how humans think, in RDFox we can add a rule, and as a result RDFox will interpret the relationships between myself, Oxford, Oxfordshire, England and the UK to deduct that I do in fact live within the UK.

Image for post

This is a simple example of semantic reasoning. However, imagine we are talking about a database containing thousands of people, some of which are listed as living in Oxford, some in Oxfordshire, some in England. In order to say that they are from the UK in SQL, this already counts as three queries (one per layer of generalisation).

Now imagine doing this for another relationship, such as the job people have: Some may be listed as Paediatric Heart Surgeons, some as Paediatricians, some as Surgeons, some as just Doctors. Now if you want to return all the Doctors in the UK you already have to run 12 different SQL queries. Add 10 more relationships and you have a nightmare.

With Semantic Reasoning on the other hand, this can be expressed with one rule only, which allows us to use only one query. And (at least in RDFox), semantic reasoning is done incrementally, meaning that if the data changes (say one of the surgeons retires), then our conclusions change too, automatically and in real time.

The power of reasoning

Semantic reasoning becomes extremely powerful when the combination of domain expertise, ontologies and rules, including rule hierarchies, are embedded into the system.

In a business setting, it is common to need expert knowledge to deal with business questions, from optimising strategy through to product development and analysis. This is often a costly and time consuming endeavour. However, using semantic reasoning technology, the expert knowledge can be embedded into the system, granting it the gift of intelligence, as a human would have.

Looking at our example of determining compatibility of components in an industrial configuration setting, the logic of compatibility is added to the system using rules. The expert knowledge then exists within the system and is accessible by the end user, on demand. This allows the system itself to provide compatible solutions, accounting for user specifications — the intelligent application thinks more like a human would think, and a lot faster than a human would too!

Looking forward

By storing information as richly connected entities within knowledge graphs, we drastically improve the ability of semantic reasoning technology to derive logical inferences from the data stored within. The structure of information within RDFox, as well as the immense power of the reasoning engine itself, offer organisations a unique opportunity to embed domain knowledge within their graph database. The result is the creation of truly intelligent applications, which can operate in real-time and with the same conviction as humans.

To learn more about RDFox visit our website or check out our medium publication. To try RDFox yourself, you can request a free 30 day trial license here. To request a demo, contact us at info@oxfordsemantic.tech.

Spread the word

This post was originally published by Felicity Mulford at Medium [AI]

Related posts