F3-AGI v4.0: Bioenergetically-Gated Active Inference, Metaplastic Preconditioning, and Residual Program Synthesis for Sample-Efficient Abstract Reasoning
Organizations: Polybee AI Research Laboratory, São Paulo, SP, Brazil
Abstract
Few-shot abstract reasoning on ARC-AGI requires inducing algorithmic transformations from 2 to 5 demonstration pairs without task-specific pretraining. Because few-shot demonstrations under-constrain the hypothesis space, program synthesis suffers from the Rashomon effect (predictive multiplicity): heuristic search finds spurious programs with low training error that fail on test inputs, while unconstrained library growth degrades latency. We introduce F3-AGI v4.0, a CPU-native neuro-symbolic and active inference architecture comprising three mechanisms: (1) F3-Metabolic-Optim, combining mistake-gated plasticity, Fisher-EMA preconditioning, and virtual ATP gating; (2) Adaptive Complexity-Guided Program Synthesis (AACR) with a Cycle-3 ResidualPatchSynthesizer and smallest-pair early rejection; and (3) a 512D L2-normalized random projection driving Expected Free Energy (EFE) exploration with dead-signature pruning. Across three empirical studies: (i) on a synthetic 5-task class-incremental stream without replay, F3-Metabolic-Optim achieves 91.67% final accuracy with 9.17% forgetting, skipping 93.47% of updates, cutting L1 plasticity cost by 65.7%, and running 2.19x faster than EWC; (ii) on the 400-task ARC-AGI-1 public evaluation set (offline CPU, zero LLM calls), F3-AGI v4.0 solves 57/400 tasks (14.25% pass@2; 56/400 pass@1) with a mean latency of 1.62 s/task, decomposed into 19/50 (38.00%, 1.19 s/task, a 42.5x paired speedup over Horizon 2) on the 50-task calibration slice and 38/350 (10.86%) on the 350 strictly uninspected hold-out tasks (with 7 autonomous Cycle-3 patch solutions); and (iii) in a local 5-game (15-level) ARC-AGI-3-inspired interactive suite, our agent completes 15/15 levels with 89.44% level-weighted RHAE (90.72% unweighted).
Figures & tables
| Paradigm / Framework | CPU-First ( ) | Forgetting Mitigation | Frugal Plasticity | Local Residual Repair | 512D Epistemic EFE | Dead-Signature Pruning |
|---|---|---|---|---|---|---|
| Brute-Force LLM Ensembles ( o3 / Astra ) | ✓ | |||||
| Classic EWC [ 11 ] | ✓ | ✓ | ||||
| Memorized Mistake Gating [ 10 ] | ✓ | ✓ | ||||
| SynGAP Continual Metaplasticity [ 9 ] | ✓ | ✓ | ||||
| Tiny Recursive Grid Models ( HRM / TRM ) [ 2 ] | ||||||
| MDL Neural Compression ( CompressARC ) [ 16 ] | ✓ |
| Algorithm 1: AACR Evolutionary Synthesis with Certified Smallest-Pair Gate & Cycle-3 Residual Patching |
|---|
| Input: Demonstration pairs , test input , operator library ( operators), mistake margin . |
| Output: Winning program , diverse Kaggle predictions , updated NREM buffer . |
| 1: Infer across all pairs , scale ratios, , objects |
| 2: Identify smallest demonstration input for pruning |
| 3: ; ; |
| 4: for do Phases 1–2: Accumulation & Compositional Amplification |
| Algorithm 2: Local Interactive Grid Controller with Isotropic Random Projection & Dead-Signature Pruning |
|---|
| Input: Turn-based environment , isotropic projection , action budget . |
| Output: Level completion trajectory, Level-Weighted , and Unweighted . |
| 1: Initialize cross-level causal memory ; Dead-signature set |
| 2: for each level do |
| 3: Reset level state memory ; Retain causal color invariants |
| 4: for step do |
| Plasticity Regime | Final Avg. Acc. (%) | Forgetting Ratio (%) | Saved Updates (%) | Executed Updates | Cost ( ) | Per-Task Acc. ( ) | Time (s) |
|---|---|---|---|---|---|---|---|
| 1. Standard SGD / Adam | 44.33% | 69.58% | 0.00% | 6,000 / 6,000 | 3,433.87 | [0.0, 43.3, 43.3, 35.0, 100.0] | 0.92s |
| 2. Classic EWC [ 11 ] | 90.67% | 11.25% | 0.00% | 6,000 / 6,000 | 7,986.85 | [65.0, 98.3, 100.0, 91.7, 98.3] | 2.32s |
| 3. Mistake Gating [ 10 ] | 50.67% | 61.25% | 95.97% | 242 / 6,000 | 3,040.31 | [0.0, 65.0, 43.3, 45.0, 100.0] | 0.29s |
| 4. F3-Metabolic-Optim (Ours) | 91.67% | 9.17% | 93.47% | 392 / 6,000 | 2,736.81 | [75.0, 95.0, 96.7, 95.0, 96.7] | 1.06s |
| Metric ( Slice) | Horizon 2 (15 Ops) | Horizon 3 (26 Ops + ResidualPatch) | Horizon 5 (30 Ops + All-Pair Bg) | Cumulative Gain (H2 H5) |
|---|---|---|---|---|
| Exact Train Solved ( ) | ( ) | ( ) | ( ) | ( solve rate) |
| Exact Blind Test Solved ( test_correct ) | ( ) | ( ) | ( ) | Train Test transfer ( ) |
| High-Precision Stratum ( ) | ( ) | ( ) | ( ) | All 10 near-misses converted to |
| Mean Synthesis Latency per Task | speedup ( latency) |
| Benchmark Metric ( ARC-AGI/data/evaluation ) | Calibration Slice ( ) | Strictly Uninspected Split ( ) | Full Official Benchmark ( ) |
|---|---|---|---|
| Kaggle Submission Schema Validation | ( ) | ( ) | ( Valid) |
| Exact Blind Test Solved — pass@1 | ( ) | ( ) | ( ) |
| Exact Blind Test Solved — pass@2 | ( ) | ( ) | ( ) |
| Exact Train Solved ( ) | ( ) | ( ) | ( ) |
| Train Test Exact Transfer Rate | ( ) | ( ) | ( ) |
| High-Precision Test Stratum ( Test Pixel Acc.) | — | — | ( ) |
| Task ID | Horizon 3 Score | Horizon 5 Train / Test | General Parametric Operator ( F3LearnedOperators ) | Induced Structural Rule |
|---|---|---|---|---|
| 0607ce86 | 100.0% / 100.0% | denoise_subblock_consensus | Majority-vote canonical subblock reconstruction + margin clearing | |
| 0692e18c | 100.0% / 100.0% | fractal_conditional_kron | Complementary self-similar Kronecker | |
| 15113be4 | 100.0% / 100.0% | grid_cell_pattern_stamp | Macro-cell template stamping across separator partitions | |
| 137f0df0 | 100.0% / 100.0% | separator_fill | Conditional interior/exterior separator line fill | |
| 17cae0c1 | 100.0% / 100.0% | macro_cell_lookup | Topological motif-to-color bijection lookup | |
| 184a9768 | 100.0% / 100.0% | pack_rectangles_into_frame_holes | Geometric packing of mobile rectangles into frame cavities |
| Interactive Game ( , 3 Levels) | Levels Solved | Agent Actions (L1/L2/L3) | Reference Actions (L1/L2/L3) | Weighted RHAE ( ) | Unweighted RHAE | Dead Actions | Virtual ATP |
|---|---|---|---|---|---|---|---|
| 1. SwitchAndDoorMaze | 3 / 3 | ( 23 ) | ( ) | 83.47% | 0 | 0.460 | |
| 2. SokobanPushBlocks | 3 / 3 | ( 25 ) | ( ) | 63.74% | 0 | 0.500 | |
| 3. ColorInfectionToggle | 3 / 3 | ( 12 ) | ( ) | 100.00% | 0 | 0.240 | |
| 4. IceSlideInertia | 3 / 3 | ( 9 ) | ( ) | 100.00% | 0 | 0.180 | |
| 5. TeleporterKeyPortal | 3 / 3 | ( 18 ) | ( ) | 100.00% | 0 | 0.360 | |
| Suite Total / Mean (15 Levels) | 15 / 15 (100.0%) | 87 total actions | 80 reference actions | 89.44% | 90.72% | 0 | 1.740 ATP |
| Agent Variant Evaluated (15 Levels across 5 Games) | Levels Solved ( ) | Weighted RHAE (%) | Unweighted RHAE (%) | Wasted Dead Actions | Virtual ATP |
|---|---|---|---|---|---|
| 1. Random / Greedy Heuristic | ( ) | ||||
| 2. Pragmatic-Only (No Epistemic Value / No Dead-Signature) | ( ) | ||||
| 3. Active Inference w/o Dead-Signature Pruning | ( ) | ||||
| 4. F3-AGI v4.0 Complete ( + 512D Random Projection + Dead-Signature + Rule Transfer) | ( ) |
Appendix figures & tables2 assets
Supplementary material from the paper’s appendix.
Appendix
| Module / Subsystem | Parameter Symbol & Description | Value / Setting | Code Reference |
| Level 1: MSRC & SLS | Fast Perceptual / Slow Workspace Dimensions | (Powers of 2) | VisualCortexV40 |
| Background Color Inference Protocol | Joint mode across all pairs | _build_depth1_pool | |
| Isotropic Projection Normalization | -sphere scaled by | AlgebraicWorldModelSLS | |
| Level 1.5: Bioenergetics | ATP Pool Bounds | BioenergeticConfig | |
| Basal Replenishment / Depletion | MetabolicControllerV40 | ||
| Plasticity Cost Weight / MDL Weight | RealistV40 |
| Provenance Tier | Function Signature(s) | Topological / Algebraic Invariant | Uninspected Hold-Out Transfers ( ) |
| Tier 0: Core DSL | crop_to_content , downsample_block , split_and_overlay | Bounding-box extraction, modal subsampling, overlay | General spatial primitives |
| ( F3Primitives ) | fill_enclosed_holes , apply_gravity , flood_fill | Border-BFS cavity closure, directional packing, BFS fill | General topological primitives |
| Tier 1: Base Priors | kronecker_self_pattern(grid) | Self-similar Kronecker tensor product | 31d5ba1a , 60c09cac , 8e2edd66 |
| (Induced strictly on | extend_2d_periodicity(grid, th, tw, mask) | Vectorized 2D minimal period induction & repair | 506d28a5 , ca8de6ea , ea959feb |
| data/training ) | dihedral_template_matching(grid) | dihedral group template registration over anchors | 5783df64 , aa18de87 , cd3c21df |
| split_and_boolean_combine(grid, axis, op) | Multi-panel boolean algebra ( nor , or , xor , and ) | 34b99a2b , 5d2a5c43 , e95e3d8e |