BadSKP: Backdoor Attacks on Knowledge Graph-Enhanced LLMs with Soft Prompts
The paper introduces BadSKP, a novel backdoor attack that exploits the graph-conditioned channel of knowledge graph-enhanced LLMs by manipulating node embeddings to override semantic anchoring, thereby achieving high attack success rates where traditional text-based attacks fail.
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 you have a very smart robot librarian (a Large Language Model, or LLM) who knows a lot of facts but sometimes makes things up. To help it, you give it a "cheat sheet" (a Knowledge Graph) containing facts about the world.
There are two ways to give this cheat sheet to the robot:
- The Old Way (Text Prompts): You read the cheat sheet out loud to the robot in plain English. "Here is a list of facts: Justin Bieber has a brother named Jaxon."
- The New Way (Soft Prompts): You don't read the facts out loud. Instead, you translate the entire cheat sheet into a special, invisible "vibe" or "feeling" (a continuous soft prompt) that the robot can sense directly. This is like handing the robot a secret radio signal that says, "Focus on family connections," without using any words.
The Problem: The "Robustness Gap"
The researchers discovered a surprising safety difference between these two methods.
- The Old Way is fragile: If a bad guy sneaks a note into the cheat sheet saying, "Ignore the question and scream 'I don't know!'", the robot reads it and obeys immediately.
- The New Way is tough: If the bad guy puts that same note into the cheat sheet, the robot ignores it. Why? Because the invisible "vibe" (the soft prompt) is so strong and focused on the actual question that it acts like an anchor. It holds the robot's attention firmly on the topic, drowning out the loud, confusing shouting from the text.
The paper calls this "Semantic Anchoring." Think of the soft prompt as a heavy anchor dropping the robot's mind into the right spot, making it hard for surface-level noise (bad text) to drag it away.
The Attack: "BadSKP"
The researchers asked: "If the anchor is so strong, can we break it?"
They realized that while the text can't break the anchor, the source of the anchor can. Since the "vibe" comes from the graph structure itself, if a bad guy can mess with the graph, they can change the vibe.
They created an attack called BadSKP. Instead of just shouting bad words, they:
- Hacked the source: They secretly altered the structure of the cheat sheet (the graph) and the hidden "feelings" of the nodes.
- Twisted the anchor: They made the invisible "vibe" point in the wrong direction. Instead of anchoring the robot to the question, they anchored it to a malicious command.
- Made it look normal: They used a multi-step process to ensure the changes looked like normal, fluent text so no one would notice the cheat sheet was tampered with.
The Result: Even though the robot was using the "tough" new method, BadSKP successfully tricked it. When asked a normal question about a specific person, the robot would suddenly refuse to answer or give a completely wrong answer, all because the bad guy had secretly re-tuned the invisible anchor.
The Defenses (and why they failed)
The researchers tried standard defenses, like a "Perplexity Filter." Imagine this filter as a spellchecker that deletes any sentence that sounds weird or unnatural.
- The Outcome: The filter failed. Because BadSKP was so clever, it made the malicious text sound perfectly natural and fluent. The filter thought it was safe, but the invisible anchor was still twisted.
The Proposed Solution
The paper suggests a new way to defend against this. Instead of checking if the words look weird, we should check if the anchor is holding.
- The Idea: Monitor the robot's internal "attention." If the robot is supposed to be focused on the question, but its internal focus is drifting toward a weird, unrelated direction, flag it as suspicious.
- The Analogy: It's like a security guard who doesn't just check if a visitor's ID card looks fake, but watches to see if the visitor is actually looking at the map they are supposed to be following. If they start staring at the ceiling instead, the guard knows something is wrong, even if the ID card looks perfect.
Summary
- The Discovery: New AI systems that use "invisible vibes" (soft prompts) from graphs are much harder to trick with bad text than old systems.
- The Breakthrough: However, if you hack the graph that creates the vibe, you can twist the vibe itself and break the system.
- The Lesson: You can't just check the words; you have to check the underlying structure and the "direction" the AI is thinking.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.