SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.01679 · ICML · 2025

VinePPO: Refining Credit Assignment in RL Training of LLMs

Aaron Courville, Siva Reddy, Alessandro Sordoni, Nicolas Le Roux, Amirhossein Kazemnejad, Milad Aghajohari, Eva Portelance

arXiv · PDF · Open in the Atlas

Code that ran

7 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 1 violated it and 2 have no contract verdict; 4 failures of our instrument; 2 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2410.01679.json · badge: /api/ran/2410.01679.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
mcgill-nlp/vineppo canonical (classifier label)
classifier basis: census
7 ran · 2 no recorded run
FunctionStatusWhere it lives
SavedText Ran
ran; our contract draft was wrong, not the code
mcgill-nlp/vineppo/src/guidance/_grammar.py
code served (permissive licence) · get_code("358e91bb94af0ba2")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Located. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import pyparsing as pp

# Create a simple node that will be used as the argument to SavedText
# The node needs to be something that pyparsing can work with
test_node = pp.Literal("test")

ARGS = {
    "node": test_node
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pyparsing — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Located — a Located output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Located output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
add_spaces Ran
ran; our contract draft was wrong, not the code
mcgill-nlp/vineppo/src/guidance/_program.py
code served (permissive licence) · get_code("0751f6d65e347f7d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

def add_spaces(s):
    """ This adds spaces so the browser will show leading and trailing newlines.
    """
    if s.startswith('\n'):
        s = ' ' + s
    if s.endswith('\n'):
        s = s + ' '
    return s

ARGS = {
    's': '\nhello world\n'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
assistant Ran
ran on a synthesized input
mcgill-nlp/vineppo/src/guidance/library/_assistant.py
code served (permissive licence) · get_code("f0a41b57b2a4951a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned coroutine. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import inspect

# Mock the role function that assistant calls
async def role(role_name='assistant', hidden=False, _parser_context=None, **kwargs):
    """Mock role function"""
    return {
        'role_name': role_name,
        'hidden': hidden,
        'parser_context': _parser_context,
        'extra_kwargs': kwargs
    }

# Define ARGS dict with all parameters for assistant function
ARGS = {
    'hidden': False,
    '_parser_context': None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type coroutine — a coroutine output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a coroutine output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
await_ Ran
ran on a synthesized input
mcgill-nlp/vineppo/src/guidance/library/_await.py
code served (permissive licence) · get_code("5e6a8e3edae86812")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned coroutine. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Build a minimal parser context with the required structure
class MockParser:
    def __init__(self):
        self.executing = True

variable_stack = {
    'test_var': 42,
    'tensor_var': torch.randn(2, 4),
    'list_var': [1, 2, 3],
}

_parser_context = {
    'parser': MockParser(),
    'variable_stack': variable_stack,
}

ARGS = {
    'name': 'test_var',
    'consume': 'yes_for_now',
    '_parser_context': _parser_context,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type coroutine — a coroutine output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a coroutine output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
callable Ran
ran, violated the contract we drafted
mcgill-nlp/vineppo/src/guidance/library/_callable.py
code served (permissive licence) · get_code("94e304b04bca6113")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import builtins
import torch

# Define a mock LLM extract function that can recognize function calls
def mock_extract_function_call(value):
    """Mock function that recognizes callable objects as 'function calls'"""
    if builtins.callable(value):
        return {"function": value.__name__ if hasattr(value, '__name__') else 'callable'}
    return None

# Define a mock parser context with the required variable_stack
_parser_context = {
    'variable_stack': {
        'llm.extract_function_call': mock_extract_function_call
    }
}

# Test value: a simple callable (lambda function)
test_value = lambda x: x + 1

ARGS = {
    'value': test_value,
    '_parser_context': _parser_context
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
find_func_name Ran
ran; our contract draft was wrong, not the code
mcgill-nlp/vineppo/src/guidance/_utils.py
code served (permissive licence) · get_code("12a84ce5d8467107")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

def simple_function():
    """A simple callable with __name__ attribute"""
    pass

class CallableClass:
    """A callable class without __name__ attribute"""
    def __call__(self):
        pass

# Test case 1: function with __name__, not in used_names
f1 = simple_function

# Test case 2: function with __name__, already in used_names (will need fallback)
def my_func():
    pass
f2 = my_func

# Test case 3: callable object without __name__
f3 = CallableClass()

# Test case 4: lambda (has __name__ but it's '<lambda>')
f4 = lambda x: x

# Create various used_names sets to test different branches
used_names_1 = set()  # f1 name not in set
used_names_2 = {'my_func', 'my_func0', 'my_func1', 'my_func2'}  # f2 name in set, needs fallback
used_names_3 = set()  # f3 callable without __name__
used_names_4 = {'<lambda>', 'lambda0', 'lambda1'}  # f4 with angle brackets and collision

ARGS = {
    'f': f1,
    'used_names': used_names_1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load Ran
ran; our contract draft was wrong, not the code
mcgill-nlp/vineppo/src/guidance/_utils.py
code served (permissive licence) · get_code("41a6139f3b69cb44")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import tempfile

# Create a temporary guidance file for testing
with tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt') as f:
    f.write("guidance program content here")
    temp_guidance_file = f.name

ARGS = {
    'guidance_file': temp_guidance_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
requests — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
chain Not yet run
unverified (harvested, no recorded run)
mcgill-nlp/vineppo/src/guidance/_utils.py
code served (permissive licence) · get_code("07024abd2b391cdf")
How it ran

no invocation recorded.

get_logger Not yet run
unverified (harvested, no recorded run)
mcgill-nlp/vineppo/src/treetune/logging_utils.py
code served (permissive licence) · get_code("e635b6a7bc9b6a4f")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 9 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 9 later) and 0 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
get_logger 12 other papers
3 dated earlier, 9 later
2004.10964 (2020-04)
Don't Stop Pretraining: Adapt Language Models to Domains and Tasks
2305.01938 (2023-05)
Doc2SoarGraph: Discrete Reasoning over Visually-Rich Table-Text Documents via Semantic-Oriented Hierarchical Graphs
2406.05478 (2024-06)
Revisiting Non-Autoregressive Transformers for Efficient Image Synthesis
and 9 more not named here
SavedText 1 other paper
1 later
2505.23564 (2025-05)
Segment Policy Optimization: Effective Segment-Level Credit Assignment in RL for Large Language Models
add_spaces 1 other paper
1 later
2505.23564 (2025-05)
Segment Policy Optimization: Effective Segment-Level Credit Assignment in RL for Large Language Models
assistant 1 other paper
1 later
2505.23564 (2025-05)
Segment Policy Optimization: Effective Segment-Level Credit Assignment in RL for Large Language Models
await_ 1 other paper
1 later
2505.23564 (2025-05)
Segment Policy Optimization: Effective Segment-Level Credit Assignment in RL for Large Language Models
callable 1 other paper
1 later
2505.23564 (2025-05)
Segment Policy Optimization: Effective Segment-Level Credit Assignment in RL for Large Language Models
chain 1 other paper
1 later
2505.23564 (2025-05)
Segment Policy Optimization: Effective Segment-Level Credit Assignment in RL for Large Language Models
find_func_name 1 other paper
1 later
2505.23564 (2025-05)
Segment Policy Optimization: Effective Segment-Level Credit Assignment in RL for Large Language Models
load 1 other paper
1 later
2505.23564 (2025-05)
Segment Policy Optimization: Effective Segment-Level Credit Assignment in RL for Large Language Models

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Large language models (LLMs) are increasingly applied to complex reasoning tasks that require executing several complex steps before receiving any reward. Properly assigning credit to these steps is essential for enhancing model performance. Proximal Policy Optimization (PPO), a common reinforcement learning (RL) algorithm used for LLM finetuning, employs value networks to tackle credit assignment. However, recent approaches achieve strong results without it, raising questions about the efficacy of value networks in practice. In this work, we systematically evaluate the efficacy of value networks and reveal their significant shortcomings in reasoning-heavy LLM tasks, showing that they often produce poor estimate of expected return and barely outperform a random baseline when comparing alternative steps. This motivates our key question: Can improved credit assignment enhance RL training for LLMs? To address this, we propose VinePPO, a straightforward approach that leverages the flexibility of language environments to compute unbiased Monte Carlo-based estimates. Our method consistently outperforms PPO and other baselines across MATH and GSM8K datasets in less wallclock time (up to 3.0x). Crucially, it achieves higher test accuracy for a given training accuracy, capturing more generalization signal per sample. These results emphasize the importance of accurate credit assignment in RL training of LLM. Code available at https://github.com/ McGill-NLP/VinePPO * Equal contribution † Equal advising

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2410.01679")
get_code_for_paper("2410.01679")
have("2410.01679")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2410.01679.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2410.01679.svg)](https://syntology.ai/paper/2410.01679)

Connect an agent — have() is free.