SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2601.00388 · 2026

Vision-Language Reasoning for Geolocalization: A Reinforcement Learning Approach

Jun Wang, Ling Chen, Ke Xu, Meng Fang, Biao Wu, Tao Cheng

arXiv · PDF · Open in the Atlas

Code that ran

7 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; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 5 failures of our instrument; 4 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/2601.00388.json · badge: /api/ran/2601.00388.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
aialt/geo-r canonical (classifier label)
classifier basis: census
7 ran · 4 no recorded run
FunctionStatusWhere it lives
evaluate_answer_similarity Ran
ran, honoured the contract we drafted
aialt/geo-r/src/open-r1-multimodal/src/open_r1/grpo_jsonl.py
code served (permissive licence) · get_code("252870f138f5203f")
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 os
from unittest.mock import Mock, patch, MagicMock

# Setup for the evaluate_answer_similarity function
# The function takes student_answer and ground_truth as parameters

student_answer = "The capital of France is Paris, and it is located in northern France."
ground_truth = "Paris is the capital of France."

ARGS = {
    'student_answer': student_answer,
    'ground_truth': ground_truth,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
openai — 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_choice Ran
ran; our contract draft was wrong, not the code
aialt/geo-r/src/open-r1-multimodal/src/open_r1/grpo_jsonl.py
code served (permissive licence) · get_code("317605c76a72fc89")
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 re

def extract_choice(text):
    text = text.upper()
    text = re.sub('\\s+', ' ', text)
    choices = re.findall('(?<![A-Z])([A-Z])(?=[\\.\\,\\?\\!\\:\\;]|$)', text)
    if not choices:
        return None
    if len(choices) == 1:
        return choices[0]
    choice_scores = {choice: 0 for choice in choices}
    keywords = ['答案', '选择', '正确', '是', '对', 'answer', 'correct', 'choose', 'select', 'right', '认为', '应该', '觉得', 'think', 'believe', 'should']
    for choice in choices:
        pos = text.find(choice)
        context = text[max(0, pos - 20):min(len(text), pos + 20)]
        for keyword in keywords:
            if keyword.upper() in context:
                choice_scores[choice] += 1
        if pos > len(text) * 0.7:
            choice_scores[choice] += 2
        if pos < len(text) - 1 and text[pos + 1] in '。.!!,,':
            choice_scores[choice] += 1
    return max(choice_scores.items(), key=lambda x: x[1])[0]


# Test case 1: Simple text with single choice
test_text_1 = "The answer is A."

# Test case 2: Text with multiple choices, should pick based on keywords
test_text_2 = "Options are A, B, C. The correct answer is B!"

# Test case 3: Text with choice near end
test_text_3 = "Choose between A, B, or C. I think the answer should be C."

# Test case 4: Text with no valid choices
test_text_4 = "This has no choices here."

ARGS = {
    "text": test_text_2
}
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 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
extract_problem_solution Ran
ran; our contract draft was wrong, not the code
aialt/geo-r/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.

format_reward Ran
ran, honoured the contract we drafted
aialt/geo-r/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
get_image_data_url Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
aialt/geo-r/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)
aialt/geo-r/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
aialt/geo-r/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
get_vlm_module Not yet run
unverified (harvested, no recorded run)
aialt/geo-r/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)
aialt/geo-r/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)
aialt/geo-r/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)
aialt/geo-r/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.

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, 3 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_image_data_url 8 other papers
6 dated earlier, 2 the same month
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.14460 (2025-05)
VisualQuality-R1: Reasoning-Induced Image Quality Assessment via Reinforcement Learning to Rank
and 5 more not named here
extract_problem_solution 7 other papers
5 dated earlier, 2 the same month
2503.21620 (2025-03)
UI-R1: Enhancing Efficient Action Prediction of GUI Agents by Reinforcement Learning
2505.14460 (2025-05)
VisualQuality-R1: Reasoning-Induced Image Quality Assessment via Reinforcement Learning to Rank
2505.15810 (2025-05)
GUI-G1: Understanding R1-Zero-Like Training for Visual Grounding in GUI Agents
and 4 more not named here
load_image_from_path 7 other papers
5 dated earlier, 2 the same month
2503.21620 (2025-03)
UI-R1: Enhancing Efficient Action Prediction of GUI Agents by Reinforcement Learning
2505.14460 (2025-05)
VisualQuality-R1: Reasoning-Induced Image Quality Assessment via Reinforcement Learning to Rank
2505.15810 (2025-05)
GUI-G1: Understanding R1-Zero-Like Training for Visual Grounding in GUI Agents
and 4 more not named here
gpt4o_query 5 other papers
5 dated earlier
2503.21620 (2025-03)
UI-R1: Enhancing Efficient Action Prediction of GUI Agents by Reinforcement Learning
2505.14460 (2025-05)
VisualQuality-R1: Reasoning-Induced Image Quality Assessment via Reinforcement Learning to Rank
2505.15810 (2025-05)
GUI-G1: Understanding R1-Zero-Like Training for Visual Grounding in GUI Agents
and 2 more not named here
process_single_item 5 other papers
5 dated earlier
2503.21620 (2025-03)
UI-R1: Enhancing Efficient Action Prediction of GUI Agents by Reinforcement Learning
2505.14460 (2025-05)
VisualQuality-R1: Reasoning-Induced Image Quality Assessment via Reinforcement Learning to Rank
2505.15810 (2025-05)
GUI-G1: Understanding R1-Zero-Like Training for Visual Grounding in GUI Agents
and 2 more not named here
format_reward 3 other papers
3 dated earlier
2505.14460 (2025-05)
VisualQuality-R1: Reasoning-Induced Image Quality Assessment via Reinforcement Learning to Rank
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
evaluate_answer_similarity 1 other paper
1 dated earlier
2505.15810 (2025-05)
GUI-G1: Understanding R1-Zero-Like Training for Visual Grounding in GUI Agents
extract_choice 1 other paper
1 dated earlier
2505.15810 (2025-05)
GUI-G1: Understanding R1-Zero-Like Training for Visual Grounding in GUI Agents
get_vlm_module 1 other paper
1 dated earlier
2505.14460 (2025-05)
VisualQuality-R1: Reasoning-Induced Image Quality Assessment via Reinforcement Learning to Rank
initialize_tokenizer 1 other paper
1 dated earlier
2505.14460 (2025-05)
VisualQuality-R1: Reasoning-Induced Image Quality Assessment via Reinforcement Learning to Rank
qwen2_5vl_forward 1 other paper
1 dated earlier
2505.14460 (2025-05)
VisualQuality-R1: Reasoning-Induced Image Quality Assessment via Reinforcement Learning to Rank

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

Recent advances in vision-language models have opened up new possibilities for reasoning-driven image geolocalization. However, existing approaches often rely on synthetic reasoning annotations or external image retrieval, which can limit interpretability and generalizability. In this paper, we present Geo-R, a retrieval-free framework that uncovers structured reasoning paths from existing ground-truth coordinates and optimizes geolocation accuracy via reinforcement learning. We propose the Chain of Region, a rule-based hierarchical reasoning paradigm that generates precise, interpretable supervision by mapping GPS coordinates to geographic entities (e.g., country, province, city) without relying on modelgenerated or synthetic labels. Building on this, we introduce a lightweight reinforcement learning strategy with coordinatealigned rewards based on Haversine distance, enabling the model to refine predictions through spatially meaningful feedback. Our approach bridges structured geographic reasoning with direct spatial supervision, yielding improved localization accuracy, stronger generalization, and more transparent inference. Experimental results across multiple benchmarks confirm the effectiveness of Geo-R, establishing a new retrieval-free paradigm for scalable and interpretable image geolocalization. To facilitate further research and ensure reproducibility, all relevant resources, including the model and code, are publicly available at https://github.com/aialt/geo-r.

For agents

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

get_harvested_code_for_paper("2601.00388")
get_code_for_paper("2601.00388")
have("2601.00388")

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

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

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

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

Connect an agent — have() is free.