Source-linked AI summary
Emergent Analogical Reasoning in Large Language Models
Taylor Webb, Keith J. Holyoak, Hongjing Lu
TL;DR
Whether analogical reasoning can emerge zero-shot in large language models remains unclear despite extensive training-based research. This paper compares GPT-3 with humans across analogy tasks and finds GPT-3 matched or surpassed human performance across varied text-based problem types.
Problem
Existing research had not established whether analogical reasoning can emerge zero-shot, without direct training, despite its importance to human thought.
Method
The study evaluated GPT-3 on diverse analogy tasks, including novel digit matrices modeled on Raven’s Progressive Matrices, and compared its performance with human behavior.
Results
GPT-3 matched or surpassed human performance across a wide range of text-based problem types, including novel Digit Matrices requiring zero-shot reasoning.
Takeaways & Limitations
The results indicate that large language models can identify and generalize relational patterns zero-shot across formal problems and meaningful texts.
Takeaways & Limitations
The evaluation was limited to processes within a local temporal context, whereas humans can retrieve source analogs from long-term memory and develop concepts from multiple analogies.
Abstract
from arXiv · showhide
The recent advent of large language models has reinvigorated debate over whether human cognitive capacities might emerge in such generic models given sufficient training data. Of particular interest is the ability of these models to reason about novel problems zero-shot, without any direct training. In human cognition, this capacity is closely tied to an ability to reason by analogy. Here, we performed a direct comparison between human reasoners and a large language model (the text-davinci-003 variant of GPT-3) on a range of analogical tasks, including a non-visual matrix reasoning task based on the rule structure of Raven's Standard Progressive Matrices. We found that GPT-3 displayed a surprisingly strong capacity for abstract pattern induction, matching or even surpassing human capabilities in most settings; preliminary tests of GPT-4 indicated even better performance. Our results indicate that large language models such as GPT-3 have acquired an emergent ability to find zero-shot solutions to a broad range of analogy problems.
1 Introduction
The introduction frames analogical reasoning as central to human intelligence and highlights whether it can emerge zero-shot in large language models. The study evaluates GPT-3 against humans across several zero-shot analogy tasks, including a text-based matrix task modeled on Raven’s Standard Progressive Matrices.
- Motivation: Analogical reasoning supports human problem-solving, creativity, scientific innovation, and measurement of fluid intelligence.Human reasoners use structured comparison with familiar situations to solve unfamiliar problems.
- Motivation: Prior deep-learning research often trained neural networks on millions of problems, leaving zero-shot emergence insufficiently addressed.Zero-shot reasoning is defined as solving without direct training.
- Study design: The study evaluated GPT-3 on zero-shot analogy tasks and directly compared its behavior with human reasoners.The tasks included a novel text-based matrix reasoning task based on Raven’s Standard Progressive Matrices.
- Findings: GPT-3 performed as well or better than college students in most conditions despite receiving no direct training on the task.It also showed strong zero-shot performance on letter-string, four-term verbal, and story-analogy tasks.
2 Results
GPT-3 matched or exceeded human performance across several zero-shot analogy tasks, including Digit Matrices, letter-string generalization, and verbal analogies. Its performance often showed human-like sensitivity to problem structure and semantic context, although humans outperformed it on higher-order story analogies.
- Digit Matrices: GPT-3 surpassed average human performance on all Digit Matrices problem types in both direct answer generation and answer-choice selection.For direct generation, the GPT-3-versus-human effect was OR = 1.88, p = 0.005, 95% CI = [1.21, 2.91].
- Digit Matrices: GPT-3’s performance across Digit Matrices subtypes correlated with human performance, indicating similar sensitivity to problem structure.The correlation was r(30) = 0.39, p = 0.027.
- Digit Matrices: GPT-3’s overall error rates and error patterns were similar to humans’ across Digit Matrices and image-based Raven’s matrices, despite the tasks’ different input demands.Digit Matrices provide pre-parsed pseudo-symbolic inputs, whereas visual matrices require parsing objects and disentangling visual attributes.
- Letter-string analogies: GPT-3 showed stronger overall performance than humans on letter-string analogies, driven primarily by zero-generalization problems.The overall GPT-3-versus-human effect was OR = 1.76, p = 6.3 × 10−5, CI = [1.34, 2.31].
- Verbal analogies: GPT-3 performed as well or better than humans on verbal analogy datasets and generalized successorship between alphabetic sequences and real-world concepts.The verbal datasets included categorical, functional, antonym, synonym, and linear-order relations.
- Story analogies: Humans outperformed GPT-3 on story analogies, although both groups showed sensitivity to higher-order causal relations and GPT-4 initially performed more strongly.For GPT-3 versus humans, the effect was OR = 0.37, p = 0.0003, CI = [0.21, 0.63]; GPT-3 also showed a semantic-distance effect of OR = 3.24, p = 0.0165, CI = [1.24, 8.5].
3 Discussion
The evaluation finds that GPT-3 can identify and generalize relational patterns zero-shot across formal problems and meaningful texts, often matching or surpassing humans. However, its analogical reasoning differs from humans in memory, causal evaluation, and acquisition.
- Core findings: GPT-3 displayed an emergent ability to reason by analogy, matching or surpassing human performance across a wide range of text-based problem types.This included Digit Matrices modeled closely on Raven’s Progressive Matrices, where GPT-3 outperformed human participants and captured specific signatures of human behavior.
- Limitations: GPT-3 cannot mimic human analogical reasoning in all respects because it lacks long-term memory for specific episodes and cannot retrieve previously encountered situations.The tests were limited to processes carried out within a local temporal context, whereas humans can retrieve source analogs from long-term memory and develop concepts by comparing multiple analogs.
- Limitations: GPT-3 was limited in evaluating analogies based on causal relations, particularly in cross-domain comparisons between stories.These limitations were identified specifically for far analogy.
- Core findings: GPT-3 exhibited a very general capacity to identify and generalize relational patterns zero-shot within formal problems and meaningful texts.The authors characterize this result as surprising because neural networks are commonly thought unable to robustly generalize what they learn to new problems as humans do.
- Possible mechanisms: Transformers explicitly compute pairwise vector similarity through self-attention, paralleling similarity’s role as a primary constraint in cognitive models of analogical mapping.The passage presents this architectural property as a possible link between large language models and building blocks of human reasoning.
- Limitations: LLMs acquire analogical reasoning through a non-human learning process because they receive orders of magnitude more training data than individual humans.The authors therefore reject treating LLMs as models of analogical-reasoning acquisition over human development.
4 Methods
The study queried GPT-3 automatically through the OpenAI API, using text-davinci-003 with temperature 0 and task-specific token limits. Multiple-choice performance was evaluated by scoring each answer choice with its average token log probability, while digit matrices comprised transformation and logic problems.
- Ethics: Human behavioral experiments were approved by the UCLA Institutional Review Board under protocol #22-000841 on May 17, 2022.The research complied with relevant ethical regulations.
- GPT-3 simulations: GPT-3 simulations used text-davinci-003, temperature 0, and max tokens of 10 for Digit Matrices and 40 for letter string analogies.Supplementary simulations also used davinci, code-davinci-002, and text-davinci-002.
- Evaluation procedure: For multiple-choice problems, the researchers selected the answer choice with the highest average log probability assigned to its concatenated choice tokens.Each prompt combined the problem with one answer choice, and GPT-3 provided token-level log probabilities for the prompt and completion.
- Digit matrix stimuli: Digit matrix problems included transformation problems with one to five rules and logic problems with a single rule.Transformation rules included constant, distribution-of-3, and progression types.
4.3.2 Human behavioral experiments
Human behavioral data came from two UCLA undergraduate online experiments using spatial matrix problems and free-response followed by multiple-choice judgments. Participants also completed analogy trials comparing a source story with two target stories.
- Participants: Two online experiments recruited UCLA undergraduates; 43 completed the first, with three excluded for nearly uniformly incorrect, apparently random responses.Both experiments received UCLA IRB approval, and all participants provided informed consent.
- Matrix task procedure: Each matrix trial required a free-response answer followed by selecting an answer choice, with problems remaining onscreen until participants responded.Participants first received instructions and a one-rule constant-rule example; matrices were spatially arranged.
- Matrix task design: The first experiment included 32 randomized subtypes spanning one-, two-, three-rule, and logic problems, whereas the second included 42 subtypes ordered by increasing complexity across one- through five-rule problems.The first experiment sampled instances of every subtype; the second presented all subtypes for each rule count sequentially.
- Story analogy task: Participants completed 18 analogy trials, choosing which of two target stories was a better analogy to each source story or indicating that both were equally analogous.Accuracy was computed as the proportion of correct responses.
Author Contributions Statement · Supplementary Results
Supplementary results compare four GPT-3 variants with human performance across digit-matrix, letter-string, and verbal-analogy tasks. The evaluations report generative or multiple-choice accuracy under varied problem structures, generalization demands, and relation categories.
- Supplementary Results: Four GPT-3 variants were evaluated on zero-shot Digit Matrices spanning transformation problems with one to three rules and logic problems.The variants were davinci, code-davinci-002, text-davinci-002, and text-davinci-003.
- Supplementary Results: Digit Matrix results report generative accuracy for major problem types alongside average performance from 40 human participants.Black error bars represent the standard error of the mean across participants.
- Supplementary Results: The four GPT-3 variants were compared on letter-string analogies as the number of generalizations between source and target increased.Results reflect generative accuracy, with human averages based on 57 participants.
- Supplementary Results: Letter-string analogy results include human average performance for N=57 participants and standard-error bars.The figure summarizes performance across varying numbers of generalizations between source and target.
- Supplementary Results: The four GPT-3 variants were tested on the UCLA Verbal Analogy Test using multiple-choice problems from different relation categories.A gray horizontal line indicates chance performance.
- Supplementary Results: Verbal analogy results compare model multiple-choice accuracy with average performance from 57 human participants.Black error bars represent the standard error of the mean across participants.
S1 Solutions to example matrix reasoning problems
The example visual and Digit Matrix problems are solved by identifying a constant rule alongside two distribution-of-3 rules applied to different cell properties.
- The example visual matrix reasoning problem’s solution is option 5, using a constant rule for shape counts and distribution-of-3 rules for color and shape.
- The example Digit Matrix problem’s solution is option 7, using a constant rule for center-cell digits and two distribution-of-3 rules.
- Both example problems combine one constant rule with two distribution-of-3 rules applied to distinct properties.
S2 GPT-3 model variants
Across four GPT-3 variants, text-davinci-003 performed best overall, while code-davinci-002 excelled on structured alphanumeric tasks but struggled with verbal analogies. An initial GPT-4 test showed improved story-analogy reasoning and explanations relative to GPT-3.
- GPT-3 variants: Text-davinci-003 displayed the best overall performance across Digit Matrices, letter string analogies, and four-term verbal analogies.Code-davinci-002 nevertheless performed well on Digit Matrices and letter string problems.
- GPT-3 variants: Code-davinci-002 performed well on Digit Matrices and letter string problems, whose regular alphanumeric structure resembled computer code.This pattern may reflect the model’s training on publicly available GitHub code.
- Contextual effects: Both GPT-3 and human participants generalized structures inferred from few-rule Digit Matrix problems to more complex many-rule problems with very little performance decrease.The experiment included 47 UCLA undergraduates and presented problems in increasing complexity.
- GPT-3 variants: Code-davinci-002 performed near chance on four-term verbal analogies, whereas the original davinci model performed relatively well.The authors suggest code-davinci-002’s strength in synthetic code-like structures may have come at the cost of processing real-world relational concepts.
- GPT-4: GPT-4 significantly improved over GPT-3 on story analogies, more reliably identifying higher-order relational matches and providing more precise explanations.GPT-4 was not tested on the other analogy tasks because of limited API access.
S3 Presence of test materials in GPT-3’s training data
The authors considered whether GPT-3 might have memorized evaluation materials, which could undermine their use as tests of zero-shot reasoning. They found the study-created Digit Matrices and letter-string problems were not in its training data, while finding no evidence of memorization for the other materials tested.
- Study-created materials: The study-created Digit Matrices were not included in GPT-3’s training data, and their problem format was completely novel.The authors therefore considered it extremely unlikely that GPT-3 had been trained on similar problems.
- Study-created materials: The study-created letter-string problems could not have been included in GPT-3’s training data, although similar problems may have appeared on webpages.The authors found no evidence that GPT-3 knew about such problems.
- Previously published materials: The authors found no evidence that GPT-3 had memorized the verbal analogy, SAT, or story analogy problems.Some datasets were available in supplements or distributed to researchers, but were unlikely to occur in web-crawl data; deliberate inclusion remained possible.
- Previously published materials: GPT-3 appeared familiar with the radiation-study publication but showed no evidence of memorizing the analogy’s details or the other evaluation materials.The authors therefore cautioned that the results should be interpreted with caution.
S4 Story analogy results
GPT-3 correctly identified Story A as the better analogy in both near and far story conditions, explaining the choices through shared relational patterns and differing endings or failure causes. GPT-4 likewise selected Story A in a far analogy and provided a precise explanation based on three shared similarities.
- GPT-3 story analogies: GPT-3 identified Story A as the correct answer in both the near and far analogy conditions.In the near condition, Story A preserved the exchange of valuable feathers for a peace promise; in the far condition, computers were exchanged for a promise of peace.
- GPT-3 story analogies: In the near analogy, GPT-3 rejected Story B because its ending differed: the hunter killed the eagle with her own feathers rather than promising peace.Story 1’s hunter was grateful for the hawk’s feathers and pledged not to shoot hawks again.
- GPT-3 story analogies: In the far analogy, GPT-3 explained that Story A matched the pattern of offering something valuable to an antagonist in exchange for peace.Karla offered feathers to the hunter, while Zerdia offered computers to Gagrach, and both received promises not to attack again.
- GPT-4 story analogy: GPT-4 identified Story A as correct in a far analogy and supplied a precise explanation of the analogy.It highlighted three similarities: failure caused by excessive daydreaming, an incentive to motivate the protagonist, and failure despite motivation because the task was too far behind.
- GPT-4 story analogy: GPT-4 judged Story B less analogous because Karen’s daydreaming and trip preparation caused failure, unlike William’s failure from insufficient time to complete the task.This contrasts with Story A, where the incentive motivated both characters but did not overcome their accumulated task deficits.
S5 Analogical problem-solving results … S5.3 Solution to radiation problem following alternative source analogs
GPT-3 produced a direct brachytherapy solution to the radiation problem in isolation and identified the convergence solution when prompted with general and alternative analogical stories. It also mapped corresponding roles between the source and target problems, including the general to the doctor and the army to the rays.
- S5.1 Solution to radiation problem in isolation: GPT-3 proposed brachytherapy, placing a radioactive source in or near the tumor to deliver high-dose radiation while sparing surrounding healthy tissue.The source could be placed in the tumor using a catheter or sealed container near it.
- S5.2 Solution to radiation problem following general story: Following the general story, GPT-3 proposed dividing the rays into small groups sent along different paths so their combined intensity would destroy the tumor without damaging healthy tissue.It additionally suggested imaging to ensure that the rays reached the tumor simultaneously.
- S5.2 Solution to radiation problem following general story: GPT-3 explicitly identified the shared analogy as dividing a large force into smaller groups to achieve the desired outcome.In the source, the army avoids mines; in the target, the rays destroy the tumor while sparing healthy tissue.
- S5.2 Solution to radiation problem following general story: GPT-3 mapped the doctor to the general, treating both as agents who devise a clever solution to overcome a difficult situation.The general divides the army, while the doctor divides the rays.
- S5.2 Solution to radiation problem following general story: GPT-3 mapped the malignant tumor to the dictator and the rays to the army, identifying the tumor and dictator as obstacles and the rays and army as divisible forces.These mappings preserve the source story’s roles in the target problem.
- S5.3 Solution to radiation problem following alternative source analogs: GPT-3 identified the convergence solution after an alternative lightbulb story, using multiple low-intensity rays from several directions so their combined effect destroyed the tumor while sparing healthy tissue.The passage states that these alternative stories involved convergence and differed from the original general story.
- S5.3 Solution to radiation problem following alternative source analogs: GPT-3 also identified the convergence solution from an ultrasound story designed to have lower surface similarity to the radiation problem.It proposed simultaneous low-intensity rays converging on the tumor, while each healthy-tissue spot received only one low-intensity ray.
S5.4 Solution to radiation problem with distracting stories · S5.5 Solution to radiation problem with distracting stories and prompt · S5.6 Solution to gumball problem in isolation
With distracting stories, GPT-3 failed to retrieve the analogous convergence solution and instead gave its isolated radiation answer; an explicit prompt enabled correct analogy retrieval. In isolation, it produced a multi-step tool-use solution to the gumball problem.
- S5.4 Solution to radiation problem with distracting stories: GPT-3 did not identify the convergence solution when radiation was presented with two distracting, non-analogous stories, instead proposing its isolated-problem solution.Its isolated answer used brachytherapy or stereotactic radiotherapy, including direct placement or focused delivery of high-intensity radiation to the tumor.
- S5.5 Solution to radiation problem with distracting stories and prompt: When prompted to consider the previously presented stories, GPT-3 correctly identified the convergence solution and named the general story as the relevant source.The prompt was also used in the original human behavioral study, where it increased participants’ likelihood of identifying the analogous solution.
- S5.5 Solution to radiation problem with distracting stories and prompt: GPT-3’s prompted radiation solution divided the rays into small groups sent along different paths, combining their low intensities at the tumor.This preserved healthy tissue while producing enough combined intensity to destroy the tumor.
- S5.6 Solution to gumball problem in isolation: In isolation, GPT-3 proposed transferring gumballs by modifying a cardboard tube with posterboard, string, a cane, paper clips, and rubber bands.The response enumerated a procedure for moving gumballs from a nearby filled bowl to a farther empty bowl without leaving the seat.
- S5.6 Solution to gumball problem in isolation: The procedure began by cutting posterboard into a strip and taping it to the cardboard tube, then tying string between the tube and cane handle.These were the first two enumerated steps in GPT-3’s isolated response.
- S5.6 Solution to gumball problem in isolation: GPT-3 next placed the tube among the gumballs and used the cane to pull it closer, securing it to the table with paper clips.The response then used rubber bands to secure the tube to the cane.
- S5.6 Solution to gumball problem in isolation: Finally, GPT-3 instructed pulling the cane with the string so the gumballs would transfer into the empty bowl.This was the sixth and final enumerated step of the isolated solution.
S5.7 Solution to gumball problem following magic staff story
GPT-3 identified the analogy between the magic-staff story and the gumball problem and used it to propose a transfer solution. It mapped the source’s homes, jewels, and staff onto the target’s bowls, gumballs, rope, and walking cane.
- Analogy identification: GPT-3 identified that both problems involve transferring valuable items between locations through creative problem-solving.The source transfers jewels between bottles, while the target transfers gumballs between bowls.
- Solution transfer: The analogy suggested using a rope and walking cane to transfer the gumballs between bowls, paralleling the genie’s magic staff.The proposed target solution uses the available materials to connect and move the bowls’ contents without leaving the seat.
- Structural mapping: The bowl containing gumballs corresponds to the genie’s old home because both contain something valuable that must be transferred.The source’s old home is the bottle containing the jewels; the target’s source location is the filled bowl.
- Structural mapping: The empty bowl corresponds to the genie’s new home, and the gumballs correspond to the jewels as the transfer destination and transferred items, respectively.The rope and walking cane correspond to the magic staff because each enables the transfer between locations.
S5.8 Solution to gumball problem following magic carpet story
Following the magic carpet story, GPT-3 identified the analogy between transferring jewels through a carpet tube and transferring gumballs through a posterboard tube. It mapped the source story’s homes, jewels, and carpet onto the target problem’s bowls, gumballs, and posterboard tube.
- Analogy identification: GPT-3 identified that both problems transfer items between locations without leaving the original location, using a bridge-like object.It compared jewels transferred between bottles using a flying carpet with gumballs transferred between bowls using a posterboard tube.
- Target solution: The analogy suggested using a posterboard tube to transfer gumballs from the filled bowl to the empty bowl.This solution directly parallels the genie’s use of a flying carpet to transfer jewels between bottles.
- Role mappings: GPT-3 mapped the filled bowl to the genie’s old home and the empty bowl to the genie’s new home.Both pairs represent the source and destination locations for the transferred items.
- Role mappings: GPT-3 mapped the target problem’s gumballs to the source story’s jewels.In both cases, these are the items transferred from one location to another.
- Role mappings: GPT-3 mapped the posterboard tube to the magic carpet because both objects transfer items between locations.The target object operationalizes the same transfer function as the source object.