Abstract
Analogical reasoning has been a principal focus of AI research, requiring relational structures to be represented flexibly across diverse domains. We study how analogical reasoning can be induced in neural networks perceiving raw visual data. We find that the critical factor is not an elaborate architecture, but careful attention to data presentation. The most robust capacity is induced when networks learn analogies by contrasting abstract relational structures in their input domains (LABC). This method forces models to learn important abstract features using only input data. We demonstrate capacities for complex visual and symbolic analogy making and generalization in simple neural network architectures.
Introduction
Analogy is a cornerstone of human intelligence, allowing us to align relational structures—such as periodicity or reflection—across disparate physical domains. For artificial intelligence, however, this remains a significant challenge. Machines often exhibit "perceptual greediness," latching onto surface-level features like color or shape rather than abstract rules. Historically, machine analogy has relied on hand-coded symbolic logic or specialized modules. This research investigates whether standard neural networks can learn to perceive and map abstract relations from raw data and identifies the critical factors enabling this capacity.
Learning Analogies by Contrasting (LABC)
The primary bottleneck in machine analogy is often the training data rather than the model architecture. We propose a training regime called Learning Analogies by Contrasting (LABC). In a standard multiple-choice setup, a model might select the correct answer simply because it is the only one that resembles a pattern. LABC addresses this by populating incorrect choices with "semantically plausible" decoys that follow incorrect rules.
Under LABC, if a source rule is "increase shape size," decoys might show "increase shape quantity" or "change shape color." To succeed, the model must analyze the source domain to determine which specific relation to apply, preventing shortcuts based solely on target-domain patterns. This forces the model to move beyond being "source-blind" and truly engage with the relational structure.
Experimental Setup
The study utilizes two primary benchmarks to evaluate analogical reasoning:
- Visual Analogy Problems: A dataset inspired by Raven’s Progressive Matrices, featuring seven domains (e.g., shape size, color, quantity, position) and four relations (XOR, OR, AND, Progression). The task requires completing a target sequence by identifying the rule used in a source sequence.
- Symbolic Analogy Task: A controlled environment using vectors of integers where relations are mathematical functions (e.g.,
MIN,MAX,SUM). This tests LABC's effectiveness when perceptual complexity is removed.
Results and Discussion
Standard architectures, such as CNNs combined with RNNs or Relation Networks, demonstrated significant improvements when trained with LABC.
Performance and Generalization
On visual tasks, LABC-trained models achieved 83-90% accuracy when mapping relations between domains never paired during training, compared to approximately 58% for models trained with random decoys. Furthermore, models successfully applied rules to entirely new target domains (e.g., applying a rule learned on "shape size" to "line color"). LABC also enhanced extrapolation, allowing models to handle values outside their training range, such as higher shape counts or darker colors.
Emergent Abstraction
Analysis of the RNN's hidden states revealed that LABC-trained models naturally cluster information by relation type (e.g., grouping all "Progression" rules) rather than by domain. This suggests the models learn the concept of the rule independently of its application. Additionally, the benefit of LABC proved architecture-agnostic, providing gains across various models including ResNets. For scenarios where hand-crafted decoys are unavailable, an adversarial approach using a generator network to produce "maximally confusing" candidates achieved similar performance boosts.
Conclusion
This work demonstrates that standard neural networks can master complex analogical reasoning without specialized architectures. The LABC training regime effectively "plugs" the loophole of source-blindness, forcing models to contrast abstract structures. While current tasks use clean geometric primitives, future work will explore applying these principles to natural images and broader spatial relations. The results suggest that careful data curation and contrastive learning are key to inducing higher-order reasoning in AI.
Summary updated