Solving a Million-Step LLM Task with Zero Errors
基本信息
- 标题: Solving a Million-Step LLM Task with Zero Errors
- 第一作者: Elliot Meyerson (Cognizant AI Lab)
- 研究团队: cognizant_ai_lab, ut_austin
- 会议/期刊: arXiv:2511.09030v1 [cs.AI], 2025
- 代码: https://www.github.com/cognizant-ai-lab/neuro-san-benchmarking
- PDF 文件: [Solving a Million-Step LLM Task with Zero Errors](file:///C:/Users/admin/.openclaw/workspace/attachment/papers/20260708_solving_million_step_llm_zero_errors.pdf)
研究摘要
The question of whether large language models can reliably execute tasks at the scale of human organizations and societies sits at the frontier of AI research. While LLMs have demonstrated remarkable breakthroughs in reasoning, insight generation, and tool use, these capabilities have largely been evaluated on benchmarks involving relatively few dependent logical steps — tasks where an accuracy of 99% might be considered excellent. Yet this paper confronts a stark reality: a system with even a seemingly modest 1% per-step error rate will almost surely fail before completing a task requiring thousands of consecutive correct steps, let alone one million. This is not merely a quantitative gap but a qualitative barrier — the difference between a technology that can assist with discrete queries and one that can be entrusted with large-scale, safety-critical processes such as hospital operations, national benefit administration, or complex supply chain management.
The fundamental research problem addressed by this paper is therefore both precise and profound: how can LLM-based systems achieve zero-error execution over arbitrarily long sequences of dependent steps? The authors approach this challenge not by pursuing the predominant paradigm of building ever-more-intelligent base models — what they term the "vertical" scaling direction — but by exploring an orthogonal axis: massively decomposed agentic processes (MDAPs). The key intellectual contribution is the realization that reliability at scale does not require a superintelligent monolithic agent, but rather an extreme decomposition of the task into minimal subtasks, each solvable by focused "microagents," combined with efficient error correction through multi-agent voting.
This reframing carries significant theoretical weight. The paper formalizes the MDAP framework through scaling laws that rigorously characterize how the probability of success and expected cost evolve with task length and decomposition granularity. These laws reveal a striking asymmetry: under maximal agentic decomposition (MAD), where each agent handles exactly one step, the expected cost scales log-linearly with the number of steps —
The empirical validation of this framework is equally impressive. The authors implement MAKER (Maximal Agentic decomposition, first-to-ahead-by-K Error correction, and Red-flagging) and apply it to the Towers of Hanoi problem with 20 disks, a task requiring
The impact of this work extends far beyond the benchmark domain. It establishes the concept of "multi-agent advantage" — analogous to quantum advantage — where a multi-agent system can solve problems that are fundamentally intractable for monolithic single-agent approaches. More broadly, it suggests a paradigm shift in how we think about scaling AI: instead of relying solely on the continual improvement of base LLM intelligence, we can achieve scalable reliability through architectural decomposition and error correction. This has profound implications for the deployment of LLMs in real-world processes where errors are not merely inconvenient but potentially catastrophic.
理论框架
The theoretical foundations of this work draw from multiple intellectual traditions that, when woven together, create a compelling case for extreme decomposition. At the most basic level, the paper builds upon the established observation — documented extensively in prior work by Shojaee et al. (2025), Sinha et al. (2025), and Dziri et al. (2023) — that LLM performance deteriorates significantly, often exponentially, with task horizon length. This "illusion of execution" reveals a fundamental liability: even when LLMs possess the raw intelligence to solve a problem, they cannot reliably execute solutions requiring many dependent steps.
The authors connect this observation to the well-established principle of error correction across computing and biological domains. From Shannon's mathematical theory of communication to error-correcting codes in memory storage and quantum computing, the lesson is consistent: reliable large-scale computation requires mechanisms to detect and correct errors at the appropriate granularity. In biological systems, error correction correlates with lifespan and body size — elephants exhibit the most impressive DNA repair mechanisms, enabling them to grow large without succumbing to cancer. The paper extends this principle to what it terms "linguistic computing" (LbAs, or language-based algorithms), arguing that error correction is equally critical for scaling LLM-based processes.
The central conceptual innovation is Maximal Agentic Decomposition (MAD). Consider a task requiring
The theoretical analysis begins by modeling the probability of generating a correct action sequence without decomposition. For a correct sequence
where
The key insight is that modularity enables error correction. The paper adopts a first-to-ahead-by-
This formula is elegant in its simplicity: as
The paper derives comprehensive scaling laws by combining decomposition level
Remarkably, this simplifies to the same form as the single-step case — the dependence on
This equation is the backbone of the paper's theoretical contribution. For a target success probability
The derivation in Appendix B shows that
The cost analysis, framed within the AALPs (Analysis with LLM Primitives) framework, reveals the dramatic efficiency of MAD. Let
The exponential dependence on
This log-linear scaling is the theoretical guarantee that makes million-step tasks feasible. Figure 5 in the paper visualizes this phenomenon dramatically: on a log-log plot, the cost for
With red-flagging — discarding responses that exceed length thresholds or violate formatting — the cost formula incorporates the validity rate
This completes the theoretical picture: extreme decomposition enables efficient error correction, which enables log-linear cost scaling, which makes arbitrarily long tasks solvable with practical resources.
技术架构
MAKER is conceived as a system of agents where each agent's role is defined entirely by the single subtask it is assigned — a deliberate departure from anthropomorphized agents with human-level roles. This design philosophy, advocated in prior work by Meyerson and Qiu, seeks to exploit the inherent machine-like nature of LLMs rather than forcing them to emulate human reasoning styles. The architecture consists of three deeply intertwined components that together transform an intractable million-step problem into a solvable one.
At the highest level, MAKER operates as a pipeline where the state of the world flows from one microagent to the next. The process begins with an initial state
The three core algorithms formalize this flow. Algorithm 1, generate_solution, orchestrates the main loop: it initializes an empty action list and the starting state, then iteratively calls do_voting for each step, appending the resulting action to the list and updating the state. Algorithm 2, do_voting, implements the first-to-ahead-by-get_vote, and terminates when one candidate leads all others by at least get_vote, handles the lowest level of the stack: it repeatedly samples from the LLM until obtaining a response that passes red-flag checks, then parses the move and next state from the valid response.
The first architectural pillar is MAD itself. In the Towers of Hanoi implementation, each agent is given the absolute minimum context required: the overall strategy (which works for any even number of disks), the current configuration of disks across the three pegs, and the previous move. The agent must output exactly two things: the next move in the format move = [disk_id, from_peg, to_peg] and the resulting next state as next_state = [[...], [...], [...]].
This minimal-context design serves multiple purposes. It prevents context dilution — the well-documented phenomenon where LLMs lose reliability as the amount of irrelevant context increases. It enables the use of smaller models with limited context windows. And perhaps most importantly, it makes each agent's task so focused that the probability of correct execution is maximized. The paper explicitly notes that this design isolates execution capability from insight capability: the strategy is provided a priori, so the agents need only follow instructions, not discover solutions.
The second pillar is the voting mechanism. For each step, multiple agents are queried in parallel to propose the next action. Rather than using a fixed number of samples and taking a majority vote, MAKER employs a sequential stopping rule: sampling continues until one candidate is ahead of all others by
The choice of
The third pillar addresses a subtle but critical issue: correlated errors. The theoretical analysis assumes independent and identically distributed (i.i.d.) errors, but in reality, certain inputs can trigger systematic failures across multiple sampling attempts. Red-flagging mitigates this by discarding responses that exhibit signs of pathological behavior.
Two red flags are implemented. The first is response length: if an agent's response exceeds 750 tokens, it is discarded. The intuition, supported by preliminary experiments and prior work on "lost in the middle" effects, is that overly long responses indicate the model has entered a confusion spiral — over-analyzing, second-guessing, and reasoning in circles. The second red flag is formatting correctness: responses that do not strictly adhere to the required output format are discarded without attempted repair. The hypothesis is that formatting errors correlate with reasoning errors — if the model cannot follow the simple structural constraint, its logical reasoning is likely compromised as well.
The red-flagging parser is intentionally strict compared to the "repairing parser" used during initial estimation. Where the repairing parser attempts to extract intended meaning from malformed outputs, the red-flagging parser rejects anything imperfect. This strictness trades some samples for substantially higher effective reliability, a trade-off that the cost analysis shows is overwhelmingly favorable at scale.
Several implementation decisions merit attention. The use of batch API calls enables efficient asynchronous sampling, dramatically reducing wall-clock time and cost for estimation experiments. The max token threshold of 750 for the full run was selected based on empirical observation that error rates increase precipitously beyond approximately 700 tokens. The choice of gpt-4.1-mini over cheaper models like gpt-oss-20B was driven by API reliability — a critical factor when millions of calls are required. These practical considerations underscore that the framework is not merely theoretical but designed for real-world deployment.
实验评估
The experimental validation of MAKER proceeds through a carefully structured pipeline: first establishing the per-step error characteristics of candidate models, then projecting costs to select the optimal configuration, and finally executing and analyzing the full million-step task.
The benchmark domain is Towers of Hanoi with 20 disks, requiring exactly
The evaluation metric is unforgiving: zero errors across all steps. Any single incorrect move invalidates the entire sequence, making this a strict test of reliability rather than aggregate accuracy.
Before committing to the full experiment, the authors estimate per-step error rates across a spectrum of LLMs by sampling random subsets of steps. A crucial design choice enables efficient estimation: because the overall strategy is embedded in every agent's prompt, the correct answer for any step is known in advance, and steps can be evaluated independently via batch API calls.
Figure 6a presents the single-step error rates across various models as the number of disks increases. Two findings are particularly striking. First, the per-step error rate is remarkably stable as the number of disks grows — there is no explosion in difficulty as the task horizon extends. This stability is highly encouraging because it suggests that MAKER's scalability is not limited by compounding task complexity. Second, and perhaps counterintuitively, relatively small non-reasoning models like gpt-4.1-mini achieve comparable or better per-step error rates than more advanced reasoning models like o3-mini. Figure 6b confirms this is not due to differences in output length, as the models use similar numbers of tokens.
The estimated parameters for candidate models are summarized in the following table:
| Model | $/M Tok (Output) | Mean Tokens | E[cost] @ |
||
|---|---|---|---|---|---|
| gpt-4.1-nano | $0.4 | 842 | 0.3571 | 29 | $41.9K |
| gpt-4.1-mini ( |
$1.6 | 580 | 0.0040 | 4 | $4.9K |
| gpt-4.1-mini ( |
$1.6 | 538 | 0.0022 | 3 | $3.5K |
| o3-mini (low) | $4.4 | 535 | 0.0018 | 3 | $9.4K |
| haiku-4.5 | $5.0 | 588 | 0.1839 | 12 | $71.2K |
| llama-3.2-3B | $0.06 | 434 | 1.0 | — | — |
| gpt-oss-20B | $0.2 | 1104 | 0.0358 | 6 | $1.7K |
| qwen-3 | $0.6 | 449 | 0.2342 | 15 | $11.5K |
| deepseek-v3.1 | $1.7 | 1004 | 0.0569 | 6 | $14.6K |
| kimi-k2 | $3.0 | 925 | 0.0393 | 6 | $22.9K |
This table reveals that cost-effectiveness depends on the ratio of model capability to price, not either factor alone. Although gpt-oss-20B has the lowest projected cost at $1.7K, API reliability concerns led to selecting gpt-4.1-mini at $3.5K for the scale-up experiment. The gpt-4.1-nano, despite having the cheapest per-token cost, is rendered infeasible by its high error rate. Similarly, o3-mini achieves the lowest per-step error rate but its higher per-token cost makes it more expensive overall than gpt-4.1-mini.
With the calibrated parameters — gpt-4.1-mini,
Figure 8 analyzes the convergence behavior by tracking the number of "undecided" steps after each sampling and voting round. The exponential decay is striking: after the initial
One step — step 10241 — required 18 voting rounds, far more than any other. This pathological case, visualized in Figure 11, involved three racing candidates: one correct and two identical incorrect answers. The fact that voting eventually resolved this case correctly, despite the correlated errors, validates the theoretical predictions and motivates future work on more sophisticated decorrelation methods.
Figure 9 provides empirical evidence for both hypothesized benefits of red-flagging. Figure 9a shows that the per-step error rate increases precipitously once responses exceed approximately 700 tokens, confirming that length is a reliable indicator of confusion. However, because few responses are overly long, the overall impact on average error rate is modest.
The more important effect is shown in Figure 9b, which compares "collision counts" — the number of steps where both of the first two votes are incorrect — across different parser configurations. Under the i.i.d. assumption, the expected collision count should be negligible (one or two at most). Yet with a high max token cutoff and the repairing parser, observed collisions are dramatically higher, indicating correlated errors. The red-flagging parser successfully reduces these collisions, confirming that format-based filtering effectively decorrelates errors. This decorrelation is not merely a nice-to-have optimization but appears critical to the method's success on million-step tasks.
案例研究
The paper provides sample responses that illuminate how MAKER operates in practice and why its design choices matter. These cases reveal not only the method's strengths but also the failure modes it must overcome.
A representative "short sample" from step 950202 occupies a mere 256 tokens. The agent receives the previous move [2, 2, 1] (disk 2 moved from peg 2 to peg 1) and the current state. It immediately applies the strategy rule: since disk 2 (not disk 1) was moved previously, the next move must be disk 1 clockwise one peg. Disk 1 is on peg 0, so clockwise takes it to peg 1. The agent updates the state accordingly and outputs both the move and next state in perfect format. This exemplifies the ideal MAD behavior: focused, minimal reasoning leading to a correct answer with no extraneous content.
The contrast with the "long sample" from step 539011 is illuminating. This response consumes the full 2048 token budget and demonstrates a classic confusion spiral. The agent begins correctly — it identifies the previous move and the current state — but then encounters what appears to be a genuine ambiguity in its reasoning: there seem to be multiple legal moves excluding disk 1, violating the assumption that such a move should be unique. Rather than recognizing that this apparent multiplicity indicates an error in its state analysis, the agent embarks on an extended circular deliberation, repeatedly checking the same facts, questioning whether disk ordering is bottom-to-top or top-to-bottom, and ultimately hitting the token limit before it can resolve its confusion.
The remarkable aspect of this case is that the agent does eventually output a formatted answer despite its tortured reasoning. Under a repairing parser, this response might be accepted. Under the red-flagging parser, the excessive length alone triggers rejection, and the sample is discarded. This case powerfully illustrates why red-flagging is not merely a heuristic but a principled response to a known failure mode: when LLMs get confused, they tend to talk themselves in circles, and length is a reliable symptom.
The most instructive case is step 10241, which required 18 voting rounds. Three candidates emerged: Candidate A (correct) proposed moving disk 2 from peg 2 to peg 1; Candidates B and C (both incorrect, converging on the same wrong answer) proposed moving disk 13 from peg 1 to peg 2. The incorrect candidates share a common failure pattern: they misidentify the "only legal move not involving disk 1" by incorrectly assessing which moves are legal given the current state configuration.
What makes this case pathological is not merely that errors occurred, but that the same error occurred twice in the first two votes — a collision. This correlation suggests that the particular state configuration at step 10241 creates a systematic blindspot in the model's reasoning. The fact that Candidate A eventually prevailed, pulling ahead after additional samples, demonstrates the statistical robustness of the voting mechanism. But the existence of such pathological cases also underscores the importance of the decorrelation methods discussed in the paper's future work section — techniques like prompt paraphrasing or noise injection that could prevent specific inputs from consistently triggering the same failure mode.
综合价值与局限
This paper changes how we conceptualize the scaling of LLM-based systems. The prevailing mental model treats intelligence as a scalar quantity — more capable models solve harder problems — and scales vertically by building bigger, more expensive, more "intelligent" base models. The MDAP framework introduces a fundamentally different axis: horizontal scaling through decomposition and error correction. The formal scaling laws are particularly valuable because they provide principled guidance for system design. The proof that MAD achieves
The practical implications are substantial and immediate. For any organization seeking to deploy LLMs in processes requiring thousands or millions of dependent steps — whether in software engineering workflows, scientific computing pipelines, or administrative processes — MAKER offers a viable path to reliable execution. The fact that small, cheap models suffice means that cost-effective deployment is possible today, without waiting for the next generation of frontier models. The projected $3,500 cost for a million-step task, while not trivial, is well within the budget of many research labs and commercial applications.
The paper's greatest strength is its tight integration of theory and practice. The scaling laws are not post-hoc rationalizations but predictive tools used to select models and parameters before the expensive full-scale experiment. The empirical validation is equally rigorous: zero errors across over one million steps is an unambiguous result that cannot be attributed to statistical noise or favorable evaluation. The writing is also commendably honest about limitations and future work, discussing not only what the method achieves but where it might fail.
Several limitations deserve honest acknowledgment. First, the framework assumes tasks can be decomposed into small, uniform subtasks with known strategies. This "execution" focus deliberately excludes "insight" — the creative generation of plans and strategies. Many real-world problems do not come with a known optimal strategy, and automating the decomposition itself remains an open challenge. Second, the theoretical analysis assumes i.i.d. errors, yet the pathological step 10241 demonstrates that correlated errors do occur. While red-flagging mitigates some correlation, more sophisticated decorrelation methods may be needed for broader applicability. Third, Towers of Hanoi, while an excellent stress test, is a deterministic domain with a single correct path. Real-world tasks often allow multiple valid approaches and may tolerate occasional errors — though the paper argues convincingly that striving for zero errors yields methods that are robust even in more forgiving domains.
The paper connects its framework to microservices architecture, drawing illuminating parallels: modularity, independent scaling, design for failure, and evolutionary design. This connection suggests that the software engineering lessons of the past decade may guide the agentic architectures of the next. The safety implications are equally thought-provoking: if powerful capabilities can be achieved through many small, focused agents rather than single monolithic superintelligent systems, the risks of harmful emergent behaviors may be substantially reduced. Each microagent's limited scope enables better sandboxing, auditing, and control.
延伸阅读与思考
This paper builds upon several important prior contributions. Shojaee et al. (2025) introduced the Towers of Hanoi benchmark and documented the catastrophic failure of state-of-the-art reasoning models on long-horizon tasks. Sinha et al. (2025) identified the "illusion of diminishing returns" in LLM execution and showed that even small improvements in subtask performance can yield exponential gains in achievable task length. Meyerson and Qiu (2025) proposed the AALPs framework for analyzing LLM-based algorithms in terms of primitive operations, which this paper uses for its cost analysis. Dziri et al. (2023) demonstrated fundamental compositionality limits in transformers, providing the theoretical backdrop for why decomposition is necessary.
Several alternative approaches to improving LLM reliability exist. Self-consistency voting (Wang et al., 2022) improves chain-of-thought reasoning by sampling multiple reasoning paths and taking the majority answer, but operates at the level of complete solutions rather than individual steps. Grammar-constrained decoding (Geng et al., 2025; OpenAI, 2024) enforces output structure at the token level, improving reliability but not addressing reasoning errors. Semantic density methods (Qiu and Miikkulainen, 2024) quantify uncertainty by measuring consistency across samples, offering a more nuanced alternative to simple voting. Self-reflection approaches (Manakul et al., 2023) enable LLMs to detect and correct their own errors, though these add latency and cost. MAKER distinguishes itself by applying correction at the finest possible granularity — the single step — and by combining decomposition with voting in a mathematically principled way.
The paper itself outlines rich avenues for future work. Automating the decomposition process is perhaps the most important: rather than assuming a known strategy, the system could recursively decompose tasks using decomposition agents, discriminator agents for voting on decompositions, and composition agents for aggregating sub-solutions. Preliminary experiments on large-digit multiplication (Appendix F) show promise in this direction. Another critical direction is error decorrelation: methods like prompt paraphrasing (Wahle et al., 2024) or systematic prompt noise injection could reduce the pathological correlations observed at step 10241. Extending the framework to heterogeneous agents — using different models for different roles — could further improve reliability and cost-effectiveness. Finally, applying MDAPs to real-world domains such as software engineering, scientific simulation, or administrative workflow automation would test the framework's generalizability.
The deepest open challenge is characterizing which tasks admit effective decomposition and which do not. At the lowest level, all computation decomposes into CPU instructions; at the highest level, some problems may resist any intermediate linguistic decomposition that preserves correctness. Understanding the computational complexity of finding good decompositions — the "decomposition gap" between primitive operations and high-level goals — is a foundational question for the field. Another deep challenge is handling tasks where errors are not binary but graded, where multiple solutions are valid, or where the task structure itself is dynamic and unknown.
The most thought-provoking aspect of this work is the concept of "multi-agent advantage" — the idea that there exist problems solvable by multi-agent systems that are fundamentally intractable for any single agent, no matter how powerful. This is a genuine paradigm shift. It suggests that the path to scalable, reliable AI may not lie in building ever-larger monolithic models but in architecting systems that distribute intelligence across many small, focused components. The realization that gpt-4.1-mini — a modest, non-reasoning model — can achieve what frontier reasoning models cannot, simply through proper decomposition and error correction, is both humbling and inspiring. It reminds us that in complex systems, architecture often matters more than raw capability. The image of a million microagents, each doing one small thing correctly, collectively accomplishing what no single mind could do alone, is a powerful metaphor for a new kind of artificial intelligence — not a superintelligent individual, but a supercapable organization.
笔记创建时间: 2026-07-08
阅读方式: L2 深度阅读
Topics:
- "multi_agent_systems"
- "reasoning"
- "agent_architecture"
- "llm"
- "test_time_scaling"
References: - "cognizant_ai_lab"
- "ut_austin"