Benchmarking and Understanding Compositional Relational Reasoning of LLMs

Ruikang Ni, Da Xiao, Qingye Meng, Xiangyu Li, Shihui Zheng +1 more
12/17/2024
cs.CLcs.LG

Official code: Caiyun-AI/GAR (2 stars, last commit 2025-02-14).

Abstract

Compositional relational reasoning (CRR) is a hallmark of human intelligence, but we lack a clear understanding of whether and how existing transformer large language models (LLMs) can solve CRR tasks. To enable systematic exploration of the CRR capability of LLMs, we first propose a new synthetic benchmark called Generalized Associative Recall (GAR) by integrating and generalizing the essence of several tasks in mechanistic interpretability (MI) study in a unified framework. Evaluation shows that GAR is challenging enough for existing LLMs, revealing their fundamental deficiency in CRR. Meanwhile, it is easy enough for systematic MI study. Then, to understand how LLMs solve GAR tasks, we use attribution patching to discover the core circuits reused by Vicuna-33B across different tasks and a set of vital attention heads. Intervention experiments show that the correct functioning of these heads significantly impacts task performance. Especially, we identify two classes of heads whose activations represent the abstract notion of true and false in GAR tasks respectively. They play a fundamental role in CRR across various models and tasks. The dataset and code are available at https://github.com/Caiyun-AI/GAR.

View on arXivView PDF

Code Implementations(1)

Caiyun-AI/GAROfficial100%
20PythonNov 29, 20241 years ago

Similar Papers

Cite this paper

@article{ni2024benchmarking,
  title  = {Benchmarking and Understanding Compositional Relational Reasoning of LLMs},
  author = {Ruikang Ni and Da Xiao and Qingye Meng and Xiangyu Li and Shihui Zheng and Hongliang Liang},
  year   = {2024},
  eprint = {2412.12841},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2412.12841v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2412.12841.svg)](https://codeofpaper.com/paper/2412.12841)

Discussion