Observing Internal Reasoning in LLMs: Intermediate Concepts and Three Key Methods

    This article explores how to observe the internal reasoning processes of Large Language Models (LLMs) by examining intermediate concepts that are activated but not explicitly output. It introduces the concept of hidden thought spaces and details three mainstream observation methods: Logit Lens, Sparse Autoencoders (SAEs), and Jacobian matrix analysis. Additionally, it provides practical guidance for developers on debugging reasoning failures, hallucination detection, model selection, and fine-tuning, while highlighting common misuses and current limitations.

    1. The Intermediate Steps Behind a Simple Question

    When asking an LLM “How many legs does an animal that weaves webs have?”, the model usually answers “8”. The generation process is rarely a single step. An approximate way to understand this is that the model infers the object might be a “spider” from “weaves webs”, and then associates “spider” with “8 legs”. This is merely illustrative and does not definitively claim the model computes along this exact path.

    Notably, the word “spider” does not appear in the final output. However, if the model’s internals do not activate representations related to it, it is difficult for the model to provide the correct answer. These activated but unexpressed intermediate representations are a common starting point for researchers observing the model’s internal mechanisms.

    2. Beyond the Output: An Introduction to Hidden States

    Model internal computation can be viewed on two levels:

    • Surface Output: The final generated token sequence, directly visible to the user.
    • Internal Representations: Intermediate vectors passed between network layers, which participate in computation but do not necessarily manifest as text.

    By analogy, a person can weigh options in their mind while saying something else aloud. The relationship between internal representations and output text is similar. This analogy is only meant to aid understanding and does not imply the model has subjective consciousness or internal thoughts.

    Some researchers refer to the subspace carrying internal concepts that are not explicitly output as a “hidden thought space.” This article temporarily uses “J-Space” to refer to this concept. It should be noted that J-Space is not an industry-standard term, and different studies define and measure it differently. When reading related papers or tool documentation, one should first verify its definition.

    3. How to Choose Among Three Mainstream Observation Methods

    Reading model internal states has been researched for years, with different methods focusing on different aspects and conditions. The table below provides an overview:

    Method Observation Object Main Output Applicable Boundaries Main Risks
    Logit Lens Predictive tendencies of intermediate layers projected onto the vocabulary Words each layer tends to output Easy to implement, low cost, suitable for quick browsing Only reflects next-word tendencies, struggles with concepts needed for multi-step reasoning
    Sparse Autoencoder (SAE) A large number of features decomposed from activation vectors Interpretable features up to tens of thousands Fine granularity, suitable for mapping conceptual representations Many features, hard to determine which actually participate in reasoning, feature semantics may be unstable
    Jacobian Matrix Analysis Sensitivity of output to internal directions Local sensitivity and correlation clues Directly targets the reasoning process, closer to causal testing Computationally expensive, usually only viable in research settings, sensitivity does not equal causality

    3.1 Logit Lens

    This method directly applies the output projection to intermediate layers to observe which words each layer tends to predict. The concept often traces back to informal research around 2020, with subsequent improved variants.

    The advantage is simple implementation and low computational overhead, making it suitable for quickly understanding the model’s predictive tendencies at each layer. The limitation is also clear: it primarily reflects the distribution of the “next word,” providing incomplete information for intermediate concepts needed multiple steps later.

    3.2 Sparse Autoencoders

    SAEs decompose a model’s activation vectors into a large number of interpretable features. Their granularity is finer than subspace-level analysis, allowing them to characterize representations across different semantic dimensions.

    The difficulty lies in the massive number of features. Researchers must determine which features actually serve reasoning and which are merely byproducts of the processing. It helps see what concepts exist internally but cannot automatically indicate which are most important.

    3.3 Jacobian Matrix Analysis

    This method characterizes the sensitivity of the output to various internal directions using a Jacobian matrix, locating internal subspaces strongly correlated with the output. It targets the reasoning process, aligning closer to causal testing than the previous two methods.

    However, sensitivity itself is only a local clue. It shows how a minor perturbation at a certain position affects the output, which is not directly equivalent to a causal conclusion. The computational cost is high, and results usually require specific model scales and compute conditions to reproduce, making it currently more suitable for research scenarios.

    4. Practical Value for Developers

    Understanding internal representations provides reference value for engineering work, but it should be treated as an auxiliary signal rather than a definitive conclusion.

    4.1 Initial Attribution for Reasoning Failures

    When a model answers incorrectly, developers often can only repeatedly tweak prompts. By observing whether key intermediate concepts are activated, a troubleshooting clue can be obtained. The problem might be in the feature identification phase (not associating with “spider”) or in the knowledge retrieval phase (associating with spider but failing to extract “8 legs”). Such clues still require validation through output evaluation and ablation or intervention experiments.

    4.2 Auxiliary Detection for Hallucinations and Content Safety

    Internal representations and output text may become inconsistent. Monitoring this inconsistency can provide supplementary signals for hallucination detection and content safety review. It cannot replace output-level validation; the two are best used together.

    4.3 Questions for Model Selection

    Beyond public benchmark scores, consider asking vendors the following questions during model selection:

    • Can you access intermediate reasoning processes, or is a controllable reasoning mode provided?
    • Are observable Chain-of-Thought related APIs provided, and how is data retained?
    • In the event of a security incident, is there internal information available for post-mortem analysis?

    The more transparent the disclosure, the more manageable long-term maintenance and risk control usually are.

    4.4 Checklist for Tuning and Evaluation

    To incorporate internal observation into the tuning process, you can start with the following steps. The values provided are merely starting points and should be adjusted based on specific business needs; they are not industry standards.

    • Monitoring Metrics: Select a few key concepts relevant to the task and record their activation changes before and after fine-tuning.
    • Sampling Method: First extract a fixed proportion of representative requests for offline analysis, then decide whether to expand the scope.
    • Manual Review: For samples where internal signals and outputs are inconsistent, arrange for manual spot-checks and record conclusions.
    • Alert Thresholds: Set an initial threshold for the inconsistency rate, and adjust based on actual distribution after a period of observation.

    During fine-tuning, observing changes in intermediate concepts helps determine whether the model has learned reasoning patterns or merely memorized surface-level rules. This provides an additional dimension for evaluation beyond output accuracy.

    5. Common Misuses and Current Limitations

    The analysis of hidden thought spaces is still evolving. The following misuses warrant caution:

    • Treating “activation correlation” as “causal driving,” ignoring the lack of intervention validation.
    • Treating a specific sparse feature as a stable, universal semantic label, when it may not remain consistent across different models or training phases.
    • Directly using research tools as online monitoring solutions, ignoring computational costs and latency issues.

    Additionally, three points require objective consideration. Observing internal states does not equate to being able to stably modify them to correct behavior. Matrix sensitivity-based analysis is computationally demanding, making it difficult to apply in real-time to high-traffic services. The internal conceptual structures vary significantly across different models and training phases, and there is currently a lack of unified standards.

    In the future, as interpretability tools become more engineered, platforms with built-in reasoning observation capabilities may integrate with logging services and monitoring alert systems to collect and analyze intermediate reasoning states. At that point, model development could shift from “black-box tuning” to a more auditable governance approach. This direction still requires time to validate.

    6. Conclusion

    Behind a simple answer, multiple steps of internal computation may occur. The path from “weaves webs” to “spider” to “8 legs” is merely an illustrative example. Logit Lens, Sparse Autoencoders, and Jacobian matrix analysis observe the model’s internals from different perspectives. They each have their applicable scope and risks. For developers, a practical approach is to treat internal observation as an auxiliary signal, combining it with output evaluation and intervention experiments to gradually establish reliable judgments.