---
title: "Analyzing Chain-of-Thought Prompting in Large Language"
description: "The authors, from Harvard, study this without reading the generated explanations, which can be… 25 references, cited by 21 papers here."
authors: ["Skyler Wu", "Eric Meng Shen", "Charumathi Badrinath", "Jiaqi Ma", "Himabindu Lakkaraju"]
year: 2023
venue: "arXiv:2307.13339"
source: "https://arxiv.org/abs/2307.13339"
doi: "10.48550/arxiv.2307.13339"
arxiv: "2307.13339"
licence: "CC BY 4.0 (arXiv)"
licence_url: "http://creativecommons.org/licenses/by/4.0/"
summary_licence: "Elamur Cosmic License"
canonical: "https://research.elamur.ai/free/en/papers/wu-2023-analyzing-chain-thought-prompting-large/"
---
[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/wu-2023-analyzing-chain-thought-prompting-large/)

[home](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2023](https://md.research.elamur.ai/free/en/papers/2023/page/9/) / Analyzing Chain-of-Thought Prompting in Large Language Models via Gradient-based Feature Attributions

# Analyzing Chain-of-Thought Prompting in Large Language Models via Gradient-based Feature Attributions

**Authors:** Skyler Wu, Eric Meng Shen, Charumathi Badrinath, Jiaqi Ma and [Himabindu Lakkaraju](https://md.research.elamur.ai/free/en/authors/himabindu-lakkaraju/) · **Year:** 2023 · **Venue:** arXiv:2307.13339 · **Licence:** [CC BY 4.0 (arXiv)](http://creativecommons.org/licenses/by/4.0/)

**Links:** [Publisher's page](https://arxiv.org/abs/2307.13339) · [PDF](https://arxiv.org/pdf/2307.13339) · [DOI 10.48550/arxiv.2307.13339](https://doi.org/10.48550/arxiv.2307.13339) · [arXiv 2307.13339](https://arxiv.org/abs/2307.13339) · [OpenAlex](https://openalex.org/W4385292374)

**Citations:** 9 citations (OpenAlex, 2026-10-14) · [21](https://md.research.elamur.ai/free/en/papers/wu-2023-analyzing-chain-thought-prompting-large/cited-by/) in our library, of the 149,439 papers whose bibliographies we read

## Summary
Chain-of-thought (CoT) prompting is known to improve LLM accuracy on reasoning questions, but it is still unclear why it works. The authors, from Harvard, study this without reading the generated explanations, which can be wrong or misleading. Instead, they use gradient-based saliency scores, which estimate how much each input token influences the token carrying the final answer. They compare standard few-shot prompting with CoT prompting on open-source models of 1.5–6B parameters, mainly GPT-J. The setup uses four attribution variants, 50-question samples from four question-answering datasets, hand-labelled sets of semantically relevant tokens, and manually rephrased question versions. Contrary to their hypothesis, CoT did not make the models weight relevant tokens more heavily; those saliency magnitudes actually dropped. Under CoT, however, the scores changed much less when questions were reworded or when generation was repeated. The study shows that CoT changes how models process input even below the scale where accuracy gains appear. It also offers an interpretability approach that does not depend on the model's own explanations.

## Key points
- Models: GPT-J (6B) for the main results, plus GPT-2 XL (1.5B) and GPT-Neo (2.7B). The four saliency methods are the regular and contrastive versions of the gradient × input and L1 norm methods from Yin & Neubig (2022).
- Data: 50 questions each from SST (Stanford Sentiment Treebank v2), GSM8K, CSQA (CommonsenseQA) and a manually written CoinFlip set. CoinFlip and GSM8K also have reworded versions with the same meaning.
- Accuracy: CoT gave no general improvement at this scale. The exception was SST, where accuracy rose from 0.5 to 0.64.
- Across all datasets and attribution methods, CoT lowered the saliency magnitudes of relevant tokens. The authors attribute this to the longer prompt spreading the gradient over more tokens.
- CoT made relevant-token saliencies more stable across original and reworded GSM8K/CoinFlip questions. It also produced tighter clusters over 20 repeated generation runs. The work was presented at an ICML 2023 workshop.

*Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.*

## Institutions

- [Harvard University](https://md.research.elamur.ai/free/en/universities/harvard-university/) — University, Cambridge, United States · 112 works · 42,023 citations

📚 Shelves (4): [🖥️ Computer Science](https://md.research.elamur.ai/free/en/shelves/computer-science/) · 16,667 works · [🤖 Artificial Intelligence](https://md.research.elamur.ai/free/en/shelves/computer-science/artificial-intelligence/) · 16,194 works · [🎭 Arts and Humanities](https://md.research.elamur.ai/free/en/shelves/arts-and-humanities/) · 16,039 works · [🗣️ Language and Linguistics](https://md.research.elamur.ai/free/en/shelves/arts-and-humanities/language-and-linguistics/) · 15,891 works

🧭 Topics (3): [🧠 Language models & pretraining](https://md.research.elamur.ai/free/en/topics/language-models/) · 3,320 works · [🧮 Reasoning](https://md.research.elamur.ai/free/en/topics/reasoning/) · 1,426 works · [🔬 Interpretability](https://md.research.elamur.ai/free/en/topics/interpretability/) · 130 works

## Cite

Cite as: Skyler Wu, Eric Meng Shen, Charumathi Badrinath, Jiaqi Ma and Himabindu Lakkaraju. 2023. Analyzing Chain-of-Thought Prompting in Large Language Models via Gradient-based Feature Attributions. arXiv:2307.13339.

The paper itself, not this page. BibTeX from the library's record of the work.

```bibtex
@misc{wu2023analyzing,
  title = {{Analyzing Chain-of-Thought Prompting in Large Language Models via Gradient-based Feature Attributions}},
  author = {Skyler Wu, Eric Meng Shen, Charumathi Badrinath, Jiaqi Ma and Himabindu Lakkaraju},
  year = {2023},
  doi = {10.48550/arxiv.2307.13339},
  eprint = {2307.13339},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2307.13339}
}
```

- [← previous WojoodNER 2023: The First Arabic Named Entity Recognition Shared Task](https://md.research.elamur.ai/free/en/papers/jarrar-2023-wojoodner-2023-first-arabic-named/)
- [next → C-STANCE: A Large Dataset for Chinese Zero-Shot Stance Detection](https://md.research.elamur.ai/free/en/papers/zhao-2023-c-stance-large-dataset-chinese/)
- [↑ back to papers of 2023](https://md.research.elamur.ai/free/en/papers/2023/page/9/)

## References

25 references, 15 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

1. Madaan, A. and Yazdanbakhsh, A. Text and patterns: For effective chain of thought, it takes two to tango. arXiv preprint arXiv:2209.07686, 2022. [find](https://scholar.google.com/scholar?q=Madaan%2C+A%2E+and+Yazdanbakhsh%2C+A%2E+Text+and+patterns%3A+For+effective+chain+of+thought%2C+it+takes+two+to+tango%2E+arXiv+preprint+arXiv%3A2209%2E07686%2C+2022%2E)
2. Black, S., Leo, G., Wang, P., Leahy, C., and Biderman, S. GPT-Neo: Large Scale Autoregressive Language Modeling with Mesh-Tensorflow, March 2021. URL https://doi.org/10.5281/zenodo.5297715. If you use this software, please cite it using these metadata. — [doi:10.5281/zenodo.5297715](https://doi.org/10.5281/zenodo.5297715) [↗](https://doi.org/10.5281/zenodo.5297715)
3. Madsen, A., Reddy, S., and Chandar, S. Post-hoc interpretability for neural NLP: A survey. ACM Computing Surveys, 55(8):1–42, dec 2022. doi: 10.1145/3546577. URL https://doi.org/10.1145%2F3546577. [find](https://scholar.google.com/scholar?q=Madsen%2C+A%2E%2C+Reddy%2C+S%2E%2C+and+Chandar%2C+S%2E+Post%2Dhoc+interpretability+for+neural+NLP%3A+A+survey%2E+ACM+Computing+Surveys%2C+55%288%29%3A1%E2%80%9342%2C+dec+2022%2E+doi%3A+10%2E1145%2F3546577%2E+URL+https%3A%2F%2Fdoi%2Eorg%2F10%2E1145%252F3546577%2E)
4. Bolukbasi, T., Pearce, A., Yuan, A., Coenen, A., Reif, E., Viégas, F., and Wattenberg, M. An interpretability illusion for bert, 2021. [find](https://scholar.google.com/scholar?q=Bolukbasi%2C+T%2E%2C+Pearce%2C+A%2E%2C+Yuan%2C+A%2E%2C+Coenen%2C+A%2E%2C+Reif%2C+E%2E%2C+Vie%CC%81gas%2C+F%2E%2C+and+Wattenberg%2C+M%2E+An+interpretability+illusion+for+bert%2C+2021%2E)
5. Radford, A., Wu, J., Child, R., Luan, D., Amodei, D., Sutskever, I., et al. Language models are unsupervised multitask learners. OpenAI blog, 1(8):9, 2019. [find](https://scholar.google.com/scholar?q=Radford%2C+A%2E%2C+Wu%2C+J%2E%2C+Child%2C+R%2E%2C+Luan%2C+D%2E%2C+Amodei%2C+D%2E%2C+Sutskever%2C+I%2E%2C+et+al%2E+Language+models+are+unsupervised+multitask+learners%2E+OpenAI+blog%2C+1%288%29%3A9%2C+2019%2E)
6. Cobbe, K., Kosaraju, V., Bavarian, M., Chen, M., Jun, H., Kaiser, L., Plappert, M., Tworek, J., Hilton, J., Nakano, R., Hesse, C., and Schulman, J. [Training verifiers to solve math word problems](https://md.research.elamur.ai/free/en/papers/cobbe-2021-training-verifiers-solve-math-word/). arXiv preprint arXiv:2110.14168, 2021.
7. Socher, R., Perelygin, A., Wu, J., Chuang, J., Manning, C. D., Ng, A., and Potts, C. [Recursive deep models for semantic compositionality over a sentiment treebank](https://md.research.elamur.ai/free/en/papers/socher-2013-recursive-deep-models-semantic-compositionality/). In Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing, pp. 1631– 1642, Seattle, Washington, USA, Oct…
8. Golovneva, O., Chen, M., Poff, S., Corredor, M., Zettlemoyer, L., Fazel-Zarandi, M., and Celikyilmaz, A. [Roscoe: A suite of metrics for scoring step-by-step reasoning](https://md.research.elamur.ai/free/en/papers/golovneva-2022-roscoe-suite-metrics-scoring-step/), 2022.
9. Sundararajan, M., Taly, A., and Yan, Q. Axiomatic attribution for deep networks, 2017. URL https://arxiv.org/abs/1703.01365. [↗](https://arxiv.org/abs/1703.01365)
10. Jacovi, A., Swayamdipta, S., Ravfogel, S., Elazar, Y., Choi, Y., and Goldberg, Y. Contrastive explanations for model interpretability. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pp. 1597–1611, Online and Punta Cana, Dominican Republic, November 2021. A… [find](https://scholar.google.com/scholar?q=Jacovi%2C+A%2E%2C+Swayamdipta%2C+S%2E%2C+Ravfogel%2C+S%2E%2C+Elazar%2C+Y%2E%2C+Choi%2C+Y%2E%2C+and+Goldberg%2C+Y%2E+Contrastive+explanations+for+model+interpretability%2E+In+Proceedings+of+the+2021+Conference+on+Empirical+Methods+in+Nat)
11. Talmor, A., Herzig, J., Lourie, N., and Berant, J. [CommonsenseQA: A question answering challenge targeting commonsense knowledge](https://md.research.elamur.ai/free/en/papers/talmor-2019-commonsenseqa-question-answering-challenge-targeting/). In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Shor…
12. Kojima, T., Gu, S. S., Reid, M., Matsuo, Y., and Iwasawa, Y. [Large language models are zero-shot reasoners](https://md.research.elamur.ai/free/en/papers/kojima-2022-large-language-models-zero-shot/), 2022. URL https://arxiv.org/abs/2205.11916. [↗](https://arxiv.org/abs/2205.11916)
13. Turpin, M., Michael, J., Perez, E., and Bowman, S. R. Language models don’t always say what they think: Unfaithful explanations in chain-of-thought prompting, 2023. — [Language Models Don't Always Say What They Think: Unfaithful Explanations in Chain-of-Thought Prompting](https://md.research.elamur.ai/free/en/papers/turpin-2023-language-models-don-t-always/)
14. Krishna, S., Han, T., Gu, A., Pombra, J., Jabbari, S., Wu, S., and Lakkaraju, H. The disagreement problem in explainable machine learning: A practitioner’s perspective, 2022. [find](https://scholar.google.com/scholar?q=Krishna%2C+S%2E%2C+Han%2C+T%2E%2C+Gu%2C+A%2E%2C+Pombra%2C+J%2E%2C+Jabbari%2C+S%2E%2C+Wu%2C+S%2E%2C+and+Lakkaraju%2C+H%2E+The+disagreement+problem+in+explainable+machine+learning%3A+A+practitioner%E2%80%99s+perspective%2C+2022%2E)
15. Wallace, E., Tuyls, J., Wang, J., Subramanian, S., Gardner, M., and Singh, S. [Allennlp interpret: A framework for explaining predictions of nlp models](https://md.research.elamur.ai/free/en/papers/wallace-2019-allennlp-interpret-framework-explaining-predictions/). arXiv preprint arXiv:1909.09251, 2019.
16. Lampinen, A. K., Dasgupta, I., Chan, S. C., Matthewson, K., Tessler, M. H., Creswell, A., McClelland, J. L., Wang, J. X., and Hill, F. [Can language models learn from explanations in context?](https://md.research.elamur.ai/free/en/papers/lampinen-2022-can-language-models-learn-explanations/) arXiv preprint arXiv:2204.02329, 2022.
17. Wang, B. and Komatsuzaki, A. GPT-J-6B: A 6 Billion Parameter Autoregressive Language Model. [https://github.com/kingoflolz/](https://github.com/kingoflolz/) mesh-transformer-jax, May 2021. [↗](https://github.com/kingoflolz/)
18. Wang, B., Min, S., Deng, X., Shen, J., Wu, Y., Zettlemoyer, L., and Sun, H. [Towards understanding chain-of-thought prompting: An empirical study of what matters](https://md.research.elamur.ai/free/en/papers/wang-2023-understanding-chain-thought-prompting-empirical/). arXiv preprint arXiv:2212.10001, 2022.
19. Li, J., Chen, X., Hovy, E., and Jurafsky, D. [Visualizing and understanding neural models in NLP](https://md.research.elamur.ai/free/en/papers/li-2016-visualizing-understanding-neural-models-nlp/). In Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pp. 681–691, San Diego, California, June 2016. Associati…
20. Wang, X., Wei, J., Schuurmans, D., Le, Q., Chi, E., Narang, S., Chowdhery, A., and Zhou, D. [Self-consistency improves chain of thought reasoning in language models](https://md.research.elamur.ai/free/en/papers/wang-2022-self-consistency-improves-chain-thought/), 2023.
21. Wei, J., Wang, X., Schuurmans, D., Bosma, M., Ichter, B., Xia, F., Chi, E. H., Le, Q. V., and Zhou, D. Chain of thought prompting elicits reasoning in large language models. In Oh, A. H., Agarwal, A., Belgrave, D., and Cho, K. (eds.), Advances in Neural Information Processing Systems, 2022. [URL http…](https://md.research.elamur.ai/free/en/papers/wei-2022-chain-thought-prompting-elicits-reasoning/)
22. Yin, K. and Neubig, G. Interpreting language models with contrastive explanations. arXiv preprint arXiv:2202.10419, 2022. [find](https://scholar.google.com/scholar?q=Yin%2C+K%2E+and+Neubig%2C+G%2E+Interpreting+language+models+with+contrastive+explanations%2E+arXiv+preprint+arXiv%3A2202%2E10419%2C+2022%2E)
23. Zelikman, E., Wu, Y., Mu, J., and Goodman, N. D. [Star: Bootstrapping reasoning with reasoning](https://md.research.elamur.ai/free/en/papers/zelikman-2022-star-bootstrapping-reasoning-reasoning/), 2022a. URL https://arxiv.org/abs/2203.14465. [↗](https://arxiv.org/abs/2203.14465)
24. Zelikman, E., Wu, Y., Mu, J., and Goodman, N. D. [Star: Bootstrapping reasoning with reasoning](https://md.research.elamur.ai/free/en/papers/zelikman-2022-star-bootstrapping-reasoning-reasoning/). mar 2022b.
25. Zhang, Z., Zhang, A., Li, M., and Smola, A. [Automatic chain of thought prompting in large language models](https://md.research.elamur.ai/free/en/papers/zhang-2022-automatic-chain-thought-prompting-large/). arXiv preprint arXiv:2210.03493, 2022.

*Updated 30 October 2026*
