Euclidean geometry—the world of perfect lines, circles, and intersections—is the bedrock of human engineering and mathematical thought. Yet, these "Platonic" forms rarely appear perfectly in nature. While humans can look at a few hand-drawn triangles and immediately understand the abstract rule defining them, computer vision (CV) models are typically trained on natural images like dogs, cars, and trees.
This raises a fascinating question: Do standard computer vision models share the human sensitivity to geometric rules?
To answer this, researchers have introduced Geoclidean, a novel domain-specific language (DSL) and benchmark designed to test how well humans and AI models generalize geometric concepts from just a few examples. The study reveals a massive gap: while humans intuitively grasp abstract Euclidean relationships, state-of-the-art computer vision models struggle to distinguish them from slightly "off" versions.
The Geoclidean Approach
To systematically test geometric reasoning, the authors needed a way to generate geometric "concepts" that aren't defined by fixed pixel coordinates, but by the logical rules of their construction.
The core of the paper is the Geoclidean DSL. Unlike standard graphics libraries that use absolute (x, y) coordinates, Geoclidean uses Euclid’s original "compass and straightedge" logic:
- Primitives: Points, lines, and circles.
- Constraints: A point can be "free," constrained to lie on a line or circle, or fixed at an intersection.
- Realization: To create an image, the system randomly samples valid coordinates that satisfy the logical rules. This means one "concept" (like a perpendicular bisector) can produce infinite visual variations in size, orientation, and position.
Datasets and the Few-Shot Task
The researchers set up a few-shot generalization task. They showed subjects (both humans and AI) five "reference" images of a concept and asked them to identify new positive examples in a test set while rejecting "negative" examples that looked similar but broke a specific geometric rule.
They introduced two new benchmark datasets for this purpose:
- Geoclidean-Elements: 17 concepts derived from the first book of Euclid’s Elements (e.g., equilateral triangles, parallel lines, rhombuses). These involve complex, multi-step constructions.
- Geoclidean-Constraints: 20 concepts that systematically permute relationships between 3–5 objects to test sensitivity to specific constraints (e.g., "a circle whose center lies on the edge of another circle").
By treating geometry as a set of programs rather than just pixels, the authors can precisely measure "semantic distance." A "Close" negative example might only differ by one missing constraint, making it a rigorous test of visual reasoning.
Key Results: The Human-Machine Gap
The results of the benchmark highlight a stark contrast between human intuition and machine pattern recognition.
- The Human Advantage: Humans are remarkably consistent, achieving an average accuracy of 91% across all tasks. We don't just look at the "ink" on the page; we seem to infer the underlying "construction rule." Humans were particularly strong at the complex "Elements" tasks.
- Model Shortcomings: Pre-trained models performed poorly, with average accuracies ranging from 53% to 60%. Even the best-performing model (a Vision Transformer using high-level features at 70% accuracy) was significantly outperformed by humans.
- Zero Correlation: There was almost zero correlation (Pearson’s $r \approx 0$) between human and model performance. The tasks humans found easy weren't necessarily the ones models found easy, indicating that AI is using a fundamentally different—and less effective—strategy for geometric generalization.
Standard AI models (like VGG and ResNet) are often criticized for being "texture-heavy." This paper proves they also lack "relational" depth. They might recognize a "triangular shape," but they fail to realize that the equality of the sides is the defining feature of the category. Interestingly, Vision Transformers (ViTs) performed slightly better than convolutional neural networks (CNNs), suggesting that ViT’s global attention mechanism might be better suited for capturing the long-range spatial relationships necessary for geometry.
Looking Ahead
The Geoclidean benchmark exposes a critical blind spot in modern computer vision. Because the models were tested using pre-trained features without specific "geometry training," future work could explore whether fine-tuning on Geoclidean data helps bridge the gap.
Furthermore, since the Geoclidean DSL provides the "ground truth" program for every image, this dataset is a prime candidate for training neuro-symbolic models that attempt to induce the underlying programmatic rules they see in images. Expanding this framework from 2D plane geometry to 3D solid geometry could also unlock new capabilities for robotics and CAD applications.
Summary updated