Adversarial machine learning
Adversarial machine learning is the study of the attacks on machine learning algorithms, and of the defenses against such attacks. Machine learning techniques are mostly designed to work on specific problem sets, under the assumption that the training and test data are generated from the same statistical distribution (IID). However, this assumption is often violated in practical high-stake applications, where users may intentionally supply fabricated data that violates the statistical assumption. Most common attacks in adversarial machine learning include evasion attacks, data poisoning attacks, Byzantine attacks and model extraction. Source: e01 Encyclopedia. Licence: CC BY-SA 4.0.
Adversarial machine learning is the study of the attacks on machine learning algorithms, and of the defenses against such attacks. Machine learning techniques are mostly designed to work on specific problem sets, under the assumption that the training and test data are generated from the same statistical distribution (IID). However, this assumption is often violated in practical high-stake applications, where users may intentionally supply fabricated data that violates the statistical assumption. Most common attacks in adversarial machine learning include evasion attacks, data poisoning attacks, Byzantine attacks and model extraction. ==Attack modalities== ===Taxonomy=== Attacks against (supervised) machine learning algorithms have been categorized along three primary axes: influence on the classifier, the security violation and their specificity. Classifier influence: An attack can influence the classifier by disrupting the classification phase. This may be preceded by an exploration phase to identify vulnerabilities. The attacker's capabilities might be restricted by the presence of data manipulation constraints. Security violation: An attack can supply malicious data that gets classified as legitimate. Malicious data supplied during training can cause legitimate data to be rejected after training. Specificity: A targeted attack attempts to allow a specific intrusion/disruption. Alternatively, an indiscriminate attack creates general mayhem. This taxonomy has been extended into a more comprehensive threat model that allows explicit assumptions about the adversary's goal, knowledge of the attacked system, capability of manipulating the input data/system components, and on attack strategy. This taxonomy has further been extended to include dimensions for defense strategies against adversarial attacks. ====Model extraction==== Model extraction involves an adversary probing a black box machine learning system in order to extract the data it was trained on. This can cause issues when either the training data or the model itself is sensitive and confidential. For example, model extraction could be used to extract a proprietary stock trading model which the adversary could then use for their own financial benefit. In the extreme case, model extraction can lead to model stealing, which corresponds to extracting a sufficient amount of data from the model to enable the complete reconstruction of the model. On the other hand, membership inference is a targeted model extraction attack, which infers the owner of a data point, often by leveraging the overfitting resulting from poor machine learning practices. Concerningly, this is sometimes achievable even without knowledge or access to a target model's parameters, raising security concerns for models trained on sensitive data, including but not limited to medical records and/or personally identifiable information. With the emergence of transfer learning and public accessibility of many state of the art machine learning models, tech companies are increasingly drawn to create models based on public ones, giving attackers freely accessible information to the structure and type of model being used. To describe the function objective, the attack defines the classifier as f:[0, 1]^d \rightarrow \reals^K , with d representing the dimensions of the input and K as the total number of output classes. f_k(x) returns the score (or a probability between 0 and 1) that the input x belongs to class k , which allows the classifier's class output for any input x to be defined as \text{argmax}_{k=1,...,K}f_k(x) . The goal of this attack is as follows: \text{argmax}_{k = 1,...,K}f_k(\hat{x}) \neq y, ||\hat{x} - x||_p \leq \epsilon \text{ and } \hat{x} \in [0, 1]^d In other words, finding some perturbed adversarial example \hat{x} such that the classifier incorrectly classifies it to some other class under the constraint that \hat{x} and x are similar. The paper then defines loss L as L(f(\hat{x}), y) = f_y(\hat{x}) - \max_{k \neq y}f_k(\hat{x}) and proposes the solution to finding adversarial example \hat{x} as solving the below constrained optimization problem: \min_{\hat{x} \in [0, 1]^d}L(f(\hat{x}), y), \text{ s.t. } ||\hat{x} - x||_p \leq \epsilon The result in theory is an adversarial example that is highly confident in the incorrect class but is also very similar to the original image. To find such example, Square Attack utilizes the iterative random search technique to randomly perturb the image in hopes of improving the objective function. In each step, the algorithm perturbs only a small square section of pixels, hence the name Square Attack, which terminates as soon as an adversarial example is found in order to improve query efficiency. Finally, since the attack algorithm uses scores and not gradient information, the authors of the paper indicate that this approach is not affected by gradient masking, a common technique formerly used to prevent evasion attacks. This black box attack was also proposed as a query efficient attack, but one that relies solely on access to any input's predicted output class. In other words, the HopSkipJump attack does not require the ability to calculate gradients or access to score values like the Square Attack, and will require just the model's class prediction output (for any given input). The proposed attack is split into two different settings, targeted and untargeted, but both are built from the general idea of adding minimal perturbations that leads to a different model output. In the targeted setting, the goal is to cause the model to misclassify the perturbed image to a specific target label (that is not the original label). In the untargeted setting, the goal is to cause the model to misclassify the perturbed image to any label that is not the original label. The attack objectives for both are as follows where x is the original image, x^\prime is the adversarial image, d is a distance function between images, c^* is the target label, and C is the model's classification class label function: \textbf{Targeted: } \min_{x^\prime}d(x^\prime, x) \text{ subject to } C(x^\prime) = c^* \textbf{Untargeted: } \min_{x^\prime}d(x^\prime, x) \text{ subject to } C(x^\prime) \neq C(x) To solve this problem, the attack proposes the following boundary function S for both the untargeted and targeted setting: S(x^\prime):= \begin{cases} \max_{c \neq C(x)}{F(x^\prime)_c} - F(x^\prime) _{C(x)} , & \text{(Untargeted)} \\ F(x^\prime) _{c^*} - \max_{c \neq c^*}{F(x^\prime)_c}, & \text{(Targeted)} \end{cases} This can be further simplified to better visualize the boundary between different potential adversarial examples: S(x^\prime) > 0 \iff \begin{cases} argmax_cF(x^\prime) \neq C(x) , & \text{(Untargeted)} \\ argmax_cF(x^\prime) = c^*, & \text{(Targeted)} \end{cases} With this boundary function, the attack then follows an iterative algorithm to find adversarial examples x^\prime for a given image x that satisfies the attack objectives. Initialize x to some point where S(x) > 0 Iterate below Boundary search Gradient update Compute the gradient Find the step size Boundary search uses a modified binary search to find the point in which the boundary (as defined by S ) intersects with the line between x and x^\prime . The next step involves calculating the gradient for x , and update the original x using this gradient and a pre-chosen step size. HopSkipJump authors prove that this iterative algorithm will converge, leading x to a point right along the boundary that is very close in distance to the original image. However, since HopSkipJump is a proposed black box attack and the iterative algorithm above requires the calculation of a gradient in the second iterative step (which black box attacks do not have access to), the authors propose a solution to gradient calculation that requires only the model's output predictions alone. By generating many random vectors in all directions, denoted as u_b , an approximation of the gradient can be calculated using the average of these random vectors weighted by the sign of the boundary function on the image x^\prime + \delta_{u_b} , where \delta_{u_b} is the size of the random vector perturbation: \nabla S(x^\prime, \delta) \approx \frac{1}{B}\sum_{b=1}^{B}\phi(x^\prime + \delta_{u_b}) u_b The result of the equation above gives a close approximation of the gradient required in step 2 of the iterative algorithm, completing HopSkipJump as a black box attack. One of the first proposed attacks for generating adversarial examples was proposed by Google researchers Ian J. Goodfellow, Jonathon Shlens, and Christian Szegedy. The attack was called fast gradient sign method (FGSM), and it consists of adding a linear amount of in-perceivable noise to the image and causing a model to incorrectly classify it. This noise is calculated by multiplying the sign of the gradient with respect to the image we want to perturb by a small constant epsilon. As epsilon increases, the model is more likely to be fooled, but the perturbations become easier to identify as well. Shown below is the equation to generate an adversarial example where x is the original image, \epsilon is a very small number, \Delta_x is the gradient function, J is the loss function, \theta is the model weights, and y is the true label. adv_x = x + \epsilon \cdot sign(\Delta_xJ(\theta, x, y)) One important property of this equation is that the gradient is calculated with respect to the input image since the goal is to generate an image that maximizes the loss for the original image of true label y . In traditional gradient descent (for model training), the gradient is used to update the weights of the model since the goal is to minimize the loss for the model on a ground truth dataset. The Fast Gradient Sign Method was proposed as a fast way to generate adversarial examples to evade the model, based on the hypothesis that neural networks cannot resist even linear amounts of perturbation to the input. FGSM has shown to be effective in adversarial attacks for image classification and skeletal action recognition. \min(||\delta||_{p}) \text{ subject to } C(x + \delta) = t, x + \delta \in [0, 1]^n Here the objective is to minimize the noise ( \delta ), added to the original input x , such that the machine learning algorithm ( C ) predicts the original input with delta (or x + \delta ) as some other class t . However instead of directly the above equation, Carlini and Wagner propose using a new function f such that: C(x + \delta) = t \iff f(x + \delta) \leq 0 This condenses the first equation to the problem below: \min(||\delta||_{p}) \text{ subject to } f(x + \delta) \leq 0, x + \delta \in [0, 1]^n and even more to the equation below: \min(||\delta||_{p} + c \cdot f(x + \delta)), x + \delta \in [0, 1]^n Carlini and Wagner then propose the use of the below function in place of f using Z , a function that determines class probabilities for given input x . When substituted in, this equation can be thought of as finding a target class that is more confident than the next likeliest class by some constant amount: f(x) = ([\max_{i \neq t}Z(x)_i] - Z(x)_t)^{+} When solved using gradient descent, this equation is able to produce stronger adversarial examples when compared to fast gradient sign method that is also able to bypass defensive distillation, a defense that was once proposed to be effective against adversarial examples. ==See also== Anti-computer tactics Fawkes (image cloaking software) Pattern recognition ==References==
Cite this
"Adversarial machine learning". 1790739242. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1377618962 JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy