# US 2022/0292387 A1 · Byzantine-robust federated learning

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

- Number: US 2022/0292387 A1
- Document ID: US20220292387A1
- Status: Published application
- Kind: A1
- Application number: 17/195,982
- Filed: 2021-03-09
- Published: 2022-09-15
- Earliest claimed: 2021-03-09
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Yi Zhou; Nathalie Baracaldo Angel; Kamala Micaela Noelle Varma; Ali Anwar; Syed Amer Zawad
- Web page: https://patentgrep.com/patent/US20220292387A1

## CPC

- G06F 21/552: {involving long-term monitoring or reporting}
- G06N 20/00: Machine learning
- G06F 17/16: Matrix or vector computation {, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization (matrix transposition G06F7/78)}
- G06F 21/554: {involving event detection and direct action}
- G06F 21/566: {Dynamic detection, i.e. detection performed at run-time, e.g. emulation, suspicious activities}
- G06F 21/577: {Assessing vulnerabilities and evaluating computer system security}
- G06N 3/0442: characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/098: Distributed learning, e.g. federated learning
- 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

## Abstract

Embodiments of the present disclosure include a federated learning method by a federated learning aggregator. The method may comprise creating a log of previously provided gradients from a plurality of workers, receiving updated gradients from the plurality of workers, calculating a vulnerability weight for each layer of a global machine learning model using the updated gradients, calculating an aggregated gradient using the vulnerability weight and the updated gradients, and updating the global machine learning model using the aggregated gradient. Some embodiments may also determine whether a Byzantine attack is occurring based upon the calculated aggregated gradient.

## Claims

### Claim 1

A federated learning method by a federated learning aggregator, comprising:
creating a log of previously provided gradients from a plurality of workers;
receiving updated gradients from the plurality of workers;
calculating a vulnerability weight for each layer of a global machine learning model using the updated gradients;
calculating an aggregated gradient using the vulnerability weight and the updated gradients; and
updating the global machine learning model using the aggregated gradient.

### Claim 2 (depends on 1)

The method of claim 1, further comprising determining whether a Byzantine attack is occurring based upon the calculated aggregated gradient.

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
issuing queries to the plurality of workers; and
collecting the updated gradients from the plurality of workers.

### Claim 4 (depends on 3)

The method of claim 3, wherein the queries include current parameters for the machine learning model.

### Claim 5 (depends on 1)

The method of claim 1, further comprising maintaining the log within a predetermined maximum log size of past collected gradients from the plurality of workers, wherein:
the federated learning aggregator adds current gradients to log; and
the federated learning aggregator removes oldest gradients to keep a current log size less than the predetermined maximum log size.

### Claim 6 (depends on 1)

The method of claim 1, further comprising computing a robustness factor for a plurality of layers in the machine learning model, wherein the federated learning aggregator calculates layer weights using the robustness factor.

### Claim 7 (depends on 6)

The method of claim 6, further comprising periodically updating the layer weights.

### Claim 8 (depends on 6)

The method of claim 6, wherein calculating the robustness factor comprises:
calculating, for each layer in the global machine learning model, an L2 norm across the previously provided gradients and the updated gradients;
calculating, for each layer in the global machine learning model, a standard deviation of each layer's L2 norms from each round; and
determining the weight factor for each layer using the normalized reciprocals of the calculated standard deviations.

### Claim 9 (depends on 8)

The method of claim 8, wherein:
the aggregated gradient is computed via a weighted average; and
the updated gradients are multiplied by a function of each layer's robustness factor and then added to an average of previously provided gradients multiplied by one minus a function of the layer's robustness factor.

### Claim 10 (depends on 1)

The method of claim 1, wherein the global machine learning model is updated with a gradient descent step using the aggregated gradient.

### Claim 11 (depends on 1)

The method of claim 1, further comprising identifying a layer in the global machine learning model that is relatively more vulnerable to Byzantine attacks.

### Claim 12 (depends on 1)

The method of claim 1, further comprising filtering outlier gradients.

### Claim 13

A computer program product for a federated learning aggregator, comprising:
a computer readable storage medium having program instructions embodied therewith, the program instructions executable by a processor to cause the processor to:
create a log of previously provided gradients from a plurality of workers;
issue queries to the plurality of workers, wherein the queries include current parameters for the machine learning model;
receive updated gradients from the plurality of workers;
maintain the log within a predetermined maximum log size of past collected gradients from the plurality of workers, wherein:
the federated learning aggregator adds current gradients to log; and
the federated learning aggregator removes oldest gradients to keep a current log size less than the predetermined maximum log size;
calculate a vulnerability weight for each layer of a global machine learning model using the updated gradients;
calculate an aggregated gradient using the vulnerability weight and the updated gradients; and
periodically update the layer weights in the global machine learning model with a gradient descent step using the aggregated gradient.

### Claim 14

A federated learning aggregator, comprising a processor configured to execute instructions that, when executed on the processor, cause the processor to:
create a log of previously provided gradients from a plurality of workers;
receive updated gradients from the plurality of workers;
calculate a vulnerability weight for each layer of a global machine learning model using the updated gradients;
calculate an aggregated gradient using the vulnerability weight and the updated gradients; and
update the global machine learning model using the aggregated gradient.

### Claim 15 (depends on 14)

The federated learning aggregator of claim 14, further comprising instructions to determine whether a Byzantine attack is occurring based upon the calculated aggregated gradient.

### Claim 16 (depends on 14)

The federated learning aggregator of claim 14, further comprising instructions to maintain the log within a predetermined maximum log size of past collected gradients from the plurality of workers, wherein:
the federated learning aggregator adds current gradients to log; and
the federated learning aggregator removes oldest gradients to keep a current log size less than the predetermined maximum log size.

### Claim 17 (depends on 14)

The federated learning aggregator of claim 14, further comprising instructions to compute a robustness factor for a plurality of layers in the machine learning model, wherein the federated learning aggregator calculates layer weights using the robustness factor.

### Claim 18 (depends on 17)

The federated learning aggregator of claim 17, further comprising instructions to periodically update the layer weights.

### Claim 19 (depends on 17)

The federated learning aggregator of claim 17, wherein calculating the robustness factor comprises:
calculating, for each layer in the global machine learning model, an L2 norm across the previously provided gradients and the updated gradients;
calculating, for each layer in the global machine learning model, a standard deviation of each layer's L2 norms from each round; and
determining the weight factor for each layer using the normalized reciprocals of the calculated standard deviations.

### Claim 20 (depends on 19)

The federated learning aggregator of claim 19, wherein:
the aggregated gradient is computed via a weighted average; and
the updated gradients are multiplied by a function of each layer's robustness factor and then added to an average of previously provided gradients multiplied by one minus a function of the layer's robustness factor.
