Prelude — A Few Jargons

System 1 and System 2 Reasoning:

These terms, popularized by Daniel Kahneman in his book Thinking, Fast and Slow, describe two distinct modes of human cognition.

System 1 operates automatically and rapidly with little conscious effort—it’s intuitive, heuristic-based, and responsible for immediate reactions (for example, quickly recognizing a familiar face).

In contrast, System 2 is slow, deliberate, and analytical, requiring focused attention and cognitive resources; it’s engaged when solving complex problems like mathematical calculations or planning a route in an unfamiliar city. Technically, these systems reflect differences in neural activation and processing: System 1 is linked to fast, subcortical and limbic responses, while System 2 is associated with higher-order cortical functions in the prefrontal cortex.

CoT and Long CoT (Chain-of-Thought):

Chain-of-Thought (CoT) prompting is a technique used to encourage language models to generate a series of intermediate reasoning steps before providing a final answer. This approach mimics human problem solving by “thinking aloud” in steps, which often leads to more accurate and interpretable outcomes—especially on complex tasks.

Long CoT refers to extending this process to include more steps or a longer reasoning chain. While a longer chain can improve the model’s capacity to handle intricate problems (like multi-step math problems or code generation), it also introduces challenges such as compounding errors if earlier steps are mistaken, requiring robust mechanisms for error detection and correction.

Test-Time Scaling:

Test-time scaling is a method of enhancing model performance by allocating additional computational resources during the inference phase rather than increasing model size or training time. Instead of solely relying on a larger, more complex model, test-time scaling lets the model “think longer” when it’s generating an answer.

This might involve techniques such as iterative self-refinement (where the model repeatedly re-evaluates its output), beam search, or Monte Carlo Tree Search. For example, in reasoning tasks, allowing extra compute time at test time can enable the model to explore multiple reasoning paths, select the most promising one, and thereby achieve higher accuracy without the expense of retraining.

Process Reward Model and Outcome Reward Model:

In the context of reinforcement learning and enhancing model reasoning, reward models are employed to guide the generation process.

An Outcome Reward Model (ORM) evaluates the final output of a reasoning chain—assigning a high reward if the end answer is correct and a low (or zero) reward if it isn’t.

In contrast, a Process Reward Model (PRM) provides feedback on the intermediate steps of the reasoning process, scoring each step based on whether it contributes correctly towards a final solution. This finer-grained supervision can help mitigate error propagation in long chains of thought by identifying and correcting mistakes along the way. Both models are typically trained via techniques such as logistic regression on labeled data (either human or synthetic) and play crucial roles in refining and aligning language models’ reasoning capabilities.

What’s Long COT?

This is the question I asked to O3-mini.

I'm studying language model related things. I often see a lot of jargons in the papers and blogposts, you are going to explain them to me. For each one, explain in a separate paragraph. highlight the technical things. Give examples if necessary - system 2 and system 1 reasoning. - CoT, long COT, - test-time scaling - process reward model, outcome reward model

The following is generated by O3-mini before outputting the final answers.

The question asks for explanations of specific jargon, so I'll break them down into separate sections, highlighting the technical details.

"System 1 and System 2 reasoning" comes from dual-process theory in cognitive psychology, where System 1 refers to fast, automatic thinking, and System 2 is slower, more deliberate reasoning. In AI, this is used metaphorically to describe fast versus slow reasoning approaches in language models.

For the other terms, I’ll need to elaborate on those in separate sections too!

System 1 reasoning is fast, automatic, and intuitive. It relies on heuristics and instinctive responses. For example, recognizing a familiar face quickly involves system 1.

System 2, on the other hand, is slow and deliberate, requiring analytical thinking and conscious effort. It involves step-by-step problem solving, like calculating complex numbers or making a well-thought-out decision after considering various options. The two systems work together, though system 1 often dominates in everyday tasks.

System 1 operates intuitively, fast, and effortlessly, requiring no cognitive resources. For example, reacting to a red light is instant and automatic. In contrast, System 2 requires more effort, attention, and cognitive resources to deliberate and analyze, like when solving complex math problems. These systems interact, but System 2 is slower and more deliberate while System 1 handles routine, immediate responses.

---

"CoT" stands for Chain-of-Thought prompting, encouraging a language model to break down intermediate reasoning steps before final answers. Long CoT extends this by including even more reasoning steps, which is helpful for complex tasks, but can lead to errors if intermediate mistakes aren't corrected.

---

Test-time scaling involves adjusting computational resources when the model is running at inference time, rather than during training. Instead of building larger models, this process allows for more in-depth reasoning or better answers through methods like iterative self-refinement, ensemble methods, or tree search. This method benefits tasks requiring deeper reasoning.

---

In reinforcement learning, the Outcome Reward Model (ORM) evaluates the final correctness of a model's response. Meanwhile, the Process Reward Model (PRM) rewards intermediate reasoning steps, guiding the model to improve along the way. These models are essential during fine-tuning, allowing the system to correct errors in complex reasoning tasks.

Key features of Long COT: Key distinguishing features of long CoTs include strategies such as:

  • recognizing and correcting mistakes,
  • breaking down difficult steps,
  • and iterating on alternative approaches,
    leading to substantially longer and more structured reasoning processes.

Example:

Question: Spell “mayonese” backward, and how many “t“‘s are in “test the test-time compute test”

Deepseek R1:

Thought for 43 seconds

Okay, let's tackle this problem step by step. First, I need to spell "mayonese" backward. Wait, actually, the correct spelling of the condiment is "mayonnaise," right? The user wrote "mayonese," which might be a typo. But maybe I should just go with what's given. Let me double-check. "Mayonese" – if that's how it's spelled here, then I need to reverse those letters. Let's see: M-A-Y-O-N-E-S-E. So backward that would be E-S-E-N-O-Y-A-M. Let me write it out:

Original: M A Y O N E S E

Backward: E E S N O Y A M? Wait, wait, let me count the letters again. "Mayonese" has 8 letters. Let's list them:

1. M

2. A

3. Y

4. O

5. N

6. E

7. S

8. E

So reversing each position:

Position 8: E

7: S

6: E

5: N

4: O

3: Y

2: A

1: M

So putting them together: E S E N O Y A M. Wait, that would be E, S, E, N, O, Y, A, M. So the backward spelling is "Esenoyam"? But that seems a bit odd. Maybe the user intended "mayonnaise," which is spelled M-A-Y-O-N-N-A-I-S-E. But since the question specifies "mayonese," I'll stick with that. So the reversed spelling is "Esenoyam."

Now the second part: how many "t"s are in "test the test-time compute test". Let's break that down. The phrase is: "test the test-time compute test". I need to count all lowercase 't's. Let's go through each word:

1. "test": t, e, s, t → 2 t's

2. "the": t, h, e → 1 t

3. "test-time": t, e, s, t - t, i, m, e → 3 t's (two in "test" and one in "time"? Wait, "test-time" is hyphenated. Let's see: "test-time" is t-e-s-t hyphen t-i-m-e. So "test" has two t's, and "time" has one t. Wait, no. "Time" is t-i-m-e, so the first letter is t. So "test-time" would have 2 (from test) + 1 (from time) = 3 t's.

4. "compute": c-o-m-p-u-t-e → 1 t

5. "test": t-e-s-t → 2 t's

Now let's add them up:

test: 2

the: 1

test-time: 3

compute: 1

test: 2

Total: 2 + 1 + 3 + 1 + 2 = 9 t's. Wait, let me check again. Maybe I made a mistake in counting.

Breaking down the entire sentence without splitting words:

"test the test-time compute test"

Let's write out each character:

t e s t t h e t e s t - t i m e c o m p u t e t e s t

Now, count each 't':

First word "test": t, e, s, t → 2

Second word "the": t, h, e → 1

Third part "test-time": t, e, s, t, -, t, i, m, e → 3 (positions 1,4,6)

Fourth word "compute": c, o, m, p, u, t, e → 1

Fifth word "test": t, e, s, t → 2

Adding them: 2 +1 +3 +1 +2 = 9. So total 9 t's. Wait, but let me make sure. Let's write all the letters and count:

t (1), e, s, t (2), t (3), h, e, t (4), e, s, t (5), -, t (6), i, m, e, c, o, m, p, u, t (7), e, t (8), e, s, t (9). Yes, that's 9 t's. So the answer is 9.

Note thoughts such as:

  • Backward: E E S N O Y A M? Wait, wait, let me count the letters again. “Mayonese” has 8 letters. Let’s list them:
  • So putting them together: E S E N O Y A M. Wait, that would be E, S, E, N, O, Y, A, M. So the backward spelling is “Esenoyam”? But that seems a bit odd. Maybe the user intended “mayonnaise,” which is spelled M-A-Y-O-N-N-A-I-S-E. But since the question specifies “mayonese,” I’ll stick with that. So the reversed spelling is “Esenoyam.”
  • Total: 2 + 1 + 3 + 1 + 2 = 9 t’s. Wait, let me check again. Maybe I made a mistake in counting.
  • Adding them: 2 +1 +3 +1 +2 = 9. So total 9 t’s. Wait, but let me make sure. Let’s write all the letters and count:


Background: Training & Inference of LLM

Below is a high‐level overview of the general training pipeline for large language models (LLMs), including the mathematics behind each phase. We also describe how these methods are used at deployment with additional test‐time scaling.


1. Pretraining (Language Modeling)

In pretraining, the model is trained to predict the next token given a sequence of previous tokens. The model is parameterized by a set of parameters . Given a training corpus D\mathcal{D} consisting of text sequences , the objective is to minimize the negative log-likelihood (NLL):

This means the model learns a probability distribution over sequences:


2. Supervised Fine-Tuning (SFT)

After pretraining, the model is fine-tuned on a curated dataset (e.g., instructions paired with desired responses) using supervised learning. The fine-tuning objective is similar to pretraining but often uses higher-quality (and sometimes human-annotated) data:

where xx is the prompt and yy is the expected output. For a sequence y=(y1,…,yN)y = (y_1, \dots, y_N), we have:


3. Reinforcement Learning Fine-Tuning (RLFT)

To better align the model’s outputs with human preferences, reinforcement learning (often in the form of RLHF, Reinforcement Learning from Human Feedback) is applied. In this phase, the model is treated as a policy that, given a prompt , produces an output . A reward function is defined (either via human feedback or automated proxies). The RL objective is to maximize the expected reward:

Using a policy gradient method (such as PPO), the gradient is approximated by:

where is an advantage estimate.

Sometimes, two kinds of reward models are used:

  • Outcome Reward Model (ORM): assigns a reward based solely on the final answer.
  • Process Reward Model (PRM): gives intermediate rewards for each reasoning step in a chain-of-thought (CoT).

For a reasoning chain , a PRM might assign a stepwise reward and the overall reward can be aggregated, for example:

There are various post-training / RLHF algorithms:

  • PPO
  • DPO
  • GRPO
  • RLOO
  • Reinforce++

4. Deployment with Test-Time Scaling

During deployment, test-time scaling refers to strategies that allocate extra computation to improve the quality of the generated output. Rather than only increasing model size or training time, test‐time compute methods let the model “think longer” and explore alternative reasoning paths. We can just regard test-time scaling as “search” based on LLM.

Some common methods include:

4.1. Best-of-N Sampling

The model generates candidate outputs (e.g., multiple reasoning chains) for a given prompt :

An external reward model (often the ORM) is then used to select the best candidate:

4.2. Iterative Refinement (Chain-of-Thought with Revision)

For complex tasks, the model can generate an initial reasoning chain and then refine it iteratively. Let the initial chain be:

At each refinement step jj, the model uses the current chain and additional test-time compute (e.g., additional sampling or search) to produce a revised chain:

where represents the revision mechanism, possibly guided by the PRM:

After several iterations, the final answer is extracted from the refined chain.

Beam search is a breadth-first heuristic that, at each time step, retains only the top‑ candidate sequences (the beam) based on their cumulative log-probability. It is designed to balance exploration and tractability.

Mathematical Details

Given a prompt xx and a language model with parameters θ\theta, the probability of generating a sequence is

Beam search computes a score (usually the log-probability) for a partial sequence :

At each step tt:

  1. Expansion: For each candidate in the beam (of size kk), the model computes the probability for all possible next tokens.
  2. Pruning: All resulting candidates (up to , where is the vocabulary size) are sorted by their scores. The top‑ candidates are retained.
  3. Termination: The search continues until an end-of-sequence token is generated or a maximum length is reached.

Beam search helps approximate the sequence with the highest overall probability, while limiting the combinatorial explosion inherent in full search.


Monte Carlo Tree Search (MCTS)

MCTS is an alternative search strategy that systematically explores a decision tree using randomized simulations. It has four main phases: Selection, Expansion, Simulation, and Backpropagation.

Steps of MCTS

  1. Selection:
    Starting from the root (the prompt ), select child nodes until reaching a leaf node. The selection is based on a policy that balances exploitation and exploration. A common choice is the Upper Confidence Bound (UCB):

    where:

    • is the average reward (or score) for the node,
    • is the visit count of the parent,
    • is the visit count of the node,
    • is an exploration constant.
  2. Expansion:
    If the selected leaf is non-terminal and has not been fully expanded, add one or more child nodes corresponding to possible next tokens.

  3. Simulation:
    From the new child node, simulate a complete rollout (i.e., generate a full sequence) using either a random policy or the language model itself. This simulation provides a reward signal (e.g., whether the final answer is correct).

  4. Backpropagation:
    Propagate the reward back up the tree, updating the statistics (e.g., visit counts and average rewards) for all nodes along the path.

Using MCTS for Test-Time Compute

For reasoning tasks, MCTS can explore multiple chains of thought:

  • Node: Each node corresponds to a partial reasoning trace.
  • Rollouts: The final reward can be determined by verifying the correctness of the chain (using an Outcome Reward Model, for example).
  • Selection: MCTS selects promising reasoning paths based on the UCB or similar criteria.

MCTS is especially useful when the search space is very large (as in multi-step reasoning), since it can focus computational effort on promising branches.


How to Train a Model that Solves Reasoning Problems Using Long CoT?

Challenge — Chicken-and-egg situation

The challenge is that to train a model for long chain-of-thought (CoT) reasoning, you need high-quality reasoning data and a reliable reward model that favors long CoT responses, but both are hard to obtain without each other. This creates a chicken-and-egg situation:

Data Generation:

To generate high-quality CoT data, the model itself must be good at reasoning. However, if the model isn’t already proficient at long reasoning chains, it won’t generate reliable intermediate steps with reflection. In other words, you need a good model to produce quality data, but you need quality data to train a good model.

Reward Model:

A reward model (or verifier) is used to filter and score generated reasoning paths. In other words, the reward model should favor reasoning trajectories with reflections, self-verifications, etc. But training such a reward model requires high-quality reasoning data with known correctness. Without a strong reward model, it’s hard to select or reinforce the right CoT trajectories.

How to Break the Cycle:

Get data even when you only have a weak base LLM that cannot perform Long CoT

  • Get human annotation data

    • Let human write intermediate steps of long CoT and start from here. (BOLT)
    • Also, human can label the trajectory and even every step of the trajectory. This enables the learning of process reward model. (Let’s verify step by step)
  • Generate synthetic data with search-based methods — use prompting methods (same as those for test-time scaling) to generate reasoning paths with self reflections, and verifications (STAR, Meta-CoT, https://srush.github.io/awesome-o1/o1-tutorial.pdf)

  • Distill a powerful model that already is able to perform Long CoT (S1, LIMO, RedStar)

Apply standard SFT and post-training methods, which can be combined with data selection / search methods

STaR: Bootstrapping Reasoning With Reasoning

We propose a technique to iteratively leverage a small number of rationale examples and a large dataset without rationales, to bootstrap the ability to perform successively more complex reasoning.

This technique, the “Self-Taught Reasoner” (STaR), relies on a simple loop:

  • generate rationales to answer many questions, prompted with a few rationale examples;
  • if the generated answers are wrong, try again to generate a rationale given the correct answer;
  • fine-tune on all the rationales that ultimately yielded correct answers;
  • repeat.

The image provides a visual representation of the STaR process. It illustrates the cycle of training and fine-tuning a language model using both rationale generation and rationalization techniques.

  • Starting Point: The process begins with a Question. The model attempts to generate a Rationale (a step-by-step reasoning process) and an Answer.

  • Rationale Generation: If the model generates a correct answer, this rationale is added to the dataset of successful rationales. These rationales are then used to fine-tune the model, reinforcing the correct reasoning paths.

  • Handling Incorrect Answers: If the generated answer is incorrect, the correct answer is provided as a hint to the model, and it attempts to generate a rationale that leads to this answer. This helps the model learn why the correct answer is valid.

  • This technique is called “rationalization”. “Specifically, we provide the answer as a hint to the model and ask it to generate rationales in the same style as in the previous rationale generation step. Given the answer, the model is able to reason backwards, and hence more easily generate a rationale that leads to the correct answer.”

Rationalization is goal-directed RL — given the goal is the ground truth answer, find a correct trajectory.

  • Feedback Loop: The rationales from this process are combined to further fine-tune the model. This loop continues iteratively, enhancing the model’s ability to reason through increasingly complex problems.

Example:

Question: “What is the best way to carry a small dog from one place to another?”

Answer Choices:

  • (a) Swimming pool
  • (b) Basket
  • (c) Dog show
  • (d) Backyard
  • (e) Own home

Model Generates a Rationale and Answer: The model is given the question and the answer choices. It generates a rationale explaining its reasoning process:

  • Generated Rationale: “To carry a small dog, you would need something that can hold the dog safely and comfortably. A swimming pool, dog show, backyard, or home are not designed for carrying small dogs. Baskets, on the other hand, are portable and designed to hold items. Therefore, the answer is (b) Basket.”
  • Generated Answer: (b) Basket

Check for Correctness: The generated answer “(b) Basket” is correct. This rationale and answer pair is added to the fine-tuning dataset for further training.

Now, let’s see how the STaR (Self-Taught Reasoner) process would handle this if the generated answer was initially incorrect:

Model Generates an Incorrect Rationale and Answer: Suppose the model initially provides a wrong answer:

  • Generated Rationale: “To carry a small dog, you need an open space. A backyard or a dog show would be ideal because the dog has space to move around. Therefore, the answer is © Dog show.”
  • Generated Answer: (c) Dog show

Rationalization Step: Since the answer is incorrect, the model is given a hint with the correct answer (b) Basket. The model is asked to generate a new rationale based on this hint:

  • Hint Provided: The correct answer is (b) Basket.
  • New Rationale Generation: “Given that the answer is a basket, it must be because a basket is portable and designed to hold small animals or objects securely. A swimming pool, dog show, backyard, or home are not practical for carrying purposes. Therefore, the rationale for the answer being a basket is that it is portable and safe.”

Filter and Fine-Tune:

The new rationale correctly supports the answer (b) Basket. This rationalized rationale is added to the dataset of correct rationales. The model is then fine-tuned on this improved dataset, learning to avoid the mistake it made earlier and reinforcing the correct reasoning path.

BOLT: Bootstrap Long Chain-of-Thought in Language Models without Distillation

BOLT consists of three key stages:

  1. LongCoT Bootstrapping – Generating synthetic LongCoT data using in-context learning from a ShortCoT LLM.
  2. LongCoT Supervised Fine-Tuning (SFT) – Training the model on high-quality Long CoT data.
  3. LongCoT Online Training – Refining the model through reinforcement learning using a reward model.

1. LongCoT Bootstrapping (Data Generation)

This step aims to create a high-quality dataset of Long Chain-of-Thought (LongCoT) examples by prompting a ShortCoT model with a small set of in-context learning (ICL) examples.

Models Used for Labeling

  • Llama-3.1-70B-Instruct was used as the bootstrapping model to generate LongCoT responses.
  • The choice of this model is crucial because smaller models (e.g., Llama-3.1-8B) failed to generate well-structured LongCoT responses reliably.

Prompt Templates

  • Each prompt consists of:
    • A query
    • A set of in-context LongCoT examples
    • A formatting function that wraps the query and examples into a structured prompt.

where:

  • is the final answer.
  • is the chain-of-thought reasoning steps.

How the Data is Generated

  1. Query Mixture Curation

    • Queries are selected and filtered from datasets like:
      • ShareGPT, MathInstruct, Evol-Instruct, SlimOrca
    • Only hard and diverse queries are retained.
  2. Response Generation

    • For each query, 8 responses are sampled using the ShortCoT model.
  3. Response Filtering

    • Responses are filtered based on:
      • Format adherence (ensuring consistency with in-context examples).
      • Outcome quality: A reward model (ORM)/verifier is used to score and rank responses.
      • Low-quality responses (bottom 30%) are discarded, and the highest-scoring response is retained.
  4. Final Bootstrapped Dataset

    • The final dataset is

2. LongCoT Supervised Fine-Tuning (SFT)

Once the LongCoT dataset is created, it is used to fine-tune a ShortCoT model to internalize LongCoT reasoning.

Supervised Learning Objective

where:

  • is the trained policy after fine-tuning.
  • The model learns to produce internal thoughts before generating the final answer .

3. LongCoT Online Training (Reinforcement Learning)

Even after fine-tuning, the model might generate suboptimal LongCoT sequences. Online Training refines the model by rewarding high-quality responses.

Reinforcement Learning Objective

where:

  • is the reward function (verifier) that evaluates reasoning quality.
  • prevents the model from diverging too much from the SFT policy π0\pi_0.

Reward Function for RL

  • Outcome Reward Model (ORM): Scores the final answer yy given xx.
  • Format Reward: Ensures that responses follow LongCoT format (internal thoughts before answer ).
  • The best ORM was ArmoRM-Llama3-8B, as Skywork-Reward-Llama-3.1-8B caused longer responses.

Training Algorithms

  • Direct Preference Optimization (DPO) was the best-performing RL method, outperforming REINFORCE, RLOO, PPO.
  • DPO uses only high-confidence samples, which reduces reward noise.

Sampling Strategy

  • The model generates 8 responses per query.
  • The best and worst responses are used for training.

Summary of BOLT Training Process

StepGoalKey Techniques
BootstrappingGenerate LongCoT dataIn-context learning, filtering with ORM
SFTTrain model on LongCoTSupervised fine-tuning on DbootstrappingD_{\text{bootstrapping}}
Online TrainingReinforce strong reasoningDPO training with ORM rewards

BOLT eliminates the need for distillation, making it a self-sufficient framework for training LongCoT models.

Meta Chain-of-Thought (Meta-CoT) for Long Reasoning Chains

Meta-CoT extends traditional Chain-of-Thought (CoT) by explicitly modeling the latent reasoning process required to arrive at an optimal CoT. Instead of treating CoT as a simple left-to-right sequence, Meta-CoT assumes reasoning consists of:

  • Reflections: Self-assessment of prior steps.
  • Verifications: Checking if intermediate steps lead to the correct answer.
  • Internal Searches: Exploring multiple solution paths before committing to one.

Meta-CoT

Traditional CoT struggles with complex problems due to:

  • Linear, left-to-right reasoning: Does not allow backtracking.
  • Lack of verification: The model does not check if intermediate steps are correct.
  • Fixed reasoning depth: Once a CoT is generated, it is not iteratively refined.

For complex problems (e.g., IMO-level math), CoT is insufficient because reasoning involves an iterative search process.

Thus, the solution should not be modeled as the standard CoT formulation:

Meta-CoT introduces latent thoughts before final reasoning steps:

This allows the model to think through possible reasoning steps before constructing an explicit CoT. This means that an LLM first generates internal meta-thoughts, such as potential strategies, before committing to a CoT. In other words, the model searches a good trajectory of in latent space.


Meta-CoT Training Pipeline

Bootstrapping Meta-CoT (Inspired by STaR)

Meta-CoT follows a Self-Taught Reasoner (STaR)-like approach to bootstrap reasoning traces:

  1. Generate CoT Reasoning Paths: Prompt an LLM to generate multiple reasoning trajectories.
  2. Reject Incorrect Paths: Filter out incorrect solutions using outcome verifiers.
  3. Use Verified Solutions for Fine-Tuning: Train the model on filtered high-quality traces.

This process allows the model to learn from its own generated reasoning steps.

Mathematical Formulation of Meta-STaR

Given a dataset of questions and answers , the base model generates reasoning traces:

Only the correct samples are retained:

The supervised loss is then:


Search-Based Meta-CoT (Inference-Time Compute)

During inference, Meta-CoT leverages search algorithms to refine reasoning:

  1. Rejection Sampling

    • Generate multiple CoT traces.
    • Rank them based on outcome correctness.
    • Select the best CoT.
  2. Best-of-N (BoN) Search

    • Generate NN samples, select the best one.
    • Works well but is compute-intensive.
  3. Monte Carlo Tree Search (MCTS)

    • Used to balance exploration and exploitation in reasoning.
    • Simulates multiple reasoning paths and selects the best trajectory based on rollouts.
  4. search

    • Implements best-first search over reasoning traces.
    • Uses a priority queue to expand the most promising solutions first.

What is Rejection Sampling?**

Rejection sampling is a post-processing technique where we generate multiple candidate solutions and filter out low-quality ones based on a criterion.

Mathematical Formulation
  1. Generate Samples: Draw samples from the model:
  2. Evaluate Each Sample: Compute acceptance probability based on a scoring function. Usually the score is .
  3. Filter Out Low-Scoring Samples: where is a predefined threshold.
How is Rejection Sampling Used in Meta-CoT?
  • LLM generates multiple reasoning paths.
  • Low-quality CoTs are rejected using a verifier or heuristic score.
  • This is particularly useful for filtering out hallucinated or incorrect steps in CoT.

What is Best-of-N (BoN)?

Best-of-N sampling is a simple but effective method for selecting high-quality outputs from a generative model. Given an LLM that generates multiple candidate solutions, BoN selects the best one according to a heuristic (e.g., correctness or confidence score).

Mathematical Definition

Given a model that generates NN samples:

BoN selects:

where Score(⋅\cdot) is some ranking function, such as:

  • LLM Log Probability: Selecting the most confident response.
  • External Verifier Score: Selecting the answer that maximizes an external reward.

Mathematical Formulation of MCTS in Meta-CoT

MCTS constructs a search tree where:

  • Nodes represent reasoning steps.
  • Edges represent transitions between reasoning steps.
  • Rollouts simulate random reasoning paths to estimate the value of a node.

MCTS consists of four steps:

  1. Selection: Traverse the tree using a policy (e.g., UCB - Upper Confidence Bound).
  2. Expansion: Expand unexplored reasoning paths.
  3. Simulation: Perform rollouts to estimate node values.
  4. Backpropagation: Update node values based on rollout results.

MCTS evaluates partial reasoning trajectories using a heuristic state estimation function:

where:

  • is the ground-truth reward (from verifiers).
  • is a partial reasoning sequence.
  • The expectation is computed using 128 Monte Carlo rollouts.

This approach enables dynamic reasoning exploration.


Verification and Backtracking

Meta-CoT integrates verification mechanisms:

  • Process Verifiers: Ensure the reasoning process follows logical steps.
  • Outcome Verifiers: Confirm if the final answer is correct.

The model backtracks when encountering errors:

This iterative process improves reasoning consistency.