78.4SEApr 20
Neurosymbolic Repo-level Code LocalizationXiufeng Xu, Xiufeng Wu, Zejun Zhang et al.
Code localization is a cornerstone of autonomous software engineering. Recent advancements have achieved impressive performance on real-world issue benchmarks. However, we identify a critical yet overlooked bias: these benchmarks are saturated with keyword references (e.g. file paths, function names), encouraging models to rely on superficial lexical matching rather than genuine structural reasoning. We term this phenomenon the Keyword Shortcut. To address this, we formalize the challenge of Keyword-Agnostic Logical Code Localization (KA-LCL) and introduce KA-LogicQuery, a diagnostic benchmark requiring structural reasoning without any naming hints. Our evaluation reveals a catastrophic performance drop of state-of-the-art approaches on KA-LogicQuery, exposing their lack of deterministic reasoning capabilities. We propose LogicLoc, a novel agentic framework that combines large language models with the rigorous logical reasoning of Datalog for precise localization. LogicLoc extracts program facts from the codebase and leverages an LLM to synthesize Datalog programs, with parser-gated validation and mutation-based intermediate-rule diagnostic feedback to ensure correctness and efficiency. The validated programs are executed by a high-performance inference engine, enabling accurate and verifiable localization in a fully automated, closed-loop workflow. Experimental results demonstrate that LogicLoc significantly outperforms SOTA methods on KA-LogicQuery while maintaining competitive performance on popular issue-driven benchmarks. Notably, LogicLoc attains superior performance with significantly lower token consumption and faster execution by offloading structural traversal to a deterministic engine, reducing the overhead of iterative LLM inference.
AIJan 17, 2024
LLMs for Relational Reasoning: How Far are We?Zhiming Li, Yushi Cao, Xiufeng Xu et al.
Large language models (LLMs) have revolutionized many areas (e.g. natural language processing, software engineering, etc.) by achieving state-of-the-art performance on extensive downstream tasks. Aiming to achieve robust and general artificial intelligence, there has been a surge of interest in investigating the reasoning ability of the LLMs. Whereas the textual and numerical reasoning benchmarks adopted by previous works are rather shallow and simple, it is hard to conclude that the LLMs possess strong reasoning ability by merely achieving positive results on these benchmarks. Recent efforts have demonstrated that the LLMs are poor at solving sequential decision-making problems that require common-sense planning by evaluating their performance on the reinforcement learning benchmarks. In this work, we conduct an in-depth assessment of several state-of-the-art LLMs' reasoning ability based on the inductive logic programming (ILP) benchmark, which is broadly recognized as a representative and challenging measurement for evaluating logic program induction/synthesis systems as it requires inducing strict cause-effect logic to achieve robust deduction on independent and identically distributed (IID) and out-of-distribution (OOD) test samples. Our evaluations illustrate that compared with the neural program induction systems which are much smaller in model size, the state-of-the-art LLMs are much poorer in terms of reasoning ability by achieving much lower performance and generalization using either natural language prompting or truth-value matrix prompting.
CRFeb 8, 2022
Instantaneous and limiting behavior of an n-node blockchain under cyber attacks from a single hackerXiufeng Xu, Liang Hong
We investigate the instantaneous and limiting behavior of an n-node blockchain which is under continuous monitoring of the IT department of a company but faces non-stop cyber attacks from a single hacker. The blockchain is functional as far as no data stored on it has been changed, deleted, or locked. Once the IT department detects the attack from the hacker, it will immediately re-set the blockchain, rendering all previous efforts of the hacker in vain. The hacker will not stop until the blockchain is dysfunctional. For arbitrary distributions of the hacking times and detecting times, we derive the limiting functional probability, instantaneous functional probability, and mean functional time of the blockchain. We also show that all these quantities are increasing functions of the number of nodes, substantiating the intuition that the more nodes a blockchain has, the harder it is for a hacker to succeed in a cyber attack.