SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2505.16947 · NeurIPS · 2025

MIXAT: Combining Continuous and Discrete Adversarial Training for LLMs

Martin Vechev, Dimitar Dimitrov, Robin Staab, Csaba Dékány, Stefan Balauca, Ohridski Kliment, St

arXiv · PDF · Open in the Atlas

Code that ran

3 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 2 failures of our instrument; 4 no recorded run), measured 2026-11-24; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2505.16947.json · badge: /api/ran/2505.16947.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
insait-institute/mixat canonical (classifier label)
classifier basis: classifier_2025
3 ran · 4 no recorded run
FunctionStatusWhere it lives
SignSGD Ran
ran on a synthesized input
insait-institute/mixat/Continuous-AdvTrain/src/embedding_attack.py
pointer only (licence: NONE) · get_code("ae2525dcaa96bdca")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, insait-institute/mixat when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

acquireLock Ran
ran; our contract draft was wrong, not the code
insait-institute/mixat/Continuous-AdvTrain/src/run_experiments.py
pointer only (licence: NONE) · get_code("dfef7ce9fc6e4f99")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, insait-institute/mixat when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

init_method Ran
ran; our contract draft was wrong, not the code
insait-institute/mixat/Continuous-AdvTrain/src/embedding_attack.py
pointer only (licence: NONE) · get_code("6a54aacfed3ea348")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, insait-institute/mixat when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

EmbeddingSpaceAttack Not yet run
unverified (harvested, no recorded run)
insait-institute/mixat/Continuous-AdvTrain/src/embedding_attack.py
pointer only (licence: NONE) · get_code("6d1289ea3b720d55")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, insait-institute/mixat when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

MixedAttackPerturbedPAPGCG Not yet run
unverified (harvested, no recorded run)
insait-institute/mixat/Continuous-AdvTrain/src/embedding_attack.py
pointer only (licence: NONE) · get_code("76278add27ce94bb")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, insait-institute/mixat when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

_init_ray Not yet run
unverified (harvested, no recorded run)
insait-institute/mixat/Continuous-AdvTrain/src/embedding_attack.py
pointer only (licence: NONE) · get_code("fc9f3839799621c1")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, insait-institute/mixat when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

get_method_class Not yet run
unverified (harvested, no recorded run)
insait-institute/mixat/Continuous-AdvTrain/src/embedding_attack.py
pointer only (licence: NONE) · get_code("5ee92d39906719a2")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, insait-institute/mixat when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 later) and 6 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
acquireLock 1 other paper
1 dated earlier
2405.15589 (2024-05)
Efficient Adversarial Training in LLMs with Continuous Attacks

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Despite recent efforts in Large Language Model (LLM) safety and alignment, current adversarial attacks on frontier LLMs can still consistently force harmful generations. Although adversarial training has been widely studied and shown to significantly improve the robustness of traditional machine learning models, its strengths and weaknesses in the context of LLMs are less understood. Specifically, while existing discrete adversarial attacks are effective at producing harmful content, training LLMs with concrete adversarial prompts is often computationally expensive, leading to reliance on continuous relaxations. At the same time, despite their effectiveness and generalization capabilities, training with continuous perturbations does not always capture the full spectrum of vulnerabilities exploited by discrete attacks. In this work, we aim to bridge this gap by introducing MIXAT, a novel method that combines stronger discrete and faster continuous attacks during training. We rigorously evaluate MIXAT across a wide spectrum of state-of-theart attacks, proposing the At Least One Attack Success Rate (ALO-ASR) metric to capture the worst-case vulnerability of models. We show MIXAT achieves substantially better robustness (ALO-ASR < 20%) compared to prior defenses (ALO-ASR > 50%), while maintaining a runtime comparable to methods based on continuous relaxations. We further analyze MIXAT in realistic deployment settings, exploring how chat templates, quantization, low-rank adapters, and temperature affect both adversarial training and evaluation, revealing additional blind spots in current methodologies. Our results demonstrate that MIXAT's discrete-continuous defense offers a principled and superior robustness-accuracy tradeoff with minimal computational overhead, highlighting its promise for building safer LLMs. We provide our code and models at https://github.com/insait-institute/MixAT.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2505.16947")
get_code_for_paper("2505.16947")
have("2505.16947")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2505.16947.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2505.16947.svg)](https://syntology.ai/paper/2505.16947)

Connect an agent — have() is free.