Reasoning That Won't Stop After Finding the Answer: How LoCo Trimmed It Down

LoCo cut reasoning tokens by 40-plus percent using math problems alone while holding accuracy steady. The trick: attach a short ending and a long ending to the same point in a solution and learn by comparing them.
← All posts
온
온틀 리서치
2026년 11월 05일 Updated 2026.11.18 33 min read views 8

Hand a 7B reasoning model a geometry problem from AIME. The model draws an auxiliary line, sets up an equation, and computes a value. It has the answer. But it doesn't stop there. "Wait, is this right?" — and it redoes the same calculation from scratch. Then once more. The third recomputation lands on exactly what the first one did. Hundreds of tokens have gone by in the meantime, and the correct answer was already in hand long ago.

This exact scene is what LoCo (Local Compression) is after. Its angle is a little unusual: rather than "write the whole solution shorter," it teaches, point by point, "did you actually need to think more right here?" We'll walk through the method piece by piece later; first, let's see how far this approach got.

What It Achieved

The results come from training on math problems only, with DeepSeek-R1-Distill-Qwen-7B as the base. Across five math benchmarks, LoCo cut the token count of generated answers by 41-45% while holding or improving accuracy. Two things stand out.

First, compression usually eats into accuracy as problems get harder — but LoCo did the opposite. On the toughest Olympiad and AIME tiers, accuracy actually rose the most.

Second, code was never used in training, yet token counts dropped on code generation too, with accuracy preserved. That means something learned from math carried across domains. That "something" is the heart of this piece.

Overthinking Is a Habit, Not a Skill

A reasoning model forms hypotheses, computes, backtracks, and double-checks before producing an answer. This intermediate trail written out along the way is called a chain-of-thought. Chains-of-thought lifted performance, but generating thousands of extra tokens (a token being the smallest unit the model builds text from, roughly a word fragment) makes responses slower and costs more memory.

Yet this length isn't free, and longer doesn't mean more accurate. The model often reaches the correct answer early in its reasoning and keeps producing thoughts anyway. Drawing on prior work (Zhang et al., 2026a; Peng et al., 2025), the paper's diagnosis is this: the overthinking that happens on solvable problems isn't a matter of insufficient ability but of habit. The model could stop, yet chooses to keep going. So what needs fixing isn't "whether it reaches the answer" but "when it decides to stop."

The Core: Comparing Two Options at the Same Spot

Put LoCo's idea into a single scene. A student who has finished the exam is redoing the same calculation for the third time. What the teacher should say isn't "always write your solutions shorter from now on." It's "right at that moment, the answer was already there, so you should have just wrapped up what was needed and stopped."

That "just what was needed" matters. What LoCo teaches isn't to cut the output off abruptly, but a continuation that wraps up more concisely starting from some point in the same solution. So once training is done, the model doesn't flip a separate stop switch mid-reasoning — it continues the text toward a shorter ending in the first place.

Concretely, here's how it works. From the model's own solution, pick one point where "it could have stopped here." Hold the preceding part fixed, and place side by side a continuation that wraps up quickly from there and the original continuation that ran long. Then train the model to prefer the shorter one.

The whole trick is that both continuations start from the identical preceding part. If you teach "the shorter one is better" lumped over the entire solution as the unit, and the two solutions diverge down different paths midway, you can't tell which passage is safe to trim. Fixing the preceding part narrows the comparison down to one thing: "having reached the same point, which way should it go?" This is also where the explanation comes from for why the effect learned in math carried over to code — more on that later.

Following One Solution Through

All three stages are the process of building training data, not the process the model actually uses to produce an answer. Let's follow a single solution through.

Finding candidates. Feed the completed chain-of-thought back into the model itself and measure how confidently it produced each token (confidence). For each step, split at paragraph boundaries, look at two signals: confidence, and how much the confidence swings between neighboring steps (volatility). A step that just finished is flagged as an overthinking candidate when its confidence is low while its volatility is high. The reason you have to look at both: low confidence alone could mean a genuinely hard sub-problem, and high volatility alone could be a legitimate change of direction. Only when the two overlap does the signal "unstable and spinning in place" stand up.

Checking for redundancy. Confidence alone can't cleanly separate spinning-in-place review from genuine difficulty. So a stronger judge model (Qwen3-30B in the experiments) sorts the next step of each candidate into three categories. Chewing over already-established content again is overthinking, making substantive progress is normal, and presenting the answer is final. This distinction is needed because reasoning models restate or box up the final answer at the end of the chain-of-thought. It may look like repetition on the surface, but it's a passage essential to extracting the answer, so if you mistake it for repetition and delete it, the answer itself disappears. Only the points the judge model confirms as "redundant" pass to the next stage.

Choosing the short ending. Hold the preceding part of the confirmed point fixed and newly generate several continuations from there. Only those that reach the same value as the reference answer (symbolically equivalent) count as valid, and among the valid ones the single shortest is chosen. It's kept as a pair only if it's clearly shorter than the original. That produces a set attaching, to one common preceding part, the continuation to prefer (short and verified) and the continuation to avoid (the original long one), and preference learning runs on this.

Technical note (expand)

Preference learning uses DPO (Direct Preference Optimization), a training method that tells the model in pairs which of two candidates is better and tunes it to produce the preferred one.

Existing compression techniques split into two camps. One takes the whole solution as the unit, comparing the long version against the short version so the model prefers the short one, or folds a length budget into the reinforcement-learning reward (Kimi k1.5's Long2Short, O1-Pruner, and so on). The other deletes filler tokens or redundant sentences from an already-built solution (TokenSkip). Both only ask "which part of the built solution should I delete," never "in this current state, do I need to think more." The observation that "reasoning is not a pre-planned process but a local process where the state changes one step at a time" (Xu et al., 2026) is LoCo's starting point.

The candidate-selection thresholds are the 25th and 75th percentiles (the lower-25% and upper-75% boundaries) drawn from the model's own distribution, catching the band where the lowest confidence and the highest volatility overlap. Answer verification uses math_verify to confirm the symbolic equivalence of expressions (same value even if written differently). That the detection is "causal" means it uses only the information up to the decision point and doesn't look at the trailing part to be cut.

Experiment Design and How to Read It

The training data is all self-generated by the model, and the training queries are math only. Not putting code into training is the premise for the generalization experiment later. The comparison baselines are the untouched base, the mild-reduction DAST, and the aggressive-reduction TokenSqueeze.

There are three metrics too: accuracy, token count, and AUC. AUC is the area under the "accuracy versus token budget" curve drawn by nudging the maximum allowed reasoning length up and down bit by bit. Rather than who wins at a single point, it shows whether a method holds a good balance across the whole range, from a generous budget down to a tight one. That said, AUC and tokens are only proxies for the efficiency-accuracy balance, not a direct measurement of real-service latency and cost.

Detailed settings (expand)

| Item | Setting | |---|---| | Base model | DeepSeek-R1-Distill-Qwen-7B (frozen, LoRA-only training) | | Original solution generation | temperature 0.6, top-p 0.95, shortest correct of 3 rollouts per query | | Judge model | Qwen3-30B | | LoRA adapter | rank 256, dropout 0.05, q/k/v/o projections | | Training | 2 epochs, effective batch 64, AdamW, 4x H20 GPU, max sequence 14,336 tokens | | Eval sampling | 8 completions per problem, vLLM, max 32,768 new tokens / context 36,864 | | Grading | math = `\boxed{}` + math_verify symbolic equivalence / code = sandbox execution of the last Python block | | Math benchmarks | MATH-500 (500), AMC23 (40), Olympiad (675), AIME24 (30), AIME25 (30) | | Code benchmarks | MBPP sanitized (257), LiveCodeBench v5 (167), CodeContests (165) |

LoRA (Low-Rank Adaptation) is a lightweight fine-tuning method that freezes the main body and trains only a small adapter that plugs in.

Results

Here are LoCo's changes relative to the base.

Benchmark Accuracy change (%p) Token savings AUC change
MATH-500 -0.08 (essentially flat) -44.1% +3.92
AMC23 +1.25 -41.7% +6.49
Olympiad +1.45 -44.6% —
AIME24 +3.34 -45.4% +6.49
AIME25 +2.50 -45.2% —
MBPP (code) 0.00 -36.3% +1.53
LiveCodeBench (code) +0.74 -24.7% +2.78
CodeContests (code) +2.13 -23.4% +2.91

Two things read straight off the table. First, on the easy MATH-500 accuracy is essentially unchanged, but on the higher-difficulty Olympiad and AIME tiers the accuracy gains (+1.45, +3.34, +2.50) were the largest. Far from degrading the reasoning power on hard problems, compression actually boosted it. On the same tiers, the paper reports, DAST compressed weakly and sometimes even grew longer on hard problems, while TokenSqueeze reduced aggressively but lost more accuracy as difficulty rose.

Second, on the three code benchmarks that were never used in training, tokens still dropped and accuracy held or edged up, and the AUC was the highest on all three.

It's hard to read the shorter code as new code knowledge being added. What carried over is more naturally seen not as knowledge but as a length preference — "when to keep going and when to stop." Because the training compared only stop-versus-continue while holding the preceding part fixed, the hypothesis is that what got learned was the very sense of "cutting off review that spins in place," rather than the shape of any particular math solution. The two examples in the appendix show this grain. Of two continuations starting from the same preceding part, the chosen ones were 212 tokens and 296 tokens, while the discarded originals were 986 tokens and 1,247 tokens. Nearly 1,000 tokens were shed and they still reached the same value as the reference answer. (Exactly which recomputations spun in place in each example isn't asserted here.)

Limits and Open Questions

Start with the guardrails baked into the design. The judge model's normal/final classification, the answer-equivalence verification of regenerated continuations, and the filter that adopts a pair "only when it's clearly shorter" are all devices to avoid losing the correct answer through indiscriminate compression. Which is to say, this pipeline only works if you know the answer. Because the validity check leans on symbolic equivalence with a reference answer, it's hard to port the same recipe as-is to tasks where the answer is open-ended or unlabeled (open-ended generation, multi-step agent work).

That the detection leans on the model's own confidence statistics is also a weak spot. On a model whose self-confidence is miscalibrated, the overthinking signal can be distorted. And the experiments were run on just one particular 7B model. Whether the same thresholds work as-is on larger or different model families is outside this paper. The paper states it also ran ablations comparing local versus global preference, self-generated versus external continuations, and detector selection versus a simple cutoff — but how many points each component moved isn't something this piece judges.

The ONTLE Take: If We Moved It to Our Own Work

Let's suppose a hypothetical scene. ONTLE's AI PM agent is told, "Investigate this week's Naver publishing failures." Before acting, the agent reasons at length. It lists candidates — session expiry, CAPTCHA, IP change — lays out a check order, then loops back to the first hypothesis and reviews again. By the third review, the conclusion "session expiry is likely" is already in place, yet it keeps the reasoning running. In an agent loop, this overthinking comes right back as latency and cost.

One distinction has to be drawn clearly here. Wrapping up an answer concisely and switching from review to the action of calling a verification tool are different training objectives. LoCo learned the former, on math with answer labels. The latter has a different definition of "what counts as success." So ONTLE's interest isn't "adopt LoCo" but whether we can validate its core idea on our own work.

The research question is framed like this. When you place "chew over the session-expiry hypothesis one more time" and "call the auth-status check tool" side by side from the same reasoning state and compare them, what do you judge as success? If, instead of an answer label, we can use "did that call hit the real cause" as the success criterion, a path opens to port LoCo's fixed-preceding-part comparison to the agent.

Validation doesn't leap from hypothesis to action. Running the same instruction repeatedly, we have to measure together (1) whether the verification-tool call came out at the right moment, (2) whether the final action's success rate holds (whether hasty misdiagnoses didn't increase), and (3) whether latency actually dropped. Only when all three improve together can we say the math benchmark's implications extended to in-house agents.

Notes for Practitioners

  • Decide your compression signal first. Will you reduce by "preferring the whole short solution," or by LoCo's local preference of "stop/continue from the same state"? The former carries a bigger risk of eating into accuracy on hard tasks.
  • Keep automatic cutting from deleting the final-answer step. Mistake the boxing-up finish for repetition and delete it, and answer extraction becomes impossible.
  • Check first whether your domain even has answer labels. If it doesn't, defining what counts as a "verified continuation" is the first design challenge.
Is there a reason you trained on math alone? Wouldn't mixing in code be better?

Math lets you auto-verify correctness through symbolic equivalence, so you can mechanically filter "is the shortened continuation still correct?" Because the pipeline leans on answer labels, math — which is easy to verify — is well suited as a training source. Deliberately leaving out code is also a design choice to cleanly see whether the stopping preference learned on math carries over to other domains.

Does the judge model (Qwen3-30B) run alongside at inference time?

No. The judge model is used only in the stage that builds training data. The trained model is a single 7B with a small LoRA adapter plugged in, generating on its own as usual. It doesn't run an additional 30B model at inference time.

Do you retrain the entire base model?

No. The 7B body stays frozen and only a rank-256 LoRA adapter is trained. Because the preference learning (DPO) targets this small adapter, the structure tunes only the length preference without shaking the original model's capabilities wholesale.

References