Machine Learning PapersLandmark papers
← All papers
RESEARCH PAPER / 2026-11-18

Test-Time Symmetrization: Scaling Laws for Model-Agnostic Learning under Structure

Behrooz Tahmasebi, Melanie Weber

Harvard University · ICLR 2027 (Submission)

Affiliations: Harvard University

Abstract

Test-time compute has emerged as a powerful way to improve the accuracy of language models at inference time, with scaling laws quantifying how accuracy improves with additional forward passes. Existing scaling laws, however, focus on repeated sampling from a fixed prompt, even though many tasks admit multiple equivalent representations of the same underlying problem. A graph does not depend on how its nodes are numbered, and a program does not depend on the names of its variables, yet language models can change their answers under such rewritings. In this paper, we study test-time symmetrization, which uses forward passes on rewritings of the input and aggregates the resulting answers over the group $G$ of rewritings. We prove that no amount of sampling and repeated decoding from a single representation can replace rewriting, while only $O(\log |G|)$ random rewritings suffice to recover the information provided by all $|G|$ rewritings. The same set of $O(\log |G|)$ rewritings provides simultaneous approximation across models, decoding rules, and sampled reasoning traces, and the logarithmic scaling is optimal in general. We validate the theory with experiments on Qwen2.5-7B, Phi-4-mini, Llama-3.1-8B, and Qwen2.5-14B, with chain-of-thought reasoning, on graph reasoning, logical deduction, and multiple-choice question answering. At the same number of forward passes, spending them on rewritings of the input is substantially more accurate than spending them on repeated sampling from the original prompt whenever the model's answer depends on how the input is written, and the number of rewritings needed grows only logarithmically with the number of possible rewritings, as the theory predicts. Our results provide a principled way to enforce symmetries at inference time when they cannot be built into the model, which we call model-agnostic symmetrization.

The following analysis is generated by AI and may contain errors. It is separate from the authors’ abstract and is not peer review.

Research summary

The paper presents a rigorous theoretical framework for test-time symmetrization, proving that input rewriting is a distinct and necessary source of test-time compute that cannot be replaced by repeated decoding, and establishing tight logarithmic scaling laws for the number of rewritings required to achieve model-agnostic invariance. By combining representation theory with empirical validation on modern LLMs, the work offers a principled, model-agnostic method to enforce structural symmetries at inference time, significantly advancing the understanding of how to efficiently allocate test-time resources for improved accuracy and robustness.

Methodology

The paper introduces "test-time symmetrization," a framework that treats input rewriting (e.g., permuting graph nodes, renaming variables) as a distinct source of test-time compute from repeated decoding. The core theoretical contribution is a rigorous proof that no amount of sampling from a single representation can replace the information gained from sampling across the orbit of equivalent representations (Theorem 1). Furthermore, it establishes a tight scaling law showing that only $O(\log |G|)$ random rewritings are sufficient to approximate the full group average uniformly across models and decoding rules (Theorem 2). The methodology leverages representation theory and matrix concentration inequalities (Matrix Bernstein) to prove these bounds, providing a principled, model-agnostic approach to enforcing symmetries at inference time without modifying model weights.

Results & evaluation

The authors validate their theory using four popular LLMs (Qwen2.5-7B/14B, Phi-4-mini, Llama-3.1-8B) on tasks with inherent symmetries: graph reasoning, logical deduction, and multiple-choice QA. The experiments confirm that at a fixed compute budget, allocating passes to input rewritings yields higher accuracy than repeated sampling from the original prompt, specifically when the model is sensitive to input formatting. The results align with the predicted logarithmic scaling, demonstrating that the number of required rewritings grows slowly with the size of the symmetry group.

Reproducibility

The paper provides detailed mathematical definitions and proofs in the appendix. However, specific implementation details for the "rewriting" operations (e.g., how exactly graph serializations are permuted or how variable renaming is handled in code) are somewhat abstracted in the main text, relying on the assumption of exact group actions. The use of standard open-source models and common benchmarks aids reproducibility, but the lack of a linked code repository in the provided text limits immediate verification of the experimental setup.

Limitations

The theory assumes exact symmetries and known group structures. The paper acknowledges that for approximate symmetries (e.g., paraphrasing), the guarantees weaken to kernel averages with drift. Additionally, the method requires the ability to generate valid rewritings of the input, which may not be trivial for all unstructured text tasks. The experiments are limited to relatively small models (7B-14B) and specific structured tasks, leaving open questions about scalability to larger models or more complex, less structured domains.

Broader impact

This work provides a fundamental theoretical foundation for understanding the limits of test-time compute. By proving that input-side diversity (rewriting) and output-side diversity (sampling) are non-interchangeable, it shifts the perspective on inference optimization. This has broad implications for designing more robust LLMs that are invariant to superficial changes in input representation, potentially improving reliability in scientific, mathematical, and code generation tasks where structural invariance is critical. The paper presents a rigorous theoretical framework for test-time symmetrization, proving that input rewriting is a distinct and necessary source of test-time compute that cannot be replaced by repeated decoding, and establishing tight logarithmic scaling laws for the number of rewritings required to achieve model-agnostic invariance. By combining representation theory with empirical validation on modern LLMs, the work offers a principled, model-agnostic method to enforce structural symmetries at inference time, significantly advancing the understanding of how to efficiently allocate test-time resources for improved accuracy and robustness.

Author of this paper? Send a correction.