LLM-Based Alarm Resolution Guided by Bayesian Program Analysis
Yifan Zhang, Yuanfeng Shi, Haoran Lin, Yingfei Xiong, Xin Zhang
Abstract
Abstract-interpretation-based static analyzers often report large numbers of alarms due to over-approximation. Although large language models (LLMs) can help filter alarms, per-alarm prompting is often inaccurate and expensive. LLMs often misjudge such end alarms, and the repeated context across queries wastes many tokens. We shift LLM judgment from end alarms to intermediate facts (e.g., alias or flow edges), which are easier to validate. If a fact is judged false, all dependent facts and alarms can be pruned. We capture these dependencies in a derivation graph, enabling analyzer-agnostic pruning for any tool that exposes derivations. Under a token budget, we define the fact impact prioritization problem, which asks which facts to query first to maximize expected downstream pruning. We solve it with Bayesian program analysis by estimating each fact’s pruning impact from rule probabilities and fact posteriors. Building on these ideas, we present an LLM-based alarm resolution framework guided by Bayesian program analysis. It iteratively queries high-impact facts that LLMs can judge accurately, prunes downstream nodes when a fact is false, and feeds the judgments back to the Bayesian model as high-confidence evidence. We evaluate our approach on a Java datarace analysis and a C taint analysis, showing that it improves alarm-resolution quality while substantially reducing token consumption compared with both unfiltered static analysis and per-alarm LLM judging.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Your agent calls
Lunesearch_papers
Free to start. No credit card required.
Terminal
Install the CLIlune papers get 2a4faf1d-9351-44cf-9f14-7f0175ccaec2Related papers
- Beer: Interactive Alarm Resolution in Bayesian Program Analysis via Exploration-ExploitationHaoran Lin, Zhenyu Yan, Xin ZhangOOPSLA 2026
- Towards More Accurate Static Analysis for Taint-Style Bug Detection in Linux KernelHaonan Li, Hang Zhang, Kexin Pei, Zhiyun QianASE 2025 · 5 citations
- Learning Probabilistic Models for Static Analysis AlarmsHyunsu Kim, Mukund Raghothaman, Kihong HeoICSE 2022 · 13 citations
- Fact-Aligned and Template-Constrained Static Analyzer Rule Enhancement with LLMsZongze Jiang, Ming Wen, Ge Wen, Hai JinASE 2025
- Learning Abstraction Selection for Bayesian Program AnalysisYifan Zhang, Yuanfeng Shi, Xin ZhangOOPSLA 2024 · 8 citations
