Source-linked AI summary
Sparse Autoencoders Are a Shared Coordinate System for Symbolic Matching
Xiaocong Yang, Xuanyu Meng, Yuji Zhang, Jiawei Han, ChengXiang Zhai
TL;DR
LLMs combine broad knowledge with concerns about interpretability and trustworthy reasoning, while human-built symbolic systems remain fragmented across domains. SAE-IDF matches symbols across systems using sparse autoencoder features weighted by rarity; across 12 tasks and six system types, it beats the same model’s dense state on every Gemma-2-9B task and all but one Llama-3.1-8B task.
Problem
Symbolic knowledge is spread across domain-specific systems with different schemas, while human-built symbolic systems are usually confined to one domain.
Source: §1 · p. 1Method
SAE-IDF encodes each symbol in its native context as a sparse autoencoder code, weights dimensions by rarity, and matches systems using cosine similarity.
Source: §1 · p. 2Results
Across 12 tasks on six kinds of symbolic system, SAE-IDF beats the same model’s dense hidden state on every Gemma-2-9B task and all but one Llama-3.1-8B task.
Source: §1 · p. 2Takeaways & Limitations
An LLM’s feature dictionary offers an interpretable common ground for aligning symbolic systems, a step toward a universal symbolic backbone.
Source: §7 · p. 8The method is limited by what the base model can read and the native context systems provide; it is at chance on SMILES, IUPAC names, and InChI.
Source: Limitations · p. 9
Abstract
from arXiv · showhide
Large language models (LLMs) hold broad knowledge in one set of weights, but lack interpretability and trustworthy reasoning, especially in high-stakes use cases. A neuro-symbolic model, with its interpretable architecture and System 2 reasoning capacity, is a promising alternative if built at the scale of LLMs; however, its symbolic backbone is usually constructed with human effort, so existing neuro-symbolic models are bottlenecked by the scope of the symbol component and usually domain-specific. A data-driven method could instead build a larger symbolic system by aligning and merging existing ones. We target its first, foundational step: matching units across these heterogeneous systems. Our method, SAE-IDF, encodes a symbol in its native context into a sparse code with a sparse autoencoder (SAE), re-weights each dimension by its rarity and matches across systems. On 12 tasks across 6 kinds of symbolic system, SAE-IDF outperforms the same LLM's dense baseline on all tasks with Gemma-2-9B and all but one with Llama-3.1-8B, by up to 45 points, consistently across SAE layers and configurations. SAE-IDF is also interpretable: every dimension of the sparse code has a human-readable meaning, so each match decomposes into named concepts (features). Our work paves the way to a universal symbolic backbone.
1 Introduction
LLMs offer broad knowledge but raise concerns about interpretability and trustworthy reasoning, while human-built symbolic systems remain costly and fragmented across domains. SAE-IDF uses sparse autoencoder features to match symbols across systems, outperforming dense baselines across nearly all evaluated tasks.
1 Introduction
- Human-expert construction constrains symbolic systems and neuro-symbolic models, leaving most confined to one domain.The paper frames this scalability gap against LLM knowledge acquired through self-supervised learning on enormous corpora.Source: §1 · p. 1
- Existing symbolic knowledge is scattered across domain-specific schemas, motivating symbolic matching as a first step toward a universal symbolic backbone.The same entity may be represented as TrainStation in one knowledge graph and RailwayStation in another.Source: §1 · p. 1
- Dense LLM states can favor shared directions and superficial linguistic similarity, while superposed concepts prevent dimensions from being rarity-weighted or interpreted individually.The introduction says post-hoc whitening trails SAE-IDF on most tasks.Source: §1 · p. 2
- SAEs express hidden states as sparse sums of interpretable features, creating a shared coordinate system in which ubiquitous directions can be identified and downweighted.Features include both shared and lexical information.Source: §1 · p. 2
- SAE-IDF encodes symbols in native context, weights sparse features by rarity, and ranks candidates by cosine similarity without requiring aligned pairs.Its contributions also include ablations, feature-level interpretability analysis, case studies, and split-and-merge tests.Source: §1 · p. 2
- Across 12 tasks on six kinds of symbolic system, SAE-IDF beats the same model’s dense hidden state on every Gemma-2-9B task and all but one Llama-3.1-8B task.It is the best training-free method on most tasks.Source: §1 · p. 2
2 SAE-IDF
SAE-IDF represents symbols using sparse autoencoder features extracted from their native contexts. It weights features by rarity and ranks candidate symbols using cosine similarity, whose contributions can be inspected feature by feature.
2 SAE-IDF
- A symbolic matching query ranks candidates from another system so its counterpart appears first.SAE-IDF encodes each symbol into a sparse vector before matching.Source: §2 · pp. 2–3
- For each symbol, the LLM reads native-context views with the symbol following the context, and the SAE receives residual-stream states at the target layer.Views can include class instances, ontology axioms, or sampled table-column values.Source: §2 · p. 3
- SAE-IDF uses states at the symbol’s token positions, SAE-encodes each kept token, and averages codes across tokens and then views.When the whole text is the symbol, every position is used.Source: §2 · p. 3
- A feature firing on every symbol receives zero weight, while features firing on few symbols are amplified.The weighting uses inverse document frequency over a reference collection of symbols.Source: §2 · p. 3
- Candidates are ranked by cosine similarity between weighted sparse vectors, and the default prediction is the top-ranked candidate.The cosine score decomposes over interpretable features, exposing each feature’s contribution to similarity.Source: §2 · p. 3
3 Experiments
The experiments evaluate SAE-IDF across six kinds of symbolic systems, two model families, and multiple baselines. SAE-IDF beats the same model’s dense hidden state on every Gemma-2-9B task and all but one Llama-3.1-8B row, with gains varying by notation similarity.
3.1 Datasets
- The benchmark spans six system kinds, including formal proofs, code, ontologies, knowledge graphs, and biomedical ontologies, using each benchmark’s protocol and metrics.PubChem molecule-notation tasks are reported in Appendix D because the model cannot read those notations.Source: §3.1 · p. 3
3.2 Setup and baselines
- The comparison uses native-context views, fixed SAE configurations for each model, and dense, post-hoc, string, and trained-retriever baselines.The trained retrievers are reference comparisons rather than like-for-like baselines because they are trained on paired data.Source: §3.2 · p. 4
3.3 Main results
- SAE-IDF beats Dense on every Gemma-2-9B task and 13 of 14 Llama-3.1-8B rows, with its largest gains on unlike formal notations.For Gemma-2-9B, the gain reaches +0.45 MRR on Lean 4 →Metamath; for Llama-3.1-8B, the exception is XLCoST MRR.Source: §3.3 · pp. 4–5
- The gain is small when notations resemble one another, but larger for Metamath, HOL Light, and MultiFarm, where surface strings are less alike.On XLCoST, shared identifiers make word TF-IDF strong and SAE-IDF’s gain over Dense is only +0.01.Source: §3.3 · p. 5
- Removing the first principal component helps dense representations on ontology and knowledge-graph terms, but not on code, formal statements, or tables.SAE-IDF remains ahead of Dense−PC1 on most tasks.Source: §3.3 · p. 5
- Without retrieval-objective training, SAE-IDF beats BGE-M3 on 10 of 15 rows and leads Qwen3-Embedding-8B on selected task groups.It trails Qwen3 on eight rows, mainly formal mathematics; the paper notes possible pretraining-data memorization as a caveat.Source: §3.3 · p. 5
4 Ablations and Analysis
Ablations show that SAE-IDF’s learned sparse features and rarity weighting both matter, and its gains persist across configurations. Feature analyses show how weighting shifts matches away from ubiquitous features toward task-relevant concepts, while revealing interpretable failure cases.
4.1 Rarity weighting and the coordinate system
- Without rarity weighting, the learned sparse basis trails Dense on 15 of 18 main-table comparisons; a random dictionary with idf stays below Dense on every task.Post-hoc dense fixes, including whitening and dense-coordinate idf, also trail SAE-IDF on most tasks.Source: §4.1 · pp. 5–6
4.2 Layer, width, sparsity, model size and model family
- Across 39 configurations, SAE-IDF beats Dense and Dense−PC1 on HOL Light and Metamath, and beats SAE-unweighted in all 78 runs.The gains persist across layers, widths, sparsities, model families, and sizes; on HOL Light MRR rises from 0.817 at 16k features to 0.935 at 1M.Source: §4.2 · p. 6
4.3 Feature-level analysis
- Ubiquitous features carry 56–91% of unweighted match cosine but only 0–6% after rarity weighting, while matches use different feature regimes across system types.Rare concept features usually dominate knowledge-graph and ontology matches; formal statements, programs, and table columns spread cosine across 10–21 features.Source: Figure 3 · p. 6, §4.3 · p. 7
- For the Chinese MultiFarm fee term, the gold match ranks 13th densely; without weighting, shared notation contributes 53% and ranks 40, while rarity weighting gives “fees and payment structures” 88% and ranks the gold first.For HOL Light’s floor problem, notation leads without weighting (gold rank 131), while “floor and rounding operations” leads with weighting (rank 1). Failures arise when features are shared, as with “has name” and the column whose only value is 1.Source: §4.3 · p. 7
5 Discussion
SAE-IDF produces a more complete and accurate four-prover merge than dense representations, while selective answering varies by prover. Its results also suggest that neural representations suit graded similarity better than numeric values, where rule-based methods may help.
Optimal choice between neural and symbolic representations
- Top-1 accuracy is 0.79–0.81 on free-text, categorical, and identifier columns, but 0.67 on numeric columns, the hardest class for every method.The authors suggest that rules on ranges, units, and value distributions may take over for bare numbers.Source: §5 · p. 7
Composition and abstention in symbolic system merging
- Coverage is 0.64 vs. 0.34; transitivity 0.981 vs. 0.963 and purity 0.981 vs. 0.979, while merged ARI is 0.795 vs. dense 0.519 and Dense−PC1 0.646.The merge links mutual top-1 matches over twelve ordered prover pairs; Table 4 reports the four-prover merge.Source: Table 4 · p. 8, §5 · p. 8
- At 90% precision, SAE-IDF answers 24% of Metamath and 93% of HOL Light queries, versus 1% and 24% for dense representations.The cosine margin between the first two candidates is used as confidence; answering is limited to queries with a counterpart.Source: §5 · p. 8
6 Related Work
Related work spans specialized matching methods, interpretable sparse features, and neuro-symbolic systems. The paper distinguishes its focus on aligning symbols across independently built systems from these neighboring lines of work.
Alignment within one kind of system
- Ontology, schema, entity, and cross-language code matching each have specialized methods and benchmarks, and none runs unchanged on another kind of system.Ontology matching spans logic-based, fine-tuned, prompted, and agent-based systems.Source: §6 · p. 8
Sparse autoencoders
- Sparse autoencoders recover interpretable features from superposed activations, and rarity-weighted SAE codes support semantic search.Prior work also applies SAEs to text embeddings; this paper uses rarity weighting for symbolic matching.Source: §6 · p. 8
Neuro-symbolic models
- Existing neuro-symbolic systems pair learned representations with explicit symbolic structure but reason within task-specific formalisms rather than aligning independently built systems.The paper identifies that alignment as a step toward a universal symbolic backbone.Source: §6 · p. 8
7 Conclusion
The paper concludes that SAE-IDF uses an LLM's sparse autoencoder features as a common ground for matching symbols across heterogeneous systems. It reports broad gains over dense states and interpretable matches composed of named concepts.
7 Conclusion
- SAE-IDF matches symbols across heterogeneous systems without training, using native context, an LLM's sparse autoencoder, rarity weighting, and cosine similarity.The paper presents the feature dictionary as an interpretable common ground and a step toward a universal symbolic backbone.Source: §7 · p. 8
- Across 12 tasks and six kinds of system, SAE-IDF beats the same model's dense state on every task with Gemma-2-9B and all but one with Llama-3.1-8B.The conclusion also states that both the dictionary and rarity weighting are needed.Source: §7 · p. 8
- Each match decomposes into a few rare, named concepts, making the sparse representation interpretable.The feature dictionary supplies the shared coordinate system used for alignment.Source: §7 · p. 8
Limitations
The method's scope depends on what the base model can read and on the context available for each symbol. Evaluation assumes a counterpart is present, and full alignments that handle varying numbers of counterparts remain future work.
What the model can read
- Performance is bounded by the base model's reading of each notation and the native context each system provides.The method is at chance on SMILES, IUPAC names, and InChI, and the authors dropped context-less symbols such as ICD codes and drug names.Source: Limitations · p. 9
Limitations
- Each evaluation ranks a candidate pool containing a counterpart, so it does not test whether a symbol has none, one, or several counterparts.The authors leave full alignments under merged-system structural constraints to future work.Source: Limitations · p. 9
- The comparisons are of representations, not dedicated pipelines, and the paper makes no claim of state of the art on any benchmark.Trained retrievers lead on formal mathematics; the lead over Dense−PC1 is within noise on MultiFarm and NELL →DBpedia and smaller with Llama-3.1-8B.Source: Limitations · p. 9
- Feature names are generated automatically and their types are labelled by an LLM; these explanations describe matches but do not compute them.Source: Limitations · p. 9
Ethical Considerations
The paper reports its artifact and data-use terms, benchmark protocol, and results for XLCoST and Valentine. Its risk discussion warns that transitive merging can propagate errors and recommends abstention or human review for high-stakes resources.
Ethical Considerations
- The evaluation uses released models, SAEs, and benchmarks under their stated terms, collects no data from people, and adds no personal information.The reported tasks use formal statements, programs, table schemas with sampled values, and ontology and knowledge-graph terms.Source: Ethical Considerations · p. 9
- Automatic matching errors can fuse correct clusters under transitive closure, so the authors recommend abstention or human review, especially for biomedical ontologies.Feature names are generated automatically and can mislead readers about why a match was made.Source: Ethical Considerations · p. 9
A Benchmark and protocol details
- The benchmark protocol represents symbols using system-specific views, such as sampled knowledge-graph instances, ontology axioms, or table-column values.For Valentine, the main setting uses the whole column as one text; other layouts use separate name-value views or only value or name tokens.Source: A Benchmark and protocol details · p. 13, C Valentine: layouts and column types · p. 14
B XLCoST per language
- On XLCoST, SAE-IDF beats Dense in every language on both metrics and stays within 0.01 MRR of word TF-IDF.It has the best MRR in five of seven languages, while its largest precision-at-six gains over Dense occur on Java and C#.Source: Table 6 · p. 14, B XLCoST per language · p. 14
C Valentine: layouts and column types
- For Valentine, SAE-IDF leads Dense on MRR in every column layout and on F1 in all but the name-only layout.Across the methods’ best layouts, SAE-IDF scores F1 0.630 vs. 0.611 and MRR 0.856 vs. 0.823.Source: Table 7 · p. 14
D Other tasks
Across additional tasks and comparisons, SAE-IDF performs well when the notation or context supports matching, but remains near chance on PubChem’s molecular notations. Comparisons with embedding baselines and generated contexts show that its advantage depends on the task and representation.
D Other tasks
- On PubChem, every method stays near chance at at most 0.029 MRR; on the Bio-ML training split, SAE-IDF reaches 0.815 MRR against 0.789 for strings and 0.736 for Dense.The authors attribute the PubChem result to molecular structure not being readable from the string notations.Source: D Other tasks · p. 14, Table 9 · p. 15
- SAE-IDF beats Dense in every task in the Gemma-2-9B main table, with the widest gains on formal-mathematics pairs whose notation differs most from Lean 4.Figure 4 plots the task-level gaps; the table caption identifies the main-table results as MRR.Source: Figure 4 · p. 16
E Embedding-model baseline
- Qwen3-Embedding-8B leads SAE-IDF on 8 of 15 rows and trails on 7, while BGE-M3 is ahead on several other tasks.The supplied comparison notes Qwen3 is narrowly behind on NELL → DBpedia, 0.973 vs. 0.976.Source: Table 10 · p. 15, E Embedding-model baseline · p. 16
F XLCoST without the free hit
- With the XLCoST query’s own row removed, SAE-IDF beats Dense in every language on both metrics, while word TF-IDF remains marginally ahead on MRR in most languages.The largest stated precision-at-six gain over Dense is +0.075 on Java (0.534 vs. 0.459).Source: F XLCoST without the free hit · p. 16
G Generated contexts
- Generated contexts raise model-based methods on MultiFarm, where Dense−PC1 matches or beats SAE-IDF in the reported Chinese and Russian examples.The authors note that generators can add shared text absent from the systems, so the main table uses native context.Source: G Generated contexts · p. 16
H Full ablation
Ablations show that SAE-IDF’s gains persist across many layers and configurations, while the learned features and rarity weighting both matter. The section also reports feature-level case studies and evaluates confidence-based abstention on benchmarks where every query has a counterpart.
H Full ablation
- Across 45 Common-KG and MultiFarm task-setting pairs, SAE-IDF beats Dense by +0.006 to +0.28 MRR and beats the unweighted code in every pair.Dense−PC1 trails SAE-IDF in 32 of 45 pairs; MultiFarm peaks at 0.774 with 65k features and declines to 0.730 at 1M.Source: H Full ablation · p. 16, Figure 5 · p. 18
- Collection IDF is best on 10 of 13 weighting comparisons, while Pile-density IDF is far behind on formal mathematics.On Metamath, Pile-density IDF scores 0.190 vs. 0.661 for collection IDF.Source: H Full ablation · p. 21
- With Llama-3.1-8B, SAE-IDF beats Dense on 13 of 14 main-table rows and the unweighted code trails it on 13 of 14.Across the 18 Common-KG and MultiFarm task-layer cells, it beats Dense in 16 and Dense−PC1 in 10.Source: H Full ablation · p. 21
I Feature-level decomposition and case studies
- The feature-level case studies decompose 38 matches into 28 wins and 10 failures, listing shared features and their contributions to cosine similarity.One XLCoST failure is spurious because the dataset contains the program twice.Source: I Feature-level decomposition and case… · p. 21
J Abstention
- The abstention analysis orders answers by the cosine margin between the top two candidates and measures coverage at 90% or 95% precision.Every benchmark query has a counterpart, so the analysis does not test detection of symbols with no counterpart.Source: J Abstention · pp. 21–22, Table 20 · p. 22
K Post-hoc controls and analyses
Post-hoc analyses compare SAE-IDF with stronger dense controls and a random dictionary, test statistical significance, and report approaches that did not work. The controls do not remove the reported gains, while reference-collection choice remains consequential for Metamath.
K Post-hoc controls and analyses
- Whitening is the strongest dense control, but ties or beats SAE-IDF only on the two Common-KG pairs and collapses on MultiFarm.It leaves Metamath at 0.465 and HOL Light at 0.786; the authors’ preregistered rule for dropping the anisotropy claim was not met.Source: K Post-hoc controls and analyses · p. 22, Table 21 · p. 23
- SAE-IDF is significantly ahead of a same-width, similarly sparse random dictionary with IDF on 16 of 17 bootstrapped comparisons.The random dictionary with IDF stays below the plain dense state on every reported row.Source: K Post-hoc controls and analyses · pp. 22–23, Table 22 · p. 23
- Using held-out library terms for IDF yields 0.588 MRR on Lean 4 → Metamath, below the candidate-pool IDF result of 0.661.By the stated threshold, this makes reference-collection choice a limitation, although library IDF remains above dense baselines on both reported tasks.Source: K Post-hoc controls and analyses · p. 23
L Statistical significance
- Every reported gain over Dense has paired-bootstrap p < 0.004; gains over Dense−PC1 are not significant on three MultiFarm pairs and NELL → DBpedia.The analysis resamples per-query quantities with replacement 10,000 times and reports 95% percentile intervals and one-sided p-values.Source: L Statistical significance · p. 24
M What did not work
- Several attempted approaches did not work, including pooling hidden states before SAE encoding and using Pile-density IDF instead of collection-specific IDF.Pile-density IDF scores 0.190 vs. 0.661 MRR on Metamath.Source: M What did not work · p. 24
Related papers
This paper cites
- Attention Is All You Need2017
- The Pile: An 800GB Dataset of Diverse Text for Language Modeling2021
- Qwen3 Embedding: Advancing Text Embedding and Reranking Through Foundation Models2025
- Toy Models of Superposition2022
- The Lean mathematical library2019
- UniXcoder: Unified Cross-Modal Pre-training for Code Representation2022