LLM Interpretability: Identifying, Validating, and Steering Neural Features

    Neural features offer practical ways to investigate and influence large language model behavior without making models fully transparent. This article explains distributed representations, sparse feature decomposition, and a workflow for feature discovery, linear probing, and causal intervention. It also covers experimental controls, potential applications, reproducibility requirements, and the risks of degrading model capabilities or safety.

    1. Distributed Representations and Sparse Decomposition Can Coexist

    Large language models can contain hundreds of billions of parameters, making their internal operations difficult to inspect directly. Early research focused largely on inputs and outputs, with less attention to internal activations. As interpretability research has developed, a central question has emerged: what do neurons and activation vectors represent when a model generates coherent text?

    A common view is that much of a model’s knowledge is distributed across directions in a high-dimensional activation space. A concept is often represented across multiple dimensions rather than by a single number. At the same time, sparse decomposition methods, such as sparse autoencoders (SAEs), can break activations into more interpretable features. Under a given decomposition, an input typically strongly activates only a small subset of those features.

    These perspectives are compatible: they describe representations at different levels of granularity.

    The practical goal of interpretability research is therefore to find useful handles for analysis and intervention—not to achieve complete transparency. This distinction defines the scope of the methods and conclusions that follow.

    2. What Neural Features Represent—and Where Their Interpretation Stops

    A neural feature can be understood as a direction associated with a semantic concept, such as “legal provisions” or “metallic elements.” Moving an activation along that direction often shifts the model’s output toward the corresponding concept. This indicates a relationship between the feature and model behavior.

    The meaning of sparse requires care. Sparsity means that only a small number of features in the decomposed feature space are active for a given input. It does not mean that each feature corresponds to one original neuron, or that each neuron represents only one concept.

    Individual neurons are often polysemantic: the same neuron participates in representing multiple concepts. One explanation is superposition, in which a model packs more concepts into a space than it has dimensions. Feature directions can therefore overlap, making additional validation necessary before assigning a specific interpretation to a feature.

    Within these limits, sparse feature spaces have three main practical uses:

    1. Easier localization. Relevant components are often easier to identify in a decomposed feature space than among individual neurons.
    2. Low-cost intervention. Adjusting a direction typically requires modifying activations rather than retraining the model.
    3. Potential stability beyond the original data distribution. Some studies report consistent activation patterns on out-of-distribution examples, but this must be tested again on the data relevant to each application.

    3. A Workflow for Feature Discovery and Behavioral Validation

    Establishing that a feature is associated with a semantic concept requires three stages: identifying the feature, testing its correlation with behavior, and evaluating its causal influence.

    3.1 Collect Activations and Construct Features

    Start by choosing the target layer and token positions. Common choices include MLP outputs or the residual stream in middle-to-upper layers. Scan multiple layers and record the index of the layer ultimately selected.

    For token positions, researchers may use the final token or all tokens in the response. The experimental report should state which approach was used.

    Dataset design is equally important. For each concept, prepare several hundred prompts where practical, along with matched negative examples—for instance, texts about “code errors” and texts about “clear weather.” Include varied sentence structures and topics rather than deriving every example from one template.

    Fix random seeds and record both the model version and code repository version. Without these details, results are difficult to reproduce.

    Several methods can extract candidate features:

    • Whitening and principal component analysis (PCA) can be used to analyze high-variance directions.
    • Sparse autoencoders (SAEs) or independent component analysis (ICA) can provide decompositions intended to separate more distinct semantic components.

    For SAEs, dictionary size and the sparsity penalty are important hyperparameters. Both directly affect the resulting feature set and should be reported.

    3.2 Use Linear Probes as Supporting Evidence

    A linear probe provides a lightweight validation method. Use the value of a single feature as the sole input to a logistic regression classifier and test whether it distinguishes two text classes. Strong classification accuracy suggests that the feature carries information about the class distinction.

    This is evidence of correlation, not proof that the model relies on the feature when generating its output. A probe may exploit superficial statistical patterns in the dataset.

    Probe results should therefore include two controls:

    • The same probe trained on projections onto random directions in the same activation space.
    • The same probe trained on unrelated features.

    If random directions achieve similar accuracy, the proposed feature provides weak evidence of a meaningful, specific representation.

    Positive and negative feature values sometimes correspond to opposing properties, such as “legal” and “illegal.” Such interpretations must be checked against actual examples rather than inferred from the sign alone.

    3.3 Test Causal Influence Through Intervention

    Causal intervention is essential for determining whether a feature affects output. During the forward pass, add or subtract the feature’s direction vector at the target layer.

    The following code illustrates this operation and includes a random-direction baseline:

    1. import numpy as np
    2. def steer(activations, direction, alpha=4.0, max_norm=None):
    3. # activations: activation at one token position in the target layer, shape (d,)
    4. # direction: the identified feature direction
    5. # alpha: intervention strength; calibrate across a range of values
    6. # in units appropriate to typical activation magnitudes
    7. unit = direction / np.linalg.norm(direction)
    8. edited = activations + alpha * unit
    9. if max_norm is not None:
    10. # Limit the activation norm to prevent excessive growth after intervention
    11. norm = np.linalg.norm(edited)
    12. if norm > max_norm:
    13. edited = edited * (max_norm / norm)
    14. return edited
    15. def random_baseline(direction, seed=0):
    16. # Generate a random unit vector of the same dimensionality as a control
    17. rng = np.random.default_rng(seed)
    18. rand = rng.standard_normal(direction.shape)
    19. return rand / np.linalg.norm(rand)

    A complete causal experiment should include at least the following controls and evaluations:

    Control or evaluation Purpose Metrics to observe
    No intervention Establish a baseline Frequency of the target behavior
    Random direction with the same dimensionality and strength Separate feature-specific effects from generic perturbation effects Change in target behavior and output quality
    Unrelated feature direction Test whether arbitrary directions produce similar effects Whether the target behavior changes in the same way
    Multiple alpha values Establish the relationship between intervention strength and effect Behavioral intensity and fluency curves
    General capability benchmarks Check for side effects Changes in accuracy, refusal rate, and related metrics

    Increase intervention strength gradually. If outputs become repetitive or incoherent, or refusal rates drop substantially, reduce the strength immediately or revert to the unmodified model.

    Define rollback thresholds before running the experiment, based on the project’s objectives. For example, stop using a configuration if performance on a general capability benchmark falls beyond a predefined limit.

    Feature interventions can degrade general capabilities and weaken safety alignment. Run experiments in an isolated environment, retain complete logs, and ensure that rapid rollback is possible.

    4. Engineering Applications: Scope and Risks

    4.1 Controlling Output Consistency

    During long conversations, models sometimes express contradictory positions. One possible approach is to monitor relevant feature activations. If features associated with conflicting positions are both highly active, a lightweight gate could constrain the output or trigger resampling.

    This approach must be validated on the intended evaluation set. Parameters from another setting should not be reused without testing.

    4.2 Analyzing Features Associated with Hallucination

    Some research suggests that activation of features associated with “fictional writing” during nonfiction question answering correlates with unsupported output.

    This remains correlational evidence. Determining whether these features cause hallucinations requires intervention experiments and appropriate controls.

    If the association is validated, such features may serve as detection signals or inform thresholds during decoding. They cannot replace retrieval augmentation or fact-checking. Feature-based detection is a supplementary tool with limited reliability when used alone.

    4.3 Safety Evaluation and Red Teaming

    White-box feature analysis can complement black-box testing. For example, researchers can examine whether multi-turn attacks activate combinations of features associated with refusal, evasion, or acquiescence, helping quantify the model’s defensive tendencies.

    Red-team testing must be authorized and conducted in an isolated environment. Keep logs and prepare a rollback plan. Feature interventions should not be used to bypass safety mechanisms in production.

    5. Choosing Layers, Validating Features, and Avoiding Common Mistakes

    Choosing Layers

    Scan multiple layers and compare both probe accuracy and intervention effects.

    As a general tendency:

    • Earlier layers capture more surface-level patterns.
    • Middle layers are more closely associated with abstract semantics.
    • Later layers near the output are more closely tied to specific output tokens.

    These are broad tendencies rather than fixed rules. Select layers where interventions produce clear effects with limited side effects, and document the reasons for the choice.

    Validating Features

    Validation should address three separate questions:

    1. Correlation: Do probe results outperform random-direction baselines?
    2. Causality: Does intervention change the target behavior as expected, without equivalent changes in the control groups?
    3. Generalization: Do the findings hold on domains excluded from feature construction and on paraphrased prompts?

    Common Mistakes

    • Treating probe accuracy alone as proof that a feature is valid.
    • Omitting random-direction baselines.
    • Constructing features from a single prompt family and overfitting to it.
    • Measuring only the target behavior while ignoring general capabilities and safety.
    • Failing to record hyperparameters and model versions, making results irreproducible.
    • Applying a feature discovered in one model directly to another. Feature directions generally do not transfer directly between models.

    6. Key Terms

    • Linear representation: A concept corresponds to a direction in activation space, and movement along that direction changes the model’s output tendencies.
    • Superposition: A model represents more concepts than its available dimensions, with concept directions partially overlapping.
    • Polysemanticity: A neuron or direction participates in representing multiple concepts.
    • SAE feature: A basic component in the feature space produced by a sparse autoencoder.
    • Linear probe: A simple classifier trained on one or a few features to test whether they carry information correlated with a target label.
    • Causal efficacy: In this article, an intervention changes output as expected, while random-direction and unrelated-feature controls do not produce the same change.

    Conclusion

    Neural features can help developers locate components associated with model behavior and investigate how changing those components affects output. They do not make a model fully transparent.

    Reliable conclusions require correlation testing, causal intervention, and generalization checks. Controls, complete logs, and rollback procedures are equally important. Together, these practices provide a disciplined basis for using neural features as practical tools for model analysis and carefully evaluated intervention.