Chiosa
Software & Code

Sightline tracks which prompt inputs an LLM output uses

Sightline: Calibrated Data-Flow Summaries for LLM-Integrated Applications · arXiv:2611.26221

3 min
Updated

In plain words

Programs often pass several pieces of text into an LLM. A program analysis needs to know which pieces shaped the answer, because assuming all did can spread data labels unnecessarily.

Sightline reads the recorded prompt and answer, measures which prompt parts the model attended to, then learns which reading patterns signal use. In tests on four models and repository families excluded from training, it was more accurate than seven compared methods. Its miss guarantee is an average per call site under a sampling assumption.

The research

For analyses that track untrusted data, treating every prompt part as used can carry labels into outputs that never depended on it. A summary that can discard unused inputs while bounding missed real flows changes how precisely these analyses can follow data across an LLM call.

Sightline turns a recorded LLM call into a calibrated data-flow summary, using learned attention-reading patterns to report used prompt inputs while bounding missed flows.

For each model, the team trained Sightline’s readout and chose its point threshold on an older batch, then compared it with seven methods on new calls from repository families absent from training. Sightline had the highest Macro-F1, the mean of the two classes’ F1 scores, on all four models; on the three transformer models, it led the strongest baseline by 4.5–6.2 points. This supports more accurate flow summaries in these tests.

The study reconstructs prompt values from code rather than observing application values in production at scale. Its miss bound is an average per call site and depends on deployment repository families being exchangeable with calibration families.

What the evidence shows

  • The missing call summary

    Sightline is a data-flow summary system for recorded LLM calls. Program analyses use summaries to track which inputs reach an output when the called system has no program code to inspect.

    If every prompt placeholder is treated as used, labels can spread from inputs the model ignored. Sightline aims to prune those non-flows while bounding how often it misses true flows.

  • Reading is evidence, not a verdict

    The system uses attention as evidence because, in the paper’s transformer model, information moves between token positions through attention routes. But reading a placeholder does not by itself mean the output used it.

    Sightline therefore keeps per-head reading measurements and trains a readout on labeled calls to identify which reading patterns signal use. Calibration then sets the threshold for reporting a flow.

  • A stronger held-out comparison

    On repository families absent from training, Sightline had Macro-F1 scores of 81.1–86.7% across four models. Macro-F1 averages the F1 scores for used and unused inputs.

    On the three transformer models, it led the strongest baseline by 4.5–6.2 percentage points. This comparison supports the claim that its summaries classified input-to-output reach more accurately in these tests.

  • Duplicated values expose a weakness

    This contrast shows why removal can misclassify duplicated inputs: deleting one copy may leave the answer unchanged, while Sightline can still distinguish the value-bearing span from a distractor.

  • Pruning carries into a client

    These calibration comparisons show that Sightline can prune spurious flows while keeping missed true flows near its 1% per-call-site target, including when calibration and evaluation use different repository collections.

    In one Qwen3-8B agent test, its summaries let an integrity rule blocking side-effecting calls with untrusted labels stop all 34 tested attack calls. These results support a bounded use for the summary in label tracking and control.

Deep

Next paperA verifier prunes eBPF branches with no possible register value