Approximating Probabilistic Inference in Statistical EL with Knowledge Graph Embeddings

Yuqicheng Zhu, Nico Potyka, Bo Xiong, Trung-Kien Tran, Mojtaba Nayyeri, Evgeny Kharlamov, Steffen Staab

TL;DR

Exact probabilistic reasoning over hierarchical data structures is notoriously difficult, often suffering from exponential computational complexity. This paper introduces a novel approach that approximates inference in Statistical $\mathcal{EL}$ ($\mathcal{SEL}$) by mapping logical concepts to geometric box embeddings. By transforming intractable logical deductions into efficient volume-ratio calculations, the authors achieve linear-time inference with strong theoretical soundness guarantees.

What Problem Does This Paper Address?

Data in fields like medicine, public policy, and manufacturing is often organized hierarchically, yet it requires joint statistical reasoning. A classic trap when analyzing such data is Simpson’s Paradox, where aggregate statistics point to one conclusion, but every sub-group shows the exact opposite (e.g., the famous 1973 UC Berkeley admissions data showing apparent gender bias in aggregate, which reversed when broken down by department).

To safely reason through these scenarios, logicians developed Statistical $\mathcal{EL}$ ($\mathcal{SEL}$), a probabilistic extension of description logics that handles conditional statistical statements like "between 20% and 25% of all applicants applied to Department A." Unfortunately, exact reasoning in $\mathcal{SEL}$ is EXPTIME-hard. The only exact theoretical approach requires building exponentially large linear programs, meaning no practical tools existed to solve it. This paper tackles this computational bottleneck.

Methods

The authors bridge the gap between logic and scalability using Knowledge Graph Embeddings (KGE). Specifically, they extend BoxEL, a geometric embedding framework.

  1. Concept Representation: Instead of points, concepts (like Applicant or Admitted) are mapped to axis-aligned boxes in an $n$-dimensional vector space.
  2. Probability as Volume: The statistical proportion of a concept corresponds to the geometric volume of its box. Conditional probabilities are calculated as the ratio of overlapping volumes. For instance, $P(\text{Admitted} \mid \text{DeptA})$ is computed as: $$\frac{\text{Vol}(\text{Box}(\text{Admitted}) \cap \text{Box}(\text{DeptA}))}{\text{Vol}(\text{Box}(\text{DeptA}))}$$
Figure 1: Two possible 2D box embeddings of the concepts Applicant (red), Admitted (blue) and DeptA (green) that maintain proportions stated in the knowledge base.
  1. Loss Function & Training: The authors introduce new loss terms to penalize box configurations that violate the lower and upper bounds of the probabilistic axioms. They minimize this loss using gradient descent with a softplus volume approximation to handle non-overlapping boxes.
  2. Interval Inference via Ensembles: Because a single embedding yields a single point estimate, the authors train an ensemble of $N$ embeddings using different random seeds. Taking the minimum and maximum point estimates across the ensemble approximates the true lower and upper probability bounds.

The authors prove that if the embedding loss reaches zero, the geometric model is guaranteed to be sound. Crucially, inference runs in linear time $O((c+d) \cdot n)$, where $c$ and $d$ are the sizes of the queried concepts and $n$ is the embedding dimension.

Datasets

Because no standard $\mathcal{SEL}$ ontologies existed, the authors constructed three benchmark datasets by extracting statistical proportions from YAGO3, a high-quality real-world knowledge base:

  • Person: 135 concepts, 6 roles, 325,600 T-Box axioms.
  • Country: 30 concepts, 1 role, 26,974 T-Box axioms.
  • Hybrid: 12 concepts, 18 roles, 7,492 T-Box axioms.

Axioms were split non-randomly into a 70% learning set and a 30% query set to evaluate inference performance.

Key Insights and Ideas

  • Logic as Continuous Geometry: Bypassing discrete, combinatorial type-elimination in favor of continuous geometric optimization avoids the exponential explosion typical of exact reasoners.
  • Predictable Error Propagation: The authors demonstrate an empirical "aha!" moment: the inference error scales proportionally with the embedding error. This means the training loss itself serves as a reliable proxy for how much you can trust the inferred probabilities.
Figure 3: Relationship between embedding and inference error.
  • Ensembles for Bounds: Using multiple randomized embedding initializations effectively "probes" the boundaries of the solution space, allowing point-estimating KGs to bound full probability intervals.
Figure 2: Approximation gap for approximation based on 10, 20, 40 and 60 embeddings.

Key Results

The proposed method, BoxSEL, was compared against simple baselines (Fixed, Random, and Kernel Density Estimation estimators) due to the lack of existing $\mathcal{SEL}$ implementations:

  • Soundness Accuracy (SA): BoxSEL achieved between 89.3% and 95.6% accuracy across the datasets, meaning the estimated intervals were almost always valid subsets of the true intervals.
  • Soundness Error (SE): The extent to which BoxSEL overestimated the true interval bounds was remarkably low, hovering between 0.4% and 2.0%.
  • Speed: While exact inference is practically impossible for large datasets, BoxSEL performed query inference in under a millisecond (0.09 to 0.41 ms per query). Training an embedding epoch took less than two minutes even on the largest Person dataset.

Limitations and Future Work

A notable limitation is that the current framework requires "safe" ontologies. It cannot handle probabilistic statements relative to the universal top concept ($\top$), such as $(D \mid \top)[l, u]$, because the top concept represents an infinite space, making finite box volume calculations invalid.

For future work, the authors suggest automating the pipeline further by using rule-mining methods to construct $\mathcal{SEL}$ ontologies directly from arbitrary, noisy knowledge graphs, using rule confidence scores as the base probabilities.

Summary updated

BibTeX
@misc{zhu2024approximating,
  author = {Yuqicheng Zhu and Nico Potyka and Bo Xiong and Trung-Kien Tran and Mojtaba Nayyeri and Evgeny Kharlamov and Steffen Staab},
  title = {{Approximating Probabilistic Inference in Statistical EL with Knowledge Graph Embeddings}},
  year = {2024},
  eprint = {2407.11821},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2407.11821},
}
Figure