Why are we so bad at knowledge graphs?
We struggle with formal languages, but need them more than ever
Nature is frequently both amazing and surprising. So it is with the way that we understand ideas, use natural languages, and have complex thoughts using them. From the prototype signalling noises of “primitive” species, to the kind of complex grammatical structures and navigational methods we employ in our human world, our language models have great sophistication. So why did we invent the much simpler but more difficult languages of mathematics, declarative syntax, and knowledge representations? These more precise mathematical and logical methods we’ve developed are nothing like natural language. So why are they different and why do we need both? And what does this have to do with knowledge graphs?
Natural language is a system for knowledge representation that nature has evolved within us. It is remarkable in the way it hints and swerves at ideas without necessarily being very precise. The meanings of words are often fluid and multi-valued, yet we are adept at understanding natural language, both its explicit and its hidden meanings. When we’re speaking or using natural language, our brains are working overtime to manage a complicated model of context that fills in many of the gaps and makes inferences about meanings to supplement the raw text. Formal languages, including computer programs, on the other hand, are a set of languages that we have developed as a technology for condensing a lot of meaning into a small amount of symbolism in a precise way. There is no ambiguity, but we generally find that precision difficult to “grok” as well as swallow. Much of natural language is a kind of padding that we use to build trust and set a scene. All of that is redacted in formal language, so it forces us to forego the parroting of common phrases that we use as a crutch for working out expressions. We have to think in a quite different way.
It takes some effort to reduce our natural free expression into disciplined formal language descriptions. Declaration is hard for us, because we think of it as a process that’s based a lot on habit. Learning to read and write formal languages is like learning any brand new language. It might have some of the same words, but its meaning is completely different. The two forms of expression have very different approaches to compression of information. They are actually two different languages.
Problem-solving and writer’s block
When we get stuck solving problems, it’s often because we try to formulate new ideas directly in a language we are not familiar with. It’s like writer’s block. That’s why we need to paraphrase information to bring it meaning–to say it in our own words. It’s why we get impatient with others for not speaking simple language (it’s simple in their language). Because there is no common language, not even for those who grow up in the same place–there’s private language and shared phrases.
As a student, I would copy lectures in the language of the lecturer, then at home I would rewrite them in my own words every evening (text, commentary, and equations). Later, before the exam, I would rewrite them again in the new language I had after more experience so that I would know how to say what I wanted to say. An AI chatbot can speak instead of us, but it can’t speak from us.
Our fluent speech has the remarkable quality of helping us to reason. Just by throwing words about what we know “out there” in a partial sentence, we somehow prime our reasoning brains to get into a proper location and process the thoughts. As we gradually meander around ideas, by talking or writing, our minds set the scene to navigate a story from start to finish. But, if we start trying to write down a path in a foreign language–whether it’s from another country, another field of study, another time, etc–then we don’t see far enough into the related contexts and meanings to find that path.
To make knowledge work, we need to solve the language problem. Like mathematics, programs, and logics, knowledge graphs force us to write in an unfamiliar disciplined language. To solve problems, we need to write things our own way first. We need to write more, or talk more. This is why brainstorming on a whiteboard works for social personalities, and psychiatrists charge fortunes for simply listening.
We should also remember that the nodes in a graph don't have to be simple entities like people or places, they can be whole paragraphs of natural language, if you only do it right.
We should also remember that the nodes in a graph don’t have to be simple entities like people or places, they can be whole paragraphs of natural language, if you only do it right.
Spatial awareness is not everyone’s strong suit, but we have to think about spatial structure too when designing a knowledge graph. That’s an added stress. If we are too worried about subordinating our own needs to those of the computer, we can’t think clearly without inhibition. We should be making computers work for us, instead of against us. The N4L note-taking language helps here, because — instead of thinking about links and geometry — we can simply think in near-natural language: how would you connect these language translations? N4L translates this for you.
chūshēng (pinyin-hanzi) 出生 (hanzi-english) born / to be born
“ (e.g.) nǐ shì zài nuówēi chūshēng de ma (ph) 你是在挪威出生的吗 (he) Were you born in Norway?If we want to express knowledge in a compact universal graphical form, the writer has to transform their intent into this specialized language from something natural, and the reader has to transform the compact representation back into their own language afterwards. Three languages. Not one.
Ours is not to reason why
Over the course of a few thousand years humanity has learned to produce hundreds perhaps thousands of fluent languages (and even teach some of them to machines). Just about any human can babble away inconsequentially, like a chatbot, in a natural language–about nothing in particular, just generating streams of grammatical yet sometimes aimless sentences. We call it “stream of consciousness” speech. It’s just like when we jam with a musical instrument or sketch in a notebook, for no definite reason. Like stretching our muscles. Music and drawing are also languages that we gravitate towards and use in concert with our different senses (no pun intended). We are language machines.
Yet, during our journey, we used our babbling to develop one very precise technology in particular: logic. We came up with the idea of logic as a special form of disciplined storytelling . We call it reasoning and use it to explain things. It began with the Greeks, using natural language in small carefully constrained sentences.
All men are mortal.
Socrates is a man.
Therefore, Socrates is mortal.
Logical reasoning, like this, has a swift punchline. It is based on ordinary words–just not too many. It’s like poetry in that sense, yet its purpose is not to stimulate our emotional response, but to settle a question. The more words we add, the more shaky the whole thing becomes.
We have developed specialized mathematical languages for reasoning, and computer programming languages too. They are highly mechanical–though we say algebraic in maths. The result is that logic has been elevated to the highest levels of honour, the epitome of human achievement, the acme of rationality. We have come to trust in logic like nothing else. We even believe that something written in logic can’t be wrong. In a weak sense, logic is the basis of digital technology and we are all expected to know it and believe in it.
Science Fiction writers once portrayed machines as perfect and flawless and humans as imperfect and flawed, because for them logic is natural. But we are not always good at logical thinking. We make mistakes and we communicate in ways that do not follow any rigid patterns of logic. We self-correct quickly instead of avoiding making mistakes. Nonetheless, today, perhaps a majority of people believe that logic is our greatest achievement in reasoning because it allows us to avoid mistakes before they occur. So much so that we have come to muddle the distinct meanings of rational, logical, smart, intelligent, etc together in common speech and in our minds (as mentioned, this is as much a feature as a bug). Many mathematicians and computer scientists believe that logic is fundamentally the basis of reasoning. I believe that storytelling is fundamental and that logic is just a special case of that.
Logic, along with other parts of mathematics from whence they came, can be perfect only in the sense that it is extremely simplistic. If you make something simple, like a rigid machine, it’s easy to decide whether it’s right or wrong, working or broken etc. Gödel showed that logics cannot be completely perfect, even though they can work very reliably. Over the history of mathematical reasoning, we have had to expand our ideas about numbers many times to try to repair that picture of perfection. But actually, we shouldn’t stress too much about it. If ordinary language can tell a good story, why do we need logic?
Declaration of logic
Logic, then, is just one form of storytelling using a language that we don’t find easy to speak. So why do we need it so much? Perhaps because it seeks to be an impartial arbiter. Humans might tell a dozen different stories, but surely there is just one version that is actually true. At least, one version ought to be enough to make it clear. But today we know that there are statements and conditions that cannot be described precisely with a unique truth. Some things are undecidable, others are too complex. This makes the question of what the point of an artificial information system is highly non-trivial.
Even if we could decide, getting us to explain exactly what we are asking is hard. People find it easier to write a hundred lines of procedural computer code than write a single declarative language statement in SQL. When there are more rules and constraints, as in writing songs or poetry, it is just harder to think about–we need system 2 at every step, no freeriding on system 1. It should rhyme and have the right length, not be too long, not be too short.
It’s probably why many of us find mathematics difficult. It’s not just about adding numbers or calculating arithmetic. We find it difficult to be precise in our concepts and concise in our expression. We find simplicity difficult. We find constraints difficult. It’s much easier for us to swerve at an idea, to hint at an idea and build a picture in a roundabout trajectory towards the truth, and let others fill in the details, than to hit the target with laser-guided precision.
Today’s Large Language Models have struck a nerve over our instinctive aversion to logic, because they are not logical though they are clearly rational–so we like them better than logical languages. Large Language Models generate stories statistically, based on patterns found in human writing. Probably that isn’t very different from how we generate streams of consciousness in our brains, but whereas we have meta-processes that are questioning and self-correcting on several levels, artificial LLMs don’t. This has left us confused because their answers “feel right” just as it feels right when a human babbles away. They hack our instincts about trust evaluation. If it quacks like a human, it must be as good as a human. But there is nothing logical or obviously correct about streams of natural language.
Knowledge representation
Thirty years late, Knowledge Graphs have started to gain ground. These were developed (for computers, at least) in the 1990s as outgrowths of library indexing systems and classification phyla of indexing in the World Wide Web. Topic Maps and the Resource Description Framework (RDF) are the best known examples. More recently, graph databases have attempted to generalize this specialization to improve the technologies. The result is quite underwhelming, because (as usual) technical people put more effort into the development than into the ideas.
There are two kinds, to be honest, but we don’t even talk about that. There are users, like financial institutions with very large but simple graph models of a single process: money transactions, used for fraud detection, social networks, etc. They could use any kind of database, but it has a natural appeal as a graph. But then, there are semantic graphs. Semantic graphs are not trying to describe many cases of teh same thing, they are trying to describe inhomogeneous collections of different things.
But wait, couldn’t we do both–and more–at the same time?
If you search for a typical knowledge graph, you’ll find small fragments of diagram with examples like these:
- Living room (has) west wall
- Mark (has phone number) 12345
- Mark (is a) person
- Mark (has job) professional nobody
These are trivial relationships that could easily be stored in any kind of database. They are just using a picture to represent a simple schemaless datastore, i.e. to remove the constraint of needing to have a fixed tabular schema from modelling, which may be unhelpful.
One quickly needs to deal with different kinds of relationships.
- Mark (is a) horse
- Mark (is a son of a) ?
These are still obsessively trying to describe what things are, rather than what actually happens. The standard answer to this is to invent a second problem to patch the first: technical ontologies.
We are quite good at lists and branching trees. We can sketch lines easily enough and we are good at dividing things into parts. This became the fashion in the 19th century when Carl Linnaeus the Swedish biologist applied taxonomy to species. Alas, taxonomies were quickly found to be fundamentally flawed as systems of unique classification: they are just what we would call a particular spanning tree for a graph–not unique, most often clumsy and expensive to maintain. As a workaround for information classification, taxonomy was later extended to produce technical ontology, as a kind of taxonomy over specialised language use, fused with some ideas from logic to give a superficial layer of rational truth. Philosophers were overjoyed that there was finally some potential use for their abstract notion of ontology, but alas mathematicians were the ones to develop these in the form of first order and modal logics.
- Trying to make hierarchies and taxonomies
- Trying to make ontologies to paper over the cracks
- Trying to fashion statements that express complex ideas.
All of these skills ask us to divide things into subgroups rather than lumping things together into approximations. Each step is a test of the author’s skill and judgement. No wonder it makes us uncomfortable. We view knowledge representation as if tidying a drawer, rather than connecting a world.
The “is a” relation is the most overhyped and poorly understood mistake in computer science.
We might think we are good at naming things, but we‘d be wrong. We humans love to think that we have the right answer about how the world is, when in fact we would be better off trying to describe what it does. The “is a” relation is the most overhyped and poorly understood mistake in computer science. You say tomayto, I say tomahto. They are not different things.
As the Chinese say, things may naturally fall into groups, but humans divide themselves into groups. We are obsessively tribal and overly concerned with proper identity and with pointing righteous fingers. What makes a group is all a bit ad hoc and individual, so how can we even agree about what concepts are? It is by smudging and approximating ideas, as well as likening dissimilar things by metaphor that concepts and languages evolve over time. These very “flaws” in our ability to be precise are the key to our intelligence–and this is how natural language works. Why not use it as a guide to formalization, by looking for the underlying commonalities? This is all well known, but something is missing when we come to try to put these ideas to use in technology.
Technologists jump straight for a logical solution to the problem. Ontologies, they say, enable reasoning over the data. For example, if you know that “Person A is a parent of Person B” and “Person B is a child of Person C,” you can infer that Person A is an ancestor of Person C. This is a mind numbingly obvious example of renaming and finger pointing. It takes a couple of “is a” relationships and replaces them with yet another “is a”. If we can’t surpass this obsession with identity we’ll never go beyond using knowledge graphs for anything but consulting hours. This ontological rule is trivial to break. Like all logic, it’s either painfully obvious or so simplistic that it tells us nothing.
This is a model of things and their attributes. But the world is not just things and attributes: it consists mainly of events, things, and concepts, all of which play a role in describing our world. If we get stuck on “things” or “nouns”, we are missing more than half of it.
Trying to force logic into language
A simplistic idea arose some years ago that graphs basically decompose the world into nouns and verbs, which are part of a model for classifying natural language. Formal languages don’t have verbs and nouns. They have functions and operators, states and values, etc. Only a small number of these behave like speech elements.
We fall back into natural language to try to explain something difficult. You can see this everywhere. This morning, I went to look up a Chinese character on Google translate. It can be a noun, a verb, an adverb, a general connective particle etc. However, when I searched, Google told me only the nouns, perhaps assuming that I too was obsessed with these. Perhaps because of this attraction to associating nodes and links as nouns and verbs, there’s a brutal lack of conceptualization around what we want to do with the information we are trying to represent. Instead of worrying about what everything is, try to understand what we want to do with the knowledge.
Why are we so bad at graphs? Because we tend to fall back into natural language mode of expression when we need to formulate things symbolically. That extra level of abstraction is what trips up most attempts. The ontology plaster doesn’t help, because it too is usually based on a linguistic understanding rather than a symbolic one rooted in process.
The “is a” relationship is the most oversold blunder in data modelling. It’s not what things are, it’s what they do that matters. You aren’t what you eat.
Consider this excerpt of Alice in Wonderland. It describes a fairly ordinary description about the world in a book. Could you turn it into a knowledge graph?
Alice did not feel encouraged to ask any more questions about it, so she turned to the Mock Turtle, and said, “What else had you to learn?”
“Well, there was Mystery,” the Mock Turtle replied, counting off the subjects on his flappers, — “Mystery, ancient and modern, with Seaography: then Drawling — the Drawling-master was an old conger-eel, that used to come once a week: he taught us Drawling, Stretching, and Fainting in Coils.”
Could you reduce this into pairs of nodes with an arrow between them? Try it for yourself, and see where it leads you. There will be those who might say, that’s cheating, it’s not proper knowledge! Those people would be part of the problem. Because, if we have to answer “you can’t get there from here”, you’ve already failed the test.
No one ever got fired for proposing …
Today, countless consulting companies have turned the flawed knowledge graph methods into a business model. Companies engage them to create knowledge maps and ontologies that are flawed. If they reach a conclusion, the results often quickly fall into disuse because they fail to live up to expectations. You might feel proud having built a model of a cake in Lego, but when it’s finished, you can’t actually eat it. So it is with off the shelf technology. We can’t blame consultants — they are just exploiting the standards that corporate interests have imposed onto the industry. Then open source blindly copies the corporate machine. These are the same people who had execs sending emails as word attachments. Still, we have to use tools properly, not just to maximise someone's profit and brand lock-in. With AI that's happening even faster.
Most people find it easy to hum a tune, but very difficult to describe a musical theme or phrase in terms of its basic components, transitions, and identifying features. We are better at doing language than analysing it or understanding how it works. But we can do both. Language is our natural tool for reasoning and reasoning is one of those cognitive developments that has grown from navigational necessity.
Why are we bad at knowledge graphs? Because we think in natural language when trying to do formal language, and lack a method for going from one to the other.
Why are we bad at knowledge graphs? Because we think in natural language when trying to do formal language, and lack a method for going from one to the other.
They key is to think in terms of space and time. We are able to picture not only physical space but also abstract spaces, and use metaphors to picture by analogy in order to find our way out of trouble. This is why the LLMs are so seductive. There’s no longer a need to learn a new formal language to make progress. But in jumping onto that trend, we miss an important point: why we invented logic in the first place. Precision. Clarity. Disambiguation. Separation in all forms of space and time.
The Semantic Spacetime (and latterly the SSTorytime project) was started by me to try to clean up some of this mess, to find a way out of the twisty maze. Whether it will succeed will depend as much on whether people engage with it or stay with old failing methods. You see, it’s not really about the technologies. It’s about how to use them well. We are too easily seduced by the idea of standards, and all too quick to standardize incompetence. If this is to be the age of knowledge work, we’d better actually know something about how to know something.
