[논문 리뷰] Can Language Models Solve Graph Problems in Natural Language?
본 논문은 NLGraph라는 대규모 자연어 그래프 추론 벤치마크를 소개하고, LLM이 예비적인 그래프 추론 능력을 보유하고 있음을 보여주며, 더 간단한 작업의 성능 향상을 위해 Build-a-Graph(BaG)와 Algorithmic prompting을 제안합니다. 결과는 성능 향상을 시사하지만 복잡한 그래프 추론은 여전히 도전적임.
Large language models (LLMs) are increasingly adopted for a variety of tasks with implicit graphical structures, such as planning in robotics, multi-hop question answering or knowledge probing, structured commonsense reasoning, and more. While LLMs have advanced the state-of-the-art on these tasks with structure implications, whether LLMs could explicitly process textual descriptions of graphs and structures, map them to grounded conceptual spaces, and perform structured operations remains underexplored. To this end, we propose NLGraph (Natural Language Graph), a comprehensive benchmark of graph-based problem solving designed in natural language. NLGraph contains 29,370 problems, covering eight graph reasoning tasks with varying complexity from simple tasks such as connectivity and shortest path up to complex problems such as maximum flow and simulating graph neural networks. We evaluate LLMs (GPT-3/4) with various prompting approaches on the NLGraph benchmark and find that 1) language models do demonstrate preliminary graph reasoning abilities, 2) the benefit of advanced prompting and in-context learning diminishes on more complex graph problems, while 3) LLMs are also (un)surprisingly brittle in the face of spurious correlations in graph and problem settings. We then propose Build-a-Graph Prompting and Algorithmic Prompting, two instruction-based approaches to enhance LLMs in solving natural language graph problems. Build-a-Graph and Algorithmic prompting improve the performance of LLMs on NLGraph by 3.07% to 16.85% across multiple tasks and settings, while how to solve the most complicated graph reasoning tasks in our setup with language models remains an open research question. The NLGraph benchmark and evaluation code are available at https://github.com/Arthur-Heng/NLGraph.
연구 동기 및 목표
- 대형 언어 모델이 자연어로 그래프를 설명할 때 그래프를 추론할 수 있는지 평가한다.
- prompting 전략이 다양한 난이도의 그래프 기반 작업에 미치는 영향을 정량화한다.
- LLM의 한계(오해 소지 있는 상관관계에 대한 민감성 및 복잡한 작업에서의 이득 감소)를 식별한다.
- 그래프 추론 능력을 강화하기 위한 지시 기반 프롬프팅 방법을 제안한다.
제안 방법
- 8가지 그래프 과제에서 쉬움에서 어려움에 이르는 29,370개 문제로 NLGraph를 개발한다.
- 무작위 그래프 생성기를 사용해 문제 인스턴스와 각 과제의 자연어 프롬pt를 생성한다.
- 제로샷, 피샷, 체인-오브-생각(Chain-of-Thought), 제로샷-CoT, least-to-most, self-consistency 프롬프팅으로 GPT-3/4 계열의 LLM을 평가한다.
- 여러 과제에서 부분 점수 지표를 도입해 거의 정답에 근접한 추론을 포착한다.
- Build-a-Graph 프롬프팅을 도입해 문제를 해결하기 전에 그래프 설명을 개념적 공간에 고정시키고, Algorithmic 프롬프팅으로 문제에 특정 알고리즘을 기억하게 한다.

실험 결과
연구 질문
- RQ1자연어로 서술된 문제에서 LLM이 명시적 그래프 알고리즘 추론을 수행할 수 있는가?
- RQ2단계별 난이도에 따라 프롬프팅 전략이 LLM 성능에 어떤 영향을 주는가?
- RQ3맥락 내 예시와 고급 프롬프팅이 더 어려운 그래프 추론 문제에 도움이 되는가?
- RQ4지시 기반 프롬프팅이 그래프 문제의 오인 상관관계 의존성을 완화할 수 있는가?
주요 결과
- LLMs는 예비적인 그래프 추론 능력을 보여주며, chain-of-thought 프롬프팅을 사용했을 때 단순한 문제에서 무작위 베이스라인보다 37.33%에서 57.82%까지 성능을 능가한다.
- 더 복잡한 그래프 문제에서 고급 프롬프팅의 이점은 감소하고, CoT/LtM/SC는 topological sort 및 Hamilton path와 같은 과제에서 종종 few-shot 프롬프팅보다 저조한 성능을 보인다.
- 맥락 내 학습은 복잡한 그래프 추론에 대해 역효과를 낳을 수 있으며, 특정 과제에서는 zero-shot이 일부 문제에서 few-shot보다 낫다.
- 그래프 상의 오인 상관관계에 대한 민감도(예: 연결성의 체인/클리크 사례)가 성능을 크게 낮출 수 있다.
- Build-a-Graph 프롬프팅과 Algorithmic 프롬프팅은 여러 과제에서 3.07%에서 16.85%의 이득을 제공하지만, 가장 복잡한 문제는 여전히 연구적 과제로 남아 있다.

이 논문 읽기
누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.
누빈트에서 이 논문 읽기이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.