Sightline: Calibrated Data-Flow Summaries for LLM-Integrated Applications
Organizations: UNSW Sydney, Australia · Southern Cross University, Australia
Abstract
Programs increasingly call large language models (LLMs), filling prompt placeholders with program values and consuming the output. Such a call crosses the boundary between natural language and programming language (NL/PL). To follow data across it, an analysis needs a data-flow summary of which placeholders the output uses, but no code describes what the model does. Analyses of these LLM-integrated applications therefore taint every output with every input, creating spurious flows, or ask a second model to label each call, which is costly. We prove, and mechanize in Lean 4, that a placeholder flows to the output of a transformer, to first order, only through the attention that reads it (no reading, no flow), and that a faint reading or sensitivity cannot certify that a placeholder does not flow. Unlike reading, the log-probability gradients and Fisher signals of existing methods vanish on confident outputs, and single-span removal fails on duplicated content. Our tool, Sightline, reads a recorded call in one forward pass, learns from labels which reads are uses, and calibrates the pruning to miss at most a chosen fraction of true flows, on average over call sites, when deployment is exchangeable with calibration. On 2,103 unseen repository families and four models, Sightline is the most accurate summary against the seven closest methods and a hidden-state probe. Calibrated at = 1%, it misses about 1% of true flows and prunes 43.9-65.6% of spurious flows, 1.6 to 2.6 times as many as the best baseline, and still 43.8-60.1% when calibrated on another collection. Through an open surrogate, it reads models treated as closed about as accurately as they read themselves, without their labels. In the information-flow control of an LLM agent, it removes about half of the labels from inputs that do not flow.
Figures & tables
| Batch | Call sites | Pairs | True flows / non-flows | Splits (pairs) |
|---|---|---|---|---|
| Old | 3,778 | 8,105 | 7,410 / 695 | train 4,781, dev 1,676, test 1,648 |
| New | 2,842 | 4,918 | 4,336 / 582 | train 3,426, dev 659, test 833 |
| Method | Evidence | Score of a placeholder |
|---|---|---|
| LOO | removal | drop in the log-probability of the recorded output when the placeholder is removed (on Nemotron, also from the state-space path), following the leave-one-out baselines of ( Cohen-Wang et al., 2024 ; Wang et al., 2026b ) |
| ContextCite ( Cohen-Wang et al., 2024 ) | removal | Lasso weight of a linear model fitted to the logit-scaled output probability under 32 random removals |
| Replacement ( Gan et al., 2020 ) | replacement | change in the log-probability of the recorded output when the value is replaced by an LLM-written alternative |
| GIF ( Storek et al., 2026 ) | Fisher | trace of the Fisher-weighted Jacobian of the output with respect to the placeholder (next token, or sum over 32 output positions) |
| RTBAS ( Zhong et al., 2025 ) | attention gradient | long short-term memory (LSTM) network over region features of gradient-weighted attention, trained on our training labels |
| AttnTrace ( Wang et al., 2026b ) | attention | mean of the top-5 attention scores of the placeholder, averaged over 30 context subsamples ( ) for calls with at least three placeholders (our choice) |
| Method | Qwen | Granite | Gemma | Nemotron |
|---|---|---|---|---|
| Sightline | 86.0 | 84.1 | 86.7 | 81.1 |
| Replacement | 80.2 | 79.6 | 80.5 | 78.7 ∘ |
| LOO | 77.5 | 77.5 | 78.8 | 75.2 |
| ContextCite | 76.6 | 77.2 | 78.1 | 79.1 ∘ |
| RTBAS | 72.9 | 73.3 | 72.9 | 74.1 |
| AT2 | 71.6 | 71.3 | 75.9 | 75.3 |
| Duplicated content ( copies) | Most confident fifth | |||||||
| Method | Qwen | Granite | Gemma | Nemotron | Qwen | Granite | Gemma | Nemotron |
| Sightline | 99.0 | 99.5 | 99.8 | 100.0 | 96.0 | 94.0 | 92.7 | 90.9 |
| Replacement | 91.8 | 88.3 | 90.7 | 90.4 | 87.3 | 90.1 | 89.0 | 88.3 ∘ |
| LOO | 67.1 | 54.0 | 68.8 | 62.0 | 84.2 | 88.9 | 88.2 | 87.0 ∘ |
| ContextCite | 90.4 | 64.9 | 88.1 | 81.5 | 89.7 | 89.4 | 89.7 ∘ | 90.2 ∘ |
| RTBAS | 93.0 | 84.2 | 95.7 | 98.7 | 83.2 | 88.5 | 82.8 | 83.4 |
| Same collection | Another collection | |||||||
| Method | Qwen | Granite | Gemma | Nemotron | Qwen | Granite | Gemma | Nemotron |
| Sightline | 65.6 | 58.5 | 61.6 | 43.9 | 56.2 | 54.4 | 60.1 | 43.8 |
| Replacement | 22.2 | 17.7 | 21.7 | 15.0 | 12.9 | 0.3 | 15.7 | 0.4 |
| LOO | 14.1 | 18.9 | 18.3 | 13.2 | 13.0 | 0.3 | 16.8 | 1.6 |
| ContextCite | 15.8 | 18.8 | 16.3 | 14.6 | 6.9 | 0.5 | 1.3 | 4.2 |
| RTBAS | 29.4 | 19.3 | 14.7 | 26.8 | 28.6 | 29.9 | 12.2 | 36.1 |
| Reader Generator | Qwen | Granite | Gemma | Nemotron |
|---|---|---|---|---|
| Qwen | 86.0 | 84.9 | 85.3 | 83.2 |
| Granite | 85.2 | 84.1 | 84.5 | 83.4 |
| Gemma | 85.7 | 85.4 | 86.7 | 84.3 |
| Nemotron | 82.4 | 82.1 | 82.5 | 81.1 |