Original title: Permutation-Based Stegomalware in Large Language Models: Threats and Countermeasures
Danny Wood, James Stringer · September 2026
Because large language models are hard to train and widely used, attackers can hide malicious payloads directly inside model weights. This threat is called stegomalware. Researchers studied behavior-preserving symmetries, which are ways to shuffle an AI model's internal parts without breaking how it works. By swapping these parts around, defenders can scramble hidden data, but attackers can also use the same shuffling to hide malware. The researchers discovered that defenders can choose permutations that displace all model parameters. This fixes an issue with older defenses, which left a significant percentage of weights untouched in large language models. They also showed attackers can use these symmetries to hide malware losslessly without retraining or needing payload-specific extraction scripts. Although shuffling can accumulate numerical errors in practice, tests showed that performance loss for both attack and defense is minimal.
Imagine you have a set of numbered lockers, each containing a secret message. Normally, you can rearrange the lockers without changing the messages inside. But if someone hides a bomb in one locker, rearranging might spread the danger. Here, the lockers are the model's weights, and the messages are the model's behavior. The researchers show that by carefully rearranging all lockers, they can either hide a bomb (attack) or make sure no bomb is left (defense), with almost no effect on the messages.
If you use a large language model, its weights could secretly contain malicious code. This paper shows that the same mathematical property that lets attackers hide that code can also be used to scrub it out, with almost no harm to the model's performance. That means safer deployment of LLMs, but also a new threat to watch for.
The method is theoretically lossless but introduces numerical error in practice, though the authors show this error is minimal. The paper focuses on permutation symmetries and does not address other types of weight symmetries or other model architectures. The defense and attack methods are demonstrated only for LLMs; applicability to other neural networks is not established.
Ask anything about this paper. Answers come from its abstract, and say so when the abstract doesn't cover your question.
Permutation-Based Stegomalware in Large Language Models: Threats and Countermeasures — Danny Wood, James Stringer
Abstract licence: CC0
Explanation generated by Synthesis from the abstract — it is not the original paper. This is a preprint, so it hasn't necessarily been peer reviewed.