TL;DR
Self-consistency (SC) significantly boosts large language model (LLM) reasoning accuracy but incurs massive inference costs by requiring dozens of samples. This paper introduces CoT-PoT Ensembling, a hybrid method that alternates between Chain-of-Thought (natural language) and Program-of-Thought (code execution) reasoning. By leveraging cross-modal agreement as a highly reliable early-stopping signal, it slashes sampling costs by 9.3×, allowing the model to confidently terminate after just two samples for 78.6% of tasks while maintaining or improving accuracy.
What Problem Does This Paper Address?
To make LLMs reliable thinkers, researchers often use Self-Consistency (SC): sampling multiple reasoning paths from a model at a high temperature and selecting the most frequent final answer via a majority vote. While effective, SC is a computational hog, frequently requiring 40 or more inference passes per question to reach peak accuracy.
Furthermore, simply cranking up the model's temperature often yields superficial syntactic variations (different wording) rather than true semantic diversity. If a model is prone to a specific logical blind spot, multiple CoT samples might simply replicate the same error. The authors set out to achieve better reasoning diversity with drastically fewer samples.
Methods
The core innovation is combining two fundamentally distinct reasoning modalities:
- Chain-of-Thought (CoT): Concrete, step-by-step natural language reasoning.
- Program-of-Thought (PoT): Abstract, symbolic reasoning where the LLM writes a program (e.g., Python) that is executed externally to compute the final answer.
Instead of sampling from just one modality, the authors introduce a uniform sampling scheme that alternates between generating one CoT and one PoT answer.
To optimize efficiency, they formalize a Bayesian agreement model for early stopping. As sampling progresses, parallel hypothesis tests track cross-modal agreements. If a CoT sample and a PoT sample arrive at the exact same answer, it provides a powerful mathematical signal of correctness. The authors evaluate both data-driven strategies (which learn stopping thresholds from a small validation set) and data-independent heuristics (like $CP_{AA}$, which stops the moment any CoT and PoT sample agree).
Datasets
The framework was evaluated across five diverse math and logic benchmarks using 500 test cases each:
- GSM8K: Elementary to middle-school level word problems.
- MATH: Challenging high-school competition-level math.
- SVAMP: Arithmetic word problems with adversarial phrasing.
- FinQA: Financial analysis requiring reasoning over text and tables.
- TabMWP: Semi-structured problems involving text and tabular data.
Key Insights and Ideas
- Complementary Error Modes: CoT and PoT fail in entirely different ways. CoT is flexible but prone to calculation slips (e.g.,
53 - 35 = 8). PoT is computationally flawless because it executes code, but it can suffer from symbolic formulation errors (e.g., using/instead of%). - Uncorrelated Errors = Stronger Signal: Because the error modes of CoT and PoT have very low correlation, an agreement between them is incredibly meaningful. Within-modality agreement (two CoTs matching) might just mean the model repeated the same logical flaw. Cross-modality agreement means the logical framing (CoT) and the computational structure (PoT) are perfectly aligned.
- Breaking the Four-Sample Barrier: Prior state-of-the-art early-stopping methods (like Adaptive Consistency) require a minimum of 4 to 5 samples just to establish a statistical majority. Because cross-modal agreement is so robust, CoT-PoT can safely stop after exactly two samples (one CoT, one PoT).
Key Results
- 9.3× Fewer Samples: The data-independent any-to-any method ($CP_{AA}$) reduced the average number of required samples from 40 down to just 4.3 while outperforming the CoT-only baseline in accuracy by 0.8%.
- The Two-Sample Majority: Across all tested models and datasets, the early-stopping criteria was satisfied after just two samples in 78.6% of cases. For advanced reasoning models like DeepSeek-R1, this number exceeded 90% on certain benchmarks.
- Token and Latency Efficiency: Because PoT prompts are generally more concise than CoT prompts, the method achieved a 9.8× reduction in token usage. The computational overhead of running the Python code was negligible (~422 ms per program), easily offset by saving dozens of LLM forward passes.
Limitations and Future Work
- Programmatic Constraints: The method shines brightest on tasks that can be naturally formulated as code (math, symbolic logic, financial calculations). For subjective reasoning or long-form QA, the PoT channel provides less value, though preliminary tests on HotpotQA show that models will creatively embed CoT-style reasoning into code comments to maintain structure.
- Weaker Model Vulnerabilities: For smaller models (like Llama-3.2-3B) that have weak native PoT capabilities, aggressive data-independent stopping ($CP_{AA}$) can underperform. In these scenarios, the authors had to bootstrap PoT capability via fine-tuning and rely on more conservative, data-driven stopping methods ($CP_{DFA}$).
Summary updated