Build · OpenEnv Hackathon India 2026
Published · 2 min read
I trained an AI to lie to another AI
PHANTOM is an environment where an AI defender contains a live breach while an adversary AI feeds it fake security logs in real time. Why the attack goes through the logs, why both sides learn at once, and why I used GRPO, a curriculum and an LLM as the judge.
Most security AI assumes its inputs are telling the truth. A defender model reads the logs, sees an intrusion and responds. An attacker who's already inside can go after the logs themselves. If the defender sees the world through logs, the cheapest attack is to lie in them.
So I built PHANTOM for the Meta × PyTorch × Hugging Face OpenEnv Hackathon India 2026. An AI defender works a live breach while an adversary AI feeds it fake SIEM entries in real time about what's happening.
The attack goes through the logs
I could have made the adversary attack harder, with more intrusions and faster moves. That trains a fast defender.
Attacking through the logs trains a defender that doesn't believe everything it reads. It has to cross-check, notice contradictions and act on evidence that holds up, whatever the latest log line claims. Once someone is inside, that's the skill that matters.
Both sides learn
A fixed adversary gets memorised. The defender learns its five tricks and looks great until it meets a sixth.
So both agents learn against each other with multi-agent reinforcement learning. As the defender gets better at spotting fake logs, the adversary gets better at writing convincing ones. Real security works like that too: every defence teaches attackers what to try next.
GRPO
For training I used GRPO (group relative policy optimisation). You skip training a separate model to estimate how good each situation is. The policy tries the same situation several times as a group, and the attempts are compared against each other. Better than the group average gets reinforced, worse gets discouraged.
It's simpler than the classic setup, and it fits when all you can really judge is whether one response beat another.
Start easy
A defender thrown straight at a skilled liar just fails over and over and learns nothing.
So there's an adaptive curriculum. Early on the deception is clumsy and the breach is simple, and the environment gets harder as the defender improves. The goal is to keep it at the edge of what it can handle, because that's where it learns.
An LLM as the judge
"Did it block the right IP" is easy to score. "Did it reason sensibly about conflicting evidence" isn't something you can write a simple rule for.
So a language model scores the responses. It can weigh reasoning in a way rules can't, and it brings its own biases. A judge you can't fully check is a risk, and I wouldn't trust its scores for anything that matters without more work on that.
What I took from it
The interesting failure in AI security is a model that sees exactly what it's shown and believes it. A defender that trusts every input will follow the attacker's story.
By Aditya Dutt Pandey, CTO of tunyt