Fixed-Set Robustness in Programming by Example: Example Corruption and Semantic Partition Recovery
This paper investigates the vulnerability of Programming-by-Example systems to worst-case adversarial example corruption, demonstrating that while semantic partition aggregation can recover from low-margin attacks, it often fails on realistic tasks where vote margins are narrow, revealing a critical robustness gap missed by traditional noisy-example evaluations.
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 are teaching a robot how to sort your emails. You give it three examples:
- "Meeting with Bob" → Bob
- "Call from Alice" → Alice
- "Lunch with Charlie" → Charlie
The robot looks at these examples, figures out the pattern ("take the name after the last word"), and writes a program to do this forever. This is called Programming by Example (PBE). It's how tools like Excel's "Flash Fill" work.
This paper asks a scary question: What if someone tries to trick the robot on purpose?
The "Tricky Teacher" Attack
Most research assumes mistakes happen by accident, like a user typing "Alic" instead of "Alice" (a typo). The robot is usually good at ignoring these small slips.
But this paper studies a smart attacker. Imagine a hacker who sees exactly how the robot learns. They don't just make random typos; they carefully change one single example to force the robot to learn the wrong rule.
The Analogy:
Think of the robot's learning process as a courtroom.
- The Evidence: Your three examples are the witnesses.
- The Verdict: The program the robot writes.
- The Attack: The hacker doesn't shout random nonsense. They whisper one specific lie to one witness that makes the robot think the rule is "Take the second word" instead of the "last word."
- The Result: The robot now thinks the rule is "Take the second word." So, for "Meeting with Bob," it outputs "Meeting." It looks like it's following the rules, but it's actually broken.
The paper found that for many simple tasks, one single, carefully chosen lie can break the robot completely, whereas hundreds of random typos might not break it at all.
The "Group Vote" Defense (VPA)
The authors tried to build a shield called Version-Space Partition Aggregation (VPA).
The Analogy:
Instead of asking the whole class for the answer at once, the teacher splits the students into small, separate groups.
- Group A gets the first two examples.
- Group B gets the next two examples.
- Group C gets the last two examples.
Each group writes down their own rule. Then, the teacher asks: "What did the majority of groups say?"
- When it works: If the examples are diverse and clear, even if the hacker tricks Group A, Groups B and C will still figure out the right rule. The majority vote saves the day.
- When it fails: The paper found that if the examples are too similar (a "low-margin" situation), the hacker can trick every group with just a few lies. If the hacker controls the majority of the groups, the "Group Vote" defense collapses, and the robot still learns the wrong rule.
The Main Takeaways
The paper doesn't claim that all AI is broken. Instead, it draws a clear line in the sand:
- Random mistakes are easy to handle; smart lies are hard. If you just fix typos, you aren't safe. You need to worry about someone intentionally changing the data to steer the AI.
- The "Vote" only works if the truth is obvious. If your examples are all very different from each other, the "Group Vote" defense works great. But if the examples are ambiguous, a smart attacker can trick the whole system.
- It's a "Fixed Set" problem. This is about when you give the AI a small, fixed list of examples (like 3 or 5). If that list is small, it's very fragile.
The "LLM" Side Note
The authors also tested this on modern AI chatbots (LLMs) using a similar setup. They found that even big, smart AI models can be tricked by changing just one example in a prompt. If you ask an AI to "do X based on these examples," and you change one example to be slightly misleading, the AI might completely change its behavior.
Summary
This paper is a warning label for anyone using "learn from examples" tools. It says: "Be careful. A single, well-placed lie can break the system, and simple defenses like 'voting' only work if the examples are very clear. If the examples are fuzzy, the system is vulnerable."
It doesn't say these tools are useless, but it tells us exactly where they are weak so we can build them better.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.