Views
No views yet
arc_grid_relational-model is a grid-relational transformer designed for the Abstraction and Reasoning Corpus (ARC) tasks.| Setting | Value |
|---|---|
| Dataset | ARC Prize 2025 training challenges (arc-agi_training_challenges.json) |
| Grid Input | Integer-encoded colors (0–9), padded to max H×W |
| Input Encoding | One-hot grid → (H, W, num_colors) |
| Optimizer | Adam (lr = 3e-4) |
| Batch Size | 32 |
| Epochs | 10 |
| Random Seed | 42 |
| Parameter | Value |
|---|---|
| Conv Channels | [64, 128] |
| Cell Embedding Dim | 192 |
| Transformer Layers | 4 |
| Attention Heads | 8 |
| FFN Dim | 512 |
| Dropout | 0.1 |
-1 (padding mask)1import tensorflow as tf
2import numpy as np
3
4model = tf.keras.models.load_model("path/to/arc_grid_relational_model")
5
6# Example input grid (integer colors)
7inp_grid = np.array([
8 [1, 1, 0],
9 [0, 2, 2],
10 [0, 0, 0]
11], dtype=np.int32)
12
13# Pad + one-hot encode
14H, W = inp_grid.shape
15H_max, W_max = 30, 30 # example maximum grid size used during training
16num_colors = 10
17
18padded = np.zeros((H_max, W_max), dtype=np.int32)
19padded[:H, :W] = inp_grid
20x = tf.one_hot(padded, depth=num_colors)
21logits = model(x[None, ...])
22pred = tf.argmax(logits, axis=-1)[0][:H, :W].numpy()
23
24print(pred)