# US 2022/0292185 A1 · Securing machine learning models against adversarial samples through backdoor misclassification

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2022/0292185 A1
- Document ID: US20220292185A1
- Status: Published application
- Kind: A1
- Application number: 17/342,571
- Filed: 2021-06-09
- Published: 2022-09-15
- Earliest claimed: 2021-03-09
- Assignees: NEC Corporation
- Applicants: NEC Laboratories Europe GmbH
- Inventors: Sebastien ANDREINA; Giorgia Azzurra MARSON; Ghassan KARAME
- Web page: https://patentgrep.com/patent/US20220292185A1

## CPC

- G06F 21/55: Detecting local intrusion or implementing counter-measures
- G06F 18/241: relating to the classification model, e.g. parametric or non-parametric approaches
- G06F 18/2431: Multiple classes
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/08: Learning methods
- G06N 3/09: Supervised learning
- G06N 3/094: Adversarial learning
- G06V 10/751: {Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching}
- G06V 10/82: using neural networks
- G06F 2221/033: Test or assess software
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING

## Abstract

A method for securing a genuine machine learning model against adversarial samples includes the steps of attaching a trigger to a sample to be classified and classifying the sample with the trigger attached using a backdoored model that has been backdoored using the trigger. In a further step, it is determined whether an output of the backdoored model is the same as a backdoor class of the backdoored model, and/or an outlier detection method is applied to logits compared to honest logits that were computed using a genuine sample. These steps are repeated using different triggers and backdoored models respectively associated therewith. It is compared a number of times that an output of the backdoored models is not the same as the respective backdoor class, and/or a difference determined by applying the outlier detection method, against one or more thresholds so as to determine whether the sample is adversarial.

## Claims

### Claim 1

A method for securing a genuine machine learning model against adversarial samples, the method comprising:
a) attaching a trigger to a sample to be classified;
b) classifying the sample with the trigger attached using a backdoored model that has been backdoored using the trigger;
c) determining whether an output of the backdoored model in step b) is the same as a backdoor class of the backdoored model, and/or applying an outlier detection method to logits from step b) compared to honest logits that were computed using a genuine sample that had the trigger attached and was applied to the backdoored model;
d) repeating steps a)-c) using different triggers and backdoored models respectively associated with the different triggers; and
e) comparing a number of times that a respective one of the outputs of the backdoored models is not the same as a respective one of the backdoor classes of the backdoored models, and/or a difference determined by applying the outlier detection method, against a predetermined threshold and/or difference threshold so as to determine whether the sample is an adversarial sample.

### Claim 2 (depends on 1)

The method according to claim 1, further comprising:
classifying the sample without any of the triggers attached using the genuine machine learning model as a result of a classification request for the sample in a case that the number of times that a respective one of the outputs of the backdoored models is not the same as a respective one of the backdoor classes of the backdoored models is less than or equal to the threshold; and
rejecting the sample as the adversarial sample in a case that the number of times that a respective one of the outputs of the backdoored models is not the same as a respective one of the backdoor classes of the backdoored models is greater than the threshold.

### Claim 3 (depends on 2)

The method according to claim 2, further comprising flagging the sample as tampered in the case that the number of times that a respective one of the outputs of the backdoored models is not the same as a respective one of the backdoor classes of the backdoored models is greater than the threshold.

### Claim 4 (depends on 3)

The method according to claim 3, wherein the threshold is zero.

### Claim 5 (depends on 1)

The method according to claim 1, wherein each of the backdoored models are generated by:
generating a respective one of the triggers as a pattern recognizable by the genuine machine learning model;
adding the respective trigger to a plurality of training samples;
changing a target class of the training samples having the respective trigger added to a respective one of the backdoor classes; and
training another version of the genuine machine learning model using the training samples having the respective trigger added.

### Claim 6 (depends on 5)

The method according to claim 5, wherein the training is performed until the respective backdoored model has an accuracy of 90% or higher.

### Claim 7 (depends on 5)

The method according to claim 5, wherein the genuine machine learning model and the version of the genuine machine learning model are each trained, and wherein the training of the version of the genuine machine learning model using the training samples having the respective trigger added is additional training to create the respective backdoored model from the genuine machine learning model.

### Claim 8 (depends on 7)

The method according to claim 7, wherein the additional training includes training with genuine samples along with the samples having the respective trigger added.

### Claim 9 (depends on 1)

The method according to claim 1, wherein the classifying of step b) comprises extracting the logits in the classification of the sample having the trigger attached using the backdoored model, wherein an output class of the backdoored models are not used for determining whether the sample is the adversarial sample, and wherein, in step e), the logits from step b) are compared to a set of honest logits that were computed using a plurality of genuine samples that had respective ones of the triggers attached and were applied to each of the backdoored models.

### Claim 10 (depends on 9)

The method according to claim 9, the method further comprising:
classifying the sample without any of the triggers attached using the genuine machine learning model as a result of a classification request for the sample in a case that results of the outlier detection method for each of the logits is less than or equal to the difference threshold; and
rejecting the sample as the adversarial sample in a case that the results of the outlier detection method for each of the logits is greater than the difference threshold.

### Claim 11 (depends on 10)

The method according to claim 10, wherein the outlier detection method uses a local outlier factor algorithm.

### Claim 12 (depends on 1)

The method according to claim 1, wherein the genuine machine learning model is based on a neural network and trained for image classification.

### Claim 13

A system for securing a genuine machine learning model against adversarial samples, the system comprising one or more hardware processors configured, alone or in combination, to facilitate execution of the following steps:
a) attaching a trigger to a sample to be classified;
b) classifying the sample with the trigger attached using a backdoored model that has been backdoored using the trigger;
c) determining whether an output of the backdoored model in step b) is the same as a backdoor class of the backdoored model, and/or applying an outlier detection method to logits from step b) compared to honest logits that were computed using a genuine sample that had the trigger attached and was applied to the backdoored model;
d) repeating steps a)-c) using different triggers; and
e) comparing a number of times that a respective one of the outputs of the backdoored models is not the same as a respective one of the backdoor classes of the backdoored models, and/or a difference determined by applying the outlier detection method, against a predetermined threshold and/or difference threshold so as to determine whether the sample is an adversarial sample.

### Claim 14 (depends on 13)

The system according to claim 13, being further configured to:
classify the sample without any of the triggers attached using the genuine machine learning model as a result of a classification request for the sample in a case that the number of times that a respective one of the outputs of the backdoored models is not the same as a respective one of the backdoor classes of the backdoored models is less than or equal to the threshold; and
reject the sample as the adversarial sample in a case that the number of times that a respective one of the outputs of the backdoored models is not the same as a respective one of the backdoor classes of the backdoored models is greater than the threshold.

### Claim 15

A tangible, non-transitory computer-readable medium having instructions thereon, which, upon execution by one or more processors, secure a genuine machine learning model against adversarial samples by providing for execution of the following steps:
a) attaching a trigger to a sample to be classified;
b) classifying the sample with the trigger attached using a backdoored model that has been backdoored using the trigger;
c) determining whether an output of the backdoored model in step b) is the same as a backdoor class of the backdoored model, and/or applying an outlier detection method to logits from step b) compared to honest logits that were computed using a genuine sample that had the trigger attached and was applied to the backdoored model;
d) repeating steps a)-c) using different triggers; and
e) comparing a number of times that a respective one of the outputs of the backdoored models is not the same as a respective one of the backdoor classes of the backdoored models, and/or a difference determined by applying the outlier detection method, against a predetermined threshold and/or difference threshold so as to determine whether the sample is an adversarial sample.
