Shapes from Examples: Foundations of Shape Learning in Recursive SHACL
This paper investigates the problem of learning recursive SHACL shapes in the Description Logic ELI fragment from positive and negative node examples, establishing tight exponential-time upper bounds for fitting existence and most specific fitting computation while identifying polynomial-time solutions for special cases.
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
Imagine you are walking through a massive, chaotic library where the books have no titles, no authors, and no shelves. They are just piled up in a giant heap, connected by invisible strings that show how one story relates to another. This is what a "knowledge graph" looks like to a computer: a giant web of facts about the world, from people and places to products and orders. Unlike a traditional library with rigid rules about where everything goes, this digital library is messy and flexible. But that flexibility creates a problem: how do you know if the information is actually correct? How do you spot a story that doesn't fit the pattern?
To fix this, computer scientists invented a system called SHACL (Shapes Constraint Language). Think of SHACL as a set of "molds" or "stencils." If you have a mold shaped like a "Valid Order," you can press it over your data. If the data fits perfectly inside the mold, it's good. If it spills over or has gaps, it's broken. But here's the tricky part: in a messy library, nobody knows what the perfect molds should look like. You can't just guess them. You need a way to learn what a "good" shape looks like by looking at examples of things that are good and things that aren't. This is the challenge of "shape learning": teaching a computer to draw the right stencil based on a few examples of success and failure.
This paper, titled "Shapes from Examples: Foundations of Shape Learning in Recursive SHACL," dives deep into the math behind teaching computers to draw these stencils. The authors, researchers from TU Wien and Paderborn University, tackle a specific and difficult version of this problem. They focus on a scenario where the rules can be recursive—meaning a rule can refer to itself, like a story that loops back on its own ending. They ask: If I show you a list of "good" examples (positive) and "bad" examples (negative), can you write a rule that catches all the good ones and none of the bad ones? And if there are many possible rules, can you find the best one—the most specific rule that describes the pattern without being too vague?
The researchers prove that for a specific, powerful type of rule (which they call ELI∗, a fancy way of saying rules that can describe paths of any length, even loops), this task is computationally possible but very hard. They show that finding any rule that fits the examples is a problem that takes a massive amount of computing power to solve, specifically a complexity class known as "ExpTime-complete." This means that as your data grows, the time it takes to find the answer grows exponentially, like a snowball rolling down a hill getting bigger and bigger. However, they don't just say "it's hard"; they provide a concrete method to do it. They designed an algorithm that can decide if a perfect rule exists and, if it does, actually build it.
One of the most exciting findings is about speed. While the general problem is slow, the authors discovered a "sweet spot." If the number of "good" examples you give the computer is small and fixed (like just a handful of examples), the problem suddenly becomes much easier, solvable in "polynomial time." This is a huge deal because it means that in many practical situations where you only have a few examples to start with, a computer could learn these complex, looping rules very quickly. They also explored different ways the computer could interpret the rules (called semantics) and found their methods work reliably across all the major ways these rules are currently understood.
In short, this paper lays the mathematical foundation for a new kind of AI that can look at a messy web of data, spot the patterns in a few examples, and automatically generate the strict rules needed to keep that data clean. It proves that while the math is tough, it's not impossible, and it gives us the tools to build systems that can learn the "shape" of truth from a few scattered examples.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.