Can LLMs Faithfully Solve Ontology Engineering Tasks? A Mechanistic Interpretability Study
Organizations: King’s College London, United Kingdom · Technical University of Munich, Germany
Abstract
Ontological knowledge underpins large language model (LLM) performance on knowledge-intensive tasks. However, existing evaluations of LLMs' ontological understanding largely rely on behavioral correctness, leaving the underlying mechanisms unexplained. Existing mechanistic interpretability work has largely focused on instance-level factual knowledge, leaving ontological knowledge under-explored. To bridge this gap, we introduce MIOE, a causal-abstraction benchmark that evaluates interchange interventions for two ontology engineering tasks: entity typing and subsumption prediction. MIOE tests whether learned internal intervention targets can change an ontology-level target answer while preserving class-specific auxiliary information. Across Qwen3-8B and Qwen3-4B, we evaluate SAE-, DBM-, and DAS-based methods, including multi-task and multi-layer variants. Distributed subspace methods give the strongest results and generalize across prompt settings, but the induced changes remain only partially separated from auxiliary class-specific information. Multi-task objectives and contiguous layer-window interventions improve this balance, while class-level analyses reveal substantial variation across ontology classes. These results suggest that ontological predictions are mechanistically accessible in LLMs, although current methods do not yet isolate a cleanly disentangled causal mechanism for ontological knowledge.
Figures & tables
| Axiom Type | # Classes | # Subjects | # Attributes (avg./class) | Avg. # Attribute Values (per subj. / per attr.) | # Prompt Templates (avg./class) |
| instance of | 54 | 1,099 | 376 (7.0) | 12.0 / 2.0 | 4,288 (79.4) |
| subclass of | 39 | 1,113 | 160 (4.1) | 51.8 / 17.1 | 2,095 (53.7) |
| Method | instance of | subclass of | ||||||||||||||
| Dimension | Layer | Entity | Context | Dimension | Layer | Entity | Context | |||||||||
| C | I | D | C | I | D | C | I | D | C | I | D | |||||
| SAE | 8192 | 13 | 0.472 | 0.352 | 0.412 | 0.399 | 0.344 | 0.371 | 16384 | 12 | 0.584 | 0.210 | 0.397 | 0.624 | 0.233 | 0.429 |
| DBM | 4096 | 10 | 0.441 | 0.409 | 0.425 | 0.385 | 0.407 | 0.396 | 4096 | 10 | 0.528 | 0.334 | 0.431 | 0.526 | 0.359 | 0.443 |
| MDBM | 4096 | 10 | 0.418 | 0.469 | 0.443 | 0.344 | 0.472 | 0.408 | 4096 | 13 | 0.491 | 0.389 | 0.440 | 0.490 | 0.409 | 0.450 |
| DAS | 1024 | 17 | 0.589 | 0.579 | 0.584 | 0.582 | 0.512 | 0.547 | 1024 | 22 | 0.509 | 0.483 | 0.496 | 0.625 | 0.445 | 0.535 |
| Method | Window | Cause | Iso | Disentangle ( ) | |
| instance of | |||||
| DAS | 23–24 | 0.560 | 0.726 | 0.643 (+0.059) | |
| MDAS | 22–23 | 0.529 | 0.730 | 0.629 (+0.038) | |
| DAS | 24–27 | 0.548 | 0.772 | 0.660 (+0.077) | |
| MDAS | 22–25 | 0.590 | 0.741 | 0.666 (+0.074) | |
| DAS | 24–27 | 0.577 | 0.756 | 0.667 ( +0.102 ) | |
Appendix figures & tables23 assets
Supplementary material from the paper’s appendix.
Appendix
| Setting | Qwen3-4B | Qwen3-8B |
| Layers / hidden size | 36 / 2,560 | 36 / 4,096 |
| Prompt / answer length | 48 / at most 3 tokens | 48 / at most 3 tokens |
| Site / position | block output / last subject subtoken | block output / last subject subtoken |
| Supervised train / eval batch | 128 / 128 | 128 / 128 |
| Epochs | 6 | 6 |
| Random seed | 42 | 42 |
| instance of | subclass of | |||||||
| Model | Target Micro | Target Macro | Attr. Micro | Attr. Macro | Target Micro | Target Macro | Attr. Micro | Attr. Macro |
| Qwen3-4B | 92.4 | 92.1 | 59.7 | 58.7 | 89.2 | 87.4 | 69.2 | 68.8 |
| Qwen3-8B | 94.7 | 94.3 | 64.9 | 63.8 | 93.0 | 91.8 | 69.1 | 68.3 |
| Model | Role | Cause | Iso | Disent. | |
| instance of | |||||
| Qwen3-8B | Base | 0.539 | 0.674 | 0.606 | +0.135 |
| Qwen3-8B | Source | 0.507 | 0.674 | 0.590 | +0.167 |
| Qwen3-4B | Base | 0.521 | 0.613 | 0.567 | +0.091 |
| Qwen3-4B | Source | 0.493 | 0.612 | 0.552 | +0.119 |
| subclass of | |||||
| Axiom | Base cross-model | Source cross-model | 8B base–source | 4B base–source |
| instance of | 0.831 | 0.810 | 0.273 | 0.267 |
| subclass of | 0.752 | 0.671 | -0.082 | 0.059 |
| Axiom | Role | Recurring high-scoring classes |
| instance of | Base | airport; city; country; currency; science award; software; stock exchange |
| instance of | Source | airport; city; country; currency; data set; disease; type of sport; university |
| subclass of | Base | animal organ; flower; measuring instrument; medical device; organization; theory; tree |
| subclass of | Source | activity; creative work; emotion; fish; flower; music |
| Axiom | Model | Mean | Median [IQR] | |||
| instance of | Qwen3-8B | 121 | 0.166 | 0.132 [0.076, 0.256] | 29.8% | 5.0% |
| Qwen3-4B | 141 | 0.184 | 0.158 [0.069, 0.253] | 39.0% | 7.1% | |
| subclass of | Qwen3-8B | 91 | 0.204 | 0.179 [0.090, 0.287] | 41.8% | 12.1% |
| Qwen3-4B | 52 | 0.185 | 0.152 [0.075, 0.291] | 36.5% | 7.7% |
| Axiom | Method | Dimension | Layer | Entity | Context | ||||
| Cause | Iso | Disentangle | Cause | Iso | Disentangle | ||||
| instance of | SAE | 5120 | 14 | 0.408 | 0.375 | 0.391 | 0.350 | 0.369 | 0.359 |
| DBM | 2560 | 10 | 0.458 | 0.354 | 0.406 | 0.400 | 0.350 | 0.375 | |
| MDBM | 2560 | 10 | 0.404 | 0.436 | 0.420 | 0.340 | 0.430 | 0.385 | |
| DAS | 1024 | 22 | 0.516 | 0.537 | 0.527 | 0.489 | 0.509 | 0.499 | |
| MDAS | 2048 | 16 | 0.520 | 0.592 | 0.556 | 0.471 | 0.639 | 0.555 | |
| Axiom | Model | Method | Dim. | Layer | Cause | Iso | Disentangle |
| instance of | Qwen3-4B | SAE | 5120 | 10 | 0.458 | 0.292 | 0.375 |
| DBM | 2560 | 9 | 0.463 | 0.323 | 0.393 | ||
| MDBM | 2560 | 10 | 0.404 | 0.436 | 0.420 | ||
| DAS | 2048 | 14 | 0.615 | 0.346 | 0.481 | ||
| MDAS | 2048 | 13 | 0.524 | 0.559 | 0.541 | ||
| Qwen3-8B | SAE | 16384 | 13 | 0.472 | 0.350 | 0.411 |
| Class | # Entity | Attributes |
|---|---|---|
| academic conference | 30 | inception, main subject, event interval, organizer |
| academic journal | 27 | main subject, country of origin, publisher, ISSN, indexed in bibliographic review, inception, editor |
| airport | 15 | country, located in the administrative territorial entity, date of official opening, elevation above sea level, IATA airport code, ICAO airport code, airline hub |
| album | 15 | form of creative work, genre, performer, publication date, record label, producer, number of parts of this work, tracklist |
| algorithm | 20 | inception, named after, discoverer or inventor, computes solution to, best-case time complexity, average time complexity, best-case space complexity, worst-case time complexity, worst-case space complexity, average space complexity |
| animal | 20 | parent taxon, taxon rank, color, endemic to, main food source, gestation period, diel cycle |
| Class | # Concept | Attributes |
| academic discipline | 17 | field of work, has subclasses, is the study of, part of |
| activity | 65 | has subclasses, location, participant |
| algorithm | 34 | has subclasses, has use |
| animal organ | 17 | body system, function, has part(s) |
| astronomical object | 26 | has part(s), has subclasses, parent astronomical body |
| award | 17 | conferred by, field of work, has subclasses |
Mechanistic Interpretability
Mechanistic interpretability studies how neural networks implement behaviors through internal features, circuits, and causal information flow.
See all 393 papers