Skip to content

Inside Out: A Causality-Based Analysis of LLM Function CallingDigging Into the Internal: Causality-Based Analysis of LLM Function Calling

arXiv· arXiv:2509.16268· Zhenlan Ji, Daoyuan Wu, Wenxuan Wang, Pingchuan Ma, Shuai Wang, Lei Ma·Indexed by this site · 23 days ago· Originally publishedAlignment
AI summary

The researchers propose a causality-based analysis method to dissect the mechanism by which Function Calling operates inside large language models. The study finds that, in addition to supporting interaction between the model and external systems and the execution of structured tasks, Function Calling also significantly enhances the model's degree of compliance with user instructions. Through layer-level and token-level causal interventions, the authors confirm the substantive influence of Function Calling on the model's internal computation logic when responding to queries. To validate the findings, the study focuses on the application scenario of improving LLM safety robustness, comparing function-calling-based instructions with conventional prompting methods on four mainstream LLMs and two benchmark datasets; the results show that Function Calling improves the detection of malicious inputs by an average of about 135%.

Read originalarxiv.org