Abstract
While deep learning has achieved remarkable success in pattern recognition, it continues to struggle with abstract reasoning tasks that require high sample efficiency. The Abstraction and Reasoning Corpus (ARC) highlights this gap, as standard architectures lack the innate "core knowledge"—such as geometric and topological priors—that humans utilize to solve puzzles from only a few examples. This paper introduces LATFORMER, a novel architecture that incorporates lattice symmetry priors directly into the attention mechanism. By utilizing learnable, gated mask experts to modulate attention weights, LATFORMER achieves a 100x improvement in sample efficiency over standard Transformers and significantly outperforms baselines on geometric reasoning benchmarks.
Introduction
The Abstraction and Reasoning Corpus (ARC), proposed by François Chollet, serves as a benchmark for general fluid intelligence. Unlike traditional datasets that rely on massive amounts of training data, ARC tasks provide only 3–5 examples of a transformation (e.g., rotating a grid or shifting colors based on position) and require the model to generalize to a novel input.
Current state-of-the-art models, particularly Transformers, fail to perform well on ARC because they lack inductive biases related to the physical world. While a Transformer can theoretically learn a rotation operation, it must derive the underlying geometric rules from scratch, requiring millions of training instances. This research addresses the challenge of sample efficiency by "baking" geometric core knowledge—specifically rotations, translations, and reflections—directly into the neural architecture.
Methodology: The LATFORMER Architecture
LATFORMER modifies the standard self-attention mechanism to prioritize geometric transformations. The approach is centered on the concept that attention is not merely a weighting of importance, but a geometric operator capable of moving data across a grid.
1. Masked Attention with Lattice Priors
In a standard Transformer, attention is computed as $A = \text{softmax}(QK^T)$. LATFORMER introduces a "soft mask" $M$ that modulates these weights:
$$A = \text{softmax}(QK^T) \odot M$$
This mask $M$ constrains the flow of information, forcing the model to consider specific spatial relationships consistent with lattice symmetries.
2. Lattice Mask Experts
The masks are generated by "Mask Experts"—gated Convolutional Neural Networks (CNNs). The authors provide a mathematical foundation for this, proving that for any transformation of a hypercubic lattice (such as a 2D grid), there exists a binary attention mask that can perfectly implement that transformation. By using gated layers, the model can learn to "skip" or "apply" specific primitive transformations (e.g., a 90-degree clockwise rotation) through backpropagation.
3. Differentiable Group Actions and Mask Smoothing
Optimizing over discrete geometric actions is computationally difficult. To bridge the gap between discrete logic and continuous optimization, the authors employ a smoothing technique inspired by heat diffusion on graphs. This allows the model to explore the space of transformations "softly" during the early stages of training before converging on a precise, discrete geometric action.
Experimental Evaluation
The model was evaluated across three distinct datasets to measure its reasoning capabilities and sample efficiency:
- Synthetic Geometric Reasoning: A controlled environment testing basic transformations like scaling, reflection, and translation.
- ARC (Abstraction and Reasoning Corpus): The primary benchmark for general intelligence.
- LARC (Language-complete ARC): A variant of ARC where natural language descriptions accompany the tasks, testing the model's ability to utilize text prompts for prior selection.
Key Results
- 100x Sample Efficiency: On synthetic tasks, LATFORMER reached near-perfect accuracy using two orders of magnitude less data than standard Transformers or CNNs. This demonstrates that providing the model with the possibility of geometric operations allows it to learn which operation to apply much faster than learning how to perform the operation from scratch.
- Superior ARC Performance: On ARC tasks specifically involving geometric priors (e.g., "Rotate + Translate"), LATFORMER achieved 80% accuracy. In contrast, standard neural baselines remained near 0% accuracy, failing to generalize the patterns.
- Competitive with Program Synthesis: LATFORMER outperformed specialized program-synthesis models in several LARC categories. This suggests that a neural-first approach, when equipped with the correct inductive biases, can be more robust than searching through discrete code-like Domain Specific Languages (DSLs).
Discussion and Future Work
LATFORMER represents a significant step toward bridging the gap between neural networks and symbolic reasoning. By treating attention as a geometric operator, the model achieves human-like sample efficiency on specific classes of abstract puzzles.
However, limitations remain. The current implementation is restricted to the symmetries of hypercubic lattices and does not yet account for other "core knowledge" domains such as object persistence, counting, or magnetism. Furthermore, the CNN gates can become brittle once trained, making it difficult for the model to adapt to entirely novel actions outside its initial prior set. Future research will focus on applying these mask experts to individual objects within a scene rather than the entire grid, further aligning the architecture with human cognitive processes.
Summary updated