- The paper introduces SECToR, showing that using chain-of-thought reasoning as a policy improvement operator allows language models to self-improve on multi-digit addition.
- It outlines a two-phase method with supervised fine-tuning followed by self-training using model-generated data and robust consistency checks.
- Experimental results demonstrate that the approach achieves significant generalization in arithmetic tasks, reducing dependence on human-curated data.
The paper "Chain-of-Thought Reasoning is a Policy Improvement Operator" (2309.08589) introduces SECToR (Self-Education via Chain-of-Thought Reasoning), a method demonstrating that LLMs can teach themselves new skills, specifically multi-digit addition, without continuous human-provided data. The core idea is that chain-of-thought (CoT) reasoning acts as a "policy improvement operator," analogous to how Monte-Carlo Tree Search (MCTS) improves policies in systems like AlphaZero.
Core Concept: CoT as a Policy Improvement Operator
The central hypothesis is that prompting a LLM to use step-by-step CoT reasoning allows it to solve problems it couldn't solve directly. SECToR leverages this by:
- Having the current model (Modelt​) use CoT to generate solutions for problems slightly beyond its direct capabilities.
- Training the next iteration of the model (Modelt+1​) to produce these CoT-generated solutions directly, without explicit reasoning steps.
- The improved Modelt+1​, when augmented with CoT, can then tackle even more complex problems, allowing the self-learning loop to continue.
This process is visualized in Figure 1 of the paper and further detailed in an appendix figure (reproduced below for clarity):
t+1​5
Simplified loop based on Figure in Appendix
Methodology: SECToR for Addition
The paper demonstrates SECToR using multi-digit addition as a benchmark task. The process involves two main phases:
- Supervised Fine-Tuning:
- Initial Training: A pre-trained LLM (ByT5, chosen for its byte-level tokenization to avoid arithmetic tokenization issues) is first fine-tuned on addition problems with a small number of digits (e.g., 1 to 6 digits).
- Two Task Types:
- Fast Addition (without CoT): The model is trained to output the sum directly (e.g., "Q: 141 + 123 = ? A: 264.").
- Slow Addition (with CoT): The model is trained to perform one step of simplification, akin to how children learn addition (e.g., "Q: 141 + 123 = ? A: The first number's last digit is 1... The next subproblem is 14 + 12.").
- Curriculum Learning: The model must achieve satisfactory performance on N-digit problems before (N+1)-digit problems are introduced. This is crucial for building foundational skills. Satisfactory performance was defined as ≥75% accuracy on "fast" N-digit addition and 100% on "slow" N-digit addition.
- Transition to Self-Training: This phase ends when the model demonstrates strong generalization to (N+1)-digit "slow" addition using CoT, even though it was only trained up to N-digit problems. For the 582M parameter ByT5 model, this occurred after training on 1-6 digit addition, showing generalization to 7-digit "slow" addition.
- Self-Training:
- Model-Generated Data: All new training data is generated by the model itself, without access to ground truth answers.
- Generating "Slow" Examples: Since CoT-augmented models generalize well, "slow" addition examples for (N+1)-digits are generated by directly sampling from the current model using greedy decoding.
- Generating "Fast" Examples (Simplify-then-Guess): "Fast" addition doesn't generalize as well. To generate these examples, SECToR uses a method called "simplify-then-guess":
- The model is asked to simplify an (N+1)-digit problem K times using its "slow" CoT ability (e.g., an 8-digit problem becomes a 7-digit problem, then a 6-digit, etc.).
- After each simplification step, the model directly guesses the final solution to the original (N+1)-digit problem using its current "fast" addition capability on the simplified sub-problem.
- The final answer for the (N+1)-digit "fast" addition training example is determined by a majority vote over these K intermediate guesses. The paper used K=5.
This process is illustrated in Figure 2 of the paper.
* Mitigating Error Avalanching: A key challenge in self-training is "error avalanching," where small errors in model-generated data compound over iterations. SECToR employs consistency checks:
* Simplify-then-Guess inherently: The majority vote provides some robustness.
* Commutativity Checks: For any problem a+b, the model also solves b+a.
* For "fast" addition, the answers for t+1​0 and t+1​1 (generated via simplify-then-guess) must be an exact string match.
* For "slow" addition, the check is that (performing one CoT simplification step + fast adding the resulting subproblem) yields identical final sums for t+1​2 and t+1​3.
If the checks fail, the problem-solution pair is discarded. This significantly reduces the introduction of incorrect data (as shown in Figure 3).
Implementation Details and Considerations
- Models: ByT5 models (582M and 300M parameters) were used. The byte-level nature of ByT5 helps avoid tokenization artifacts common with arithmetic tasks in other LLMs.
- Training:
- Adam optimizer, DeepSpeed library, constant learning rate of t+1​4, bfloat16 training.
- Batch sizes: 2048 (300M model), 1024 (582M model).
- Data generation during supervised phase (per N-digit step): 10,000 unique N-digit CoT examples, 1,000 for each smaller digit length (anti-forgetting); 30,000 unique N-digit fast examples, 3,000 for smaller.
- Data generation during self-training phase: Numbers reduced by a factor of 10 due to higher generation cost.
- Computational Cost: The self-training phase, especially data generation with simplify-then-guess and consistency checks, is computationally intensive.
- Curriculum Learning is Key: The paper notes (Appendix C.7) that curriculum learning is vital. An ablation training a 582M model on 1-6 digits in a single step (not curriculum) generalized to 9-digit slow addition, but the curriculum is essential for the step-by-step self-improvement process where N-digit capabilities are used to generate (N+1)-digit data.
Pseudocode for SECToR Self-Training Loop (for N+1 digits):
t+1​6
Results
- 582M ByT5 Model: After supervised fine-tuning on 1-6 digit addition, it self-trained to accurately (98%+) perform up to 29-digit addition. This involved 22 steps of self-improvement. The final model could add 30-digit numbers with 88% accuracy without CoT.
- 300M ByT5 Model: Supervised training up to 8 digits, then self-trained up to 24-digit addition.
- Generalization: Models showed poor length generalization for "fast" addition. However, with CoT ("slow" addition), generalization to N+1 digits occurred much earlier (e.g., after training up to N=4 or N=6 digits for the 582M model, as seen in Figure 4). This strong CoT generalization is what enables the self-training.
- Error Avalanching: While mitigated, it eventually caused training to terminate. The 582M model failed to continue after 29-digit addition.
Practical Applications and Implications
- Reducing Human Data Dependency: Demonstrates a path towards models that can improve and acquire new skills with less reliance on vast, human-curated datasets. This is significant given concerns about exhausting high-quality training data.
- Compute-Driven Scaling: If self-learning can be broadly applied, it could lead to scaling laws driven more by computational power than data availability.
- Improving Reasoning: The core mechanism could potentially be applied to more complex reasoning tasks beyond arithmetic, such as mathematics, programming, or logical deduction, provided effective CoT-like processes and consistency checks can be formulated for those domains.
- System Design for Self-Improving AI:
- Curriculum: A structured curriculum seems essential.
- Dual Capabilities: Training models for both direct ("fast") and step-by-step ("slow") problem-solving is beneficial.
- Self-Correction/Consistency: Robust mechanisms to filter out self-generated errors are critical. Commutativity is a domain-specific example; more general consistency principles would be needed for other tasks (e.g., logical consistency, consistency with known facts).
- Model Architecture: Byte-level models like ByT5 may be advantageous for tasks sensitive to tokenization.
Limitations
- Task Specificity: Success is shown on addition. Generalization to more complex, less formally verifiable tasks is an open question.
- Computational Inefficiency: Generating data via simplify-then-guess and consistency checks is resource-intensive.
- Error Accumulation: Self-training doesn't continue indefinitely.
- Safety and Control: Self-learning models could amplify biases or develop unpredictable capabilities, requiring research into safety and control mechanisms.
In summary, SECToR provides a proof-of-concept that LLMs can autonomously extend their capabilities on a structured task like addition. It operationalizes the idea of CoT reasoning as a policy improvement mechanism within a self-training loop, using curriculum learning and novel data generation/filtering techniques (simplify-then-guess, commutativity checks) to manage the process and mitigate error accumulation. The approach offers insights into building more data-efficient and continuously improving AI systems.