cainvert-benchmark / README.md
randomnumber101's picture
Upload README.md with huggingface_hub
615b2a1 verified
|
Raw History Blame Contribute Delete
3.48 kB
metadata
configs:
  - config_name: 1d_w81
    data_files: data/1d_w81/*.parquet
  - config_name: 1d_w400
    data_files: data/1d_w400/*.parquet
  - config_name: 1d_w900
    data_files: data/1d_w900/*.parquet
  - config_name: 2d_9x9
    data_files: data/2d_9x9/*.parquet
  - config_name: 2d_20x20
    data_files: data/2d_20x20/*.parquet
  - config_name: 2d_30x30
    data_files: data/2d_30x30/*.parquet
license: mit
task_categories:
  - reasoning
tags:
  - cellular-automata
  - recursive-reasoning
  - rule110
  - game-of-life
  - parquet
size_categories:
  - 100K<n<1M

CAInvert: Cellular Automata Inversion Reasoning Benchmark

Official Dataset Repository for CAInvert (GitHub).

CAInvert evaluates recursive and latent neural reasoning models on computationally irreducible cellular automata dynamics. Given an evolved future state $S_D$ at depth $D$ alongside sparse disambiguating hints, the model's task is to invert the physical trajectory and reconstruct the ancestral ground-truth initial state $S_0$.

Dataset Portfolio

Total verified preimage trees: 510,364 across 1D and 2D lattices:

Config Dimension Rule Lattice Shape Sequence Length Total Trees Shards Depths ($d$)
1d_w81 1D Rule 110 (81,) $N = 81$ 249,920 100 shards 1, 2, 3, 4, 6, 8, 10, 12
1d_w400 1D Rule 110 (400,) $N = 400$ 149,920 60 shards 1, 2, 3, 4, 6, 8, 10, 12
1d_w900 1D Rule 110 (900,) $N = 900$ 100,000 40 shards 1, 2, 3, 4, 6, 8, 10, 12
2d_9x9 2D Life B3/S23 (9, 9) $N = 81$ 6,000 192 shards 1, 2, 3, 4, 6, 8, 10, 12
2d_20x20 2D Life B3/S23 (20, 20) $N = 400$ 2,200 411 shards 1, 2, 3, 4, 6, 8, 10
2d_30x30 2D Life B3/S23 (30, 30) $N = 900$ 2,324 437 shards 1, 2, 3, 4, 6, 8, 10

Sequence Layout & Prediction Task

Every sample in the Parquet files contains:

  • target_state: Byte buffer of length $N$ representing $S_D$.
  • ground_truth_s0: Byte buffer of length $N$ representing target $S_0$.
  • hints_s0: Int8 array of length $N$ where -1 represents unrevealed/masked bits and values in {0, 1} represent spatial hint tape tokens.
  • depth: Integer recursion depth $d$.
  • leaf_count: Number of alternative preimages in the branching tree ($\Lambda$).
  • effective_branching: Geometric branching rate $b_{\text{eff}} = \Lambda^{1/d}$.

Model Input Format:

X=[SD]∘[[SEP]=3]∘[H0 (with MASK=2)]\mathbf{X} = [S_D] \circ [\mathtt{[SEP]=3}] \circ [H_0 \text{ (with MASK=2)}] Total input length: $2N + 1$ tokens. Target: $S_0 \in {0, 1}^N$.

Loading Data

1. PyTorch (cainvert)

from cainvert.storage.torch_dataset import CAInversionDataset

dataset = CAInversionDataset.from_hub(
    repo_id="randomnumber101/cainvert-benchmark",
    split="1d_w81",
    depth_min=4,
    depth_max=8
)

2. Hugging Face Datasets

from datasets import load_dataset

ds = load_dataset("randomnumber101/cainvert-benchmark", "1d_w81")

3. Zero-Download DuckDB Queries

import duckdb

conn = duckdb.connect()
conn.execute("INSTALL httpfs; LOAD httpfs;")
df = conn.execute("""
    SELECT depth, COUNT(*), AVG(leaf_count)
    FROM read_parquet('https://huggingface.co/datasets/randomnumber101/cainvert-benchmark/resolve/main/data/1d_w81/*.parquet')
    GROUP BY depth
""").df()
print(df)