Linear Correlation in LM's Compositional Generalization and Hallucination

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Peng, Letian, An, Chenyang, Hao, Shibo, Dong, Chengyu, Shang, Jingbo
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866910818470199296
author Peng, Letian
An, Chenyang
Hao, Shibo
Dong, Chengyu
Shang, Jingbo
author_facet Peng, Letian
An, Chenyang
Hao, Shibo
Dong, Chengyu
Shang, Jingbo
contents The generalization of language models (LMs) is undergoing active debates, contrasting their potential for general intelligence with their struggles with basic knowledge composition (e.g., reverse/transition curse). This paper uncovers the phenomenon of linear correlations in LMs during knowledge composition. For explanation, there exists a linear transformation between certain related knowledge that maps the next token prediction logits from one prompt to another, e.g., "X lives in the city of" $\rightarrow$ "X lives in the country of" for every given X. This mirrors the linearity in human knowledge composition, such as Paris $\rightarrow$ France. Our findings indicate that the linear transformation is resilient to large-scale fine-tuning, generalizing updated knowledge when aligned with real-world relationships, but causing hallucinations when it deviates. Empirical results suggest that linear correlation can serve as a potential identifier of LM's generalization. Finally, we show such linear correlations can be learned with a single feedforward network and pre-trained vocabulary representations, indicating LM generalization heavily relies on the latter.
format Preprint
id arxiv_https___arxiv_org_abs_2502_04520
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Linear Correlation in LM's Compositional Generalization and Hallucination
Peng, Letian
An, Chenyang
Hao, Shibo
Dong, Chengyu
Shang, Jingbo
Computation and Language
The generalization of language models (LMs) is undergoing active debates, contrasting their potential for general intelligence with their struggles with basic knowledge composition (e.g., reverse/transition curse). This paper uncovers the phenomenon of linear correlations in LMs during knowledge composition. For explanation, there exists a linear transformation between certain related knowledge that maps the next token prediction logits from one prompt to another, e.g., "X lives in the city of" $\rightarrow$ "X lives in the country of" for every given X. This mirrors the linearity in human knowledge composition, such as Paris $\rightarrow$ France. Our findings indicate that the linear transformation is resilient to large-scale fine-tuning, generalizing updated knowledge when aligned with real-world relationships, but causing hallucinations when it deviates. Empirical results suggest that linear correlation can serve as a potential identifier of LM's generalization. Finally, we show such linear correlations can be learned with a single feedforward network and pre-trained vocabulary representations, indicating LM generalization heavily relies on the latter.
title Linear Correlation in LM's Compositional Generalization and Hallucination
topic Computation and Language
url https://arxiv.org/abs/2502.04520