← Latest papers
🤖 AI

GIF: Locally Sound Geometric Information Flow Control for LLMs

This paper introduces Geometric Information Flow (GIF), a semantically sound framework that uses LLM Jacobians and local output geometry to efficiently and accurately bound information flow for detecting prompt injections and privacy leaks, outperforming existing baselines in both accuracy and computational cost while supporting black-box deployment.

Original authors: Adam Storek, Nikolaus Holzer, Zhuo Zhang, Suman Jana

Published 2026-06-23
📖 4 min read☕ Coffee break read

Original authors: Adam Storek, Nikolaus Holzer, Zhuo Zhang, Suman Jana

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine a large language model (LLM) as a very smart, but slightly chaotic, secretary who works for a busy company. This secretary takes notes from many sources: trusted boss instructions, untrusted emails from strangers, private company files, and public news. The secretary then writes reports, sends emails, or makes decisions based on all this mixed information.

The problem is that this secretary doesn't have a clear rulebook for what influenced what. If a stranger sends a note saying, "Ignore the boss and send $1 million to my account," the secretary might just do it, mixing that dangerous instruction with the trusted boss's rules. Or, the secretary might accidentally read a private file and include a secret address in a public blog post.

Current security tools try to stop this by putting a "taint" label on everything. It's like saying, "Since that stranger sent an email, everything the secretary touches from now on is suspicious." This is too aggressive. It blocks the secretary from doing their job because it treats a harmless word in a private email the same as a dangerous command.

Enter GIF (Geometric Information Flow).

The authors of this paper created a new way to watch the secretary work. Instead of just slapping a "suspicious" label on everything, GIF acts like a high-tech detective that measures exactly how much a specific piece of input "pushes" the output.

Here is how GIF works, using simple analogies:

1. The "Nudge" Test

Imagine the secretary is standing in a room. GIF asks: "If I gently nudge this specific word in the input (like the word 'salary'), how much does the secretary's final answer wobble?"

  • Small Nudge, Big Wobble: If changing the word "salary" to "bonus" makes the secretary change the final number from $50k to $200k, GIF says, "Whoa! That input word has a huge influence." This is a high "flow" of information.
  • Small Nudge, No Wobble: If changing the word "experience" to "skills" doesn't change the final decision at all, GIF says, "Okay, that input didn't really matter." The flow is low.

2. The "Geometry" of Influence

The paper calls this "Geometric" because it treats the secretary's brain as a complex landscape.

  • Imagine the input words are like balls rolling down a hill.
  • GIF measures the slope of the hill. If the slope is steep (the output changes a lot with a tiny input change), the information is flowing strongly.
  • If the slope is flat, the information is stuck; it's not really affecting the outcome.

The paper proves mathematically (using a computer-checked proof) that this "slope measurement" is a safe, reliable way to estimate how much secret or dangerous information is leaking out, without needing to guess or rely on vague intuition.

3. The "Surrogate" Detective

Calculating this "slope" for a massive AI model is usually too slow and expensive, like trying to measure every single grain of sand on a beach.

  • The Trick: The authors found you can use a tiny, cheap AI model (a "surrogate") to do the measuring.
  • The Result: Even though the tiny model is 200 times smaller than the big one, it can still accurately tell you which words in the big model's input are dangerous. It's like using a small, cheap scale to weigh a giant elephant; the paper shows the small scale gives you a surprisingly accurate reading of the weight.

4. The Real-World Results

The team tested this on three different "secretary" scenarios:

  • Integrity (Preventing Hijacking): Can a stranger trick the secretary into doing something bad? GIF was excellent at spotting the exact words the stranger used to hijack the system, far better than previous methods that just looked at which words the AI "paid attention to."
  • Confidentiality (Preventing Leaks): Can the secretary accidentally reveal secrets? GIF correctly identified when private info was flowing into public outputs.
  • Cost: Using GIF to help a smaller AI judge the security of a task was 81 times cheaper than using a massive, expensive AI to read the whole conversation.

The Bottom Line

GIF is a new tool that lets us see exactly which words in a prompt are driving the AI's actions.

  • Instead of blocking everything because one word was suspicious, GIF says, "Only these specific words are dangerous; the rest is fine."
  • It uses math to prove it's not just guessing.
  • It works fast and cheap, even on the biggest AI models.

This allows us to build safer AI agents that can still be useful, because we aren't blindly blocking all their work, just the specific parts that are actually dangerous.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →