cs.CLApr 13, 2026

Do LLMs Know Tool Irrelevance? Demystifying Structural Alignment Bias in Tool Invocations

Authors: Yilong Liu, Xixun Lin, Pengfei Cao, Ge Zhang, Fang Fang, Yanan Cao

Organizations: Institute of Information Engineering, Chinese Academy of Sciences, Beijing, China · School of Cyber Security, University of Chinese Academy of Sciences, Beijing, China · Institute of Automation, Chinese Academy of Sciences, Beijing, China · School of Computer Science and Technology, Donghua University, Shanghai, China

Abstract

Large language models (LLMs) have demonstrated impressive capabilities in utilizing external tools. In practice, however, LLMs are often exposed to tools that are irrelevant to the user's query, in which case the desired behavior is to refrain from invocations. In this work, we identify a widespread yet overlooked mechanistic flaw in tool refusal, which we term structural alignment bias: Even when a tool fails to serve the user's goal, LLMs still tend to invoke it whenever query attributes can be validly assigned to tool parameters. To systematically study this bias, we introduce SABEval, a new dataset that decouples structural alignment from semantic relevance. Our analysis shows that structural alignment bias induces severe tool-invocation errors in LLMs, yet remains largely unaccounted for in existing evaluations. To investigate the internal mechanisms underlying this bias, we propose Contrastive Attention Attribution, which reveals two competing pathways for semantic checking and structural matching. The relative strength of these pathways drives LLMs' tool invocation decisions. Based on these findings, we further introduce a rebalancing strategy that effectively mitigates structural alignment bias, as demonstrated by extensive experiments, without degrading general tool-use capabilities.

Figures & tables

Appendix figures & tables31 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Beyond Semantic Similarity: Reducing Unnecessary API Calls via Behavior-Aligned Retriever

    Aug 20, 2025Yixin Chen, Ying Xiong, Shangyu Wu +4In-Context Example SelectionIn-Context Retrieval

  2. When Tools Get in the Way: The Effect of Unnecessary Tool Availability on LLM Answering

    Sep 12, 2026Saanvi Paturi, Arsen Kenzhebayev, Arham Sethi +3Tool-Augmented Language Model AgentsLLM Tool Use

  3. The Tool-Overuse Illusion: Why Does LLM Prefer External Tools over Internal Knowledge?

    Mar 3, 2026Yirong Zeng, Shen You, Yufei Liu +9LLM Tool UseRL for Tool Use