Diagnosing Memorization in Chain-of-Thought Reasoning, One Token at a Time

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Li, Huihan, Chen, You, Wang, Siyuan, He, Yixin, Mehrabi, Ninareh, Gupta, Rahul, Ren, Xiang
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912546014887936
author Li, Huihan
Chen, You
Wang, Siyuan
He, Yixin
Mehrabi, Ninareh
Gupta, Rahul
Ren, Xiang
author_facet Li, Huihan
Chen, You
Wang, Siyuan
He, Yixin
Mehrabi, Ninareh
Gupta, Rahul
Ren, Xiang
contents Large Language Models (LLMs) perform well on reasoning benchmarks but often fail when inputs alter slightly, raising concerns about the extent to which their success relies on memorization. This issue is especially acute in Chain-of-Thought (CoT) reasoning, where spurious memorized patterns can trigger intermediate errors that cascade into incorrect final answers. We introduce STIM, a novel framework for Source-aware Token-level Identification of Memorization, which attributes each token in a reasoning chain to one of multiple memorization sources - local, mid-range, or long-range - based on their statistical co-occurrence with the token in the pretraining corpus. Our token-level analysis across tasks and distributional settings reveals that models rely more on memorization in complex or long-tail cases, and that local memorization is often the dominant driver of errors, leading to up to 67% of wrong tokens. We also show that memorization scores from STIM can be effective in predicting the wrong tokens in the wrong reasoning step. STIM offers a powerful tool for diagnosing and improving model reasoning and can generalize to other structured step-wise generation tasks.
format Preprint
id arxiv_https___arxiv_org_abs_2508_02037
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Diagnosing Memorization in Chain-of-Thought Reasoning, One Token at a Time
Li, Huihan
Chen, You
Wang, Siyuan
He, Yixin
Mehrabi, Ninareh
Gupta, Rahul
Ren, Xiang
Computation and Language
Artificial Intelligence
Large Language Models (LLMs) perform well on reasoning benchmarks but often fail when inputs alter slightly, raising concerns about the extent to which their success relies on memorization. This issue is especially acute in Chain-of-Thought (CoT) reasoning, where spurious memorized patterns can trigger intermediate errors that cascade into incorrect final answers. We introduce STIM, a novel framework for Source-aware Token-level Identification of Memorization, which attributes each token in a reasoning chain to one of multiple memorization sources - local, mid-range, or long-range - based on their statistical co-occurrence with the token in the pretraining corpus. Our token-level analysis across tasks and distributional settings reveals that models rely more on memorization in complex or long-tail cases, and that local memorization is often the dominant driver of errors, leading to up to 67% of wrong tokens. We also show that memorization scores from STIM can be effective in predicting the wrong tokens in the wrong reasoning step. STIM offers a powerful tool for diagnosing and improving model reasoning and can generalize to other structured step-wise generation tasks.
title Diagnosing Memorization in Chain-of-Thought Reasoning, One Token at a Time
topic Computation and Language
Artificial Intelligence
url https://arxiv.org/abs/2508.02037