arXiv:2608.25681cs.LGAug 2026

Manuscript Offprint

arXiv:2608.25681

Adversarial Training of Linear Models under Stealthy Attacks

Lovisa Eriksson, Dave Zachariah, André M. H. Teixeira

Lovisa Eriksson, Dave Zachariah, and André M. H. Teixeira

Abstract—Predictive models are widely used in many fields, but are vulnerable to false data injection attacks. To address this, detection schemes and adversarial training have been proposed, but such approaches lack guarantees against stealthy attacks. We therefore propose a detector-based switched model, in which optimal attack strategies are stealthy. For linear prediction models, we derive a convex formulation of the resulting adversarial risk. The model incorporates protected features and introduces a hyperparameter modelling attack probability, enabling an explicit performance trade-off between clean and attacked data regimes. Numerical simulations on real and synthetic data show improved performance on partially attacked data, even for misspecified attack probabilities.

Index Terms—Adversarial machine learning, False data injection attacks, Detection, Robust estimation

I. INTRODUCTION

A basic idea for most modern machine learning algorithms is that a predictive model can be optimized on a set of past data such that it performs well on new data. However, in reality, the new data may not be drawn from the same distribution as the past data, due to natural variations [1], or false data injection attacks [2]. Applying a model to data subject to attacks presents a particular challenge since the new data is intentionally crafted to deteriorate the model performance [3].

False data injection attacks have been extensively studied, both in machine learning [3], [4], [5] and adjacent fields such as control theory [2]. To make the problem feasible, different assumptions are put on the attacker. Existing work either imposes a limit on the size of attack perturbations [3], [5] or imposes stealthiness [6], [7]. Classical robust statistics studies estimators under bounded contamination and worst-case deviations from nominal assumptions [1], but without analytically characterizing the resulting performance trade-off's across regimes. Common defence mechanisms include adversarial training and detection schemes. Adversarial training [5], [8] improves robustness through the generation of static perturbed examples, thus limiting the defence against unforeseen and adapting attacks. Detection schemes against adversarial examples has been shown infective against stronger, tailored attacks [4].

To address these gaps simultaneously, we consider the use of a predictive model that switches mode depending on whether an attack detector triggers an alarm or not. Importantly, the attack can be stealthy and we consider the possibility that some features of the new data can be protected. Formal results are derived for linear models. Our main contributions are (i) a method that makes explicit trade-offs between accuracy on clean and attacked data, (ii) deriving adversarial stealthiness as a consequence of the proposed prediction model, and (iii) providing explicit convex formulations for adversarial training of linear models under stealthy attacks. Numerical experiments illustrating the performance use both synthetic and real data.

Notation: Throughout the paper we use ∥⋅∥\|\cdot\| to denote the euclidean norm, E[x]\mathbb{E}[x] to denote expectation of xx and V[x,x′]\mathbb{V}[x,x'] is the covariance between xx and x′x', with V[x]≡V[x,x]\mathbb{V}[x] \equiv \mathbb{V}[x,x]. The natural logarithm is denoted log and the transpose of a vector xx is denoted x⊤x^\top. We use p(x)p(x) to denote the probability density function of xx, and p(x=k)p(x = k) to denote the probability of event kk.

The code is available at GitHub:

LovisaLuna/code_Adversarial-Training-of-Linear-Models-under-Stealthy-Attacks