When to Ponder: Adaptive Compute Allocation for Code Generation via Test-Time Training

Gihyeon Sim
12/31/2025
cs.LGcs.CL

No confident code implementation found for this paper.

Abstract

Large language models apply uniform computation to all inputs, regardless of difficulty. We propose PonderTTT, a gating strategy using the TTT layer's self-supervised reconstruction loss to selectively trigger Test-Time Training (TTT) updates. The gating decision itself is training-free--requiring no learned classifier or auxiliary networks; only a single scalar threshold is initially calibrated on unlabeled data and continuously adapted via EMA to maintain target update rates. Our experiments with GPT-2 models (124M to 1.5B) on code language modeling (The Stack v2, teacher-forced perplexity) demonstrate that this signal is inference-compatible, requiring no ground-truth labels. Our Reconstruction Gating achieves 82-89% Oracle Recovery while being fully training-free, significantly outperforming Random Skip baselines (up to 16% lower loss on OOD languages).

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Cite this paper

@article{sim2025when,
  title  = {When to Ponder: Adaptive Compute Allocation for Code Generation via Test-Time Training},
  author = {Gihyeon Sim},
  year   = {2025},
  eprint = {2601.00894},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2601.00894v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2601.00894.svg)](https://codeofpaper.com/paper/2601.00894)

Discussion