Adversarial Regression with Multiple Learners
Abstract
Despite the considerable success enjoyed by machine learning techniques in practice, numerous studies demonstrated that many approaches are vulnerable to attacks. An important class of such attacks involves adversaries changing features at test time to cause incorrect predictions. Previous investigations of this problem pit a single learner against an adversary. However, in many situations an adversary’s decision is aimed at a collection of learners, rather than specifically targeted at each independently. We study the problem of adversarial linear regression with multiple learners. We approximate the resulting game by exhibiting an upper bound on learner loss functions, and show that the resulting game has a unique symmetric equilibrium. We present an algorithm for computing this equilibrium, and show through extensive experiments that equilibrium models are significantly more robust than conventional regularized linear regression.
1 Introduction
Increasing use of machine learning in adversarial settings has motivated a series of efforts investigating the extent to which learning approaches can be subverted by malicious parties. An important class of such attacks involves adversaries changing their behaviors, or features of the environment, to effect an incorrect prediction. Most previous efforts study this problem as an interaction between a single learner and a single attacker (Brückner & Scheffer, 2011; Dalvi et al., 2004; Li & Vorobeychik, 2014; Zhou et al., 2012). However, in reality attackers often target a broad array of potential victim organizations. For example, they craft generic spam templates and generic malware, and then disseminate these widely to maximize impact. The resulting ecology of attack targets reflects not a single learner, but many such learners, all making autonomous decisions about how to detect malicious content, although these decisions often rely on similar training datasets.
We model the resulting game as an interaction between multiple learners, who simultaneously learn linear regression models, and an attacker, who observes the learned models (as in whitebox attacks (Šrndic & Laskov, 2014)), and modifies the original feature vectors at test time in order to induce incorrect predictions. Crucially, rather than customizing the attack to each learner (as in typical models), the attacker chooses a single attack for all learners. We term the resulting game a MultiLearner Stackelberg Game, to allude to its two stages, with learners jointly acting as Stackelberg leaders, and the attacker being the follower. Our first contribution is the formal model of this game. Our second contribution is to approximate this game by deriving upper bounds on the learner loss functions. The resulting approximation yields a game in which there always exists a symmetric equilibrium, and this equilibrium is unique. In addition, we prove that this unique equilibrium can be computed by solving a convex optimization problem. Our third contribution is to show that the equilibrium of the approximate game is robust, both theoretically (by showing it to be equivalent to a particular robust optimization problem), and through extensive experiments, which demonstrate it to be much more robust to attacks than standard regularization approaches.
Related Work Both attacks on and defenses of machine learning approaches have been studied within the literature on adversarial machine learning (Brückner & Scheffer, 2011; Dalvi et al., 2004; Li & Vorobeychik, 2014; Zhou et al., 2012; Lowd & Meek, 2005). These approaches commonly assume a single learner, and consider either the problem of finding evasions against a fixed model (Dalvi et al., 2004; Lowd & Meek, 2005; Šrndic & Laskov, 2014), or algorithmic approaches for making learning more robust to attacks (Russu et al., 2016; Brückner & Scheffer, 2011; Dalvi et al., 2004; Li & Vorobeychik, 2014, 2015). Most of these efforts deal specifically with classification learning, but several consider adversarial tampering with regression models (Alfeld et al., 2016; Grosshans et al., 2013), although still within a singlelearner and singleattacker framework. Stevens & Lowd (2013) study the algorithmic problem of attacking multiple linear classifiers, but did not consider the associated game among classifiers.
Our work also has a connection to the literature on security games with multiple defenders (Laszka et al., 2016; Smith et al., 2017; Vorobeychik et al., 2011). The key distinction with our paper is that in multilearner games, the learner strategy space is the space of possible models in a given model class, whereas prior research has focused on significantly simpler strategies (such as protecting a finite collection of attack targets).
2 Model
We investigate the interactions between a collection of learners and an attacker in regression problems, modeled as a MultiLearner Stackelberg Game (MLSG). At the high level, this game involves two stages: first, all learners choose (train) their models from data, and second, the attacker transforms test data (such as features of the environment, at prediction time) to achieve malicious goals. Below, we first formalize the model of the learners and the attacker, and then formally describe the full game.
2.1 Modeling the Players
At training time, a set of training data is drawn from an unknown distribution . is the training sample and is a vector of values of each data in . We let denote the th instance in the training sample, associated with a corresponding value from . Hence, and . On the other hand, test data can be generated either from , the same distribution as the training data, or from , a modification of generated by an attacker. The nature of such malicious modifications is described below. We let represent the probability that a test instance is drawn from (i.e., the malicious distribution), and be the probability that it is generated from .
The action of the th learner is to select a vector as the parameter of the linear regression function , where is the predicted values for data . The expected cost function of the th learner at test time is then
(1) 
where . That is, the cost function of a learner is a combination of its expected cost from both the attacker and the honest source.
Every instance generated according to is, with probability , maliciously modified by the attacker into another, , as follows. We assume that the attacker has an instancespecific target , and wishes that the prediction made by each learner on the modified instance, , is close to this target. We measure this objective for the attacker by for a vector of predicted and target values and , respectively. In addition, the attacker incurs a cost of transforming a distribution into , denoted by .
After a dataset is generated in this way by the attacker, it is used simultaneously against all the learners. This is natural in most real attacks: for example, spam templates are commonly generated to be used broadly, against many individuals and organizations, and, similarly, malware executables are often produced to be generally effective, rather than custom made for each target. The expected cost function of the attacker is then a sum of its total expected cost for all learners plus the cost of transforming into with coefficient :
(2) 
As is typical, we estimate the cost functions of the learners and the attacker using training data , which is also used to simulate attacks. Consequently, the cost functions of each learner and the attacker are estimated by
(3) 
and
(4) 
where the attacker’s modification cost is measured by , the squared Frobenius norm.
2.2 The MultiLearner Stackerlberg Game
We are now ready to formally define the game between the learners and the attacker. The MLSG has two stages: in the first stage, learners simultaneously select their model parameters , and in the second stage, the attacker makes its decision (manipulating ) after observing the learners’ model choices . We assume that the proposed game satisfies the following assumptions:

Players have complete information about parameters (common to all learners) and . This is a strong assumption, and we relax it in our experimental evaluation (Section 6), providing guidance on how to deal with uncertainty about these parameters.

Each learner has the same action (model parameter) space which is nonempty, compact and convex. The action space of the attacker is .

The columns of the training data are linearly independent.
We use MultiLearner Stackelberg Equilibrium (MLSE) as the solution for the MLSG, defined as follows.
Definition 1 (MultiLearner Stackelberg Equilibrium (MLSE)).
An action profile is an MLSE if it satisfies
(5) 
where constitutes the joint actions of the learners.
At the high level, the MLSE is a blend between a Nash equilibrium (among all learners) and a Stackelberg equilibrium (between the learners and the attacker), in which the attacker plays a best response to the observed models chosen by the learners, and given this behavior by the attacker, all learners’ models are mutually optimal.
The following lemma characterizes the best response of the attacker to arbitrary model choices by the learners.
Lemma 1 (Best Response of the Attacker).
Given , the best response of the attacker is
(6) 
Proof.
We derive the best response of the attacker by using the first order condition. Let denote the gradient of with respect to . Then
Due to convexity of , let , we have
∎
Lemma 1 shows that the best response of the attacker, , has a closed form solution, as a function of learner model parameters . Let , then in Eq. (5) can be rewritten as
(7) 
Using Eq. (7), we can then define a MultiLearner Nash Game (MLNG):
Definition 2 (MultiLearner Nash Game (MLNG)).
A static game, denoted as is a MultiLearner Nash Game if

The set of players is the set of learners ,

the cost function of each learner is defined in Eq. (7),

all learners simultaneously select .
We can then define MultiLearner Nash Equilibrium (MLNE) of the game :
Definition 3 (MultiLearner Nash Equilibrium (MLNE)).
An action profile is a MultiLearner Nash Equilibrium of the MLNG if it is the solution of the following set of coupled optimization problem:
(8) 
Combining the results above, the following result is immediate.
Theorem 1.
An action profile is an MLSE of the multilearner Stackelberg game if and only if is a MLNE of the multilearner Nash game , with defined in Eq. (6) for .
Theorem 1 shows that we can reduce the original player Stackelberg game to an player simultaneousmove game . In the remaining sections, we focus on analyzing the Nash equilibrium of this multilearner Nash game.
3 Theoretical Analysis
In this section, we analyze the game . As presented in Eq. (6), there is an inverse of a complicated matrix to compute the best response of the attacker. Hence, the cost function shown in Eq. (7) is intractable. To address this challenge, we first derive a new game, with tractable cost function for its players, to approximate . Afterward, we analyze existence and uniqueness of the Nash Equilibirum of .
3.1 Approximation of
We start our analysis by computing presented in Eq. (6). Let matrix , and . Then, Similarly, let matrix , and , which implies that The best response of the attacker can then be rewritten as We then obtain the following results.
Lemma 2.
and satisfy

and are invertible, and the corresponding invertible matrices, and , are positive definite.

.

.
Proof.

First, we prove that is invertible, and its inverse matrix, , is positive definite by using mathematical induction.
When , . As is an invertible square matrix and is a column vector, by using ShermanMorrison formula, is invertible.
For any nonzero column vector , we have
As and , according to CauchySchwarz inequality,
Then, . Thus, is a positive definite matrix.
We then assume that when , is invertible and is positive definite. Then, when ,
As is invertible, is a column vector. By using ShermanMorrison formula, we have that is invertible, and
Then,
As is a positive definite matrix, we have and . By using Extended CauchySchwarz inequality, we have
Then, is positive definite. Hence, is invertible, and is positive definite. Similarly, we can prove that is invertible, and is positive definite.

We have proved that and are invertible. Then, the result can be obtained by using ShermanMorrison formula.

Let . As is a symmetric matrix, its inverse, is also symmetric. Using a similar approach to the one above, we can prove that is invertible and is positive definite. By using ShermanMorrison formula, we have
Then,
We then iteratively apply ShermanMorrison formula and get
∎
Lemma 2 allows us to relax as follows:
Lemma 3.
(9) 
Proof.
Firstly, by using ShermanMorrison formula we have
Then,
By using Lemma 2, we have which completes the proof. ∎
Note that in Eq. (3), and only depend on . Hence, the RHS of Eq. (3) is a strictly convex function with respect to . Lemma 3 shows that can be relaxed by moving out of and adding a regularizer with its coefficient . Motivated by this method, we iteratively relax by adding corresponding regularizers. We now identify a tractable upper bound function for .
Theorem 2.
(10) 
where is a positive constant and .
Proof.
We prove by extending the results in Lemma 3 and iteratively relaxing the cost function. As presented in Lemma 3, we have
By using ShermanMorrison formula,
where , and is a continuous function of . As the action space is bounded, then . Hence, we have
where is a continuous function of and . Let , then, similarly, can be further relaxed as follows.
where , using the same approach, can be further and iteratively relaxed as follows,
where . Combining the results above, we can iteratively relax as follows,
where and . Then,
Hence,
where is a constant such that . ∎
As represented in Eq. (10), is strictly convex with respect to and . We then use the game as an approximation of . Let
(11) 
then has the same Nash equilibrium with if one exists, as adding or deleting a constant term does not affect the optimal solution. Hence, we use to approximate , and analyze the Nash equilibrium of in the remaining sections.
3.2 Existence of Nash Equilibrium
As introduced in Section 2, each learner has identical action spaces, and they are trained with the same dataset. We exploit this symmetry to analyze the existence of a Nash equilibrium of the approximation game .
We first define a Symmetric Game (Cheng et al., 2004):
Definition 4 (Symmetric Game).
An nplayer game is symmetric if the players have the same action space, and their cost functions satisfies
(12) 
if and .
In a symmetric game it is natural to consider a Symmetric Equilibrium:
Definition 5 (Symmetric Equilibrium).
An action profile of is a symmetric equilibrium if it is a Nash equilibrium and .
We now show that our approximate game is symmetric, and always has a symmetric Nash equilibrium.
Theorem 3 (Existence of Nash Equilibrium).
is a symmetric game and it has at least one symmetric equilibrium.
Proof.
As described above, the players of use the same action space and complete information of others. Hence, the cost function is symmetric, making a symmetric game. As has nonempty, compact and convex action space, and the cost function is continuous in and convex in , according to Theorem 3 in Cheng et al. (2004), has at least one symmetric Nash equilibrium. ∎
3.3 Uniqueness of Nash Equilibrium
While we showed that the approximate game always admits a symmetric Nash equilibrium, it leaves open the possibility that there may be multiple symmetric equilibria, as well as equilibria which are not symmetric. We now demonstrate that this game in fact has a unique equilibrium (which must therefore be symmetric).
Theorem 4 (Uniqueness of Nash Equilibrium).
has a unique Nash equilibrium, and this unique NE is symmetric.
Proof.
We have known that has at least NE, and each learner has an nonempty, compact and convex action space . Hence, we can apply Theorem 2 and Theorem 6 of Rosen (1965). That is, for some fixed , if the matrix in Eq. (13) is positive definite, then has a unique NE.
(13) 
By taking secondorder derivatives, we have
and
We first let and decompose as follows,
(14) 
where and are block diagonal matrices such that , , and , . and are block symmetric matrices such that , , and , .
Next, we prove that is positive definite, and , and are positive semidefinite. Let be an vector, where are not all zero vectors.

. As the columns of are linearly independent and are not all zero vectors, there exists at least one such that . Hence, which indicates that is positive definite.

Similarly, which indicates that is a positive semidefinite matrix.

Let’s be a symmetric matrix such that and , . Hence, , . Note that is a positive semidefinite matrix, as it is also symmetric, there exists at least one lower triangular matrix