Method and apparatus for adversarial attacks
By integrating a surrogate model as a function prior in Bayesian optimization, the proposed method improves black-box adversarial attack efficiency and success rates by leveraging target model information, addressing the limitations of existing methods.
Patent Information
- Application Number
- PCT/CN2024/090000
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-04-26
- Publication Date
- 2025-10-30
AI Technical Summary
Existing black-box adversarial attack methods require a large number of queries to successfully mislead target models due to insufficient exploitation of global information and lack of effective prior information integration, especially in high-dimensional spaces.
Integrate a surrogate model as a function prior into Bayesian optimization, using a Gaussian process to guide the optimization process, allowing for improved performance by leveraging abundant information from the black-box target model.
Significantly reduces the number of queries needed for successful attacks while maintaining high success rates, enhancing the efficiency of black-box adversarial attacks.
Smart Images

Figure CN2024090000_30102025_PF_FP_ABST
Abstract
Description
METHOD AND APPARATUS FOR ADVERSARIAL ATTACKSFIELD
[0001] Aspects of the present disclosure relate generally to artificial intelligence (AI) , and more particularly, to a method and an apparatus for generating an adversarial example.BACKGROUND
[0002] A longstanding problem of deep learning is the vulnerability to adversarial examples, which are generated by imposing small perturbations to natural examples but can mislead the target model. To identify the weakness of deep learning models and evaluate their robustness, adversarial attacks are widely studied to generate the worst-case adversarial examples.
[0003] Generally, adversarial attacks can be categorized into white-box attacks and black-box attacks. Tremendous efforts have been made to develop both white-box and black-box attacks. However, there are still shortages or room for improvement.
[0004] Therefore, it may be desirable to provide an improved method or a technique for generating an adversarial example.SUMMARY
[0005] The following presents a simplified summary of one or more aspects according to the present disclosure in order to provide a basic understanding of such aspects. This summary is not an extensive overview of all contemplated aspects, and is intended to neither identify key or critical elements of all aspects nor delineate the scope of any or all aspects. Its sole purpose is to present some concepts of one or more aspects in a simplified form as a prelude to the more detailed description that is presented later.
[0006] In an aspect of the disclosure, a computer-implemented method for generating an adversarial example is provided, comprising obtaining a set of inputs and a set of attack metric values, wherein the set of attack metric values are obtained by inputting the set of inputs to a first attack objective function that is on top of a first model; determining a Gaussian process as a prior for the first attack objective function, wherein the Gaussian process comprises a second attack objective function that is on top of a second model as a mean function; obtaining a posterior distribution for the first attack objective function based on the set of inputs and the set of attack metric values and the Gaussian process; and obtaining a next input based on the posterior distribution for the first attack objective function to attack the first model.
[0007] In another aspect of the disclosure, a computer-implemented method for a generating an adversarial example is provided, comprising obtaining a set of inputs and a set of attack metric values, wherein the set of attack metric values are obtained by inputting the set of inputs to a first attack objective function that is on top of a first model; determining a Gaussian process as a prior for the first attack objective function, wherein the Gaussian process comprises a second attack objective function that is on top of a second model as a mean function; obtaining a posterior distribution for the first attack objective function based on the set of inputs and the set of attack metric values and the Gaussian process; and obtaining a next input based on the posterior distribution for the first attack objective function to attack the first model; wherein the set of inputs comprise a set of images, the first model comprises an image classifier, and the next input comprises an image to mislead the image classifier to generate a wrong class.
[0008] In another aspect of the disclosure, apparatus for generating an adversarial example is provided, comprising a memory and at least one processor coupled to the memory. The at least one processor is configured to obtain a set of inputs and a set of attack metric values, wherein the set of attack metric values are obtained by inputting the set of inputs to a first attack objective function that is on top of a first model; determine a Gaussian process as a prior for the first attack objective function, wherein the Gaussian process comprises a second attack objective function that is on top of a second model as a mean function; obtain a posterior distribution for the first attack objective function based on the set of inputs and the set of attack metric values and the Gaussian process; and obtain a next input based on the posterior distribution for the first attack objective function to attack the first model.
[0009] In another aspect of the disclosure, a computer program product for generating an adversarial example is provided, comprising processor executable computer code for obtaining a set of inputs and a set of attack metric values, wherein the set of attack metric values are obtained by inputting the set of inputs to a first attack objective function that is on top of a first model; determining a Gaussian process as a prior for the first attack objective function, wherein the Gaussian process comprises a second attack objective function that is on top of a second model as a mean function; obtaining a posterior distribution for the first attack objective function based on the set of inputs and the set of attack metric values and the Gaussian process; and obtaining a next input based on the posterior distribution for the first attack objective function to attack the first model.
[0010] In another aspect of the disclosure, a computer readable medium stores computer code for generating an adversarial example. The computer code when executed by a processor causes the processor to obtain a set of inputs and a set of attack metric values, wherein the set of attack metric values are obtained by inputting the set of inputs to a first attack objective function that is on top of a first model; determine a Gaussian process as a prior for the first attack objective function, wherein the Gaussian process comprises a second attack objective function that is on top of a second model as a mean function; obtain a posterior distribution for the first attack objective function based on the set of inputs and the set of attack metric values and the Gaussian process; and obtain a next input based on the posterior distribution for the first attack objective function to attack the first model.
[0011] The proposed methods for generating an adversarial example according to one or more aspects of the present disclosure may be used for various tasks and / or application fields, such as image classification, visual recognition, medical diagnosis, autonomous driving, spam email classifiers, facial recognition and the like. Although the following disclosure may be described with reference to image classification or visual recognition for some part only for illustration, the present disclosure may be applicable to many other application fields.
[0012] By incorporating and / or appropriately utilizing a function prior in a Bayesian optimization, abundant information of a black-box model can be provided in black-box attacks, thus the performance of the black-box attacks can be improved significantly, such as, achieving a high success attack rate (e.g., applicable to diverse target models) with a reduced number of queries needed for performing a success attack.
[0013] Other aspects or variations of the disclosure, as well as other advantages thereof will become apparent by consideration of the following detailed description and accompanying drawings.BRIEF DESCRIPTION OF THE DRAWINGS
[0014] The disclosed aspects will hereinafter be described in connection with the appended drawings that are provided to illustrate and not to limit the disclosed aspects.
[0015] FIG. 1A and 1B illustrate a comparison between a clean example and an adversarial example generated by imposing small perturbations to the clean example.
[0016] FIG. 2 shows a schematic diagram for integration of transfer-based attacks and query-based attacks.
[0017] FIG. 3 shows a schematic diagram for Bayesian optimization in black-box attacks.
[0018] FIG. 4 shows a schematic diagram for the proposed method of prior-guided Bayesian optimization according to one or more aspects of the present disclosure.
[0019] FIG . 5 illustrates an exemplary workflow for a method of generating adversarial examples in black-box attacks according to one or more aspects of the present disclosure.
[0020] FIG . 6 illustrates another exemplary workflow for a method of generating adversarial examples in black-box attacks according to one or more aspects of the present disclosure.
[0021] FIG. 7 illustrates an example of a hardware implementation for an apparatus according to one or more aspects of the present disclosure.DETAILED DESCRIPTION
[0022] The present disclosure will now be discussed with reference to several example implementations. It is to be understood that these implementations are discussed only for enabling those skilled in the art to better understand and thus implement the embodiments of the present disclosure, rather than suggesting any limitations on the scope of the present disclosure.
[0023] Recently, many studies demonstrate that several machine learning models, including state-of-the-art neural networks, are vulnerable to adversarial examples. For example, these machine learning models misclassify adversarial examples that are only slightly different from correctly classified examples drawn from the data distribution. In many cases, a wide variety of models with different architectures trained on different subsets of the training dataset misclassify the same adversarial example. This implies that adversarial examples expose fundamental blind spots in the training algorithms.
[0024] FIG. 1A and 1B illustrate a comparison between a clean example and an adversarial example generated by imposing small perturbations to the clean example. FIG. 1A shows a clean or natural image 100A, which is identified correctly by a model (e.g., a Vision-Language Model (VLM) ) as “A painting of two bears with a mountain in the background” . FIG. 1B shows an adversarial image 100B that is slightly different from the clean image 100A (e.g., by imposing small perturbations within a perturbation budget to the clean image 100A) . The small perturbations may be imperceptible and not hinder a human observer to correctly identify, while misleading the model to output wrong description: “A painting of two sheep in a field with a castle in the background” .
[0025] In order to identify the weakness of machine learning models and evaluate their robustness, for visual classification or identification in the field of autonomous driving, or facial recognition in the bio-identification field and the like for example, adversarial attacks are widely studied to generate the worst-case adversarial examples. Some methods attack a target model by performing gradient-based optimization to maximize the loss function, which inevitably requires access to the architecture and parameters of the target model, known as white-box attacks. However, in a real-world scenario, the target model generally is hosted remotely by a third-party who keeps the target model internals secret. In fact, one (e.g., malware, or adversary) is able to access the target model after training is completed.
[0026] On the other hand, black-box attacks assume limited knowledge of the target model, which are more practical in real-world applications. In general, in black-box attacks, the adversary has no information about the structure or parameters of the target model, and may not have access to training dataset. The adversary can only observe labels assigned by the target model for chosen inputs.
[0027] Tremendous efforts have been made to develop black-box adversarial attacks, which may be generally categorized onto transfer-based attacks and query-based attacks. In transfer-based attacks, adversarial examples generated for a surrogate model are probable to fool the target model based on the adversarial transferability. Despite for recent improvements, the success rate for transfer-based attacks is still limited for diverse models. This may be attributed to the inherent dependence on the unknown similarity between the surrogate model and the target model, lacking an adjustment process.
[0028] Differently, query-based attacks generate adversarial examples by leveraging the query feedback by the target model. The most prevalent approaches involve estimating the true gradient through zeroth-order optimization. There are also heuristic algorithms that don’ t rely on gradient estimation. However, the main limitation of these methods is that they inevitably require a tremendous number of queries before performing a successful attack.
[0029] Recently, several methods have been proposed to integrate transfer-based attacks and query-based attacks to have the best of both aspects. They typically leverage the input gradient of a surrogate white-box model as the transfer-based prior to improve query-based optimization, e.g., query efficiency.
[0030] FIG. 2 shows a schematic diagram for integration of transfer-based attacks and query-based attacks. In the diagram 200, a curve 201 denotes an attack objective function on top of a target model, a curve 202 denotes an attack objective function on top of a surrogate model, an arrow 204 denotes the surrogate gradient, an arrow 206 denotes the true gradient, and an arrow 208 denotes the estimated gradient. However, the surrogate gradient is localized and may not be informative enough for the gradient estimation, as shown in FIG. 2. In other words, these previous methods are unable to sufficiently exploit the global information of the surrogate model in the entire space. Consequently, these method still require hundreds of queries before successfully attacking the target model.
[0031] Moreover, several studies turn to Bayesian optimization for black-box attacks. These methods adopt a Bayesian statistical model (e.g., Gaussian process) to approximate the attack objective and update a posterior distribution according to which the next point to query is chosen.
[0032] FIG. 3 shows a schematic diagram for Bayesian optimization in black-box attacks. In the diagram 300, a curve 301 denotes an attack objective function on top of a target model, points 310 denote previous queries, a curve 314 denotes a predicted mean, area 312 denotes confidence interval, and point 316 denotes a next query. Although these method are effective with low query budgets, they usually adopt a zero-mean Gaussian process, which does not leverage any prior information, leaving room for improvement.
[0033] To address the above-mentioned problems, present disclosure proposes a method for prior-guided Bayesian optimization, which integrates a surrogate model as a function prior into Bayesian optimization, allowing the function prior to provide abundant information of the black-box target model. Thus, the performance of black-box attack can be further improved.
[0034] FIG. 4 shows a schematic diagram for the proposed method of prior-guided Bayesian optimization according to one or more aspects of the present disclosure. In the diagram 400, a curve 401 denotes an attack objective function on top of a target model, a curve 402 denotes an attack objective function on top of a surrogate model, points 410 denote previous queries, a curve 414 denotes a predicted mean, area 412 denotes confidence interval, and point 416 denotes a next query. By initializing the mean function of the Gaussian process using the surrogate model, the Bayesian optimization can be guided properly to better approximate the attack objective function over the target model (e.g., the curve 401) , and thus the query efficiency of black-box adversarial attacks can be improved.
[0035] As shown by the two horizontal dotted lines in the examples of FIG. 3 and FIG. 4, compared with the next query 316 in absent of the prior information, the next query 416 can be generated more closely to the worst-case adversarial example with respect to the target model within a certain number of query budgets.
[0036] For clarity, more details and examples are provided below. It should be appreciated that these details or examples are provided as an illustration without limitation of the present disclosure to the specific forms or examples.
[0037] Generally, given a natural input and its ground-truth class c, adversarial attack aims to generate an adversarial example xadv by solving a constrained optimization problem:
[0038] Where f is an attack objective function on top of a target model (e.g., cross-entropy loss, or CW (Carlini &Wagner) loss, etc. ) , A= {x|||x-xnat||∞≤∈} is the allowed space of adversarial examples and we consider the l∞ norm with the perturbation budget ∈ for example. The class c is omitted in the following description for simplicity.
[0039] Bayesian optimization is an efficient method for finding global optima of black-box optimization problems. Specifically, assume f a prior follows a Gaussian process with mean equal zero (e.g., in current works) and kernel function k (·, ·) , denoted as f~GP (0, k) .
[0040] Given the observation data where yi=f (xi) , the predictive posterior distribution for f (x) at a test point x, denoted as follows a Gaussian distribution where
[0041] Where kT (x) = [k (x1, x) , k (x2, x) , …, k (xT, x) ] T, KT is a T×T matrix with its (i, j) -th element being k (xi, xj) , and yT= [y1, …, yT] T.
[0042] Typically, based on the posterior distribution, next query may be generated. For example, an acquisition function (e.g., denoted as α (x) ) may be constructed based on a certain theory, such as Expected Improvement (EI) , Probability of Improvement (PI) , Upper-Confidence Bounds (UCB) , or entropy-based methods, etc., by referring to the posterior distribution.
[0043] In one example, UCB may be chosen to obtain the acquisition function as below: α (x) =μT (x) +βσT (x) (4)
[0044] Where β is a coefficient for balancing exploration (e.g., encouraging queries in regions with high predictive variance) and exploitation (e.g., encouraging queries in regions with high predictive mean) .
[0045] Subsequently, the next query xT+1 may be generated by maximizing the acquisition function as and the next query xT+1 may be used to query the attack objective function on top of the target model f.
[0046] In one or more aspects of the present disclosure, as Bayesian optimization enables global optimization of the black-box objective function by building a probabilistic model, it is proposed to seamlessly integrate prior information over functions.
[0047] In an example, a white-box or known model (e.g., at least one of parameters, or structure of a model is known) may be determined as a surrogate model, and a corresponding attack objective function on top of the surrogate model, denoted as f′, may be obtained in the same form of f. The proposed method of prior-guided Bayesian optimization regards f′as a function prior to optimize the black-box attack objective function f.
[0048] Specifically, f a prior follows a Gaussian process with a mean function equal non-zero, i.e., f~GP (f′, k) . Similar to Eq. (2) and Eq. (3) , the posterior distribution given the observation data also follows a Gaussian distribution where
[0049] Where kT (x) , KT, yT are the same with those defined in Eq. (2) and Eq. (3) , and y′T= [f′ (x1) , …, f′ (xT) ] T.
[0050] In order to further improve the performance of black-box attacks, the regret bound of the proposed prior-guided Bayesian optimization is analyzed to explore further room to improve. We define the instantaneous regret rt=f (x*) -f (xt) at the t-th iteration, where is the global maximum. The cumulative regret RT after T iterations is In the realm of black-box optimization, we are typically concerned with the optimization error which can be upper bounded by Thus, the performance of black-box attacks (e.g., convergence rate) is closely related to the regret RT.
[0051] The regret bound of the proposed prior-guided Bayesian optimization with the statistical model GP (f′, k) and the UCB acquisition function may be derived as follow.
[0052] Where in which KT is the covariance matrix with its (i, j) -th element being k (xi, xj) , ||·||k denotes the Reproducing Kernel Hilbert Space (RKHS) norm, and assume f and f′lie in the RKHS corresponding to kernel k, and we use the UCB acquisition function as defined in equation (4) , where β=||f-f′||k. For technical reasons, we shall consider an observation noise in the Gaussian process modeling procedure (e.g., replacing KT in equations (5) and (6) with KT+σ2I) , but the actual observed value of f is deterministic and without noise.
[0053] According to the proof described with reference to the equation (7) , the regret bound is proportional to ||f-f′||k. To achieve better performance, a small value of ||f-f′||k is desired, at least satisfying ||f-f′||k≤||f||k. Therefore, if f′approximates closely to f, employing the Gaussian process GP (f′, k) to model f significantly lowers the regret.
[0054] However, as the machine learning models are increasingly defined in high-dimensional space (e.g., the features of the models may have higher and higher dimensions) , the requirement for approximation is quite strong to nowadays machine learning models. According to our studies, when f and f′are both random linear functions, ||f-f′||k>||f||k with high probability. This implies that when the target and prior functions (e.g., f and f′) are not closely aligned, directly modeling f with GP (f′, k) may degrade the performance. Therefore, an adaptive integration strategy is further proposed in the present disclosure.
[0055] To address the problem of hard alignment in high-dimensional space, a coefficient λ is set on the function prior and is automatically adjusted according to the quality of the function prior. The coefficient λ for the function prior may be used to control the strength of utilizing the function prior, and is optimized to achieve a better performance in black-box attacks.
[0056] In an example, the optimal value of the coefficient may be determined according to the quality of the function prior by minimizing the regret bound.
[0057] Specifically, the prior-guided Bayesian optimization with the adaptive integration strategy may model the objective as f~GP (λf′, k) . The optimal value of the coefficient λ may be determined as:
[0058] As the function f is unknown in black-box optimization, a heuristic approximation method may be used to estimate the optimal value of the coefficient λ*.
[0059] In an example, to optimize whose values at x1, …, xT can be stacked into the vector yT-λy′T, by using an insight of s.t. and where μT is the predictive posterior mean of the objective function modeled by GP (0, k) given observation data as defined in the equation (2) , and is the RKHS corresponding to the kernel k, can be approximated as following:
[0060] Where the const term is independent of λ, and represents the log-likelihood of under the modeling of GP (λf′, k) .
[0061] In an example, solving can be approximated as maximizing the log-likelihood, i.e., solving
[0062] FIG . 5 illustrates an exemplary workflow for a method of generating adversarial examples in black-box attacks according to one or more aspects of the present disclosure. The method 500 may be used to attack diverse machine learning models to evaluate adversarial robustness, or adversarial examples generated by the method 500 may be useful in adversarial trainings of the machine learning models.
[0063] At step 510, an observation data comprising a set of inputs and a set of attack metric values may be obtained, for example, the set of inputs may correspond to previous queries (such as, randomly sampled points under a given Gaussian process) , and the set of attack metric values may correspond to the values derived by a first attack objective function on top of a target model (e.g., a first model) when inputting the set of inputs.
[0064] In an example, the operation at step 510 may correspond to obtaining the observation data where yi=f (xi) , xi may correspond to the set of inputs, yi may correspond to the set of attack metric values, and f may correspond to the first attack objective function on top of a target model (for example, in a form of CW loss, or cross-entropy loss, and the like) .
[0065] In an example, at least one of parameters, objective function, or structure of the target model is unknown, like a black-box.
[0066] At step 520, a surrogate model (e.g., a second model) may be used to provide prior information in a Gaussian process that is used to approximate the first attack objective function. For example, the Gaussian process may comprise a second attack objective function that is on top of the surrogate model as a mean function.
[0067] In an example, the operation at step 520 may correspond to the operation that f a prior follows a Gaussian process with a mean function equal non-zero, i.e., f~GP (f′, k) , where f′may correspond to the second attack objective function that is on top of the surrogate model.
[0068] In an example, the surrogate model is known. For example, at least one of the parameters, structure, mapping function between inputs and outputs, or the training dataset of the surrogate model is known.
[0069] In an example, the surrogate model may approximate to the target model. For example, the surrogate model may have a type similar or same to that of the target model. For example, the type of a machine learning model may indicate at least one of a type of a task performed by the model (e.g., image processing, reasoning, natural language processing, robot controlling, or visual processing and the like) , or a basic structure type of the model (e.g., a Convolutional Neural Network (CNN) , a Recurrent Neural Network (RNN) , or a Transformer Model (TM) ) . It should be appreciated that although one may know a type of a target model, for example, the target model is a CNN or RNN, but the specific structure (e.g., the number of layers) or the parameters (e.g., trainable parameters or hyper-parameters) of the target model cannot be accessed or known to an observer in black-box attacks. It can be seen from the proof described with reference to the equation (7) , the approximation of the surrogate model to the target model can significantly lower the regret, and thus the performance of the black-box attacks can be improved.
[0070] In an example, the Gaussian process may further comprise a coefficient for the second attack objective function that is on top of the second model. For example, the coefficient may be used to control the strength of utilizing the second attack objective function that is on top of the second model in the optimization, to achieve a better performance in black-box attacks.
[0071] In an example, the coefficient may be adjusted as a hyper-parameter, according to a log-likelihood of the observation data (e.g., at least part of the set of inputs and the set of attack metric values) under the Gaussian process (e.g., GP (λf′, k) ) , as described with reference to the equation (9) . For example, adjusting the coefficient based on a likelihood of a subset of (i.e., not all of) the observation data (e.g., part of the set of inputs and the set of attack metric values) may reduce storage, computing resources, or complexity of the algorithm.
[0072] At step 530, a posterior distribution for the first attack objective function may be obtained based on the observation data and the Gaussian process determined at step 520.
[0073] In an example, the operation at step 530 may correspond to the operation described with reference to the equation (5) and equation (6) .
[0074] At step 540, a next input or query may be obtained based on the posterior distribution for the first attack objective function to attack the target model.
[0075] In an example, the operation at step 540 may correspond to the operation described with reference to the equation (4) and maximizing the acquisition function as to generate the next query xT+1.
[0076] In an example, the next query (e.g., xT+1) may be generated based on other acquisition functions using a certain theory, such as, EI, PI, or entropy-based methods, by referring to the posterior distribution.
[0077] FIG . 6 illustrates another exemplary workflow for a method of generating adversarial examples in black-box attacks according to one or more aspects of the present disclosure. Method 600 may utilize the above-mentioned methods or processes, and steps 610, 620, 630 and 640 may correspond to the steps 510, 520, 530 and 540 of method 500. Optionally, at step 640, the set of inputs may be updated with the next input obtained at step 640.
[0078] At step 650, a determination may be made on whether the next input generated at step 640 successfully attacks the first model (i.e., the target model) . If the determination is made that the next input successfully attacks the first model (e.g., misleading the target model to give a wrong class) , the workflow may proceed to step 660, where the next input may be outputted as an adversarial example to the target model, and the workflow may be ended. If the determination is made that the next input does not successfully attack the first model, the workflow may proceed to step 610, where a next iteration may be started.
[0079] Alternatively or additionally, at step 650, before starting a next iteration, a determination may be made on whether the threshold number of inputs (e.g., queries) is exceeded. For example, a query budget may limit the number of queries to the target model. If the determination is made that the threshold number of inputs is not exceeded, a next iteration can be started, e.g., the workflow may proceed to step 610. If the determination is made that the threshold number of inputs is exceeded, the workflow may proceed to step 660, an optimal input may be selected from the set of inputs that leads a maximum value of the set of attack matric values, and the workflow may be ended.
[0080] In one or more aspects of the present disclosure, an algorithm is presented to provide an exemplary implementation of the proposed methods herein. It should be appreciated that these details or examples are provided as an illustration without limitation of the present disclosure to the specific forms or examples, and other algorithms are also possible without causing a departure of the present disclosure.
[0081] Algorithm 1
[0082] 1: Input: objective function f; function prior f′; search space A; number of queries N; kernel function k; balancing coefficient β.
[0083] 2: Output: approximate solution x* maximizing f.
[0084] 3: Construct an initial dataset:
[0085] 4: for T=S to N-1 do
[0086] 5: Normalize yT, y′T, and f′;
[0087] 6: Solve λ* by maximizing
[0088] 7: Compute posterior of GP (λf′, k) , where
[0089] 8: Compute acquisition function: α (x) =μT (x) +βσT (x) ;
[0090] 9: Obtain the next query point:
[0091] 10: Query f at xT+1 to obtain yT+1=f (xT+1) ;
[0092] 11: Update the dataset:
[0093] 12: end for
[0094] 13: return xN
[0095] Wherein at each iteration, yT, y′T, and f′may be normalized to a good and similar numerical range: where μ and σ represent the mean and standard deviation of yT, and μ′and σ′represent the mean and standard deviation of y′T. In the algorithm, the maximization problem of finding λ* and xT+1 may be solved by gradient-based methods.
[0096] To further demonstrate the advantages of the present disclosure, experimental results are given in the following Table 1.
[0097] Wherein the attack methods are performed on the three black-box target models: ResNet-50, DenseNet-121 and SENet-18. A Wide ResNet model (WRN-34-10) is adopted as the surrogate model for our proposed methods. The query budget is set as N=1000. The perturbation size is under the l∞ norm. We adopt the attack success rate (ASR) , and the average / median number of queries (AVG. Q / MED. Q) needed to generate an adversarial example to evaluate the performance. For all test methods, we restrict the maximum number of queries for each image as 1000. We report a successful attack if a method generates an adversarial example within 1000 queries and the size of perturbation is smaller than the budget (i.e., ) .
[0098] FIG. 7 illustrates an example of a hardware implementation for an apparatus 700 according to one or more aspects of the present disclosure. The apparatus 700 for generating an adversarial example may comprise a memory 710 and at least one processor 720. The processor 720 may be coupled to the memory 710 and configured to implement the methods and / or algorithms, described above with reference to FIGs. 4, 5, and 6. The processor 720 may be a general-purpose processor, or may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration. The memory 710 may store the input data, output data, data generated and / or processed (e.g., coefficients, or queries) by processor 720, and / or instructions executed by processor 720.
[0099] The various operations, models, and networks described in connection with the disclosure herein may be implemented in hardware, software executed by a processor, firmware, or any combination thereof. According an embodiment of the disclosure, a computer program product for generating an adversarial example may comprise processor executable computer code for implementation of the methods and / or the algorithms described above with reference to FIGs. 4, 5 and 6. According to another embodiment of the disclosure, a computer readable medium may store computer code for generating an adversarial example, the computer code when executed by a processor may cause the processor to implement the methods and / or the algorithms described above with reference to FIGs. 4, 5 and 6. Computer-readable media includes both non-transitory computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. Any connection may be properly termed as a computer-readable medium. Other embodiments and implementations are within the scope of the disclosure.
[0100] The preceding description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the various embodiments. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the scope of the various embodiments. Thus, the claims are not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the following claims and the principles and novel features disclosed herein.
Claims
1.A computer-implemented method for generating an adversarial example, comprising:obtaining a set of inputs and a set of attack metric values, wherein the set of attack metric values are obtained by inputting the set of inputs to a first attack objective function that is on top of a first model;determining a Gaussian process as a prior for the first attack objective function, wherein the Gaussian process comprises a second attack objective function that is on top of a second model as a mean function;obtaining a posterior distribution for the first attack objective function based on the set of inputs and the set of attack metric values and the Gaussian process; andobtaining a next input based on the posterior distribution for the first attack objective function to attack the first model.2.The computer-implemented method of claim 1, wherein at least one of parameters, objective function, or structure of the first model is unknown.3.The computer-implemented method of claim 1, wherein the second model is known and has a type same as that of the first model.4.The computer-implemented method of claim 1, wherein the Gaussian process further comprises a coefficient for the second attack objective function that is on top of the second model.5.The computer-implemented method of claim 4, wherein the coefficient is adjustable based on a likelihood of at least part of the set of inputs and the set of attack metric values under the Gaussian process.6.The computer-implemented method of claim 1, wherein the posterior distribution for the first attack objective function comprises a Gaussian distribution.7.A computer-implemented method for generating an adversarial example, comprising:obtaining a set of inputs and a set of attack metric values, wherein the set of attack metric values are obtained by inputting the set of inputs to a first attack objective function that is on top of a first model;determining a Gaussian process as a prior for the first attack objective function, wherein the Gaussian process comprises a second attack objective function that is on top of a second model as a mean function;obtaining a posterior distribution for the first attack objective function based on the set of inputs and the set of attack metric values and the Gaussian process; andobtaining a next input based on the posterior distribution for the first attack objective function to attack the first model;wherein the set of inputs comprise a set of images, the first model comprises an image classifier, and the next input comprises an image to mislead the image classifier to generate a wrong class.8.An apparatus for generating an adversarial example, comprising:a memory; andat least one processor coupled to the memory and configured to perform the method of one of claims 1-7.9.A computer program product for generating an adversarial example, comprising: processor executable computer code for performing the method of one of claims 1-7.10.A computer readable medium, storing computer code for generating an adversarial example, the computer code when executed by a processor, causing the processor to perform the method of one of claims 1-7.
Citation Information
Patent Citations
Bayesian-optimization-based query-efficient black-box adversarial attacks
CN112633309A
Adversarial sample generation method, related device and storage medium
CN117332844A
Interpretability Framework for Differentially Private Deep Learning
US20220138348A1
Systems, methods, and apparatuses for integrating a defense mechanism into deep-learning-based systems to defend against adversarial attacks
US20230018948A1