SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2605.20075 · 2026

CopT: Contrastive On-Policy Thinking with Continuous Spaces for General and Agentic Reasoning

U Berkeley, Dachuan Shi, Hanlin Zhu, Wen Xiao, Wanjia Zhao, Xiangchi Yuan, Kejing Xia, Wenke Lee

arXiv · PDF · Open in the Atlas

Code that ran

6 of 11 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, 0 violated it and 0 have no contract verdict; 6 failures of our instrument; 5 no recorded run), measured 2026-11-23; 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/2605.20075.json · badge: /api/ran/2605.20075.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
shishirpatil/gorilla canonical (classifier label)
classifier basis: census
6 ran · 5 no recorded run
FunctionStatusWhere it lives
encode_question Ran
ran; our contract draft was wrong, not the code
shishirpatil/gorilla/gorilla/eval/get_llm_responses.py
code served (permissive licence) · get_code("c34a73c1bf673a0b")
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 list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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

torch.manual_seed(0)

# Define arguments for encode_question function
question = "How can I classify images using a pre-trained model?"
api_name = "huggingface"

ARGS = {
    "question": question,
    "api_name": api_name
}
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 list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
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
get_all_sub_trees Ran
ran; our contract draft was wrong, not the code
shishirpatil/gorilla/gorilla/eval/eval-scripts/ast_eval_hf.py
code served (permissive licence) · get_code("cbc9e3ecfe4b8580")
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 list, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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.

# First, let's understand what the function expects:
# - root_node: an object with attributes/methods: text, child_count, children (list), sexp(), and children have the same structure
# - The function traverses a tree structure depth-first

class MockNode:
    def __init__(self, text, children=None, sexp_str=None):
        self.text = text
        self.children = children if children is not None else []
        self._sexp_str = sexp_str if sexp_str is not None else f"({text})"
    
    @property
    def child_count(self):
        return len(self.children)
    
    def sexp(self):
        return self._sexp_str


# Build a small tree structure
# Tree structure:
#       root
#      /    \
#    child1 child2
#    /
#  grandchild1

grandchild1 = MockNode("grandchild1", children=[], sexp_str="(grandchild1)")
child1 = MockNode("child1", children=[grandchild1], sexp_str="(child1 (grandchild1))")
child2 = MockNode("child2", children=[], sexp_str="(child2)")
root_node = MockNode("root", children=[child1, child2], sexp_str="(root (child1 (grandchild1)) (child2))")

ARGS = {
    "root_node": root_node
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family float — a list output has no array shape of its own; none is stated
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
get_args Ran
ran; our contract draft was wrong, not the code
shishirpatil/gorilla/gorilla/eval/eval-scripts/ast_eval_th.py
code served (permissive licence) · get_code("65bc21b9f088f906")
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 list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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

class MockNode:
    def __init__(self, text, children=None, child_count=0):
        self.text = text if isinstance(text, bytes) else text.encode()
        self.children = children if children is not None else []
        self.child_count = child_count

# Construct a tree structure that matches the function's access pattern:
# node.children[0].children[0].children[1].children
# Each child needs a text attribute with bytes and potentially a children[2].text attribute

# Create leaf nodes with text containing 'repo_or_dir' or 'model'
leaf1 = MockNode(b'repo_or_dir', children=[], child_count=0)
leaf1.children = [None, None, MockNode(b'/path/to/repo')]

leaf2 = MockNode(b'model', children=[], child_count=0)
leaf2.children = [None, None, MockNode(b'bert-base-uncased')]

leaf3 = MockNode(b'other_param', children=[], child_count=0)
leaf3.children = [None, None, MockNode(b'some_value')]

# Build the nested structure: children[0].children[0].children[1].children
innermost_children = [leaf3, leaf1, leaf2]

inner_level_2 = MockNode(b'inner', children=[MockNode(b'x', children=innermost_children)])

inner_level_1 = MockNode(b'args_parent', children=[inner_level_2])

# Node at index [1] of children[0].children[0]
args_node = MockNode(b'args', children=innermost_children)

# Create the main structure
root_children_0_children_0 = MockNode(
    b'root_inner',
    children=[MockNode(b'dummy'), args_node],
    child_count=2
)

root_children_0 = MockNode(
    b'root_child_0',
    children=[root_children_0_children_0],
    child_count=1
)

node = MockNode(
    b'root',
    children=[root_children_0],
    child_count=1
)

ARGS = {
    'node': node
}
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 list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
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
get_questions Ran
ran; our contract draft was wrong, not the code
shishirpatil/gorilla/gorilla/inference/gorilla_eval.py
code served (permissive licence) · get_code("899cb7d14116e83d")
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 list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 tempfile
import os

# Create a temporary file with sample question data
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_file.write('{"question": "What is 2+2?", "id": 1}\n')
temp_file.write('{"question": "What is the capital of France?", "id": 2}\n')
temp_file.write('{"question": "What is machine learning?", "id": 3}\n')
temp_file.close()

question_file_path = temp_file.name

ARGS = {
    'question_file': question_file_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
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
messages_from_dict Ran
ran; our contract draft was wrong, not the code
shishirpatil/gorilla/gorilla/eval/retrievers/schema.py
code served (permissive licence) · get_code("e7bb842a667e637c")
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 list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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
from typing import List, Dict, Any

# Define the message dictionaries that will be passed to messages_from_dict
message_dicts = [
    {
        'type': 'human',
        'data': {
            'content': 'Hello, how are you?',
            'additional_kwargs': {}
        }
    },
    {
        'type': 'ai',
        'data': {
            'content': 'I am doing well, thank you for asking.',
            'additional_kwargs': {'confidence': 0.95}
        }
    },
    {
        'type': 'system',
        'data': {
            'content': 'System initialization complete.',
            'additional_kwargs': {}
        }
    },
    {
        'type': 'chat',
        'data': {
            'role': 'moderator',
            'content': 'Please continue the conversation.',
            'additional_kwargs': {'priority': 'high'}
        }
    }
]

ARGS = {
    'messages': message_dicts
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pydantic, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
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
messages_to_dict Ran
ran; our contract draft was wrong, not the code
shishirpatil/gorilla/gorilla/eval/retrievers/schema.py
code served (permissive licence) · get_code("2c09abf6e7d255ad")
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 list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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.

from abc import ABC, abstractmethod
from typing import List
from pydantic import BaseModel, Field

class BaseMessage(BaseModel):
    """Message object."""
    content: str
    additional_kwargs: dict = Field(default_factory=dict)

    @property
    @abstractmethod
    def type(self) -> str:
        """Type of the message, used for serialization."""

class HumanMessage(BaseMessage):
    """Human message."""
    @property
    def type(self) -> str:
        return "human"

class AIMessage(BaseMessage):
    """AI message."""
    @property
    def type(self) -> str:
        return "ai"

def _message_to_dict(message: BaseMessage) -> dict:
    return {'type': message.type, 'data': message.dict()}

def messages_to_dict(messages: List[BaseMessage]) -> List[dict]:
    return [_message_to_dict(m) for m in messages]

# Create test messages
message1 = HumanMessage(content="Hello", additional_kwargs={"key1": "value1"})
message2 = AIMessage(content="Hi there", additional_kwargs={"key2": "value2"})
message3 = HumanMessage(content="How are you?")

messages_list = [message1, message2, message3]

ARGS = {
    "messages": messages_list
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pydantic — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
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
get_args Not yet run
unverified (harvested, no recorded run)
shishirpatil/gorilla/gorilla/eval/eval-scripts/ast_eval_hf.py
code served (permissive licence) · get_code("0d43a9f437f03789")
How it ran

no invocation recorded.

get_args Not yet run
unverified (harvested, no recorded run)
shishirpatil/gorilla/gorilla/eval/eval-scripts/ast_eval_tf.py
code served (permissive licence) · get_code("011dca36dc92a8af")
How it ran

no invocation recorded.

get_buffer_string Not yet run
unverified (harvested, no recorded run)
shishirpatil/gorilla/gorilla/eval/retrievers/schema.py
code served (permissive licence) · get_code("5ca74d2a45a7f542")
How it ran

no invocation recorded.

load_model Not yet run
unverified (harvested, no recorded run)
shishirpatil/gorilla/gorilla/inference/gorilla_eval.py
code served (permissive licence) · get_code("ba873c8d7fc8d9c3")
How it ran

no invocation recorded.

run_eval Not yet run
unverified (harvested, no recorded run)
shishirpatil/gorilla/gorilla/inference/gorilla_eval.py
code served (permissive licence) · get_code("0739c6a004099445")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 11 are also present in other papers whose code we hold (11 with at least one paper dated earlier, 0 the same month, 0 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_questions 2 other papers
2 dated earlier
2401.10727 (2024-01)
MLLM-Tool: A Multimodal Large Language Model For Tool Agent Learning
2404.06921 (2024-04)
GoEX: Perspectives and Designs Towards a Runtime for Autonomous LLM Applications
encode_question 1 other paper
1 dated earlier
2404.06921 (2024-04)
GoEX: Perspectives and Designs Towards a Runtime for Autonomous LLM Applications
get_all_sub_trees 1 other paper
1 dated earlier
2404.06921 (2024-04)
GoEX: Perspectives and Designs Towards a Runtime for Autonomous LLM Applications
get_args 1 other paper
1 dated earlier
2404.06921 (2024-04)
GoEX: Perspectives and Designs Towards a Runtime for Autonomous LLM Applications
get_args 1 other paper
1 dated earlier
2404.06921 (2024-04)
GoEX: Perspectives and Designs Towards a Runtime for Autonomous LLM Applications
get_args 1 other paper
1 dated earlier
2404.06921 (2024-04)
GoEX: Perspectives and Designs Towards a Runtime for Autonomous LLM Applications
get_buffer_string 1 other paper
1 dated earlier
2404.06921 (2024-04)
GoEX: Perspectives and Designs Towards a Runtime for Autonomous LLM Applications
load_model 1 other paper
1 dated earlier
2404.06921 (2024-04)
GoEX: Perspectives and Designs Towards a Runtime for Autonomous LLM Applications
messages_from_dict 1 other paper
1 dated earlier
2404.06921 (2024-04)
GoEX: Perspectives and Designs Towards a Runtime for Autonomous LLM Applications
messages_to_dict 1 other paper
1 dated earlier
2404.06921 (2024-04)
GoEX: Perspectives and Designs Towards a Runtime for Autonomous LLM Applications
run_eval 1 other paper
1 dated earlier
2404.06921 (2024-04)
GoEX: Perspectives and Designs Towards a Runtime for Autonomous LLM Applications

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-23.

Repositories linked to this paper

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

Abstract

Figure 1: (a) Conceptual comparison between COT thinking and COPT on-policy thinking. (b) COPT contrasts the output distributions under discrete and continuous inputs. (c) COPT improves peak accuracy, marked by * , across mathematics, coding, and agentic reasoning tasks and nearly halves token usage at matched accuracy.

For agents

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

get_harvested_code_for_paper("2605.20075")
get_code_for_paper("2605.20075")
have("2605.20075")

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

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

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

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

Connect an agent — have() is free.