SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2407.04952 · EMNLP · 2024

Granular Privacy Control for Geolocation with Vision Language Models

Wei Xu, James Hays, Yang Chen, Sauvik Das, Alan Ritter, Ethan Mendes, El Ravel, Brauereigaststätte Schlappeseppel N/A N/A, La Boqueria, Julie Johnson, John Biggan, Etta Mullin, and 1 more

arXiv · PDF · Open in the Atlas

Code that ran

8 of 10 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, 1 violated it and 1 has no contract verdict; 5 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/2407.04952.json · badge: /api/ran/2407.04952.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
ethanm88/GPTGeoChat canonical (classifier label)
classifier basis: census
8 ran · 2 no recorded run
FunctionStatusWhere it lives
compute_basic_metrics Ran
ran, honoured the contract we drafted
ethanm88/GPTGeoChat/utils/metric_utils.py
code served (permissive licence) · get_code("47808bf66674777d")
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 tuple, 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 json
import os
import tempfile
from sklearn.metrics import precision_recall_fscore_support

# Create temporary directory structure for ground truth data
temp_dir = tempfile.mkdtemp()
ground_truth_dir = os.path.join(temp_dir, 'moderation_decisions_ground_truth')
os.makedirs(ground_truth_dir, exist_ok=True)

# Create ground truth file
granularity = 'conversation'
ground_truth_file = os.path.join(ground_truth_dir, f'ground_truth_granularity={granularity}.jsonl')
with open(ground_truth_file, 'w') as f:
    f.write(json.dumps({'question_id': 'q1', 'ground_truth': 'yes'}) + '\n')
    f.write(json.dumps({'question_id': 'q2', 'ground_truth': 'no'}) + '\n')

# Create answers file
answers_file = os.path.join(temp_dir, 'answers.jsonl')
with open(answers_file, 'w') as f:
    f.write(json.dumps({'question_id': 'q1', 'predicted': 'Yes'}) + '\n')
    f.write(json.dumps({'question_id': 'q2', 'predicted': 'No'}) + '\n')

# Define ARGS
ARGS = {
    'granularity': granularity,
    'answers_file': answers_file,
    'raw_data': None,
    'ground_truth_dir': ground_truth_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple 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
compute_withheld_leaked Ran
ran on a synthesized input
ethanm88/GPTGeoChat/utils/metric_utils.py
code served (permissive licence) · get_code("c37a931cd4f26a83")
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 tuple, 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 json
import tempfile
import os

# Create temporary directory and files for the test
temp_dir = tempfile.mkdtemp()

# Create ground truth results files
image_id_1 = "img_001"
image_id_2 = "img_002"

ground_truth_dir = os.path.join(temp_dir, "gptgeochat", "human", "ground_truth_results")
os.makedirs(ground_truth_dir, exist_ok=True)

# Create ground truth file for image 1
gt_file_1 = os.path.join(ground_truth_dir, f"ground_truths_{image_id_1}.jsonl")
with open(gt_file_1, 'w') as f:
    f.write(json.dumps({"dialogue_turn_no": 1, "ground_truth": True, "granularity": "country"}) + "\n")
    f.write(json.dumps({"dialogue_turn_no": 1, "ground_truth": True, "granularity": "city"}) + "\n")
    f.write(json.dumps({"dialogue_turn_no": 2, "ground_truth": True, "granularity": "neighborhood"}) + "\n")
    f.write(json.dumps({"dialogue_turn_no": 2, "ground_truth": False, "granularity": "exact location name"}) + "\n")

# Create ground truth file for image 2
gt_file_2 = os.path.join(ground_truth_dir, f"ground_truths_{image_id_2}.jsonl")
with open(gt_file_2, 'w') as f:
    f.write(json.dumps({"dialogue_turn_no": 1, "ground_truth": True, "granularity": "country"}) + "\n")
    f.write(json.dumps({"dialogue_turn_no": 1, "ground_truth": True, "granularity": "city"}) + "\n")

# Create answers file
answers_file = os.path.join(temp_dir, "answers.jsonl")
with open(answers_file, 'w') as f:
    f.write(json.dumps({"question_id": f"{image_id_1}_turn_1", "predicted": "No"}) + "\n")
    f.write(json.dumps({"question_id": f"{image_id_1}_turn_2", "predicted": "Yes"}) + "\n")
    f.write(json.dumps({"question_id": f"{image_id_2}_turn_1", "predicted": "No"}) + "\n")

# Change to temp directory so relative paths work
original_cwd = os.getcwd()
os.chdir(temp_dir)

ARGS = {
    "answers_file": answers_file,
    "granularity": "city"
}
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 tuple, ndim 1, dtype family float — a tuple 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
convert_standard_format Ran
ran; our contract draft was wrong, not the code
ethanm88/GPTGeoChat/generate_ground_truths.py
code served (permissive licence) · get_code("866a346b65416e6f")
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

ARGS = {
    'location_data': {
        'country': 'United States',
        'city': 'New York',
        'neighborhood': 'Manhattan',
        'exact_location_name': 'Times Square',
        'latitude': '40.758896',
        'longitude': '-73.985130'
    }
}
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 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_agent_results Ran
ran; our contract draft was wrong, not the code
ethanm88/GPTGeoChat/generate_eval_metrics.py
code served (permissive licence) · get_code("8a570385a75f45c4")
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 os
import tempfile
import json

# Create a temporary directory with test .jsonl files
temp_dir = tempfile.mkdtemp()

# Create sample .jsonl files with granularity in filename
test_files = [
    'model_a_granularity=fine.jsonl',
    'model_b_granularity=coarse.jsonl',
    'model_c_granularity=medium.jsonl'
]

for filename in test_files:
    filepath = os.path.join(temp_dir, filename)
    with open(filepath, 'w') as f:
        # Write a simple jsonl entry
        f.write(json.dumps({'data': 'test'}) + '\n')

ARGS = {
    'results_dir': temp_dir
}
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_gpt_location_data Ran
ran; our contract draft was wrong, not the code
ethanm88/GPTGeoChat/utils/geocoding_utils.py
code served (permissive licence) · get_code("67e10bde25d14528")
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 directory and annotation file
temp_dir = tempfile.mkdtemp()
annotation_subdir = os.path.join(temp_dir, 'gptgeochat', 'human', 'test', 'annotations')
os.makedirs(annotation_subdir, exist_ok=True)

# Create a mock annotation file
annotation_data = {
    'messages': [
        {
            'role': 'user',
            'content': 'Where is this?'
        },
        {
            'role': 'assistant',
            'content': 'This is in France',
            'location_data': {
                'country': 'France',
                'city': 'Paris',
                'neighborhood': 'Marais',
                'exact_location_name': 'Place des Vosges'
            }
        },
        {
            'role': 'user',
            'content': 'Tell me more'
        },
        {
            'role': 'assistant',
            'content': 'It is a historic square',
            'location_data': {
                'country': 'France',
                'city': 'Paris',
                'neighborhood': 'Le Marais',
                'exact_location_name': 'Palais des Vosges'
            }
        }
    ]
}

image_id = '12345'
annotation_file_path = os.path.join(annotation_subdir, f'annotation_{image_id}.json')
with open(annotation_file_path, 'w') as f:
    json.dump(annotation_data, f)

# Change working directory to temp_dir so relative path works
os.chdir(temp_dir)

ARGS = {
    'image_id': '12345',
    'include_turn': [True, False],
    'granularity': 'country'
}
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_gpt_result_ground_truth Ran
ran; our contract draft was wrong, not the code
ethanm88/GPTGeoChat/utils/metric_utils.py
code served (permissive licence) · get_code("7e785034febc6214")
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 directory and mock JSONL file
temp_dir = tempfile.mkdtemp()
mock_results_dir = os.path.join(temp_dir, 'gptgeochat', 'human', 'ground_truth_results')
os.makedirs(mock_results_dir, exist_ok=True)

# Create mock ground truth results file
image_id = "test_image_001"
results_file = os.path.join(mock_results_dir, f'ground_truths_{image_id}.jsonl')

# Write sample JSONL data
mock_data = [
    {"dialogue_turn_no": 1, "ground_truth": True, "granularity": "country", "moderated": True},
    {"dialogue_turn_no": 1, "ground_truth": True, "granularity": "city", "moderated": False},
    {"dialogue_turn_no": 2, "ground_truth": True, "granularity": "neighborhood", "moderated": True},
    {"dialogue_turn_no": 2, "ground_truth": False, "granularity": "exact location name", "moderated": False},
]

with open(results_file, 'w') as f:
    for item in mock_data:
        f.write(json.dumps(item) + '\n')

# Patch the file path in the function's context
import sys
from unittest import mock

# Create a mock to intercept the file opening
original_open = open

def mock_open_func(file_path, mode='r', *args, **kwargs):
    if 'ground_truths_' in file_path:
        return original_open(results_file, mode, *args, **kwargs)
    return original_open(file_path, mode, *args, **kwargs)

sys.modules['builtins'].open = mock_open_func

# Define arguments
ARGS = {
    'image_id': image_id,
    'include_turn': [True, True],  # Include both dialogue turns
    'granularity': 'exact_location_name'  # Test with a granularity level
}
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_individual_ground_truth Ran
ran, violated the contract we drafted
ethanm88/GPTGeoChat/generate_ground_truths.py
code served (permissive licence) · get_code("74f89775e644ee22")
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.

# Setup code for get_individual_ground_truth

ARGS = {
    'current_location_data': {
        'country': 'USA',
        'city': 'New York',
        'neighborhood': 'Manhattan',
        'exact': {
            'exact_location_name': 'Times Square',
            'latitude': '40.758896',
            'longitude': '-73.985130'
        }
    },
    'previous_location_data': {
        'country': 'USA',
        'city': 'Boston',
        'neighborhood': 'Downtown',
        'exact': {
            'exact_location_name': 'Boston Common',
            'latitude': '42.358431',
            'longitude': '-71.063611'
        }
    },
    'granularity_true': 'city'
}
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 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
sort_models_results Ran
ran; our contract draft was wrong, not the code
ethanm88/GPTGeoChat/utils/format_utils.py
code served (permissive licence) · get_code("15343dec0b243310")
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

# Construct arguments for sort_models_results
# The function filters and sorts results by model type, then concatenates them

results = [
    {'model': 'bert-base', 'score': 0.85},
    {'model': 'gpt2', 'score': 0.78},
    {'model': 'roberta-base', 'score': 0.82},
    {'model': 'bert-finetuned', 'score': 0.88},
    {'model': 'gpt2-finetuned', 'score': 0.81},
    {'model': 't5-base', 'score': 0.80},
]

baselines = ['bert-base', 'gpt2', 't5-base']
base_models = ['roberta-base']
finetuned_models = ['bert-finetuned', 'gpt2-finetuned']

ARGS = {
    'results': results,
    'baselines': baselines,
    'base_models': base_models,
    'finetuned_models': finetuned_models
}
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
compute_api_distance Not yet run
unverified (harvested, no recorded run)
ethanm88/GPTGeoChat/utils/geocoding_utils.py
code served (permissive licence) · get_code("a8f80573651054dc")
How it ran

no invocation recorded.

get_geocoding_api_coordinate_guess Not yet run
unverified (harvested, no recorded run)
ethanm88/GPTGeoChat/utils/geocoding_utils.py
code served (permissive licence) · get_code("efd6496d92b367e0")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 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 10 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-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

Vision Language Models (VLMs) are rapidly advancing in their capability to answer information-seeking questions. As these models are widely deployed in consumer applications, they could lead to new privacy risks due to emergent abilities to identify people in photos, geolocate images, etc. As we demonstrate, somewhat surprisingly, current open-source and proprietary VLMs are very capable image geolocators, making widespread geolocation with VLMs an immediate privacy risk, rather than merely a theoretical future concern. As a first step to address this challenge, we develop a new benchmark, GPTGEOCHAT, to test the capability of VLMs to moderate geolocation dialogues with users. We collect a set of 1,000 image geolocation conversations between in-house annotators and GPT-4v, which are annotated with the granularity of location information revealed at each turn. Using this new dataset we evaluate the ability of various VLMs to moderate GPT-4v geolocation conversations by determining when too much location information has been revealed. We find that custom fine-tuned models perform on par with prompted API-based models when identifying leaked location information at the country or city level, however fine-tuning on supervised data appears to be needed to accurately moderate finer granularites, such as the name of a restaurant or building. 1

For agents

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

get_harvested_code_for_paper("2407.04952")
get_code_for_paper("2407.04952")
have("2407.04952")

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

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

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

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

Connect an agent — have() is free.