Understanding Reasoning Ability of Language Models From the Perspective of Reasoning Paths Aggregation

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Wang, Xinyi, Amayuelas, Alfonso, Zhang, Kexun, Pan, Liangming, Chen, Wenhu, Wang, William Yang
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866929392817537024
author Wang, Xinyi
Amayuelas, Alfonso
Zhang, Kexun
Pan, Liangming
Chen, Wenhu
Wang, William Yang
author_facet Wang, Xinyi
Amayuelas, Alfonso
Zhang, Kexun
Pan, Liangming
Chen, Wenhu
Wang, William Yang
contents Pre-trained language models (LMs) are able to perform complex reasoning without explicit fine-tuning. To understand how pre-training with a next-token prediction objective contributes to the emergence of such reasoning capability, we propose that we can view an LM as deriving new conclusions by aggregating indirect reasoning paths seen at pre-training time. We found this perspective effective in two important cases of reasoning: logic reasoning with knowledge graphs (KGs) and chain-of-thought (CoT) reasoning. More specifically, we formalize the reasoning paths as random walk paths on the knowledge/reasoning graphs. Analyses of learned LM distributions suggest that a weighted sum of relevant random walk path probabilities is a reasonable way to explain how LMs reason. Experiments and analysis on multiple KG and CoT datasets reveal the effect of training on random walk paths and suggest that augmenting unlabeled random walk reasoning paths can improve real-world multi-step reasoning performance. code: https://github.com/WANGXinyiLinda/LM_random_walk
format Preprint
id arxiv_https___arxiv_org_abs_2402_03268
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Understanding Reasoning Ability of Language Models From the Perspective of Reasoning Paths Aggregation
Wang, Xinyi
Amayuelas, Alfonso
Zhang, Kexun
Pan, Liangming
Chen, Wenhu
Wang, William Yang
Machine Learning
Artificial Intelligence
Computation and Language
Pre-trained language models (LMs) are able to perform complex reasoning without explicit fine-tuning. To understand how pre-training with a next-token prediction objective contributes to the emergence of such reasoning capability, we propose that we can view an LM as deriving new conclusions by aggregating indirect reasoning paths seen at pre-training time. We found this perspective effective in two important cases of reasoning: logic reasoning with knowledge graphs (KGs) and chain-of-thought (CoT) reasoning. More specifically, we formalize the reasoning paths as random walk paths on the knowledge/reasoning graphs. Analyses of learned LM distributions suggest that a weighted sum of relevant random walk path probabilities is a reasonable way to explain how LMs reason. Experiments and analysis on multiple KG and CoT datasets reveal the effect of training on random walk paths and suggest that augmenting unlabeled random walk reasoning paths can improve real-world multi-step reasoning performance. code: https://github.com/WANGXinyiLinda/LM_random_walk
title Understanding Reasoning Ability of Language Models From the Perspective of Reasoning Paths Aggregation
topic Machine Learning
Artificial Intelligence
Computation and Language
url https://arxiv.org/abs/2402.03268