Manuscript Offprint

arXiv:2610.19636

Sparse Autoencoders Are a Shared Coordinate System for Symbolic Matching

Xiaocong Yang, Xuanyu Meng, Yuji Zhang, Jiawei Han, ChengXiang Zhai

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

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

Modern large language models (LLMs) hold broad knowledge in a single set of weights and are widely seen as a route to general-purpose intelligence. However, the lack of interpretability of a model's internal working mechanism (Zhao et al., 2024), and the controversy on whether it has genuine reasoning capability rather than pattern matching (Mirzadeh et al., 2025; Wu et al., 2024), make that route questionable (Dawid and LeCun, 2024), especially in high-stakes scenarios such as healthcare. Neuro-symbolic models (d'Avila Garcez and Lamb, 2023; Kautz, 2022), instead, address the two defects of LLMs architecturally: a symbolic component exposes intermediate states that a person can read and intervene on (Yang, 2026), and supplies the slow, deliberate, and usually rule-governed reasoning capability that cognitive theory calls System 2 (Kahneman, 2011; Booch et al., 2021; Goyal and Bengio, 2022).

Yet a major challenge that blocks neuro-symbolic models is scalability. Unlike LLMs whose knowledge is obtained via self-supervised learning on an enormous corpus, which benefits from modern computing hardware, symbolic systems depend on knowledge and careful handcraft from human experts. Consequently, most existing symbolic systems and neuro-symbolic models are confined to one domain (The mathlib Community, 2020; Ashburner et al., 2000; Silver et al., 2016; Segler et al., 2018; Lample and Charton, 2020).

Nonetheless, much symbolic knowledge does already exist, and AI now adds to it, e.g., Lean proofs on open problems (OpenAI, 2026). But it is spread across those numerous domain-specific systems that each describe it in their own schema: a math problem is a Lean 4 theorem in one proof assistant and a string of $e hypotheses in Metamath, and the same place is TrainStation in one knowledge graph and RailwayStation in another. Indeed, aligning such heterogeneous systems is a classic problem in several communities—ontology matching (Euzenat and Shvaiko, 2013), schema matching (Rahm and Bernstein, 2001), entity alignment (Sun et al., 2020), cross-language code retrieval (Zhu et al., 2022)—but each solves it for its own kind of system. We use one term, symbolic matching, for all of them, and a general approach to it is the first step towards the universal symbolic backbone that a general-purpose neuro-symbolic model needs, reusing the human effort in existing systems instead of starting over like Cyc (Lenat,

1 Symbol in context

2 SAE encoder

3 Sparse code, rarity-weighted

4 Matching

Figure

Figure 1: SAE-IDF on the NELL class trainstation (Common-KG NELL → DBpedia). (1) A native view—context first, symbol last—goes through the LLM; the residual stream hth_t is read at the symbol's tokens. (2) The SAE encoder EE maps each state to a sparse code; codes are averaged into a(s)a(s). (3) Its largest coordinates, with explanations and document frequencies: idf damps features that fire on many symbols (grey). (4) Each bar is a feature's share of the cosine with the query; the mark says whether it is the gold: 93% of the match with the gold RailwayStation comes from two features for railroads and stations, whereas dense ranks the gold fifth and AutomobileEngine (sic) first, which shares only ubiquitous or unrelated features and ranks fourth under SAE-IDF.

1995).

One might think a pretrained LLM already supplies a general tool for symbolic matching: trained on a large general corpus, it reads almost any notation and contextualizes each symbol through attention (Vaswani et al., 2017). Its hidden states are a natural candidate, but they are known to be anisotropic, dominated by directions shared by all inputs (Ethayarajh, 2019; Mu and Viswanath, 2018), and dense text embeddings tend to favor superficial linguistic similarity over structural correspondence (Yang et al., 2024). Neither defect is easy to fix: each dense dimension mixes many concepts in superposition (Elhage et al., 2022), so it can be neither rarity-weighted nor read to explain a match, and post-hoc fixes such as whitening trail SAE-IDF on most tasks (Appendix K).

Sparse autoencoders (SAEs) address these defects. They write an LLM's hidden state as a sparse sum of interpretable features from a large dictionary (Bricken et al., 2023; Cunningham et al., 2024; Templeton et al., 2024). Trained on a large corpus, the dictionary is a shared coordinate system for any token, including symbols: each feature is a basis direction and its weight (the code) the coordinate. Here, the directions shared by every dense vector become a few named, ubiquitous features that can be identified and downweighted, as well as lexical features, so each symbol's contextual meaning contributes most to the matching.

Upon such merits, we build SAE-IDF, a general approach for symbolic matching. An LLM reads each symbol in its native context; the SAE encodes it as a sparse code, in effect a bag of named concepts, so text retrieval's classic inverse document frequency (IDF; Spärck Jones, 1972) applies: features are weighted by rarity and candidates ranked by the cosine of weighted codes (Figure 1), much as DNA sequence search finds relatedness in a few high-scoring local matches, each scored against chance (Altschul et al., 1990), not in stretches every genome shares. Needing no aligned pairs, SAE-IDF matches any systems an LLM can read.

Across 12 tasks on 6 kinds of symbolic system, SAE-IDF beats the same model’s dense hidden state on every task with Gemma-2-9B and on all but one with Llama-3.1-8B, and it is the best training-free method on most tasks.

References (39)