arc-prize
ARC-AGI-2 solver using geometric embeddings, hyperbolic rule inference, and adversarial structure probing.
Approach
This solver combines three key ideas:
-
Hyperbolic Rule Encoding — ARC transformation rules are hierarchical (e.g., "tile the pattern" contains "repeat", "mirror", "offset"). The Poincaré ball naturally represents this hierarchy: general rules near the origin, specific sub-rules near the boundary.
-
Radar-like Structure Probing — Parametric transforms at controllable intensity [0,1] are applied to grids and the model's latent response is measured. Transforms the model is invariant to reveal learned symmetries; transforms it's sensitive to reveal structural features it uses. This is adapted from the Bond Index adversarial fuzzing framework.
-
Test-Time Refinement — Per-task fine-tuning on augmented training pairs (the dominant winning pattern from ARC Prize 2025). Leave-one-out training on dihedral augmentations provides more signal per task.
Architecture
Training Pairs → PairEncoder → z_pairs → HyperbolicRuleEncoder → h_rules
↓
Attention Aggregation
↓
Test Input → GridEncoder ─────────────────────────→ GridDecoder ← z_rule
↓
Output Grid
The adversarial training component (gradient reversal) forces the encoder to be invariant to surface features (color palette, position) while remaining sensitive to structural features (pattern, symmetry, count).
Installation
pip install arc-prize
Or for development:
git clone https://github.com/ahb-sjsu/arc-prize.git
cd arc-prize
pip install -e ".[dev]"
Quick Start
from arc_prize.solver import ARCSolver, SolverConfig
from arc_prize.data import load_arckit_tasks
# Load ARC-AGI-1 tasks
train_tasks, eval_tasks = load_arckit_tasks()
# Initialize solver
solver = ARCSolver(SolverConfig(device="cuda"))
# Solve a task
task = eval_tasks[0]
train_pairs = [(p.input, p.output) for p in task.train]
test_inputs = [p.input for p in task.test]
predictions = solver.solve_task(train_pairs, test_inputs, refine=True)
# predictions[i] = [candidate_1, candidate_2] for test input i
Structure Probing
The radar-like probe system reveals what the model has learned:
from arc_prize.fuzzer import StructureProbe, make_transform_suite
from arc_prize.encoder import GridEncoder
encoder = GridEncoder(z_dim=128)
probe = StructureProbe(encoder, transforms=make_transform_suite())
report = probe.scan(task_id="abc123", grid=input_grid, device="cuda")
# What is the model invariant to?
print(report.invariance_profile)
# {'color_permute': 0.95, 'rotate': 0.88, 'add_noise': 0.12, ...}
# How well does it separate structure from surface?
print(f"Robustness Index: {report.robustness_index:.3f}")
Modules
| Module | Description |
|---|---|
grid.py |
Grid ↔ tensor conversion, padding, object extraction |
encoder.py |
CNN + attention pooling grid encoder, pair encoder |
geometric.py |
Poincaré ball operations, hyperbolic rule encoder |
decoder.py |
FiLM-conditioned CNN grid decoder |
fuzzer.py |
Parametric structure probing (the "radar") |
adversarial.py |
Gradient reversal for surface-invariant encoding |
augment.py |
Dihedral group + color permutation augmentations |
solver.py |
End-to-end solver with test-time refinement |
data.py |
Task loading from JSON / arckit |
evaluate.py |
Exact-match scoring |
submit.py |
Kaggle submission generator |
License
MIT
Metadata
Release files for arc-prize 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| arc_prize-0.1.0.tar.gz | 24.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| arc_prize-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 49.1 kB
Release files / arc_prize-0.1.0.tar.gz
| Download URL | arc_prize-0.1.0.tar.gz |
|---|---|
| Size | 24.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4b34efd14ad84889531da7284d40a5f137d5a4676ffcdc69567bfe2e73d33998
|
|
BLAKE2b-256 checksum How to use checksums |
7d994f333dce1fe189f366c92a4549ee2eb56ffa7afbb7fa45fac3f942468525
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.2
|
Release files / arc_prize-0.1.0-py3-none-any.whl
| Download URL | arc_prize-0.1.0-py3-none-any.whl |
|---|---|
| Size | 24.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1b5e841daf8c6a0a1822c9c6b07e3c15b6d47000b529eafe0175ed92a6453d0c
|
|
BLAKE2b-256 checksum How to use checksums |
4a3b8136ff81f60fc484cb6badf268c7ab9e5e1ad7fa876d582ca89c6580acf5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.2
|
Security for arc-prize 0.1.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.