arXiv:2610.27157cs.LGOct 2026

Manuscript Offprint

arXiv:2610.27157

Understanding the Benefits of Scaffolds through Computational Separations

Jingchu Gai, Adam Block, Andrej Risteski

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Inference-time harnesses, i.e., external procedures that call a model many times and keep state across calls, can substantially improve model capabilities. In this paper, we investigate the benefits of using such harnesses and the extent to which these benefits can be internalized through training. More precisely, we conceptualize a harness A as an arbitrary wrapper around a base model M and attempt to distill a student model from the harness's traces. Empirically we find that, even with simple scaffolds and small models, the inference-time harness significantly outperforms a distilled student. We then prove that such a gap is due to a fundamental representational limitation: inference-time harnesses can compute a closure of their per-call primitive that is NL-complete even when the primitive is a trivial AC0AC^0 lookup, and that no fixed-depth forward pass can represent under the widely believed conjecture that NL⊈TC0NL \not\subseteq TC^0. Our theory suggests that expanding the representational capacity of the student relative to the task at hand, e.g., by enlarging the model, making the task easier, or lengthening its chain-of-thought, is necessary to close the gap, which we verify empirically. Finally, we scale to an agentic harness on competition math, where the same gap reappears. Overall, our results show that a harness confers on the base model a profound gain in representational power, one that training a same-class student on its traces cannot transfer back into the weights.

1 Introduction

Much of the recent progress on challenging reasoning and agentic tasks depends on the workflow surrounding a language model. An inference-time harness (or scaffold) keeps the underlying model fixed, but calls it repeatedly, maintaining state and choosing later queries based on earlier answers. Harnesses range from sampling and selecting complete solutions (Wang et al., 2022; Cobbe et al., 2021) to searching over partial solutions (Yao et al., 2023), backtracking with a verifier (Rohatgi et al., 2026), coordinating agents (Du et al., 2023), and incorporating tools and environment feedback (Yao et al., 2022).

There is something puzzling about how elementary some of these strategies are—and why they should improve the performance of already strong models. For example, early systems achieving IMO gold-level performance (Huang & Yang, 2025) and autonomous mathematics research systems like Aletheia (Feng et al., 2026) use designed, but simple loops of maintaining a candidate set of solutions, expanding them, and pruning them by verification occasionally. Why should a model capable of sophisticated mathematical reasoning benefit so much from having such a simple strategy imposed from outside?

Moreover, considering that simplicity of design is often desirable, the fact that carefully designed harnesses are needed to achieve strong performance raises the question of whether one can expect a model to learn such strategies on its own, thereby internalizing the benefits of a harness. Indeed, Cundy & Ermon (2024) train models to perform backtracking themselves and Gandhi et al. (2024) to search by learning from serialized search traces. It is unclear, however, when one can expect this internalization to be successful and when a practitioner would be better off simply using a harness at inference-time.

There is likely more than one reason why a harness can improve performance: for example, it may increase the effective capacity of the underlying model, provide a form of error correction, or provide implicit decomposition of the target task into semantically meaningful subtasks (Zhang et al.). While these intuitions are plausible, turning them into a predictive theory that can guide harness design requires precise hypotheses that can be tested quantitatively and, ideally, proved under suitable assumptions. The prevalence and success of harnesses make this an increasingly important task.

In this paper, we examine the success of inference-time harnesses through a computational lens: we show a model capable of executing each individual step of a harness may nevertheless be unable to represent the computation performed by the composition represented by the harness. We first investigate this hypothesis experimentally, then give a theoretical setting in which such internalization is provably impossible under standard computational modeling assumptions of the base model.

We first perform controlled experiments on Dyck languages (a formal language of valid nested parentheses) and Sokoban (a maze-like puzzle game), where we can train a model from scratch and vary the difficulty of generalization. We train a base model on ground-truth demonstrations, then augment it with a harness: either a principled backtracking algorithm (VGB) introduced by Rohatgi et al. (2026), or A* search with model-pruned expansions (Hart et al., 1968; Lehnert et al., 2024). Together, the harness and base model specify a teacher whose behavior we attempt to reproduce with a student of the same size and model class as the base model. The student is trained on the teacher's traces, either from scratch or by fine-tuning the base model. In both cases, a substantial gap remains, particularly out of distribution. Changing the amount and composition of training data, the trace format, or the number of training iterations does not close this gap in the settings we test.

Why does this training fail to reproduce the teacher's behavior? One possible explanation is that a harness fundamentally increases the representational capacity of the base model, so that reproducing the harness requires a larger model than executing its individual calls. We investigate this by increasing the student's size while keeping the teacher fixed: sufficiently large students match and eventually exceed their teacher's performance. We also test a complementary hypothesis that a simpler harness should be easier for the original student to internalize. Specifically, we replace verifier-controlled backtracking with a rule that deletes a fixed number of tokens and regenerates. The same-sized student can match this simpler teacher.

Model size is not the only reasonable consideration: a student may also need more “reasoning steps” to carry out the harness’s computation. Indeed, recent work has shown that increasing the length of a chain of thought can be understood to mimic the representational capacity of a much deeper model (Merrill & Sabharwal, 2024; Li et al., 2024; Merrill & Sabharwal, 2026a; Amiri et al., 2025). In particular, on modular arithmetic, we find that training a model to use a longer chain of thought lets it match and eventually exceed the accuracy obtained by augmenting a shorter-chain model with verifier-guided search. These experiments suggest that successful internalization depends on the student’s size, the number of reasoning steps it can take, and the complexity of the strategy it must reproduce.

These observations motivate a formal separation in representational capacity. We consider directed s-t reachability (Jones, 1975), the task of path-finding in a graph. To model a search harness, we think of vertices as reasoning states and edges as valid transitions. The base model only answers local edge queries, which are adjacency-matrix lookups computable by constant-depth Boolean circuits ( AC0AC^{0}). The harness maintains a search frontier and visited set, using these queries to perform breadth-first search and decide reachability in polynomial time.

Internalizing the harness requires the student to decide reachability from the graph itself. Under standard precision assumptions, fixed-depth transformers of polynomial size can be simulated by constant-depth threshold circuits (TC 0^{0}), even with logarithmic-length chain-of-thought (Li et al., 2024; Merrill & Sabharwal, 2026a). Since directed reachability is NL-complete, the widely believed computational complexity separation NL ⊈\not\subseteq TC 0^{0} implies that no such student can reproduce the harness on all inputs. The separation thus captures a concrete obstacle to internalization: composing local decisions through an external search procedure can exceed the students' representational capacity.

Finally, we examine whether the same pattern persists with an agentic harness around a pretrained language model. We use Branching (Bateni et al., 2025), which organizes model calls into a tree: leaves propose solutions independently, and internal nodes synthesize new solutions from their children. Using Qwen3-1.7B on competition mathematics (DAPO-Math-17k), we flatten the teacher's runs into transcripts and LoRA fine-tune the same backbone to reproduce them in a single autoregressive rollout. As the branching factor d and depth L increase, the teacher's accuracy improves while the student's eventually plateaus, widening the gap. Increasing the LoRA rank yields only modest gains, whereas enlarging the backbone

Figure

Figure 1: Same-size students cannot recover the teacher. ID (blue) / OOD (magenta) accuracy of the base model and the two students; dashed lines denote the teacher.

closes the gap. These results support the same interpretation as our controlled experiments and theory: internalizing a harness may require a larger model than the one used in the harness.

References (43)