Table of Contents
Fetching ...

From Atoms to Trees: Building a Structured Feature Forest with Hierarchical Sparse Autoencoders

Yifan Luo, Yang Zhan, Jiedong Jiang, Tianyang Liu, Mingrui Wu, Zhennan Zhou, Bin Dong

TL;DR

The paper tackles the challenge of interpreting LLM representations by identifying that sparse autoencoder features are organized hierarchically rather than as flat, atomic units. It introduces Hierarchical Sparse Autoencoders (HSAE), which jointly train a sequence of SAEs at increasing dictionary sizes and enforce parent–child relationships to form a structured feature forest via a structural constraint loss and a random feature perturbation mechanism. The authors demonstrate, through qualitative case studies and rigorous quantitative metrics, that HSAE recovers coherent hierarchies that align with human semantics while preserving reconstruction fidelity across dictionary sizes; they also show the learned hierarchies reflect the geometry of the activation space and correlate with interpretability. Ablation studies, cross-model evaluations, and automated interpretability assessments further validate that the hierarchical priors improve structure consistency beyond post-hoc baselines, offering a scalable tool for multi-scale interpretation and potential applications in model steering and safety auditing.

Abstract

Sparse autoencoders (SAEs) have proven effective for extracting monosemantic features from large language models (LLMs), yet these features are typically identified in isolation. However, broad evidence suggests that LLMs capture the intrinsic structure of natural language, where the phenomenon of "feature splitting" in particular indicates that such structure is hierarchical. To capture this, we propose the Hierarchical Sparse Autoencoder (HSAE), which jointly learns a series of SAEs and the parent-child relationships between their features. HSAE strengthens the alignment between parent and child features through two novel mechanisms: a structural constraint loss and a random feature perturbation mechanism. Extensive experiments across various LLMs and layers demonstrate that HSAE consistently recovers semantically meaningful hierarchies, supported by both qualitative case studies and rigorous quantitative metrics. At the same time, HSAE preserves the reconstruction fidelity and interpretability of standard SAEs across different dictionary sizes. Our work provides a powerful, scalable tool for discovering and analyzing the multi-scale conceptual structures embedded in LLM representations.

From Atoms to Trees: Building a Structured Feature Forest with Hierarchical Sparse Autoencoders

TL;DR

The paper tackles the challenge of interpreting LLM representations by identifying that sparse autoencoder features are organized hierarchically rather than as flat, atomic units. It introduces Hierarchical Sparse Autoencoders (HSAE), which jointly train a sequence of SAEs at increasing dictionary sizes and enforce parent–child relationships to form a structured feature forest via a structural constraint loss and a random feature perturbation mechanism. The authors demonstrate, through qualitative case studies and rigorous quantitative metrics, that HSAE recovers coherent hierarchies that align with human semantics while preserving reconstruction fidelity across dictionary sizes; they also show the learned hierarchies reflect the geometry of the activation space and correlate with interpretability. Ablation studies, cross-model evaluations, and automated interpretability assessments further validate that the hierarchical priors improve structure consistency beyond post-hoc baselines, offering a scalable tool for multi-scale interpretation and potential applications in model steering and safety auditing.

Abstract

Sparse autoencoders (SAEs) have proven effective for extracting monosemantic features from large language models (LLMs), yet these features are typically identified in isolation. However, broad evidence suggests that LLMs capture the intrinsic structure of natural language, where the phenomenon of "feature splitting" in particular indicates that such structure is hierarchical. To capture this, we propose the Hierarchical Sparse Autoencoder (HSAE), which jointly learns a series of SAEs and the parent-child relationships between their features. HSAE strengthens the alignment between parent and child features through two novel mechanisms: a structural constraint loss and a random feature perturbation mechanism. Extensive experiments across various LLMs and layers demonstrate that HSAE consistently recovers semantically meaningful hierarchies, supported by both qualitative case studies and rigorous quantitative metrics. At the same time, HSAE preserves the reconstruction fidelity and interpretability of standard SAEs across different dictionary sizes. Our work provides a powerful, scalable tool for discovering and analyzing the multi-scale conceptual structures embedded in LLM representations.
Paper Structure (47 sections, 9 equations, 11 figures, 3 tables)

This paper contains 47 sections, 9 equations, 11 figures, 3 tables.

Figures (11)

  • Figure 1: Hierarchical feature discovery with HSAE. We visualize a tree within the learned feature forest alongside a semantic dashboard of its nodes. Each node includes a unique feature index (e.g., #1059), a human-annotated semantic label, and representative top-activating context snippets. Orange highlights indicate the activation positions, with color intensity reflecting the activation magnitude. HSAE captures a clear conceptual taxonomy: a broad parent feature representing Science, Technology, and Research (#1059) is systematically decomposed into specialized features such as Scientific Disciplines (#4015). This intermediate node further branches into a feature capturing lexical patterns containing the word science or scientists (#12268) alongside a feature representing specific discipline names such as biology or physics (#12975). For clarity, only a three-layer subgraph and examples of some features are shown.
  • Figure 2: Hierarchical feature discovery of temporal concepts. The root broad temporal feature (#1902) branches into a Daily Timescale (#2357) and a Longer Timescale (#3864). At the next level, the daily timescale branch splits into Today/Tonight (#10732), the unit concept Day (#11382), and Sub-daily intervals including morning/afternoon or am/pm (#13334). Similarly, longer-term concepts are partitioned into Adverbs (#8273) and specific units like Week (#11760). Orange highlights indicate activation positions, with intensity reflecting magnitude.
  • Figure 3: Quantitative evaluation of hierarchical structure.(a) Parent-Child Alignment: Measured by the Hamming Distance between ground-truth parent activations and their logical-OR reconstruction from children, indicating how well parent features summarize their descendants' activations. (b) Parent-given-child activation probability: measuring the necessity of the parent feature for its children. (c) Child-given-parent activation probability: reflecting the coverage of children within the parent's activation space. (d) AutoInterp: LLM-based automated interpretability scores evaluating the semantic alignment between parent and child features.
  • Figure 4: Ablation of training mechanisms. We compare the parent-child alignment across: (1) Baseline: independently trained SAEs with post-hoc alignment; (2) w/o Constraint: without parent-child constraint loss; (3) w/o Perturbation: without random perturbation; and (4) HSAE: our complete implementation.
  • Figure 5: Geometric manifestation of hierarchical relations. UMAP projection of activations that trigger different features. Sibling A (#3157) and Sibling B (#5729) are features at level 2 that share the same parent (#14).
  • ...and 6 more figures