Shapes from Examples: Foundations of Shape Learning in Recursive SHACL

Bente Gortworst, Cem Okulmus, Magdalena Ortiz, Anni-Yasmin Turhan
7/30/2026
cs.AIcs.LO

No confident code implementation found for this paper.

Abstract

SHACL shapes enable data graph validation, making automatic shape learning essential for knowledge graph applications. We investigate the well-known fitting approach to this task: given sets P and N of positive and negative example nodes from an input graph, compute a shape expression C, possibly using shape names defined in a recursive shape catalogue, that validates at every node in P and none in N.

Show full abstract

We focus on the case where C is written in a core fragment of SHACL corresponding to the Description Logic ELI. For the catalogue, we consider the well-founded, stable, and supported semantics. We address fitting existence and most specific fitting computation, establish tight exponential-time upper bounds for both problems, and obtain polynomial bounds for relevant special cases.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{gortworst2026shapes,
  title  = {Shapes from Examples: Foundations of Shape Learning in Recursive SHACL},
  author = {Bente Gortworst and Cem Okulmus and Magdalena Ortiz and Anni-Yasmin Turhan},
  year   = {2026},
  eprint = {2607.27934},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2607.27934v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2607.27934.svg)](https://codeofpaper.com/paper/2607.27934)

Discussion