Interpreting Large Language Models: Locating "Features" Inside Neural Networks for Transparency and Control

    This article explains why we need to open the "black box" of large language models, introduces the core challenge of superposition and polysemanticity in neuron-level interpretation, and presents the leading technical approach—sparse autoencoders—along with probing and activation steering. It also discusses how discovered features can be used for model diagnosis, safety control, knowledge editing, and the current limitations and future directions of interpretability research.

    Why We Need to Open the “Black Box” of Large Models

    Modern large language models are predominantly built on the Transformer architecture, with parameter counts ranging from billions to hundreds of billions. During pre‑training, these models spontaneously learn linguistic patterns, world knowledge, and even a degree of reasoning ability—but these capabilities are distributed across billions of weights, and no single parameter corresponds to a human‑understandable semantic concept.

    This opacity creates three practical problems:

    1. Safety and alignment risks are difficult to audit. The model may produce harmful, biased, or fabricated content under specific inputs, but because its internal mechanism is invisible, developers can only intercept and patch outputs—a “treat the symptom, not the cause” approach.
    2. Debugging failures is costly. When a model behaves abnormally on a task, engineering teams struggle to determine whether the cause lies in training data, fine‑tuning strategy, or internal representations—often resorting to repeated trial‑and‑error.
    3. Trust and compliance pressure. In high‑stakes industries such as finance and healthcare, regulators increasingly require that model decisions be traceable and explainable. Fully opaque solutions limit commercial deployment.

    Therefore, “opening the black box and seeing inside” has become an essential part of LLM evolution.

    Neurons ≠ Features: The Core Challenge of Interpretability

    Intuitively, one might assume that each neuron in a neural network is responsible for a single concept. However, extensive research shows this assumption is false, for two main reasons:

    Superposition. The number of concepts a model needs to represent far exceeds the number of neurons. The model therefore adopts a “compressed encoding” strategy: a single neuron participates in representing multiple unrelated concepts, and each concept is expressed by a combination of neurons. This is similar to encoding more information than physical storage capacity allows, at the cost of making individual neuron activations noisy and hard to interpret. For example, a neuron’s activation might be simultaneously correlated with code, multilingual text, and specific punctuation—no single label suffices.

    Polysemanticity. Due to superposition, the same neuron can be activated for entirely different reasons in different contexts, making “neuron‑by‑neuron” analysis almost certain to fail.

    The key pivot in interpretability research is to stop asking “what is this neuron doing?” and instead ask “does the model contain a set of directions, each corresponding to a clear concept?” These directions are what we call features—they may be linear combinations of many neurons, and individual features often have human‑readable semantics, such as “a direction for legal terms” or “a direction that detects sarcastic tone.”

    Main Technical Routes for Separating Features from Internal Activations

    Sparse Autoencoders (SAE)

    This is the most actively studied approach in recent years. The core idea is to attach a small auxiliary autoencoder to a model layer (typically the residual stream or MLP output), requiring it to decompose the high‑dimensional activation vector into an “over‑complete dictionary” whose dimensionality is much larger than the original space, while enforcing a sparsity constraint—only a very small number of dimensions are allowed to be active at any time.

    The intuition behind sparsity is that an activation vector at any given moment involves only a handful of semantic concepts, so a reasonable decomposition should have “a few non‑zero features.” Once the autoencoder is trained, each hidden dimension can be treated as a candidate feature. Researchers then observe which input texts strongly activate that dimension and assign a semantic label—for instance, one feature might fire whenever quoted text appears, while another activates when the model performs arithmetic.

    A simplified training objective can be sketched as:

    1. # Pseudo‑code: core logic of a sparse autoencoder
    2. encoded = relu(W_enc @ activation + b_enc) # sparse encoding
    3. decoded = W_dec @ encoded + b_dec # reconstruct activation
    4. loss = mse(decoded, activation) + λ * l1(encoded) # reconstruction error + sparsity penalty

    The L1 regularization term enforces sparsity in the encoding, which is the key to achieving “one dimension ≈ one concept.”

    Probing and Causal Intervention

    Beyond autoencoders, two complementary techniques are widely used:

    • Linear probing: Train a simple linear classifier to determine whether a target attribute (e.g., sentiment polarity, factual truth‑value) is linearly encoded in the internal activations. A successful probe indicates that the attribute has a clear structure in the representation space.
    • Activation steering: After finding the direction corresponding to a feature, artificially amplify or suppress that direction during inference and observe how the model’s output changes. For example, if suppressing a “refusal to answer” feature makes the model more compliant, this demonstrates a causal relationship between that feature and the behavior. Such “from correlation to causation” validation is crucial for the credibility of feature research.

    Scaling Dictionary Learning

    Applying feature separation to real‑world production models is computationally demanding: the dictionary dimension of the autoencoder often needs to reach millions to cover the model’s rich semantic space, and training requires processing massive amounts of activation data. This has driven engineering advancements such as distributed training optimization for dictionary learning, efficient caching of activation data (often using object storage and streaming data pipelines to manage large activation snapshots), and mixed‑precision training.

    After Discovering Features: What Can You Do?

    Once feature separability is validated, the application space is broad:

    1. Model behavior diagnosis. For anomalous outputs in a specific scenario, retrieve the most active features in the internal activations to quickly identify which concept triggered the biased behavior—turning blind trial‑and‑error into traceable debugging.
    2. Fine‑grained safety control. Compared to crude filtering of the entire layer output, feature‑based intervention enables more targeted behavior modification—for example, weakening only the direction associated with deceptive content without harming other model capabilities.
    3. Capability evaluation and training feedback. By monitoring feature evolution during training, one can observe when a model acquires a certain abstract ability, providing intermediate signals for tuning training strategies rather than relying solely on final evaluation scores.
    4. Knowledge editing and debiasing. After locating the feature combinations that encode erroneous knowledge or biased information, targeted fine‑tuning or representation correction can repair the model with fewer side effects.

    Current Limitations and Outlook

    It is important to recognize that this field is still in its early stages. First, features learned by autoencoders are not necessarily the computational units the model truly uses; there is a trade‑off between reconstruction error and sparsity, and proving the causal validity of features remains an active research topic. Second, the number of features is huge (possibly millions), making manual semantic labeling impractical—automated interpretation pipelines are needed, but the automatically generated explanations can themselves be erroneous. Finally, the transfer rules of feature discovery across different layers and model sizes are not yet fully understood.

    Despite these challenges, the value of this direction is clear: it moves LLM interpretability from “philosophical discussion” to “an actionable technology stack.” For engineering teams, even without delving into frontier research, low‑cost methods such as activation visualization and probing experiments can lay a foundation for model observability. In the future, as sparse dictionary learning matures and tooling improves, “understanding what the model is thinking” is likely to become a standard part of LLM development, providing solid support for safe deployment and trustworthy applications.