Skip to main content

Sophon

A procedurally-generated benchmark for diagnosing spatial reasoning failure modes in Vision-Language Models.

Sophon ships no images — it ships a generator. A YAML spec plus an integer seed deterministically produces (image, question, ground_truth) triples, so every experiment is reproducible from a one-line config. The benchmark strips everything except spatial structure: no objects, no scenes, no textures, no language cues. What's left is a clean readout on whether a VLM can recover a geometric transformation from its rendered projection.

Sample stimuli across coordinate systems and question types

Sample Sophon stimuli, one per (coordinate-system, question-type) cell. Left: 1D-linear / categorical. Center: 2D Cartesian / binary. Right: 2D polar / quantitative. Each panel shows its coordinate system and ground-truth transform parameter.

Quick start

# from the repo root, with uv installed
uv sync

# Render and preview a spec (writes images + question text to ./preview/<spec>/)
uv run sophon preview --spec sophon/specs/cartesian_rotation.yaml --num-samples 5

# Or generate (image, question, ground_truth) triples programmatically
uv run python -c "
from sophon.generator import BenchmarkGenerator
from sophon.schema import BenchmarkSpec
import yaml

spec = BenchmarkSpec(**yaml.safe_load(open('sophon/specs/cartesian_rotation.yaml')))
for img, sample in BenchmarkGenerator(spec).generate(seed=42):
    print(sample.question_text, '->', sample.ground_truth)
    if img: img.save(f'sample_{sample.sample_id}.png')
"

What's in the box

Coordinate systems

  • 1D Linear — points on a number line; translation only.
  • 2D Cartesian — points on an x/y grid; translation, rotation, scale.
  • 2D Polar — points in (r, θ) space; radial shift, angular rotation, radial scale.

Question types

  • Binary — "Are the blue and red point sets aligned (yes/no)?" — single-token answer.
  • Categorical — "Which direction should the red points move to align with the blue points?" — restricted (transform-relevant) or full (six-way) vocabulary.
  • Comparative — "Which image (A or B) shows better alignment?" — pairwise side-by-side.
  • Quantitative — "Approximately how many degrees was the rotation?" — magnitude estimation.

Categorical samples across coordinate systems

Specs

sophon/specs/ contains pre-baked YAML specs for the diagnostic suite used in the SOPHON paper:

  • cartesian_translation_x.yaml / cartesian_translation_y.yaml / cartesian_rotation.yaml / cartesian_scale.yaml / cartesian_compound.yaml
  • linear_translation.yaml
  • polar_radial.yaml / polar_radial_scale.yaml / polar_rotation.yaml
  • full_suite.yaml — concatenation runner

Each spec is a single YAML file; copy and edit to define your own. Spec fields document themselves (see sophon/schema.py for the dataclass definition).

Determinism

Every spec is deterministic given a seed: same seed in, same (image, question, ground_truth) stream out. The SOPHON paper uses this to keep training-data seeds (100+) disjoint from evaluation seeds (42, 43, 44) — no leakage between fine-tuning data and held-out test items.

Restricted vocabulary

Categorical questions default to a restricted vocabulary — only the two direction words relevant to the active transform (e.g. left, right for x-translation). VLMs preferentially select rotation tokens (clockwise, counterclockwise) when they're available even on translation tasks; restricted vocabulary isolates spatial reasoning from answer-set confusion. The full six-way vocabulary remains available via vocab_mode: full in the spec for ablations.

Citing

If you use Sophon in published work, please cite:

@article{sophon2026,
  title  = {{Sophon}: A Procedural Diagnostic for Spatial Reasoning in Vision-Language Models},
  year   = {2026}
}

License

MIT.

Metadata

Release files for sophon-bench 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sophon-bench 0.3.1
File Size Uploaded Provenance Actions
sophon_bench-0.3.1.tar.gz 38.3 kB With provenance Details for sophon_bench-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sophon-bench 0.3.1
File Interpreter ABI Platform Actions
sophon_bench-0.3.1-py3-none-any.whl Python 3 none any Details for sophon_bench-0.3.1-py3-none-any.whl

Total release size: 87.5 kB

Release files / sophon_bench-0.3.1.tar.gz

Download URL sophon_bench-0.3.1.tar.gz
Size 38.3 kB
Tags Source
SHA-256 checksum
How to use checksums
29419cc415d50842a47621831673aaa8bba44b058aa16da8a8796cf4229d1ba6
BLAKE2b-256 checksum
How to use checksums
898c23c88203a31ebd3b894913bb4f1ea26135313dc40230cc719f09323ba80a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Release files / sophon_bench-0.3.1-py3-none-any.whl

Download URL sophon_bench-0.3.1-py3-none-any.whl
Size 49.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c41a6bcff469e4bef237e2d79acd2e8fdc99df2f5fddf4fb032b51c64c6c3254
BLAKE2b-256 checksum
How to use checksums
7a0cdeaac6d29b2cabca76ab8da88807fd8a2cd4b83daa38431f810b12d23624
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Security for sophon-bench 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for sophon_bench-0.3.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page