Manuscript Offprint

arXiv:2608.30627

REER-PT: Reverse-Engineered Reasoning for Perplexity-Guided Pre-training Data Augmentation

Haoran Que, Jiajun Shi, Ting Huang, Renming Pang, Jiaheng Liu, Ge Zhang, Wenhao Huang, Shen Yan, Wei Ye, Shikun Zhang

Abstract

As language-model compute continues to scale, high-quality training data is becoming an increasingly important bottleneck. Conventional next-token prediction supervises what follows a context but leaves the intermediate reasoning behind that continuation implicit. We introduce REER-PT, a scalable framework that extends Reverse-Engineered Reasoning (REER) to raw pre-training data. REER-PT identifies continuations that are difficult to predict but can still be inferred from the preceding context, and inserts concise reasoning annotations that reconstruct the missing connection between context and continuation. Candidate annotations are generated and refined offline, with perplexity serving as the optimization signal. Constraints on length and target leakage filter out unhelpful or trivial annotations. This sparse transformation preserves the source text and remains compatible with standard next-token prediction, avoiding online reasoning rollouts during pre-training. We apply REER-PT to transform a source pre-training corpus into an augmented one. Across augmented-data, original-token, and selected-continuation comparisons, perplexity reductions range from 0.42 to 7.29, and only about 0.05% of annotation 13-grams appear verbatim in the source text. We then train two 680M-parameter models with the same architecture and training configuration on the source and augmented corpora, respectively. The augmented-data model gains up to 2.07 percentage points on several knowledge and reasoning benchmarks. Together, the perplexity analysis indicates improved continuation predictability, while the controlled pre-training experiments suggest that this augmentation can improve model performance without changing the standard pre-training objective.

Date: September 1, 2026

Correspondence: Haoran Que at hrque25@stu.pku.edu.cn, Ge Zhang at gezhang@umich.edu, Wei Ye at wye@pku.edu.cn

1 Introduction

Large language models acquire most of their capabilities through next-token prediction on massive text corpora [1, 2]. As compute continues to scale, however, high-quality training data is becoming an increasingly important bottleneck [3–5]. Conventional pre-training teaches a model what text follows a context, but rarely explains why it follows. We therefore consider explicitly annotating the intermediate reasoning that connects a context to its continuation. Chain-of-thought (CoT) supervision provides a natural mechanism for representing these dependencies explicitly [6, 7], allowing reasoning signals to be incorporated directly into the training text [8, 9]. Yet most conventional CoT datasets are built from curated question–answer pairs rather than ordinary documents, limiting their scale and domain coverage. In contrast, pre-training corpora already span diverse subjects, genres, and forms of discourse. Synthesizing reasoning annotations directly from these corpora therefore offers a scalable way to enrich existing data and provide reasoning signals across domains without designing separate tasks for each domain [10].

Recent work has introduced reasoning signals into pre-training data, either through generated or latent intermediate thoughts [8, 9, 11, 12] or through reinforcement learning on observed continuations [13–15]. These directions establish the promise of reasoning-aware pre-training, but leave two practical challenges. First, dense or online reasoning generation can be expensive at corpus scale. Second, a fluent model-generated annotation is not necessarily useful. It may be redundant, weakly grounded, or unrelated to the actual difficulty faced by the model. Moreover, high-loss tokens are not always reasoning opportunities; some are unpredictable because they introduce arbitrary names, dates, identifiers, or external facts. Effective corpus augmentation must therefore determine both where reasoning is useful and whether a proposed annotation makes the observed continuation easier to predict.

To address these challenges, we introduce REER-PT, a scalable framework that extends Reverse-Engineered Reasoning (REER) [16] to pre-training data. REER uses the perplexity of a known reference output as an optimization signal, searching over candidate CoT trajectories for reasoning that makes the reference easier to generate. Following this principle, REER-PT uses the perplexity of observed continuations to guide the search for useful reasoning annotations in raw documents. It first identifies difficult-to-predict continuations and retains only those that are inferable from context. For each selected continuation, an annotation model produces a concise, book-note-style annotation that reconstructs the missing connection between the preceding context and the continuation. Candidate annotations are then evaluated and refined offline, and only those that reduce continuation perplexity while satisfying constraints on length and target leakage are retained. Restricting this offline search to a sparse set of difficult yet contextually inferable continuations keeps corpus-scale augmentation efficient and selective. Because annotation generation and refinement are completed offline and the source text is preserved, the augmented corpus can be trained with standard next-token prediction without online reasoning rollouts. Figure 1 illustrates how a reasoning annotation bridges the context and the observed continuation. In the example, the preceding discussion of insulin and glucagon supports the continuation, but the transition to hepatic metabolism remains implicit. REER-PT inserts a concise, third-person, book-note-style annotation that captures this connection without revealing the target content. Conditioning on the annotation lowers the perplexity of the unchanged continuation.

(a) Raw pre-training passage

(b) REER-PT augmented passage

Context. After a meal, insulin promotes glucose uptake and glycogen synthesis. During fasting, insulin levels fall while glucagon rises.

Observed continuation. The liver consequently switches from storing glucose to releasing it through glycogenolysis and gluconeogenesis.

relevant high perplexity

Context. After a meal, insulin promotes glucose uptake and glycogen synthesis. During fasting, insulin levels fall while glucagon rises.

<annotation_begin>

After this hormonal flip, the storage signal is no longer in force, and circulating glucose still has to be kept up. What follows should therefore leave the hormone change and take up the metabolic response that comes next.

<annotation_end>

Observed continuation. The liver consequently switches from storing glucose to releasing it through glycogenolysis and gluconeogenesis.

PPL(y | c, a) < PPL(y | c)

Figure 1 Illustration of REER-PT augmentation. Given a context c and an observed continuation y with relatively high perplexity, REER-PT inserts a concise reasoning annotation a that makes the implicit transition explicit. The original continuation is preserved, while conditioning on the annotation makes it easier to predict: PPL(y∣c,a)<PPL(y∣c)\text{PPL}(y \mid c, a) < \text{PPL}(y \mid c).

We apply REER-PT to transform a source pre-training corpus into an augmented one and analyze the resulting data at the augmented-data, original-token, and selected-continuation levels. Across these comparisons, perplexity reductions range from 0.42 to 7.29, and only about 0.05% of annotation 13-grams appear verbatim in the source text. We then compare two 680M-parameter models with the same architecture and training configuration, trained on the source and augmented corpora, respectively. The augmented-data model gains up to 2.07 percentage points on several knowledge and reasoning benchmarks. Together, the perplexity analysis indicates improved continuation predictability, while the controlled pre-training experiments suggest that this augmentation can improve model performance without changing the standard pre-training objective.

Our main contributions are as follows:

  • We introduce REER-PT, a scalable framework that augments raw pre-training data with concise reasoning annotations that make implicit connections between context and continuation explicit. It selects difficult continuations that can be inferred from context and retains annotations that reduce continuation perplexity while preserving the original text.

  • We apply REER-PT at corpus scale and analyze the resulting augmented data at the augmented-data, original-token, and selected-continuation levels. Across these comparisons, perplexity reductions range from 0.42 to 7.29, and only about 0.05% of annotation 13-grams appear verbatim in the source text. A comparison of two 680M-parameter models with the same architecture and training configuration further shows gains of up to 2.07 percentage points on several knowledge and reasoning benchmarks.

References (41)