Skip to content

Manipulating machine learning: Poisoning attacks and countermeasures for regression learningManipulating Machine Learning: Poisoning Attacks and Countermeasures for Regression Learning

arXiv· arXiv:1804.00308· Matthew Jagielski, Alina Oprea, Battista Biggio, Chang Liu, Cristina Nita-Rotaru, Bo LiNortheastern University; University of Cagliari; Pluribus One; UC BerkeleyIndexed by this site · 27 days ago· Originally publishedAttacks

Quick read

Attacks

Based on the paper PDF (AI-generated); refer to the original

The authors propose the poisoning attack framework OptP, the statistical attack StatP, and the defense TRIM for linear regression, and state that under TRIM the median MSE increase across all attacks is only 6.1%.

Threat modelThe attacker injects up to p=α·n poisoning points into the training set, whose features and response values can be set arbitrarily within [0,1] (α<1, experiments take 4%–20%); the goal is a poisoning availability attack (indiscriminately raising test MSE). Knowledge is divided into white-box (knows the training data, algorithm, and parameters) and black-box (does not know the training set, uses a substitute dataset Dtr' to estimate parameters). The victim systems are OLS, ridge, LASSO, and elastic net linear regression models.

Questions
Machine learning models need to be updated online with continuously incoming data, and attackers can inject a small number of poisoning points to manipulate training. Linear regression is widely used for decisions in lending, healthcare, and other areas, but the actual impact of adversarial manipulation of its training data and defense methods remain unclear.
Methods
The authors formalize poisoning as bilevel optimization and propose the regression-oriented OptP framework (optional initialization, optimization variables, objective function, and joint optimization of the response value y), as well as the statistical attack StatP that requires only black-box queries; on defense, they propose TRIM, which iteratively retrains the model on the n points with the smallest residuals, with guarantees on convergence and an MSE upper bound.
Experiments and results
On the three datasets health care, loan, and house and four regression models, OptP's MSE reaches up to 6.83 times the BGD baseline and 155.7 times that of the unpoisoned model; under TRIM, the median MSE increase across all attacks is 6.1%, while Huber, RANSAC, and RONI are sometimes worse than no defense.
Limitations and future work
The authors study only availability poisoning; integrity attacks are left for future work. TRIM only guarantees convergence to a local optimum; the MSE upper bound depends on α<1 and the bound for regularized models may be looser. The experiments cover only four linear models and three regression datasets, with poisoning rates of 4%–20%.
Experimental setupOLS、ridge et al. · health care (Warfarin) dataset、Lending Club loan dataset et al. · MSE、running time
Evaluated models
OLSridgeLASSOelastic net
Benchmarks
health care (Warfarin) datasetLending Club loan datasethouse pricing datasetContagio PDF dataset
Metrics
MSErunning time
AI summaryThe researchers propose an optimization framework for poisoning attacks against linear regression models and a fast statistical attack, and design corresponding defense methods. The authors state that this is the first systematic study of poisoning attacks and countermeasures for linear regression, in which attackers manipulate the results of predictive models by deliberately influencing the training data. The proposed fast statistical attack requires only a small amount of knowledge about the training process; the defense method is highly robust to various poisoning attacks, providing formal guarantees of convergence and an upper bound on attack effectiveness after the defense is deployed. The attacks and defenses are thoroughly evaluated on three real datasets: healthcare, loan evaluation, and real estate.

The researchers propose an optimization framework for poisoning attacks against linear regression models and a fast statistical attack, and design corresponding defense methods. The authors state that this is the first systematic study of poisoning attacks and countermeasures for linear regression, in which attackers manipulate the results of predictive models by deliberately influencing the training data. The proposed fast statistical attack requires only a small amount of knowledge about the training process; the defense method is highly robust to various poisoning attacks, providing formal guarantees of convergence and an upper bound on attack effectiveness after the defense is deployed. The attacks and defenses are thoroughly evaluated on three real datasets: healthcare, loan evaluation, and real estate.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    The authors systematically study training data poisoning attacks against linear regression and their defenses, proposing an attack framework and the TRIM defense.

    Core question: How effective are training data poisoning attacks against linear regression models, and how can they be defended against? There was previously a lack of systematic research.

    • Scenario and motivation: The authors point out that many models need to be updated online with continuously generated data (e.g., IoCs in security analysis, crowdsourced patient data in personalized medicine), and an attacker can submit forged data to contaminate the training set and manipulate predictions.
    • Shortcomings of existing methods: The authors state that robust statistical methods (e.g., Huber, RANSAC) are only resilient to noise and outliers and perform poorly against adversarial poisoning points similar to the training set distribution; data sanitization methods rely on restricted adversarial models; adversarially robust regression by Chen et al. relies on assumptions that often do not hold in practice (e.g., X^T X=I, sub-Gaussian).
    • Core observation: The response variable in regression is continuous, and the attacker can choose both the features and the response values of poisoning points, which differs from classification poisoning; based on this, the authors design attacks that jointly optimize (x, y), and find that the most effective poisoning points are near the corners with response values at the boundary.
    • Paper contributions: They propose a regression poisoning optimization framework (instantiated as OptP), a statistical attack StatP that requires only limited knowledge, and a defense algorithm TRIM with theoretical guarantees on convergence and an MSE upper bound, evaluated on four regression models and three domain datasets.
    • Threat model:
      • Goal: poisoning availability attack, indiscriminately corrupting test set predictions (raising MSE); the paper explicitly studies only this type, leaving integrity attacks for future work.
      • Knowledge: white-box (knows training data, features, algorithm, and training parameters) or black-box (does not know the training set, collects a substitute dataset Dtr' to estimate parameters, used to test transferability).
      • Capability: inject p=α·n poisoning points into the training set, with features and response values arbitrarily set within [0,1]; requires α<1, and experiments take 4%–20%.
      • Victim systems: four linear regression models: OLS, ridge, LASSO, and elastic net.
  2. What related research exists?

    Related work falls into three categories: classification poisoning attacks, robust/adversarially robust regression defenses, and other adversarial machine learning attacks.

    Poisoning attacks in classification settings

    • Biggio et al. [5]—pioneered optimization-based poisoning attacks on kernel learning algorithms such as SVM; Mei and Zhu [37] used machine teaching to find the optimal training set attack; Muñoz-González et al. [39] used back-gradient to optimize poisoning of simple neural networks.
    • Xiao et al. [56]—poisoning attacks against categorical feature selection; this paper's baseline attack BGD is adapted from it (using Wtr as the outer objective and InvFlip initialization to simulate label flipping).
    • Practical poisoning in the security community: worm signature generation [42], [45], spam filtering [40], DoS detection [48], sentiment analysis [41], etc.

    Robust and adversarially robust regression (defense baselines)

    • Robust statistics: Huber [27] uses an outlier-resistant loss function; RANSAC [18] iteratively fits on random subsets and removes points whose error exceeds a threshold. The paper states that such methods only guarantee robustness to noise and outliers, and are ineffective against inlier poisoning points whose distribution resembles the training data.
    • Adversarially robust regression: Chen et al. [11], [12] assume X^T X=I and sub-Gaussian data; Feng et al. [17] assume sub-Gaussian; Liu et al. [34] assume the feature matrix is low-rank. The paper states that these assumptions are usually not satisfied in practice.
    • RONI [40]—removes points with large negative impact by comparing the model's performance on a sampled validation set with and without a given point; the paper states that it can only identify high-impact outliers and is ineffective against the inlier attacks in this paper.

    Other adversarial machine learning work

    • Evasion attacks [3], [9], [21], [43], [44], [51], [52] and privacy attacks [19], [20], [49], listed by the paper only as background.
    • Unsupervised poisoning: Rubinstein et al. [48] inject traffic against PCA anomaly detection; Kloft and Laskov [32]'s boiling frog attack; Ciocarlie et al. [13]'s training data sanitization (assuming the attacker controls only data within a limited time window).

    Baselines and benchmarks: The attack baseline is BGD adapted from Xiao et al. [56]; the defense baselines are Huber, RANSAC, Chen et al. [12], and RONI. The evaluation datasets are three regression datasets: health care (Warfarin), loan (Lending Club), and house pricing; Appendix C additionally reproduces the baselines on the Contagio PDF classification dataset.

    Positioning: The authors state that this paper is the first work to systematically study poisoning attacks and defenses for linear regression; on the attack side, it exploits the properties of continuous response variables in regression to surpass baselines adapted from classification, and on the defense side, TRIM does not rely on data distribution assumptions and provides stronger guarantees than prior work.

  3. How does the paper address this problem?

    On the attack side, the bilevel optimization framework OptP and the statistical attack StatP are used; on the defense side, the TRIM algorithm, which iteratively prunes residuals, is used.

    Overall approach: poisoning is formalized as bilevel optimization and a regression-oriented solution framework, OptP, is proposed; theoretical insights then lead to a fast statistical attack, StatP; on the defense side, TRIM is proposed, which iteratively estimates regression parameters on the n points with the smallest residuals.

    Problem formalization

    • The regression model f(x,θ)=w⊤ x+b minimizes a quadratic loss plus a regularization term; the four models differ only in the regularization term (OLS none, ridge l2, LASSO l1, elastic net a combination of both, ρ=0.5).
    • The poisoning attack is written as bilevel optimization: the outer level selects the poisoning point set Dp to maximize the loss W on clean data, and the inner level retrains the model on Dtr∪Dp. Attack effectiveness is measured by the difference in test MSE between the poisoned model and the clean model, and by runtime.

    Optimization attack OptP

    • Poisoning points are updated point by point via gradient ascent (Algorithm 1); when the inner problem is convex, gradients are obtained in closed form via KKT conditions; three optional dimensions form the framework: initialization strategy (InvFlip: yc=1−y; BFlip: yc rounded to 0 or 1), optimization variables (x only or (x, y)), and outer objective (Wtr or Wval).
    • Response variable optimization: this paper is the first to jointly optimize the features xc and the continuous response value yc of poisoning points, i.e., optimize zc=(xc, yc), with the gradient formulas extended accordingly (Eq. 13–14).
    • The baseline BGD is defined as (InvFlip, x, Wtr), i.e., the regression adaptation of Xiao et al. [56]'s classification attack.
    • Theoretical insight: the authors state that Wtr and the "difference from the original model's prediction" objective Wtr' are equivalent in this bilevel optimization (Appendix A proves this for OLS and ridge); its gradient update pushes yc away from the original regression line and pushes xc away along the perpendicular and parallel directions, suggesting that optimal poisoning points lie near the corners.

    Statistical attack StatP

    • Samples from a multivariate normal distribution with mean and covariance estimated from the training data, rounds feature values to the corners, and sets response values to the boundary (0 or 1) to maximize loss.
    • Requires only black-box access: querying the model to obtain response values, plus estimates of the mean and covariance of the training distribution; it does not depend on the specific regression algorithm, parameters, or training set.

    Defense algorithm TRIM

    • Solves the problem minθ,I L(DI,θ) s.t. |I|=n: from a poisoned training set of N=(1+α)n points, selects the n points with the smallest residuals for training, requiring α<1.
    • Alternating iteration (Algorithm 2): using the current parameters θ(i), select the n points with the smallest residuals, then retrain only on these n points to obtain θ(i+1), stopping when the loss no longer decreases; initially trains on all N points.
    • Theoretical guarantees: Theorem 1 states that the algorithm terminates in a finite number of steps (upper bound is the binomial coefficient C(N,n); the experiments state convergence within a few dozen iterations); Theorem 2 states that the MSE of the global optimum θ̂ on at least (1−α)·n clean points does not exceed (1+α/(1−α))L(Dtr,θ∗), i.e., when α≤20% the ratio of worst-case to best-case MSE does not exceed 1.25, and this does not rely on data distribution assumptions.

    Evaluation method

    • Attack effectiveness is measured by test MSE (increase relative to the unpoisoned model) and runtime; transferability constructs attacks using a substitute training set and then tests the target model; defense comparison measures MSE and runtime of Huber, RANSAC, Chen, and RONI under the OptP attack.
  4. What experiments did the paper conduct?

    Attacks and defenses are evaluated on 3 datasets and 4 regression models: OptP's MSE reaches up to 6.83 times that of BGD, and under TRIM the median MSE increase is 6.1%.

    Experimental setup

    • Models tested: four linear regressions: OLS, ridge, LASSO, and elastic net; the attack and defense figures mainly show ridge and LASSO (the authors say because they are the most popular).
    • Datasets: health care (5700 patients, 167-dimensional features, predicting Warfarin dose), loan (Lending Club, 5000 sampled records, 89-dimensional), house pricing (1460 houses, 275-dimensional); 1400 records from each dataset are used for poisoning experiments; Appendix C additionally reproduces the baselines on the Contagio PDF classification dataset (5000 benign + 5000 malicious, 141-dimensional).
    • Baselines: attack baseline BGD (adapted from Xiao et al. [56]); defense baselines Huber (ε chosen from 5 values), RANSAC (initial sample size chosen from 5 values), Chen et al. [12] (number of features chosen from 1–9), RONI (validation set 50, average of 5 trials).
    • Metrics: MSE (attack effectiveness and defense effectiveness) and running time; poisoning rate α takes 4%–20% in steps of 4%.
    • Protocol: cross-validation split of 1/3 training, 1/3 test, 1/3 validation, with results averaged over 5 runs; hyperparameters (η, β=0.75, ε=1e-5, λ by cross-validation) are in Appendix C Table VI.

    Main results

    MSE of attack variants (LASSO, according to Table II, III; BGD is the first row):

    Swipe horizontally to read the table

    DatasetAttack variant12%16%20%
    loanBGD (InvFlip, x, Wtr)0.0260.0270.027
    loan(BFlip, x, Wtr)0.0280.0320.033
    loan(BFlip, (x,y), Wval)0.0300.03380.0376
    houseBGD (InvFlip, x, Wtr)0.0340.0470.054
    house(BFlip, x, Wtr)0.080.1450.172
    house(InvFlip, (x,y), Wval)0.3690.3690.369
    • The authors state that all three framework dimensions affect effectiveness: BFlip initialization is best in most cases (only on LASSO+house are InvFlip with (x,y) and Wval better); joint optimization of (x, y) is better than optimizing only x; Wval improves over Wtr by up to 7.09 times (LASSO+house).
    • The authors state that OptP improves MSE over BGD by up to 6.83 times (LASSO+house, BFlip+(x,y)+Wval), and up to 155.7 times over the unpoisoned model; Figures 3 and 4 show that OptP and StatP both outperform BGD on ridge and LASSO.
    • Exceptions: on LASSO+loan, StatP is 11% higher than the best OptP; on ridge's health and loan, StatP and OptP are similar; because the loan dataset is itself nonlinear and its original MSE is already high, the authors state that all attacks are weaker than on datasets with good linear fits.

    Transferability (black-box)

    • What was tested: attacks constructed with a substitute training set Dtr' and transferred to the target model trained on Dtr, reporting the MSE ratio of the transferred attack to the original attack (Table V, average of 5 runs).
    • Results: StatP's transferred MSE differs from the original attack by within 11.4%; OptP's transferred MSE is 3% lower on LASSO, but some are higher after transfer: ridge 30% higher, LASSO 78% higher; the exception is ridge+house (ratio 0.479), which the authors say is left for future research.
    • Authors' interpretation: The authors believe OptP and StatP generally have good transferability.

    Medical case study

    • What was tested: converting the MSE caused by OptP attacks at a 20% poisoning rate into Warfarin dose changes (Table IV).
    • Results: 75% of patients' doses change by an average of 93.49% (LASSO; ridge 87.50%), half of patients change by 139.31% (LASSO), and 10% of patients change by up to 358.89% (LASSO; ridge 459.63%); at an 8% poisoning rate, half of patients' doses change by 75.06%.
    • Authors' interpretation: The authors state that poisoning attacks can cause serious consequences in real-world applications.

    Defense evaluation

    • What was tested: comparing the MSE (Figures 5, 6) and running time of no defense, TRIM, Huber, RANSAC, and RONI under OptP attacks.
    • Results: On ridge and LASSO, the median MSE increase across all attacks, models, and datasets under TRIM is 6.1%, and only 20% of attacks cause an increase of more than 27.2%; on the health dataset with LASSO and α=8%, TRIM's MSE is 3.47% lower than the unpoisoned model. On a single dataset, TRIM's MSE improvement factors relative to Huber, RANSAC, and RONI are 131.8, 17.5, and 20.28 respectively.
    • Negative results: On LASSO+health with α=20%, OptP makes MSE reach 19.74 times that of the unpoisoned model; Huber increases the MSE of undefended ridge by a further 2781 times, RONI by 8.06%, and RANSAC by 1.79 times—the authors state that these defenses are sometimes worse than no defense, because they target outliers whereas the attacks in this paper generate inlier points. Chen's MSE increase reaches up to 63,087 times and is not plotted due to excessive fluctuation; the authors attribute this to its sub-Gaussian and X^T X=I assumptions not holding on real data.
    • Running time: On the house dataset, TRIM averages 0.02 seconds, RANSAC 0.33 seconds, Huber 7.86 seconds, RONI 15.69 seconds, and Chen 0.83 seconds; on health, TRIM 0.02 seconds and RONI 14.80 seconds. On the attack side, OptP takes about 337 seconds (ridge)/408 seconds (LASSO) on house, while StatP takes only about 0.1 seconds (house)/0.01 seconds (loan).

    Other ablations and analyses

    • Initialization strategy: The authors state they tried various feature initialization methods, which showed no improvement over uniform random selection, so they report only InvFlip and BFlip.
    • Objective function: Under the same initialization and optimization variables, Wval improves over Wtr by 7.09 times (LASSO+house), 17.5% (LASSO+loan), and 30.4% (ridge+loan).
    • Appendix C: On the Contagio PDF classification dataset, OptP and BGD have similar effectiveness (the authors say this is expected, because in classification the (x,y) optimization degenerates to x), and StatP is 40% higher than BGD and OptP on ridge.
    • TRIM worst/best MSE ratio: at α=12% it is always below 1.46×, and on one dataset at α=20% it reaches 2.39×.
  5. What are some points that can be further explored?

    The authors state that integrity poisoning and the ridge+house transfer anomaly are left for future work; the experiments cover only linear models and three datasets.

    Limitations and future directions noted by the authors

    • The paper studies only poisoning availability attacks; although integrity (targeted) attacks can be derived and implemented with the same technique, a detailed study of their effectiveness is left as future work (Section II).
    • In the transferability experiments, the transfer attack MSE of ridge on the house dataset is notably lower than the original attack (Table V ratio 0.479); the authors state that this exception merits further study in future work (Section V-B).
    • TRIM can only guarantee finding a local minimum of problem (17); there is no efficient algorithm guaranteeing global optimality; the MSE upper bound is given for the global optimum, and the actual ratio depends on the initial subset I(0) (Section IV-B).
    • For models with regularization terms (LASSO, ridge, elastic net), the bound in Theorem 2 includes the regularization term, and the worst-case MSE amplification may be larger; the authors state that the technique for triggering this worst case is not yet known (Section IV-B).
    • In the conclusion, the authors express the hope that the work will inspire research on safer learning algorithms against poisoning attacks (Section VII).

    Scope of experiments

    • The models tested are 4 linear regression models in total: OLS, ridge, LASSO, and elastic net; the attack and defense figures show only ridge and LASSO (Section V-B).
    • The datasets are three regression datasets: health care, loan, and house pricing (1400 records each); Appendix C additionally validates the baselines on the Contagio PDF classification dataset; poisoning rates cover 4%–20%.
    • The defense evaluation includes four baselines—Huber, RANSAC, Chen et al., and RONI—and TRIM, and targets only the OptP attack (Section V-C).
    • Results are averages of 5 runs; settings for the attack hyperparameters η, β, ε and the regularization parameter λ are given in Appendix C Table VI.
    • The paper does not report attack or defense experiments on nonlinear models such as neural networks (the authors state that the understanding of linear regression can inspire future research on other model classes).
  6. Summarize the main content of the paper

    The authors systematically study linear regression poisoning: OptP and StatP attacks are effective and transferable, and the TRIM defense reduces the median MSE increase to 6.1%.

    A systematic study of training data poisoning attacks and defenses for linear regression (accepted paper at IEEE S&P 2018); the authors claim it is the first systematic work in this setting.

    • Problem: When a model is updated online, an attacker can inject a small number of poisoning points to manipulate regression predictions; existing robust statistical methods only resist outliers, and adversarially robust regression relies on unrealistic assumptions.
    • Method: On the attack side, they propose a bilevel optimization framework OptP—with optional initialization (InvFlip/BFlip), optimization variables (x or (x,y)), and objective (Wtr/Wval)—and for the first time jointly optimize continuous response values; there is also a statistical attack StatP that requires only black-box queries and the distribution mean and covariance. On the defense side, they propose TRIM: alternately select the n points with the smallest residuals and retrain, with Theorem 1 guaranteeing finite-step convergence and Theorem 2 giving an upper bound that the worst/best MSE ratio does not exceed 1.25 when α≤20%.
    • Attack effectiveness: On three datasets and four regression models, OptP's MSE reaches up to 6.83 times the baseline BGD and 155.7 times that of the unpoisoned model; black-box transfer attacks are generally close in effectiveness to the original attacks (ridge+house is an exception).
    • Real-world impact: At a 20% poisoning rate, on the health care dataset, the Warfarin dose of 75% of patients changes by an average of 93.49% (LASSO), and 10% of patients change by up to 358.89%.
    • Defense effectiveness: Under TRIM, the median MSE increase across all attacks, models, and datasets is 6.1%, and only 20% of attacks exceed 27.2%; on a single dataset it is better than Huber, RANSAC, and RONI by 131.8, 17.5, and 20.28 times respectively, and it runs the fastest (0.02 seconds on house); Huber, RONI, etc. are sometimes worse than no defense.
    • Authors' conclusions: The authors believe optimization attacks are more effective than statistical attacks but more time-consuming and require more knowledge, and that TRIM provides stronger guarantees without making data distribution assumptions; integrity poisoning and nonlinear models are left for future work.
Read originalarxiv.org