SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2505.14460 · 2025

VisualQuality-R1: Reasoning-Induced Image Quality Assessment via Reinforcement Learning to Rank

arXiv · PDF · Open in the Atlas

Code that ran

9 of 14 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; 1 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 4 failures of our instrument; 5 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.14460.json · badge: /api/ran/2505.14460.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
tianhewu/visualquality-r1 canonical (classifier label)
classifier basis not recorded on the link
9 ran · 5 no recorded run
FunctionStatusWhere it lives
extract_first_number Ran
ran on a synthesized input
tianhewu/visualquality-r1/src/open-r1-multimodal/src/open_r1/grpo_jsonl.py
code served (permissive licence) · get_code("07ccec4e2aecef7f")
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
import random

def extract_first_number(model_answer):
    match = re.search('-?\\d+(\\.\\d+)?', model_answer)
    if match:
        return float(match.group())
    else:
        return random.randint(1, 5)

ARGS = {
    'model_answer': 'The answer is 42.5 and it works'
}
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_problem_solution Ran
ran; our contract draft was wrong, not the code
tianhewu/visualquality-r1/src/open-r1-multimodal/local_scripts/prepare_hf_data.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from AMAP-ML/Q-Hawkeye, is pointer only (licence: NONE) · get_code("41c548a25e90eb39")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from AMAP-ML/Q-Hawkeye, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

fidelity_reward Ran
ran on a synthesized input
tianhewu/visualquality-r1/src/open-r1-multimodal/src/open_r1/grpo_jsonl.py
code served (permissive licence) · get_code("44d62022cdd5c922")
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 Tensor, ndim 2, dtype family float, shape (2, 4) 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 torch

torch.manual_seed(0)

device = 'cpu'

# Create small tensors for predictions, variances, and ground truth
batch_size = 2
dim = 4

pred1 = torch.randn(batch_size, dim, device=device)
pred2 = torch.randn(batch_size, dim, device=device)
var1 = torch.abs(torch.randn(batch_size, dim, device=device)) + 0.1
var2 = torch.abs(torch.randn(batch_size, dim, device=device)) + 0.1
gt = torch.randint(0, 2, (batch_size, dim), dtype=torch.float32, device=device)

ARGS = {
    'pred1': pred1,
    'pred2': pred2,
    'var1': var1,
    'var2': var2,
    'gt': gt,
    'device': device
}
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 Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) 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
format_reward Ran
ran, honoured the contract we drafted
tianhewu/visualquality-r1/src/open-r1-multimodal/src/open_r1/grpo.py
code served (permissive licence) · get_code("e89f2eec0a18d4c2")
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 re

def format_reward(completions, **kwargs):
    """Reward function that checks if the completion has a specific format."""
    pattern = '<think>.*?</think>\\s*<answer>.*?</answer>'
    completion_contents = [completion[0]['content'] for completion in completions]
    matches = [re.match(pattern, content) for content in completion_contents]
    return [1.0 if match else 0.0 for match in matches]


# Set up valid arguments for format_reward
completions = [
    [
        {
            'content': '<think>This is a thinking block</think>\n<answer>This is the answer</answer>'
        }
    ],
    [
        {
            'content': '<think>Another thought</think>  <answer>Another answer</answer>'
        }
    ],
    [
        {
            'content': 'This does not match the pattern'
        }
    ],
    [
        {
            'content': '<think>Incomplete'
        }
    ]
]

ARGS = {
    'completions': completions
}
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
generate_temp_json_data Ran
ran on a synthesized input
tianhewu/visualquality-r1/datasets/make_data.py
code served (permissive licence) · get_code("cdda70c471530e2d")
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

# Construct a valid comparison_result argument
# The function iterates over items and expects each to have length 2
# Each item is unpacked as (dis, mos) where dis is an image path/identifier
# and mos is a score/answer

comparison_result = [
    ('image1.jpg', '0.85'),
    ('image2.jpg', '0.92'),
]

ARGS = {
    'comparison_result': comparison_result
}
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_image_data_url Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
tianhewu/visualquality-r1/src/open-r1-multimodal/local_scripts/create_vision_cot_data.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from minglllli/cls-rl, is pointer only (licence: NONE) · get_code("3f31b48fd862935d")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from minglllli/cls-rl, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

initialize_tokenizer Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
tianhewu/visualquality-r1/src/open-r1-multimodal/src/open_r1/grpo_jsonl.py
code served (permissive licence) · get_code("cbe3d6234a75d8d8")
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 Mock. 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
from unittest.mock import Mock, MagicMock

torch.manual_seed(0)

# Create a mock tokenizer to avoid actual model downloads
mock_tokenizer = Mock()
mock_tokenizer.vocab_size = 30522
mock_tokenizer.model_max_length = 512

# Mock the AutoTokenizer.from_pretrained to return our mock tokenizer
# We need to patch this before calling initialize_tokenizer
import transformers
original_from_pretrained = transformers.AutoTokenizer.from_pretrained
transformers.AutoTokenizer.from_pretrained = Mock(return_value=mock_tokenizer)

ARGS = {
    "model_path": "bert-base-uncased"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Mock — a Mock output has no array shape of its own; none is 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
process_single_item Ran
ran; our contract draft was wrong, not the code
tianhewu/visualquality-r1/src/open-r1-multimodal/local_scripts/create_vision_cot_data.py
code served (permissive licence) · get_code("f029d6b5f19d2885")
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 dict. 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
from PIL import Image
from io import BytesIO

# Create a small test image
def create_test_image():
    img = Image.new('RGB', (10, 10), color='red')
    return img

# Save image to bytes and get path-like reference
test_image = create_test_image()
img_buffer = BytesIO()
test_image.save(img_buffer, format='JPEG')
img_buffer.seek(0)

# Create a simple example dict matching the structure expected by process_single_item
example = {
    'image_path': test_image,  # Can be PIL Image, file path, or data URL
    'question': 'What color is the square in the image?',
    'answer': 'Red'
}

ARGS = {
    'example': example
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, openai, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
read_json_file Ran
ran on a synthesized input
tianhewu/visualquality-r1/datasets/make_data.py
code served (permissive licence) · get_code("b6715cf1542b45e4")
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 dict. 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 json
import tempfile
import os

# Create a temporary JSON file with test data
temp_dir = tempfile.mkdtemp()
test_file_path = os.path.join(temp_dir, "test.json")

test_data = {
    "key1": "value1",
    "key2": [1, 2, 3],
    "key3": {"nested": "object"}
}

with open(test_file_path, 'w', encoding='utf-8') as f:
    json.dump(test_data, f)

ARGS = {
    "file_path": test_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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
get_vlm_module Not yet run
unverified (harvested, no recorded run)
tianhewu/visualquality-r1/src/open-r1-multimodal/src/open_r1/grpo_rec.py
code served (permissive licence) · get_code("a34f33d5ef7c45a9")
How it ran

no invocation recorded.

gpt4o_query Not yet run
unverified (harvested, no recorded run)
tianhewu/visualquality-r1/src/open-r1-multimodal/local_scripts/create_vision_cot_data.py
code served (permissive licence) · get_code("58ab41ce28a94c62")
How it ran

no invocation recorded.

load_image_from_path Not yet run
unverified (harvested, no recorded run)
tianhewu/visualquality-r1/src/open-r1-multimodal/local_scripts/prepare_hf_data.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from AMAP-ML/Q-Hawkeye, is pointer only (licence: NONE) · get_code("bdcc94560fb87f30")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from AMAP-ML/Q-Hawkeye, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

qwen2_5vl_forward Not yet run
unverified (harvested, no recorded run)
tianhewu/visualquality-r1/src/open-r1-multimodal/src/open_r1/qwen2_5vl_monkey_patch.py
code served (permissive licence) · get_code("f7e2f7881b609401")
How it ran

no invocation recorded.

scoring_images Not yet run
unverified (harvested, no recorded run)
tianhewu/visualquality-r1/datasets/make_data.py
code served (permissive licence) · get_code("5b01b590f99f82db")
How it ran

no invocation recorded.

Also present in other papers' code

Of 14 samples lifted from this paper's linked repositories, 14 carry a function identity and 0 do not. Of the 14 distinct functions with an identity, 9 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 6 the same month, 9 later) and 5 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_image_data_url 8 other papers
2 dated earlier, 1 the same month, 5 later
2503.16188 (2025-03)
To Think or Not To Think: A Study of Thinking in Rule-Based Visual Reinforcement Fine-Tuning
2503.21620 (2025-03)
UI-R1: Enhancing Efficient Action Prediction of GUI Agents by Reinforcement Learning
2505.15810 (2025-05)
GUI-G1: Understanding R1-Zero-Like Training for Visual Grounding in GUI Agents
and 5 more not named here
extract_problem_solution 7 other papers
1 dated earlier, 1 the same month, 5 later
2503.21620 (2025-03)
UI-R1: Enhancing Efficient Action Prediction of GUI Agents by Reinforcement Learning
2505.15810 (2025-05)
GUI-G1: Understanding R1-Zero-Like Training for Visual Grounding in GUI Agents
2510.14605 (2025-10)
Knowledge-based Visual Question Answer with Multimodal Processing, Retrieval and Filtering
and 4 more not named here
load_image_from_path 7 other papers
1 dated earlier, 1 the same month, 5 later
2503.21620 (2025-03)
UI-R1: Enhancing Efficient Action Prediction of GUI Agents by Reinforcement Learning
2505.15810 (2025-05)
GUI-G1: Understanding R1-Zero-Like Training for Visual Grounding in GUI Agents
2510.14605 (2025-10)
Knowledge-based Visual Question Answer with Multimodal Processing, Retrieval and Filtering
and 4 more not named here
gpt4o_query 5 other papers
1 dated earlier, 1 the same month, 3 later
2503.21620 (2025-03)
UI-R1: Enhancing Efficient Action Prediction of GUI Agents by Reinforcement Learning
2505.15810 (2025-05)
GUI-G1: Understanding R1-Zero-Like Training for Visual Grounding in GUI Agents
2510.14605 (2025-10)
Knowledge-based Visual Question Answer with Multimodal Processing, Retrieval and Filtering
and 2 more not named here
process_single_item 5 other papers
1 dated earlier, 1 the same month, 3 later
2503.21620 (2025-03)
UI-R1: Enhancing Efficient Action Prediction of GUI Agents by Reinforcement Learning
2505.15810 (2025-05)
GUI-G1: Understanding R1-Zero-Like Training for Visual Grounding in GUI Agents
2510.14605 (2025-10)
Knowledge-based Visual Question Answer with Multimodal Processing, Retrieval and Filtering
and 2 more not named here
format_reward 3 other papers
1 the same month, 2 later
2505.15810 (2025-05)
GUI-G1: Understanding R1-Zero-Like Training for Visual Grounding in GUI Agents
2510.14605 (2025-10)
Knowledge-based Visual Question Answer with Multimodal Processing, Retrieval and Filtering
2601.00388 (2026-01)
Vision-Language Reasoning for Geolocalization: A Reinforcement Learning Approach
get_vlm_module 1 other paper
1 later
2601.00388 (2026-01)
Vision-Language Reasoning for Geolocalization: A Reinforcement Learning Approach
initialize_tokenizer 1 other paper
1 later
2601.00388 (2026-01)
Vision-Language Reasoning for Geolocalization: A Reinforcement Learning Approach
qwen2_5vl_forward 1 other paper
1 later
2601.00388 (2026-01)
Vision-Language Reasoning for Geolocalization: A Reinforcement Learning Approach

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

DeepSeek-R1 has demonstrated remarkable effectiveness in incentivizing reasoning and generalization capabilities of large language models (LLMs) through reinforcement learning. Nevertheless, the potential of reasoning-induced computation has not been thoroughly explored in the context of image quality assessment (IQA), a task depending critically on visual reasoning. In this paper, we introduce VisualQuality-R1, a reasoning-induced no-reference IQA (NR-IQA) model, and we train it with reinforcement learning to rank, a learning algorithm tailored to the intrinsically relative nature of visual quality. Specifically, for a pair of images, we employ group relative policy optimization to generate multiple quality scores for each image. These estimates are used to compute comparative probabilities of one image having higher quality than the other under the Thurstone model. Rewards for each quality estimate are defined using continuous fidelity measures rather than discretized binary labels. Extensive experiments show that the proposed VisualQuality-R1 consistently outperforms discriminative deep learning-based NR-IQA models as well as a recent reasoning-induced quality regression method. Moreover, VisualQuality-R1 is capable of generating contextually rich, human-aligned quality descriptions, and supports multi-dataset training without requiring perceptual scale realignment. These features make VisualQuality-R1 especially well-suited for reliably measuring progress in a wide range of image processing tasks like super-resolution and image generation.

For agents

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

get_harvested_code_for_paper("2505.14460")
get_code_for_paper("2505.14460")
have("2505.14460")

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

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

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

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

Connect an agent — have() is free.