Fingerprinting Inference Systems of Large Language Models
This paper reveals that subtle numerical deviations caused by specific inference system components (such as engines, backends, and hardware) propagate to LLM outputs, enabling a new fingerprinting method to reliably identify these underlying systems and demonstrating that completely preventing such identification is fundamentally difficult.
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
The Big Idea: The "Digital Fingerprint" of a Computer
Imagine you order the exact same meal at three different restaurants. Even if they use the same recipe, the food might taste slightly different. One chef chops the onions a tiny bit finer, another uses a slightly hotter pan, and a third stirs the pot in a different order. To a casual eater, the meal looks the same. But to a professional food critic, those tiny differences reveal exactly which kitchen cooked the meal.
This paper argues that Large Language Models (LLMs) work the same way.
When you ask an AI a question, the answer isn't just generated by the "brain" (the model). It is also shaped by the "kitchen" (the inference system) where the cooking happens. This kitchen includes:
- The Engine: The software that manages the conversation (like vLLM or SGLang).
- The Backend: The specific math tools used to process attention (like FlashAttention).
- The Hardware: The physical computer chips (like an Nvidia A100 vs. an H100 GPU).
Even though the math is supposed to be the same, computers don't always calculate numbers in the exact same order. Because of this, tiny, invisible errors (called numerical deviations) happen. The paper shows that these tiny errors are unique to the specific combination of software and hardware used.
How the Attack Works: The "Detective's Quiz"
The researchers created a method to "fingerprint" these systems. They act like a detective who doesn't have access to the kitchen, but can only ask the chef questions and read the menu.
The Strategy:
The detective uses four specific types of "traps" (prompts) to force the computer to reveal its secrets:
- The Rare Token Trap: Asking the AI to recall a weird, strange symbol hidden in a sentence. Tiny math errors can make the AI guess the wrong symbol.
- The Yes/No Trap: Asking a simple question that requires only one step of thinking. This isolates how the computer reads the question before answering.
- The Long Story Trap: Giving the AI a very long text and asking for a specific number inside it. This forces the computer to split the work into chunks, revealing how it handles large tasks.
- The Repetition Trap: Asking the AI to repeat a sentence 100 times. This checks how the computer remembers what it just said (using a "cache").
By feeding these traps to the AI and analyzing the tiny differences in the answers, the researchers built a classifier (a smart sorting machine) that can say with high accuracy: "This answer was cooked on an A100 chip using the vLLM engine."
What They Found
The researchers tested this on many different combinations of software and hardware.
- Perfect Accuracy (The "Zero Temperature" Case): When the AI is set to be very strict and deterministic (no randomness), the fingerprinting works 100% of the time. It's like a perfect match.
- Good Accuracy (The "Chat" Case): When the AI is allowed to be a bit creative (randomness is turned on), the fingerprinting is still very effective, getting it right 76% to 80% of the time.
- Robustness: The method works even if the AI is asked to handle different amounts of data at once or if the system prompt (the AI's instructions) changes slightly.
Why Should We Care? (The Security Risk)
The paper highlights a serious security problem.
Imagine a hacker wants to break into a bank. They need to know if the bank uses a specific type of lock (a specific software engine) to know which key to pick.
- The Vulnerability: If an attacker can identify the "kitchen" (the inference engine and hardware) just by talking to the AI, they can look up known weaknesses (bugs) in that specific software.
- The Result: They can then launch a targeted attack. The paper notes that critical vulnerabilities have already been found in popular engines like vLLM and SGLang. Identifying the system is the first step to exploiting it.
Can We Stop It?
The paper concludes that stopping this is very hard.
- The Dilemma: To stop the fingerprinting, you would have to make every computer calculate numbers in the exact same way, no matter the hardware or software. But this would destroy the benefits of having different, specialized tools (like faster chips or optimized software).
- The Trade-off: You could add "noise" (randomness) to the answers to hide the fingerprint, but this would make the AI less reliable for tasks that need perfect precision, like coding or math.
- The Best Defense: The easiest defense is simply rate limiting. If you limit how many questions a user can ask, it becomes too slow and expensive for a hacker to collect enough data to build a fingerprint.
Summary
This paper reveals that the "kitchen" where an AI cooks its answers leaves a unique, detectable taste in the food. By analyzing these tiny tastes, attackers can identify exactly what hardware and software the AI is running, potentially allowing them to target specific security weaknesses. While we can't easily fix the root cause without sacrificing performance, we can make it harder for attackers to gather the data they need.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.