Just out todayAgritech: Texts to Ugandan farmers moved what they knew and what they thought, and not what they didArtificial intelligence: An AI trained on 142 cervical photographs reached an AUC of 0.70, and found the obvious casesUncategorized: Two satellites spotted wheat stem rust in Ethiopian plots before it was severe, and the blue band did the work

Artificial intelligence

The Attack Went From 97 Percent To 10 By Changing Where It Looks

Instead of filtering text, this defence changes where the model's attention is allowed to go. The strongest attack dropped from 97 percent success to 10, with no loss of ordinary ability.

What the paper found

Heads of Security adds a small set of learned per-head attention gates that teach each attention head how to redistribute attention between trusted and untrusted tokens, building instruction-data separation into the model rather than filtering text. The RL-Hammer attack reached 97% success against GPT-OSS-20B and 85% against SecAlign, but only 10% against HoS, and a white-box attack strengthened against HoS needed three times more compute to match its success elsewhere. HoS also preserved base-model utility where the compared defences degraded in few-shot settings.

Grade 7 reading level5 min readPreprint · not yet peer reviewed

What happened

Everything an AI model reads arrives as one stream of text. Your instruction, the web page it fetched, the file it opened, the tool’s reply. All the same kind of thing, all in the same place.

That is the root of prompt injection. There is no marker in the stream saying “this part is an order and that part is just information”. So an instruction hidden in a web page can look exactly like an instruction from you.

Most defences try to fix this from outside: inspect the incoming text, spot the suspicious bits, delete them. That is filtering, and filtering can always be reworded around.

This paper tries something else. Instead of changing what the model reads, it changes how the model is allowed to read it.

The test

Inside a model, attention is the mechanism that decides which words matter when producing the next one. It is divided across many separate attention heads, each learning its own habits.

Heads of Security adds a small learned gate to each head. The gate controls how that head splits its attention between trusted text and untrusted text. Nothing is deleted. The model can still read the whole web page and reason about it. It just cannot treat the page’s words as orders in the way it treats yours.

They tested on two models, Llama-3.3-70B-Instruct and GPT-OSS-20B, against two comparisons: SecAlign++, a fine-tuning defence, and ASIDE, another architectural one.

Crucially, they also did the test that most defence papers skip. They let an attack be strengthened specifically against their own defence, and then ran it.

The result

Against RL-Hammer, a strong black-box attack, the undefended GPT-OSS-20B fell 97 percent of the time. SecAlign fell 85 percent of the time. Heads of Security fell 10 percent of the time.

Then the adaptive test. Claudini, a white-box attack strengthened against HoS using automated research, needed three times more computing power to reach the same success rate on HoS that it reached on the undefended model. That does not mean HoS is unbreakable. It means breaking it costs more, which is what a real defence looks like.

The other half of the result is about not paying for safety. HoS kept the base model’s ordinary ability across standard benchmarks and prompting styles. SecAlign and ASIDE both degraded in few-shot settings. ASIDE in particular struggled with tool use, managing only 10 percent utility — which is to say it was safe and nearly useless.

Why does an attention gate hold where a filter leaks? This is because a filter has to recognise the attack, and recognition can always be dodged by rephrasing. A gate does not care what the text says. It cares where the text came from. YOU CANNOT REWORD YOUR WAY OUT OF BEING UNTRUSTED.

What it means

There is a fork in this field, and this paper argues for one side of it. Either you keep inspecting content, forever, against attackers who keep rewriting it. Or you build the distinction between instruction and data into the model, so that where text came from is part of how it is processed.

The second approach is harder to deploy, because it means touching the model rather than wrapping it. But it does not depend on predicting the attack.

Therefore the practical question for a buyer is which kind of defence they are being sold. If it works by recognising bad text, it has an expiry date.

Business ideas from this paper

1. Adaptive-attack testing for security vendors. The reason this paper is believable is that it ran an attack built against itself. Almost no commercial claim does. Offer that as an independent test. Buyer: vendors selling injection defences, and the enterprises buying them. First test: strengthen one known attack against one vendor’s product and report the before and after.

2. Utility regression testing for safety layers. ASIDE’s 10 percent utility on tool use is the cautionary tale: a defence can be safe and unusable. Sell the check on ordinary performance after a safety change. Buyer: platform teams who just shipped a filter. First test: measure one customer’s task completion with the safety layer on and off.

3. Trusted-source labelling for existing pipelines. The whole idea rests on knowing which text is trusted. Most systems do not track that at all. Sell the plumbing that tags text by origin before it reaches the model. Buyer: companies with in-house assistant pipelines. First test: instrument one pipeline and report what fraction of incoming text has no recorded origin.

How sure can you be?

Among the more convincing defence papers of the year, with the usual caveats.

What earns trust: the adaptive attack, run against their own method, with the cost of breaking it reported. Comparing against two different kinds of existing defence rather than one. Reporting utility as well as safety, including the finding that a rival defence becomes nearly useless for tool use.

What to hold back: no peer review yet. Two open models, so nothing here tells you how it behaves on a closed frontier model, and the method requires access to the model’s internals, which most buyers do not have. A 10 percent success rate is a large improvement and still a real exposure. And the three-times-more-compute figure is a cost to one attacker with one budget; a better-resourced attacker is a different calculation.

Do this today

Next time you are shown a security number, ask what the attacker knew. An attack that had never seen the defence and an attack designed to beat it produce very different figures, and only one of them tells you about next year.

Mark Alex

Mark Alex

Writes Just Out Tech. Founder and Managing Director of Real Biz Digital. Connect on LinkedIn.

Every article here is read against the paper it reports, and carries its own credibility score.

Source: Heads of Security: Learned Attention Gates Improve Prompt Injection Robustness, October 2026. arXiv:2610.37657 · arxiv.org (preprint · not yet peer reviewed).

Just Out Tech explains new research in plain language. This article was drafted with AI assistance and checked by a human against the original source.

What to remember
  • Heads of Security enforces instruction-data separation with a small set of learned per-head attention gates, letting models reason over untrusted content without following instructions inside it (arXiv:2610.37657).
  • The black-box RL-Hammer attack reached 97% success against GPT-OSS-20B and 85% against SecAlign, but only 10% against HoS.
  • Claudini, a white-box attack strengthened against HoS through autoresearch, required three times more compute to reach the same success rate on HoS as on the undefended models.
  • HoS preserved base-model utility across standard multiple-choice benchmarks and prompting setups, whereas SecAlign and ASIDE degraded in few-shot settings.
  • ASIDE, the other architectural defence compared, struggled badly with tool use, achieving only 10% utility.
Where this really is

Benchmark evaluation on two open models against adaptive attacks. No production deployment is reported.

Questions people ask

What is an attention gate?

A learned control on how much each part of the model attends to trusted versus untrusted text, rather than a filter that deletes words.

Why test an attack built against the defence?

Because defences that only face old attacks tend to collapse when someone designs one for them. This paper did that test.

Is 10 percent good enough?

It is far better than 97, and not zero. A one-in-ten success rate is still a serious exposure at scale.

About the author

Mark Alex

Mark Alex is the founder and Managing Director of Real Biz Digital, a technology company operating out of Nairobi since 2018. He works in agentic AI and the Model Context Protocol, AI governance, enterprise software architecture and cybersecurity. He holds an MSc in Mechatronical Engineering from Obuda University in Budapest and a BSc in IT, Forensic Technology and Cybercrime, from USIU-Africa in Nairobi, and has published IEEE conference research on an AI-powered digital twin for greenhouse systems. He is the author of seven books. Between 2020 and 2024 he mentored more than 200 university students and interns in Nairobi. He writes every Just Out Tech article from the original research paper.