← Latest papers
🤖 machine learning

Hierarchy-Aware Semantic Losses for Knowledge Graph Link Prediction

This paper demonstrates that incorporating ontology-derived class hierarchies into knowledge graph link prediction via hierarchy-aware semantic losses significantly outperforms both standard models and those that encode hierarchies as additional graph edges, achieving notable improvements in mean reciprocal rank across AIFB, CoDEx, and BioKG datasets.

Original authors: Filip Kronström, Ross D. King

Published 2026-08-25
📖 7 min read🧠 Deep dive

Original authors: Filip Kronström, Ross D. King

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

In the vast digital landscape of modern science, information is rarely stored in simple lists or flat files. Instead, researchers and computers increasingly rely on knowledge graphs, which are like massive, interconnected webs of facts. Imagine a web where every node is a thing—a person, a drug, a disease, a protein—and every line connecting them is a relationship, such as "treats" or "causes." These structures allow machines to navigate complex networks of data, helping to predict missing links, like figuring out which new drug might work for a specific disease. However, these webs often sit alongside another layer of organization: a family tree of concepts. Just as a biological species belongs to a genus, which belongs to a family, digital concepts are often arranged in hierarchies where one category is a specific type of a broader one. This background structure holds valuable clues about how things relate, but for a long time, the computer programs designed to navigate these webs have largely ignored these family trees, focusing only on the direct connections they can see.

A team of researchers at Chalmers University of Technology and the University of Gothenburg, working alongside a colleague from the University of Cambridge, set out to change that. They asked a straightforward question: if we teach these computer programs to respect the family trees of concepts while they learn, will they become better at predicting missing connections? The researchers tested a new approach on three very different sets of data: a collection of academic and organizational facts, a massive web of general knowledge drawn from Wikipedia, and a complex biological network containing drugs, diseases, and proteins. They compared their new method against the standard way of doing things and against an older technique that tried to force the family tree into the web by adding extra lines to the map.

The results were clear and consistent. By using a special mathematical penalty that gently nudged the computer's internal understanding to match the known family trees, the researchers significantly improved the system's ability to find missing links. This new method, which they call a "semantic loss," worked better than simply adding the family tree relationships as extra connections in the graph. In fact, on the biological dataset, the improvement was substantial, boosting the system's accuracy by fifteen percent compared to the standard approach. On the other datasets, the gains were also positive, ranging from two to eight percent. Perhaps most importantly, this smarter way of learning achieved these results while using fewer computer resources than the method that added extra lines to the map.

The researchers found that the success of this approach depended heavily on the quality and depth of the family tree information available. The biological dataset, which contained rich, detailed hierarchies for drugs, diseases, and proteins, saw the most dramatic improvement. The general knowledge dataset, which had a shallower and less complete family tree, showed more modest gains. This suggests that the technique is not a magic bullet that works equally well everywhere, but rather a powerful tool that shines when there is deep, structured knowledge to guide the learning process. The study demonstrates that when computers are encouraged to align their internal maps with the logical structures humans have already built, they become much more effective at navigating the complex world of data.

To understand how this works, one must look at how these systems learn. Traditionally, a computer learns to predict missing links by studying the patterns of connections it already sees. It creates a simplified, numerical representation of every entity in the network, placing them in a virtual space where similar things end up close together. The problem is that without guidance, the computer might place a specific type of cancer far away from the general category of "disease," even though we know it belongs there. The new method introduces a rule that says, "If you think A is a type of B, your internal map must show A inside the space of B." It does this by checking the computer's internal map at every step of learning and applying a small correction if the hierarchy is violated. This correction is not a hard rule that forces the computer to obey, but a gentle pressure that encourages it to find a solution that satisfies both the observed connections and the logical family trees.

The team tested this on three distinct datasets to ensure their findings were robust. The first, AIFB, is a smaller collection of facts about people, projects, and organizations. The second, CoDEx, is a huge, multi-domain graph drawn from Wikipedia, covering everything from entertainment to science. The third, BioKG, is a specialized biological network linking functions, diseases, side effects, proteins, and drugs. Each of these datasets had its own unique family tree structure, ranging from simple lists to deep, complex hierarchies. The researchers compared their new method against two other approaches: a standard model that ignored the family trees entirely, and a model that tried to incorporate the trees by adding them as extra connections in the graph.

The results showed that the new method outperformed both competitors across the board. On the biological dataset, the new approach improved the accuracy of link predictions by fifteen percent compared to the standard model. On the academic dataset, the improvement was nearly eight percent, and on the general knowledge dataset, it was about two and a half percent. Crucially, the new method also beat the approach that added extra connections. In fact, adding extra connections sometimes made the performance worse, particularly on the biological dataset, likely because it cluttered the graph with too much information that didn't directly help with the specific task of finding missing links. The new method, by contrast, kept the graph clean and used the family tree information as a guiding principle rather than a physical addition.

The researchers also looked at how the computer's internal understanding changed over time. They tracked the "loss," or the measure of how well the computer was respecting the family trees, as it learned. They found that this measure steadily decreased, meaning the computer was successfully learning to align its internal map with the logical hierarchies. However, the speed and extent of this improvement varied depending on the type of data. The biological categories, which had deep and detailed hierarchies, showed the most significant alignment. The side-effect categories, which were more complex and varied, showed more fluctuation. This indicates that the method is most effective when the underlying family trees are well-defined and consistent.

One of the most practical findings was that this smarter way of learning was also more efficient. The method that added extra connections to the graph required significantly more computer memory and processing power, especially on the large biological dataset. The new method, which used the family tree as a guiding rule rather than a physical addition, achieved better results with fewer resources. This efficiency is important because it means the technique can be scaled up to even larger and more complex networks without overwhelming the computer systems that run them.

The study concludes that incorporating logical hierarchies into the learning process is a powerful way to improve how machines understand complex data. It suggests that the best way to teach a computer about the structure of the world is not just to show it the connections, but to also remind it of the rules that govern those connections. By doing so, the computer builds a more accurate and reliable map of the data, capable of making better predictions about what is missing. This approach does not replace the need for the data itself, but it enhances the way the data is used, turning a simple web of facts into a structured, logical system that mirrors the way humans organize knowledge. The findings offer a clear path forward for building more intelligent systems in fields ranging from medicine to scientific research, where understanding the relationships between things is critical.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →