Source-linked AI summary

Learning to Make Analogies by Contrasting Abstract Relational Structure

Felix Hill, Adam Santoro, David G. T. Barrett, Ari S. Morcos, Timothy Lillicrap

arXiv:1902.00120v1cs.AI

TL;DR

Machines have difficulty representing relations so they can be flexibly applied across diverse domains. This paper trains neural networks to make analogies by contrasting abstract relational structures, and reports generalization across novel mappings and unfamiliar target domains, including with simple architectures.

  • Problem

    The paper asks whether neural networks can flexibly apply relations across diverse domains, a capability that has been challenging for machines.

    Source: §1 · p. 1
  • Method

    LABC trains networks by contrasting abstract relational structures, making relational inference necessary to distinguish correct from plausible incorrect candidates.

    Source: §5.1 · p. 8, §6 · p. 10
  • Results

    LABC-trained models generalize across novel domain mappings and unfamiliar target domains, and moderately improve extrapolation to perceptual inputs beyond training experience.

    Source: §3.4 · p. 7
  • Takeaways & Limitations

    The findings indicate that the data and manner of training are important for inducing neural-network analogy-making.

    Source: §6 · p. 10

    As described, LABC relies on understanding the underlying data-generating process, although the paper demonstrates an application that does not require such understanding.

    Source: §3.3 · p. 5

Abstract

from arXiv · show

Analogical reasoning has been a principal focus of various waves of AI research. Analogy is particularly challenging for machines because it requires relational structures to be represented such that they can be flexibly applied across diverse domains of experience. Here, we study how analogical reasoning can be induced in neural networks that learn to perceive and reason about raw visual data. We find that the critical factor for inducing such a capacity is not an elaborate architecture, but rather, careful attention to the choice of data and the manner in which it is presented to the model. The most robust capacity for analogical reasoning is induced when networks learn analogies by contrasting abstract relational structures in their input domains, a training method that uses only the input data to force models to learn about important abstract features. Using this technique we demonstrate capacities for complex, visual and symbolic analogy making and generalisation in even the simplest neural network architectures.

1 INTRODUCTION

Analogy requires flexibly mapping relations across domains despite perceptual differences, a capacity that has been challenging to reproduce in machines. The paper shows that simple neural networks can learn such mappings when trained by contrasting abstract relational structure.

1 INTRODUCTION

  • Analogy flexibly maps relations between experience domains independently of perceptual congruence.The passage illustrates this with Roman scientists mapping relations in water waves to acoustics.Source: §1 · p. 1
  • Machines have struggled to apply predicates or operations flexibly across diverse domains, especially domains not previously observed.Neural networks may offer useful representations at different abstraction levels and flexible computation over noisy inputs.Source: §1 · p. 1
  • Simple neural networks trained with LABC apply abstract relations to unseen source–target domain mappings and unfamiliar target domains.The method is called learning analogies by contrasting abstract relational structure.Source: §1 · p. 1
  • The model jointly learns stimulus representation and cross-domain mapping without instantiating an explicit cognitive theory or analogy-like computation in its architecture.The theoretical insight instead informs how the model is trained.Source: §1 · pp. 1–2
  • The visual task requires identifying a relation in a source domain and applying it to a different target domain.The example maps Progression in shape quantity to line color; the dataset has seven domains and four relations.Source: Figure 1 · p. 2

2 ANALOGIES AS HIGH-LEVEL PERCEPTION AND STRUCTURE MAPPING

Structure Mapping Theory distinguishes analogy from attribute similarity by emphasizing shared relations across domains. High-Level Perception theory instead treats perception and reasoning as mutually dependent; this work combines both perspectives through joint optimization and LABC.

2 ANALOGIES AS HIGH-LEVEL PERCEPTION AND STRUCTURE MAPPING

  • Structure Mapping Theory treats domains as analogous when they share many relations despite few shared attributes.It assumes representations of attributes and structured relations need not depend on subsequent mappings.Source: §2 · p. 2
  • High-Level Perception theory proposes that creating stimulus representations and aligning them are mutually dependent processes.In the sea–acoustics example, the comparison determines which perceptual features are represented or ignored.Source: §2 · p. 2
  • The models jointly optimize perception and domain comparison, while LABC encourages comparison at the abstract level of relations rather than attributes.This training makes relational inference essential, ruling out solutions based on attribute similarity, surface statistics, or memorization.Source: §2 · p. 2

3 VISUAL ANALOGY PROBLEMS

Visual analogy problems ask models to apply a source relation across target sequences, with difficulty increasing from copying to new values and domains. LABC uses semantically plausible decoys to encourage relational comparison, and the experiments report broader generalization with this training approach.

3 VISUAL ANALOGY PROBLEMS

  • The visual task asks models to complete a target sequence by applying the source relation; its full analogy questions apply that relation across different domains.The task also varies relation, domain, and values to create questions requiring different degrees of abstraction.Source: §3 · p. 3

3.1 METHODS

  • LABC makes incorrect answers semantically plausible completions of decoy relations, requiring models to match the source relation in the target.The normal regime instead samples incorrect values at random from the target domain.Source: §3.1 · pp. 4–5

3.2 EXPERIMENT 1: NOVEL DOMAIN TRANSFER

  • On held-out source-to-target mappings, LABC achieves 83% accuracy versus 58% with random candidates on focused semantically plausible tests.The endpoints are familiar, but the tested mapping between them was not seen during training.Source: §3.2 · p. 5

3.3.2 EXPERIMENT 4: MODEL COMPARISON

  • Across architectures, LABC improves novel-domain-transfer performance on a balanced test set with semantically and perceptually plausible incorrect answers.The authors say this makes LABC more effective when exact test-question details are unknown.Source: Table 1 · p. 6, §3.3.2 · p. 7

3.3 EXPERIMENT 2: NOVEL TARGET DOMAIN

  • On unfamiliar target domains, LABC reaches ∼80% versus ∼60% with random candidates on focused contrasting tests; interleaving candidate types largely recovers perceptually plausible test performance.The LABC accuracy is lower than in Experiment 1, depending on the held-out domain.Source: §3.3 · p. 6

3.3.1 EXPERIMENT 3: NOVEL DOMAIN VALUES

  • 45% vs 93%: random-candidate training versus LABC on interpolation tests with contrasting answers.For extrapolation, mixed training yields 62% vs 43% on contrasting-answer tests and 45% vs 44% on random-answer tests, respectively, compared with normal training.Source: §3.3.1 · p. 6

3.4 CONCLUSION

  • LABC increases generalization beyond the training distribution across novel domain mappings and unfamiliar target domains, with moderate improvements on perceptual extrapolation.The conclusion describes these effects across Experiments 1–3.Source: §3.4 · p. 7

4 EMERGENT RELATIONAL REPRESENTATIONS

With LABC, RNN hidden states cluster more strongly by relation type than domain, whereas normally trained models show greater overlap. The reported relation-cluster distances are close to the maximum possible in the 64-dimensional representation space.

4 EMERGENT RELATIONAL REPRESENTATIONS

  • LABC-trained hidden states cluster more by relation type than domain, while normally trained models show greater overlap between relation-based clusters.The analysis uses activity just before the candidate panel; the comparison is also summarized in Table 2.Source: §4 · p. 7, Table 2 · p. 7
  • Relation-cluster distances are close to the stated maximum Euclidean distance of 8 in the 64-dimensional representation space.Table 2 reports mean (+SD) distances between hidden-state clusters.Source: Table 2 · p. 7
  • Figure 5 presents PCA and t-SNE views of 64-dimensional RNN states, with each dot colored by the question’s relation type and domain.Source: Figure 5 · p. 7

5 SYMBOLIC ANALOGY PROBLEMS

The symbolic task represents relations as functions applied to feature dimensions, then tests whether models can transfer those structures to withheld domain mappings. LABC contrasts correct answers with candidates generated from alternative functions; experiments also examine automatic candidate generation.

5 SYMBOLIC ANALOGY PROBLEMS

  • The symbolic task uses set functions such as MIN, MAX, SUM, and RANGE to map relations across discrete feature dimensions and stimulus-vector sets.Questions are generated by applying the same function to source and target domains; domain mappings are withheld while each dimension appears in training as a source and target.Source: §5 · pp. 7–8

5.1 METHODS

  • LABC-explicit SMT trains the model with candidates generated by alternative functions, so identifying the correct answer requires inferring the source set’s function.The task uses candidates that satisfy some relational structure, but not the structure instantiated in the source set.Source: §5.1 · p. 8

5.2 EXPERIMENT 1: NOVEL DOMAIN TRANSFER

  • Just under 90% accuracy with LABC, versus just above chance without it, replicated the visual-task pattern on symbolic novel-domain transfer.The test requires applying learned functions to domain mappings withheld during training.Source: §5.2 · pp. 8–9

5.3 EXPERIMENT 2: NOVEL DOMAIN TRANSFER WITH AUTOMATIC LABC METHODS

  • Approximately 77% accuracy from chance (25%) with top-k candidates fell to 43% when candidates satisfying known functions were excluded; Table 3 reports performance across four training regimes.Top-k selects the model’s most confusing candidates from a randomly generated pool.Source: §5.3 · p. 9, Table 3 · p. 9
  • 62% test performance from chance (25%) resulted from generator-proposed confusing candidates, an adversarial approach linked to GANs and possibly self-play.The generator proposes candidates to maximize the analogy model’s score.Source: §5.3 · pp. 9–10

6 DISCUSSION

The discussion argues that simple neural networks can make visual and symbolic analogies when training contrasts correct answers with relation-plausible alternatives. It connects this result to generalization, perception, and the selection of negative examples.

6 DISCUSSION

  • Simple networks learned visual and symbolic analogies when training contrasted correct answers with incorrect alternatives plausible at the relational level.The discussion says models trained with LABC also showed better extrapolation to a wider range of input values.Source: §6 · p. 10
  • The authors argue that neural networks are not fundamentally limited in systematic generalization beyond training data, but that careful learning is important.They point to prior one-shot learning work as an example of a capability achieved through suitable training objectives, models, and optimization.Source: §6 · p. 10
  • The authors present end-to-end learning from raw perception as a proof of principle for flexible, generalizable analogy making in basic neural networks.They note that their visual inputs are less naturalistic than some prior work, but allow control over training and test semantics.Source: §6 · p. 10
  • The discussion connects the choice of negative examples to generalization, noting that teacher-like candidate proposal may help when good negatives are not known.It also links this idea to noise-contrastive estimation, negative sampling, and self-play.Source: §6 · p. 10
  • The discussion frames analogy as a shared abstract relation whose meaning can adapt across domains, likening such relations to functions of the mind.It suggests renewed attention to analogy in developing machine intelligence.Source: §6 · p. 11

7 MODEL DETAILS

The model details describe a CNN-to-RNN visual pipeline and a parallel symbolic setup using vector inputs and a Relation Network. The symbolic experiment deliberately simplifies domain identification to focus on transfer across dimensions.

7.1 VISUAL ANALOGY PROBLEMS

  • The visual model embeds each 80 × 80 grayscale panel with a four-layer CNN, then scores source-target-candidate sequences with a 64-unit RNN and softmax.Four independent passes produce candidate scores; training uses cross-entropy loss and Adam with learning rate 1e−4.Source: §7.1 · p. 14

7.2 SYMBOLIC ANALOGY PROBLEMS

  • The symbolic input combines 16-dimensional vectors, a source-domain vector, and source/target membership tags; a Relation Network scores each candidate vector.Entity vectors have zeros in unused dimensions, simplifying domain identification so the experiment tests transfer between dimensions; the Relation Network uses 128-unit MLP components and Adam at 3e−4.Source: §7.2 · p. 14

8 SUPPLEMENTARY RESULTS

This section includes supplementary results for the RNN visual analogy task, but the supplied passages do not state any result values.

8 SUPPLEMENTARY RESULTS

  • Table 4 presents results for the visual analogy task using the RNN model.The supplied caption does not report table values or comparisons.Source: Table 4 · p. 15

9 MODEL COMPARISON DETAILS

The model comparison evaluates several architectures and reports that the parallel relation network generalises best on held-out domain transfer. LABC’s gains on semantically plausible candidates outweigh a small disadvantage on perceptually plausible candidates.

9 MODEL COMPARISON DETAILS

  • The ResNet-50 processes all nine panels together, while the Parallel ResNet-50 and parallel relation network score a candidate alongside the five question panels.The parallel relation network uses a convnet for panel embeddings and a relation network for scoring.Source: §9 · p. 16
  • 95% accuracy on the held-out domain-transfer test set was achieved by the parallel relation network, the model with strongest generalisation.The test mixed semantically plausible and perceptually plausible candidates.Source: §9 · p. 16
  • Test-set accuracy can oscillate between good and poor solutions during normal training, while LABC encourages configurations that generalise at an abstract, semantically meaningful level.The authors infer that multiple configurations fit training data, but only some generalise as desired.Source: §9 · p. 16
  • Normal-regime training performed marginally better on questions with perceptually plausible candidates, but LABC’s greater benefit on semantically plausible candidates outweighed this specialization effect.The authors therefore expect higher performance from LABC when exact test-question details are unknown.Source: §9 · p. 16

10 FURTHER DISCUSSION AND RELATED WORK

The discussion connects analogy training with learning from contrasting examples and notes that the networks can solve even unfamiliar-domain analogies in one forward pass. It distinguishes LBC’s aim of out-of-distribution generalisation from improving classification embeddings.

10 FURTHER DISCUSSION AND RELATED WORK

  • Contrasting negative examples is proposed as a recipe for more robust representations and greater generalisation when expert understanding of the data is available.The authors recommend selecting negatives plausible under the data’s most abstract principles.Source: §10 · p. 16
  • The trained recurrent networks resolve analogies, including those involving unfamiliar input domains, in a single forward pass.The paper notes a parallel with fast human visual analogical reasoning.Source: §10 · p. 16

10.1 DISTANCE METRIC APPROACHES

  • Unlike distance-metric approaches such as LMNN and triplet loss, which target class-separating embeddings for classification, LBC targets out-of-distribution generalisation through abstract understanding.The paper says whether those embeddings support this kind of generalisation is unclear and, to the authors’ knowledge, untested.Source: §10.1 · pp. 16–17
  • LBC focuses on the quality of incorrect-class examples and is agnostic to the loss function, so it could be combined with LMNN or triplet loss; the paper does not explore this.The authors also distinguish it from generative adversarial active learning work, which they say does not explicitly address incorrect-sample quality and abstract generalisation.Source: §10.1 · p. 17

11 VISUAL ANALOGY EXAMPLES

The visual examples include relation mappings across shape and line attributes, with both same-domain and cross-domain mappings. The figure caption reports 93% interpolation-test performance for an LABC-trained RNN and samples both correct and incorrect choices.

11 VISUAL ANALOGY EXAMPLES

  • Other listed mappings are AND from shape position to line type, OR from shape type to line colour, and OR from shape position to shape size.Source: §11 · p. 18
  • XOR also maps line type to line colour and to shape colour; progression maps shape type to line colour and shape size to shape size.Source: §11 · p. 18
  • OR maps line colour to shape colour and shape type to line colour, while XOR maps line type to line type and shape colour to line colour.Source: §11 · p. 18
  • 93% interpolation-test performance is reported for the RNN trained with LABC; the figure shows sampled correct and incorrect choices.Correct candidates are highlighted in green and incorrect choices in red.Source: Figure 7 · p. 18
Loading 1902.00120v1…