Get the newsletter
Microsoft · AI / ML · Filed May 30, 2025 · USPTO published Dec 3, 2026 · This week's release

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.

An AI system tests a safety filter with tricky prompts to teach it how to catch and block harmful requests before they reach a chatbot. Drawing from patent filing US 2026/0387614 A1.
An AI system tests a safety filter with tricky prompts to teach it how to catch and block harmful requests before they reach a chatbot.All 8 drawings ↓
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.

From the filing · CLAIM 1
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.

There are more where this came from

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

Training a prompt filter to protect a chatbot, drawing sheet 1 from US 2026/0387614 A1
Sheet 1 Training a prompt filter to protect a chatbot
Generating bad prompts to practice catching them, drawing sheet 2 from US 2026/0387614 A1
Sheet 2 Generating bad prompts to practice catching them
Training the attacker first so it produces tougher prompt tests, drawing sheet 3 from US 2026/0387614 A1
Sheet 3 Training the attacker first so it produces tougher prompt tests
Deciding whether user requests reach the chatbot or get blocked, drawing sheet 4 from US 2026/0387614 A1
Sheet 4 Deciding whether user requests reach the chatbot or get blocked
Catching harmful prompts that slipped past the outer filter, drawing sheet 5 from US 2026/0387614 A1
Sheet 5 Catching harmful prompts that slipped past the outer filter
Updating the prompt filter when the chatbot blocks attacks, drawing sheet 6 from US 2026/0387614 A1
Sheet 6 Updating the prompt filter when the chatbot blocks attacks
Computer hardware running the safety filters and chatbot models, drawing sheet 7 from US 2026/0387614 A1
Sheet 7 Computer hardware running the safety filters and chatbot models
Cloud servers hosting the AI security services, drawing sheet 8 from US 2026/0387614 A1
Sheet 8 Cloud servers hosting the AI security services
Patent filing page

More in AI assistant & agent

All 491 AI assistant & agent patents →

Watchlists this filing belongs to

All watchlists →
Reader comments

No comments yet

Start the discussion

Real name or a handle, either is fine. Comments are read by a person before they appear, so allow a little time. Keep it about the filing.