Microsoft Files Patent for an AI That Attacks Chatbot Filters to Toughen Them
Microsoft's patent pits two AIs against each other: one invents sneaky, rule-breaking requests, and the other learns to block them. The attacker gets better every round because the filter tells it how it did.

- Publication number
- US 2026/0387614 A1(US20260387614A1)
- USPTO patent title:
- Automated Adversarial Training for Filtering Machine Learning Model Inputs
- Applicant
- Microsoft Technology Licensing, LLC
- Filed · Published
- May 30, 2025 · Dec 3, 2026
- Inventors
- Shrey SHAH
- Status when we published
- Waiting for an examiner
- Document
- 20 claims
- US classification
- 706/15
What Microsoft's self-attacking chatbot filter does
Every time you type a question into an AI chatbot, something has to decide whether the request is okay to answer. Ask for help hotwiring a car and a good chatbot says no. Ask it to play your grandmother telling a bedtime story that happens to include hotwiring instructions, and the chatbot may happily comply.
Microsoft's patent describes a way to train the gatekeeper against that kind of trickery. One AI plays the trickster, inventing fake sneaky requests that should be refused. A separate, smaller AI acts as the filter, practices on each one, and reports back on how well it did. The trickster uses that report to write a harder attempt next time.
The loop repeats until a stopping point is reached, such as a set number of rounds. Because the filter is its own model, it can be retrained without touching the main chatbot.
generating, by an adversarial training model and based on at least a portion of feedback received from the input filtering model, an adversarial sample for the input filtering model, wherein the adversarial sample comprises a sample input for a machine learning model that should be rejected by the input filtering model; …
Translation: One AI creates tricky test inputs designed to slip past the safety filters of another AI.
How the attacker AI and the filter train each other
The patent covers a training method for an input filtering model, a separate AI that checks every request before it reaches the main model (such as a large language model, the type behind chatbots). The filter either passes a request along or rejects it.
To train it, a second AI called the adversarial training model (a model built to attack) writes sample requests that should be rejected, such as simulated jailbreak attacks (prompts built to trick a chatbot into breaking its own rules). Each sample is handed to the filter as training data. The filter then sends back feedback, which can be a number describing how accurately it classified the sample, such as a loss gradient (a math signal showing how wrong the filter was and which way to adjust).
The attacker folds that feedback into its next prompt and writes a different, harder sample. The loop runs until a stopping rule is met, such as a set number of rounds, a time limit, or a score that stops changing.
The claims also cover using the trained filter:
- Accepted requests go on to the main model.
- Rejected requests are blocked.
- If the main model refuses something the filter let through, that request can be added to the filter's training data.
Why a separate filter is easier to keep current
If you use an AI chatbot, its guardrails are only as good as the last trick someone tried. A separate filter trained against a stream of automatically written attacks could catch new tricks sooner, and the chatbot itself would not need a full retraining to get the fix. The filing says filters like this are cheaper to train than the main model, so a company could run different safety rules for different regions.
There is a catch the filing admits: too many training rounds can make a filter overly strict and block normal requests. That matters to you as a user, since an overcautious filter is the one that refuses your harmless question. The filing offers no test results, so how well this works stays an open question.
Microsoft's 41st filing we've tracked since July in the AI guardrails race follows one on catching hijacked AI assistants and one on fact-checking database answers.
Source: US 2026/0387614 A1 at the USPTO (PDF). Full patent text and figures are in the official publication.
Get our take in your Top Stories
Liked this breakdown? Add Patentlyze as a preferred source on Google, and our plain-English take shows up more often in your Top Stories the next time Microsoft patent news breaks.
We read the new patents from Big Tech, carmakers and more and send you the ones worth knowing. Plain English, free, every week.
The drawings · 8 sheets
8 drawing sheets from US 2026/0387614 A1 · click any drawing to enlarge

No comments yet