Geoclidean: Few-Shot Generalization in Euclidean Geometry

Joy Hsu, Jiajun Wu, Noah D. Goodman

Abstract

Euclidean geometry represents a fundamental domain of human abstract reasoning, characterized by ideal forms and rigorous logical constraints. While humans can generalize geometric concepts from minimal examples, the capacity of modern computer vision models to do the same remains a significant challenge. This paper introduces Geoclidean, a benchmark and domain-specific language (DSL) designed to evaluate few-shot geometric concept learning. Our evaluation reveals a substantial performance gap: while humans achieve an average accuracy of 91%, state-of-the-art vision models struggle to capture underlying logical structures, often failing to distinguish between geometrically correct shapes and visually similar "close negatives."

Introduction

Euclidean geometry is a cornerstone of mathematical thought. Despite the fact that "perfect" lines and circles are rarely encountered in the natural world, humans possess an innate ability to perceive and reason about these abstract entities. This ability suggests a "Platonic" understanding of the world—one defined by underlying geometric constraints rather than just visual textures.

In contrast, modern computer vision models are typically trained on massive datasets of natural images, such as ImageNet. While these models excel at identifying object categories and textures, it is unclear if they share the human intuition for abstract structure. The Geoclidean framework was developed to address this question by testing whether vision models can generalize geometric concepts from just a few examples, a hallmark of human intelligence.

The Geoclidean Framework

To systematically study geometric reasoning, the researchers developed a Domain-Specific Language (DSL) based on the ancient axioms of Euclid—specifically the "compass and straightedge" method.

1. Primitives and Constraints

The DSL defines three fundamental primitives: points, lines, and circles. Concepts are not defined by fixed coordinates but by relational constraints. For example, an equilateral triangle is defined by the intersection points of two circles with equal radii. This constraint-based approach allows the framework to generate an infinite variety of unique images for a single concept by randomly sampling valid coordinates that satisfy the logical rules.

2. The Few-Shot Task

The benchmark utilizes a few-shot learning setup. A participant (either human or AI) is presented with five reference images that exemplify a specific geometric concept. They must then categorize 15 test images as either "in-concept" (positive) or "out-of-concept" (negative). This task requires the learner to infer the abstract rule governing the first five images and apply it to novel instances.

Datasets: Elements and Constraints

The Geoclidean benchmark introduces two distinct datasets to test different aspects of geometric perception:

  • Geoclidean-Elements: This dataset consists of 17 concepts derived from the first book of Euclid’s Elements. It includes complex constructions such as perpendicular bisectors, rhombuses, and oblongs. These tasks require a high degree of precision to distinguish correct constructions from subtle errors.
  • Geoclidean-Constraints: This dataset includes 20 concepts that systematically explore the relationships between primitives, such as a line tangent to a circle or a point at the center of a circle.

To increase the difficulty, the test sets include "Close" negatives—images that are visually very similar to the target concept but violate a specific geometric constraint—and "Far" negatives, which are clearly distinct.

Experimental Results and Analysis

The researchers evaluated several standard vision models, including VGG16, ResNet50, InceptionV3, and the Vision Transformer (ViT), comparing their performance against a human baseline.

The Human-AI Performance Gap

Humans demonstrated remarkable proficiency in the Geoclidean tasks, achieving an average accuracy of 91%. In contrast, the vision models performed poorly, with average accuracies ranging from 53% to 70%. Even the best-performing model, a Vision Transformer using high-level features, lagged 21 percentage points behind the human average.

Divergent Strategies

One of the most significant findings was the zero or negative correlation between human and model performance. Tasks that humans found intuitive and easy were often the most difficult for the models, and vice versa. This suggests that AI models are utilizing entirely different strategies—likely relying on low-level visual features or local textures—rather than capturing the global logical constraints that humans prioritize.

Inductive Bias: ViT vs. CNN

Interestingly, the Vision Transformer (ViT) generally outperformed convolutional neural networks (CNNs) like ResNet. This suggests that the self-attention mechanism in ViTs may be better suited for capturing the long-range spatial relationships necessary for geometric reasoning than the local receptive fields of standard convolutions.

Discussion and Future Work

The failure of models to distinguish "Close" negatives highlights a fundamental limitation in current computer vision: the lack of sensitivity to exact geometric constraints. While a human can easily see that a triangle is not equilateral if one side is slightly shorter, models often treat such small variations as negligible noise.

Future research may explore whether pretraining on synthetic geometric data or utilizing neuro-symbolic architectures—which combine deep learning with formal logic—can bridge this gap. Teaching machines to prioritize the "Euclidean" interpretation of visual data remains a significant challenge for the field of artificial intelligence.

Conclusion

Geoclidean provides a rigorous new lens through which to view the limitations of current vision models. By moving beyond natural image recognition and into the realm of abstract geometric constraints, the benchmark reveals that our best AI still lacks the fundamental "Platonic" intuition that characterizes human mathematical thought.

Summary updated

BibTeX
@inproceedings{hsu2022geoclidean,
  author = {Joy Hsu and Jiajun Wu and Noah D. Goodman},
  title = {{Geoclidean: Few-Shot Generalization in Euclidean Geometry}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=S3GbyUSi9X},
}

Loading related content...

Figure