SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2505.17018 · ICLR · 2025

SophiaVL-R1: Reinforcing MLLMs Reasoning with Thinking Reward

Xiangyu Yue, Kaituo Feng, Dongzhan Zhou, Kaixuan Fan, Haoming Lyu

arXiv · PDF · Open in the Atlas

Code that ran

9 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; 9 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 0 failures of our instrument; 0 no recorded run), measured 2026-11-24; 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/2505.17018.json · badge: /api/ran/2505.17018.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
kxfan2002/sophiavl-r1 canonical (classifier label)
classifier basis: classifier_2025
9 ran · 0 no recorded run
FunctionStatusWhere it lives
extract_after_think_number Ran
ran, honoured the contract we drafted
kxfan2002/sophiavl-r1/verl/workers/reward/custom.py
code served (permissive licence) · get_code("d334e03a4f7bf62b")
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 float, 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 re

def extract_after_think_number(text: str):
    """
    Extract the number after </think> tag.
    Match style: </think> <answer>0.5</answer>
    """
    match = re.search('</think>\\s*<answer>\\s*([\\d.]+)\\s*</answer>', text)
    if match:
        number_str = match.group(1)
        return int(number_str) if number_str.isdigit() else float(number_str)
    match = re.search('</think>\\s*([\\d.]+)', text)
    if match:
        number_str = match.group(1)
        return int(number_str) if number_str.isdigit() else float(number_str)
    return None


ARGS = {
    "text": "</think> <answer>0.5</answer>"
}
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 float, 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
extract_box_score Ran
ran, honoured the contract we drafted
kxfan2002/sophiavl-r1/verl/workers/reward/custom.py
code served (permissive licence) · get_code("48c3c2432861c79e")
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 float, 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 re

def extract_box_score(text: str):
    """
    Extract float number from \x08ox{} or \x08oxes{}.
    """
    match = re.search('\\\\box(?:es)?\\{([01](?:\\.\\d)?)\\}', text)
    if match:
        return float(match.group(1))
    return None


ARGS = {
    "text": "\\box{0.5}"
}
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 float, 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
extract_plain_number Ran
ran, honoured the contract we drafted
kxfan2002/sophiavl-r1/verl/workers/reward/custom.py
code served (permissive licence) · get_code("1c25e11108cd52bb")
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 float, 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 re

def extract_plain_number(text: str):
    """
    Directly extract the first 0~1 float number from the text (not format-dependent).
    """
    match = re.search('\\b([01](?:\\.\\d)?)\\b', text)
    if match:
        return float(match.group(1))
    return None


ARGS = {
    "text": "The probability is 0.7 and confidence 1"
}
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 float, 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
extract_score Ran
ran, honoured the contract we drafted
kxfan2002/sophiavl-r1/verl/workers/reward/custom.py
code served (permissive licence) · get_code("41ec901c077b9860")
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 float, 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 re

def extract_after_think_number(text: str):
    """
    Extract the number after </think> tag.
    Match style: </think> <answer>0.5</answer>
    """
    match = re.search('</think>\\s*<answer>\\s*([\\d.]+)\\s*</answer>', text)
    if match:
        number_str = match.group(1)
        return int(number_str) if number_str.isdigit() else float(number_str)
    match = re.search('</think>\\s*([\\d.]+)', text)
    if match:
        number_str = match.group(1)
        return int(number_str) if number_str.isdigit() else float(number_str)
    return None

def extract_box_score(text: str):
    """
    Extract float number from \x08ox{} or \x08oxes{}.
    """
    match = re.search('\\\\box(?:es)?\\{([01](?:\\.\\d)?)\\}', text)
    if match:
        return float(match.group(1))
    return None

def extract_plain_number(text: str):
    """
    Directly extract the first 0~1 float number from the text (not format-dependent).
    """
    match = re.search('\\b([01](?:\\.\\d)?)\\b', text)
    if match:
        return float(match.group(1))
    return None

def extract_total_wrong_steps(text: str):
    """
    Extract the integer from 'Total Wrong Steps:'.
    """
    match = re.search('Total Wrong Steps\\*\\*:\\s*(\\d+)', text)
    if match:
        return int(match.group(1))
    return None

def extract_wrong_steps(text: str):
    """
    Extract the integer after **... Wrong Steps**.
    Match style: **Total Wrong Steps**: 1
    """
    match = re.search('\\*\\*.*?\\bWrong Steps\\*\\*:\\s*(\\d+)', text)
    if match:
        return int(match.group(1))
    return None

def extract_xml_answer(text: str):
    """
    Extract float number from <answer>...</answer>.
    """
    match = re.search('<answer>\\s*([01](?:\\.\\d)?)\\s*</answer>', text)
    if match:
        return float(match.group(1))
    return None

def extract_zero_wrong_steps(text: str):
    """
    Match **0 wrong steps** and extract the number (should be 0 here).
    """
    match = re.search('\\*\\*(\\d+)\\s+wrong steps\\*\\*', text)
    if match:
        return int(match.group(1))
    return None

def extract_score(text: str):
    """
    Use above method to extract score
    """
    for extractor in [extract_box_score, extract_xml_answer, extract_plain_number, extract_after_think_number, extract_total_wrong_steps, extract_zero_wrong_steps, extract_wrong_steps]:
        score = extractor(text)
        if score is not None:
            if score > 1:
                score = 1
            elif score < 0:
                score = 0
            return score
    return 0


ARGS = {
    "text": "</think> <answer>0.75</answer>"
}
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 float, 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
extract_total_wrong_steps Ran
ran, honoured the contract we drafted
kxfan2002/sophiavl-r1/verl/workers/reward/custom.py
code served (permissive licence) · get_code("a3fb75a44df989bc")
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 int, ndim 0, dtype family int, 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 re

def extract_total_wrong_steps(text: str):
    """
    Extract the integer from 'Total Wrong Steps:'.
    """
    match = re.search('Total Wrong Steps\\*\\*:\\s*(\\d+)', text)
    if match:
        return int(match.group(1))
    return None

# Test case 1: text with the pattern
text_with_pattern = "Total Wrong Steps**: 42"

ARGS = {
    "text": text_with_pattern
}
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 int, ndim 0, dtype family int, 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
extract_wrong_steps Ran
ran, honoured the contract we drafted
kxfan2002/sophiavl-r1/verl/workers/reward/custom.py
code served (permissive licence) · get_code("ecd8a3dfe587141d")
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 int, ndim 0, dtype family int, 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 re

def extract_wrong_steps(text: str):
    """
    Extract the integer after **... Wrong Steps**.
    Match style: **Total Wrong Steps**: 1
    """
    match = re.search('\\*\\*.*?\\bWrong Steps\\*\\*:\\s*(\\d+)', text)
    if match:
        return int(match.group(1))
    return None


# Test case 1: valid format
text_1 = "**Total Wrong Steps**: 5"

# Test case 2: no match
text_2 = "No wrong steps here"

# Test case 3: different prefix
text_3 = "**Math Wrong Steps**: 42"

# Test case 4: extra whitespace
text_4 = "**Total Wrong Steps**:   99"

ARGS = {
    "text": text_1
}
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 int, ndim 0, dtype family int, 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
extract_xml_answer Ran
ran, honoured the contract we drafted
kxfan2002/sophiavl-r1/verl/workers/reward/custom.py
code served (permissive licence) · get_code("816215511a181080")
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 float, 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 re

def extract_xml_answer(text: str):
    """
    Extract float number from <answer>...</answer>.
    """
    match = re.search('<answer>\\s*([01](?:\\.\\d)?)\\s*</answer>', text)
    if match:
        return float(match.group(1))
    return None


ARGS = {
    "text": "<answer> 0.5 </answer>"
}
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 float, 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
extract_zero_wrong_steps Ran
ran, honoured the contract we drafted
kxfan2002/sophiavl-r1/verl/workers/reward/custom.py
code served (permissive licence) · get_code("a92257d44df0a660")
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 int, ndim 0, dtype family int, 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 re

def extract_zero_wrong_steps(text: str):
    """
    Match **0 wrong steps** and extract the number (should be 0 here).
    """
    match = re.search('\\*\\*(\\d+)\\s+wrong steps\\*\\*', text)
    if match:
        return int(match.group(1))
    return None


ARGS = {
    'text': '**0 wrong steps**'
}
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 int, ndim 0, dtype family int, 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
get_process_reward Ran
ran, honoured the contract we drafted
kxfan2002/sophiavl-r1/verl/workers/reward/custom.py
code served (permissive licence) · get_code("543de9154f5a4ee8")
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) and returned int, ndim 0, dtype family int, 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 os
import re

# Set up environment variables that the function expects
os.environ['OPENAI_API_URL'] = 'http://localhost:8000/v1/chat/completions'
os.environ['REWARD_MODEL'] = 'gpt-4-vision'

# Define the arguments for get_process_reward
ARGS = {
    'prompt_str': 'What is the capital of France?',
    'reasoning_str': 'France is a country in Europe. The capital of France is Paris. Paris is located in the north-central part of France.',
    'image': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
httpx — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, 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

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, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 9 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.

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

Repositories linked to this paper

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

Abstract

Recent advances have shown success in eliciting strong reasoning abilities in multimodal large language models (MLLMs) through rule-based reinforcement learning (RL) with outcome rewards. However, this paradigm typically lacks supervision over the thinking process leading to the final outcome. As a result, the model may learn sub-optimal reasoning strategies, which can hinder its generalization ability. In light of this, we propose SophiaVL-R1, as an attempt to add reward signals for the thinking process in this paradigm. To achieve this, we first train a thinking reward model that evaluates the quality of the entire thinking process. Given that the thinking reward may be unreliable for certain samples due to reward hacking, we propose the Trust-GRPO method, which assigns a trustworthiness weight to the thinking reward during training. This weight is computed based on the thinking reward comparison of responses leading to correct answers versus incorrect answers, helping to mitigate the impact of potentially unreliable thinking rewards. Moreover, we design an annealing training strategy that gradually reduces the thinking reward over time, allowing the model to rely more on the accurate rule-based outcome reward in later training stages. Experiments show that our SophiaVL-R1 surpasses a series of reasoning MLLMs on various benchmarks (e.g., MathVisita, MMMU), demonstrating strong reasoning and generalization capabilities. Notably, our SophiaVL-R1-7B even outperforms LLaVA-OneVision-72B on most benchmarks, despite the latter having 10× more parameters. All code, models, and datasets will be made publicly available.

For agents

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

get_harvested_code_for_paper("2505.17018")
get_code_for_paper("2505.17018")
have("2505.17018")

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

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

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

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

Connect an agent — have() is free.