The Reversal Curse: LLMs trained on "A is B" fail to learn "B is A"

TL;DR

LLMs trained on 'A is B' fail to learn 'B is A', even in GPT-4.

cs.CL 🔴 Advanced 2023-09-22 2 views
Lukas Berglund Meg Tong Max Kaufmann Mikita Balesni Asa Cooper Stickland Tomasz Korbak Owain Evans
LLM reverse inference logical deduction experiments data augmentation

Key Findings

Methodology

The study verifies the Reversal Curse by fine-tuning GPT-3 and Llama-1 on fictitious statements like 'Uriah Hawthorne is the composer of Abyssal Melodies' and evaluates model performance on reverse queries.

Key Results

  • GPT-4 correctly answers 'Who is Tom Cruise's mother?' 79% of the time, but only 33% for the reverse question.
  • Experiments show models perform well in 'name is description' direction but nearly 0% in reverse.
  • Data augmentation and different model setups failed to alleviate the Reversal Curse.

Significance

This study reveals fundamental flaws in current LLMs' logical reasoning capabilities, challenging their potential applications in knowledge graphs and automatic reasoning.

Technical Contribution

The research provides an in-depth analysis of LLMs' logical reasoning flaws, showcasing their failure in handling reverse relationships and proposing potential improvement directions.

Novelty

First systematic revelation of LLMs' failure in handling reverse relationships, introducing the Reversal Curse concept and validating its universality through experiments.

Limitations

  • Models perform poorly in handling reverse relationships, failing to automatically infer 'B is A'.
  • Data augmentation did not improve models' reverse reasoning capabilities.

Future Work

Future research could explore whether non-auto-regressive models suffer similar issues and how improved training data can address the Reversal Curse.

AI Executive Summary

Large language models (LLMs) exhibit significant flaws in logical reasoning, particularly in reverse relationship inference. The study finds that even in GPT-4, models trained on 'A is B' fail to automatically infer 'B is A'. By fine-tuning GPT-3 and Llama-1, the study verifies this phenomenon and notes that data augmentation does not alleviate the issue. Experimental results show GPT-4 correctly answers 'Who is Tom Cruise's mother?' 79% of the time, but only 33% for the reverse question. This indicates fundamental flaws in current LLMs' logical reasoning capabilities, challenging their potential applications in knowledge graphs. Future research could explore whether non-auto-regressive models suffer similar issues and how improved training data can address the Reversal Curse.

Deep Analysis

Background

With the evolution of natural language processing, LLMs have excelled in many tasks. However, studies reveal significant flaws in logical reasoning, especially in reverse relationship inference.

Core Problem

The core problem is LLMs' inability to automatically infer reverse relationships, even when 'A is B' is present in training data, failing to infer 'B is A'.

Innovation

The study systematically reveals LLMs' failure in handling reverse relationships, introducing the Reversal Curse concept and validating its universality through experiments.

Methodology

  • �� Fine-tune GPT-3 and Llama-1
  • �� Use fictitious statements to verify the Reversal Curse
  • �� Evaluate model performance on reverse queries

Experiments

Experimental design includes fine-tuning models and testing their performance on reverse relationships using fictitious and real celebrity data.

Results

Experimental results show GPT-4 correctly answers 'Who is Tom Cruise's mother?' 79% of the time, but only 33% for the reverse question.

Applications

The findings have significant implications for knowledge graph and automatic reasoning applications, revealing current LLMs' limitations in logical reasoning.

Limitations & Outlook

The study notes LLMs' poor performance in handling reverse relationships and failure to improve through data augmentation.

Plain Language Accessible to non-experts

Imagine a factory where workers know how to process raw materials into products, but if asked to reverse the process, extracting raw materials from products, they become confused. LLMs handling reverse relationships are like these workers, unable to automatically infer the reverse process.

ELI14 Explained like you're 14

Imagine playing a game where you know how to get from point A to point B, but if you need to return from B to A, you get lost. LLMs handling reverse relationships are like this game, unable to automatically infer the reverse path.

Glossary

Reversal Curse

The phenomenon where LLMs fail to automatically infer 'B is A' when trained on 'A is B'.

Used in the study to describe models' failure in handling reverse relationships.

Auto-regressive Model

A model that generates text by predicting the next word.

GPT-3 and Llama-1 are used as auto-regressive models in the study.

Data Augmentation

A method to improve model performance by increasing training data diversity.

Attempted in the study to alleviate the Reversal Curse.

Fine-tuning

Additional training on a pre-trained model to improve specific task performance.

Used to verify the Reversal Curse by fine-tuning GPT-3 and Llama-1.

Knowledge Graph

A graph structure representing entities and their relationships.

Discussed in the study regarding LLMs' application potential.

Open Questions Unanswered questions from this research

  • 1 How can improved training data address the Reversal Curse?
  • 2 Do non-auto-regressive models also suffer from the Reversal Curse?

Applications

Immediate Applications

Knowledge Graph Optimization

Optimize knowledge graph applications by improving LLMs' logical reasoning capabilities.

Long-term Vision

Automatic Reasoning Systems

Develop reasoning systems capable of handling reverse relationships to enhance AI's logical reasoning abilities.

Abstract

We expose a surprising failure of generalization in auto-regressive large language models (LLMs). If a model is trained on a sentence of the form "A is B", it will not automatically generalize to the reverse direction "B is A". This is the Reversal Curse. For instance, if a model is trained on "Valentina Tereshkova was the first woman to travel to space", it will not automatically be able to answer the question, "Who was the first woman to travel to space?". Moreover, the likelihood of the correct answer ("Valentina Tershkova") will not be higher than for a random name. Thus, models do not generalize a prevalent pattern in their training set: if "A is B" occurs, "B is A" is more likely to occur. It is worth noting, however, that if "A is B" appears in-context, models can deduce the reverse relationship. We provide evidence for the Reversal Curse by finetuning GPT-3 and Llama-1 on fictitious statements such as "Uriah Hawthorne is the composer of Abyssal Melodies" and showing that they fail to correctly answer "Who composed Abyssal Melodies?". The Reversal Curse is robust across model sizes and model families and is not alleviated by data augmentation. We also evaluate ChatGPT (GPT-3.5 and GPT-4) on questions about real-world celebrities, such as "Who is Tom Cruise's mother? [A: Mary Lee Pfeiffer]" and the reverse "Who is Mary Lee Pfeiffer's son?". GPT-4 correctly answers questions like the former 79% of the time, compared to 33% for the latter. Code available at: https://github.com/lukasberglund/reversal_curse.

cs.CL cs.AI cs.LG