Calibrating Reasoning in Language Models with Internal Consistency

Large language models (LLMs) have demonstrated impressive capabilities in various reasoning tasks, aided by techniques like chain-of-thought prompting that elicits verbalized reasoning. However, LLMs often generate text with obvious mistakes and contradictions, raising doubts about their ability to robustly process and utilize generated rationales. In this work, we investigate reasoning in LLMs through the lens of internal representations, focusing on how these representations are influenced by generated rationales. Our preliminary analysis reveals that while generated rationales improve answer accuracy, inconsistencies emerge between the model's internal representations in middle layers and those in final layers, potentially undermining the reliability of their reasoning processes. To address this, we propose internal consistency as a measure of the model's confidence by examining the agreement of latent predictions decoded from intermediate layers. Extensive empirical studies across different models and datasets demonstrate that internal consistency effectively distinguishes between correct and incorrect reasoning paths. Motivated by this, we propose a new approach to calibrate reasoning by up-weighting reasoning paths with high internal consistency, resulting in a significant boost in reasoning performance. Further analysis uncovers distinct patterns in attention and feed-forward modules across layers, providing insights into the emergence of internal inconsistency. In summary, our results demonstrate the potential of using internal representations for self-evaluation of LLMs. Our code is available at github.com/zhxieml/internal-consistency.

Paper

Similar papers

Peer review

Reviewer fPrR7/10 · confidence 4/52024-07-01

Summary

This paper investigates the correlation between CoT reasoning and internal representations in Transformer models. It shows that there are inconsistencies between model’s internal representations in different layers. Such inconsistencies can be used to distinguish correct and incorrect reasoning paths, and thereby calibrate model predictions. By incorporating internal consistency into self-consistency (SC+IC), the authors show that SC+IC improves over SC under the same number of sampled reasoning paths. Besides, the authors also provided insights into how internal inconsistency is caused by Transformer components.

Strengths

- The correlation between internal representations and CoT reasoning is a novel topic and the conclusion of this paper would be useful for a wide range of audience working on CoT prompting. - This paper has a clear logic and the experiment design is solid. The authors first observe inconsistency in internal representations, then propose the internal consistency metric, and show that the metric is correlated with prediction correctness. - The authors conduct experiments on 4 different datasets and 2 family of models, showing that SC+IC achieves robust improvement over both SC and SC+$\Delta$ at almost no additional cost.

Weaknesses

- The improvement of SC+IC over SC is relatively marginal (+1.2% on avearge). This might be due to the fact that the authors just simply used internal consistency $\in [0, 1]$ as weights in SC. Maybe the authors can try some other weighting strategies (e.g. exponentiating the internal consistency) and obtain better results. - Section 4.4 is not clear to me. Could you explain why attention weights and number of top value vectors reveal the source of internal inconsistency? Could you elaborate what the probe vector is and how you obtained it? It is not very clear to me even after reading the appendix. - It is hard to understand some important details (e.g. Figure 6, self-attention layers and FFN layers) without looking into the Appendix. I would recommend the authors to reorganize them in the main paper.

Questions

- Why do we measure internal consistency against the final prediction? How about measuring the consistency between every pair of layers? - Can internal consistency be applied to non-binary answers? Will it be still effective in that case? - Line 210: By the term “decreases”, do you mean internal consistency is lower for few-shot CoT than few-shot direct prompting? - Line 241-242: focusing on the answer tokens → focusing on what the answer tokens attend to. - Line 248: second → last FFN matrix in the FNN layer. This would be clearer to the readers. - Figure 5 caption: Are attention weights and number of top value vectors supposed to align? Why?

Rating

7

Confidence

4

Soundness

4

Presentation

3

Contribution

3

Limitations

Yes. The authors has discussed the limitations in the paper.

Reviewer reW16/10 · confidence 3/52024-07-08

Summary

This paper first reveals that inconsistencies emerge between the internal representations in middle layers and those in final layers, which might undermine the reliability of reasoning processes, and then proposes internal consistency to measure the model’s confidence. Furthermore, the authors propose a method to calibrate CoT reasoning by up-weighting reasoning paths with high internal consistency, which boosts reasoning performance.

Strengths

- This paper identifies the inconsistencies between intermediate and final layer representations in LLM reasoning, and proposes a measure of internal consistency to evaluate the model’s confidence and calibrate CoT reasoning. - Extensive results across different models and datasets show that the proposed measure can effectively distinguish between correct and incorrect reasoning processes. - The authors propose a new method to calibrate CoT reasoning by up-weighting reasoning paths with high internal consistency, thereby improving reasoning performance.

Weaknesses

- The motivation for this paper doesn't sound convincing enough (see Questions part). - The improvements in Table 1 seem to be limited to some models/datasets. Although the authors performed ten runs with different random seeds, they mentioned that each dataset contains at least 500 samples, which means that the results may vary between 0-10 samples. I suggest the authors report detailed data statistics. - This paper includes extensive experiments and results, but lacks analysis and description; Readers need to observe for themselves, such as Figure 3. - In Figure 3 (a), the text on the x-axis is overlapping. - For Figure 2 (b) and (d), it is unclear how the different internal consistency results (0, 25, 50, 75, 100) were obtained. For example, the authors mentioned that results are averaged over all models and datasets, so (a) shows results corresponding to different prompting methods, and (c) shows results corresponding to different layers. - The authors describe Figure 6 in the main text, but the figure is placed in the appendix (of course this may be improved in the final version).

Questions

- Intuitively, as intermediate layers get closer to the final layer, their predictions should increasingly match the final predictions. Why do you think they need to be internally consistent?

Rating

6

Confidence

3

Soundness

3

Presentation

2

Contribution

3

Limitations

see above.

Reviewer 7a9f5/10 · confidence 4/52024-07-12

Summary

This paper investigates the use of internal consistency as a measure for calibration, and to improve the reasoning capabilities of LLMs. The internal consistency is a measure of the model’s confidence by examining the agreement of latent predictions decoded from intermediate layers, and this measure does not require additional training. The authors conduct extensive empirical studies across various models and datasets, demonstrating that internal consistency effectively distinguishes between correct and incorrect reasoning paths.

Strengths

1. The proposed measurement is practical, offering a new way to self-evaluate and calibrate reasoning without additional training or human annotations. 2. The authors conduct extensive empirical studies across different models and datasets. 3. This paper is also well-structured and clearly presents its methodology, experiments, and findings.

Weaknesses

1. The proposed measurement is rather straightforward, using an indicator function to measure if latent predictions match the final prediction and summing over all intermediate layers. 2. The authors claim that the proposed measure is more accurate than logit-based methods and does not require additional training. However, Table 1 does not show a significant performance gap. 3. The evaluation is conducted on specific datasets involving true-or-false questions, which may not fully represent the diversity of reasoning tasks encountered in practical applications. 4. The paper dedicates considerable space to explaining the Transformer architecture, which seems unnecessary given the target reader's background. The listed equations for Transformer architecture and internal representations are not utilized in later sections. In contrast, the authors should elaborate more on the decoding process using the proposed consistency score, which is only briefly mentioned.

Questions

1. Will the authors provide more probing results regarding the suitability of lower layers for prediction and the proposed measurement? 2. Will the authors include results using other approaches for reasoning?

Rating

5

Confidence

4

Soundness

2

Presentation

3

Contribution

2

Limitations

Yes

Reviewer B2Yn6/10 · confidence 3/52024-07-13

Summary

The paper explores the concept of "internal consistency" in Large Language Models (LLMs), mainly focusing on chain-of-thought (CoT) reasoning, where models articulate step-by-step rationales. The authors probe internal representations of LLMs to assess the alignment between middle and final layer outputs and propose boosting reasoning paths with higher internal consistency. Through studies across various models and datasets, authors demonstrate that models enhanced with internal consistency metrics reach significant improvement on performances in reasoning tasks.

Strengths

1. Leveraging internal consistency within LLMs to improve reasoning performance is novel and promising. It addresses the issue of LLMs producing reasoning paths that are not always aligned with their final predictions. 2. The paper provides validations across multiple models and datasets, enhancing the confidence of the results. 3. By demonstrating how internal consistency can be used to calibrate CoT reasoning, the paper contributes practical techniques for improving LLM reliability, which is crucial for applications requiring precise and trustworthy outputs.

Weaknesses

1. The techniques described require accessing intermediate layer outputs and could be computationally expensive, limiting the scalability of the proposed methods, especially in resource-constrained environments. 2. There is a risk that optimizing for internal consistency might lead models to overfit specific reasoning patterns or datasets, potentially reducing the generalizability of the findings.

Questions

1. Can you briefly explain why low LLM layers (<10) can be used to show internal consistency? 2. With high internal consistency, the results from high LLM layers (>20) may be the same as the last layer. Can we remove the last few layers to reduce the computational complexity of LLMs and increase their reasoning speed? In other words, can we use the method to reduce the size of LLMs? 3. How does internal consistency interact with other known issues in LLMs, such as hallucination or bias in data?

Rating

6

Confidence

3

Soundness

3

Presentation

3

Contribution

3

Limitations

This paper appropriately describes its limitations.

Reviewer B2Yn2024-08-12

Reply to the Rebuttal

Thanks for the authors' response. Given the additional experiments, generalized results, and answers to my questions, I decided to raise my score.

Reviewer 7a9f2024-08-10

Reply to authors' rebuttal

Thanks for the authors' response. WIth additional experiments and generalized results demonstrated, I decide to raise my score.

Reviewer fPrR2024-08-10

Thanks the authors for their response. I am happy to see that with tuned weights, SC+IC can achieve much better performance, and this transfers across datasets. I decide to raise my score from 6 to 7.

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC