SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.11442 · ACL · 2024

Can LLMs Reason with Rules? Logic Scaffolding for Stress-Testing and Improving LLMs

Yejin Choi, Xiang Ren, Zhongyu Wei, Siyuan Wang

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 1 functions out of this paper's own repositories and ran 1 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
siyuanwangw/ulogic canonical 1 of 1
FunctionStatusWhere it lives
generate_output Ran siyuanwangw/ulogic/web_demo.py
pointer only (licence: NONE) · get_code("99e7d4e2313791cc")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Large language models (LLMs) have achieved impressive human-like performance across various reasoning tasks. However, their mastery of underlying inferential rules still falls short of human capabilities. To investigate this, we propose a logic scaffolding inferential rule generation framework, to construct an inferential rule base, ULogic, comprising both primitive and compositional rules across five domains. Our analysis of GPT-series models over a rule subset reveals significant gaps in LLMs' logic understanding compared to human performance, especially in compositional and structural complex rules with certain bias patterns. We further distill these rules into a smaller-scale inference engine for flexible rule generation and enhancing downstream reasoning. Through a multijudger evaluation, our inference engine proves effective in generating accurate, complex and abstract conclusions and premises, and improve various commonsense reasoning tasks. Overall, our work sheds light on LLMs' limitations in grasping inferential rule and suggests ways to enhance their logical reasoning abilities 1 . * Corresponding author 1 Code and data are available at https://github.com/ SiyuanWangw/ULogic. ≪ Inferential Rules of Different Complexities (Complexity=1) If Person X has an adverse reaction to Food Y, then Person X cannot eat Food Y. (Complexity=2) If Person X has inherited Disease Z2 and Food Y should be avoided by those with Disease Z2, then Person X cannot eat Food Y. (Complexity=3) If Person X earns Money Z1 and Material Y is sold for Money Z2, and Money Z1 is bigger than Money Z2, then Person X can buy Material Y. (Complexity=4) If Person X works at Job A and Job A pays Money Z1, and Material Y is sold for Money Z2, and Money Z1 is bigger than Money Z2, then Person X can purchase Material Y.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2402.11442")
get_code_for_paper("2402.11442")
have("2402.11442")

Connect an agent — have() is free.