# US 11,443,245 B1 · Method and system for federated adversarial domain adaptation

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

- Number: US 11,443,245 B1
- Document ID: US11443245B1
- Status: Granted
- Kind: B1
- Application number: 17/382,809
- Filed: 2021-07-22
- Granted: 2022-09-13
- Earliest claimed: 2021-07-22
- Assignees: Alipay Labs (Singapore) Pte. Ltd.
- Applicants: Alipay Labs (Singapore) Pte. Ltd.
- Inventors: Jian Du; Yan Shen; Mingchen Gao; Benyu Zhang
- Web page: https://patentgrep.com/patent/US11443245B1

## CPC

- G06N 20/00: Machine learning
- G06N 20/20: Ensemble learning
- G06N 5/01: Dynamic search techniques; Heuristics; Dynamic trees; Branch-and-bound
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

Methods, systems, and apparatuses, including computer programs encoded on computer storage media, for federal learning are disclosed. One exemplary method may include receiving, by a client device from a server device, model parameters of a global machine learning model being collaboratively trained by the client device and the server device; constructing, by the client device, a local machine learning model based on the model parameters of the global machine learning model, wherein the local machine learning model comprises two branches corresponding to two loss functions; training, by the client device, the local machine learning model based on local training data, wherein the training comprises updating the model parameters to minimize a first loss function of the two loss functions and maximize a second loss function of the two loss functions; and sending, by the client device, the updated model parameters back to the server device.

## Claims

### Claim 1

A computer-implemented method, comprising:
receiving, by a client device from a server device, model parameters of a global machine learning model, wherein the client device is one of a plurality client devices that receive the model parameters from the server device;
constructing, by the client device, a local machine learning model based on the model parameters of the global machine learning model, wherein the local machine learning model comprises two branches corresponding to two loss functions;
training, by the client device, the local machine learning model based on local training data, wherein the training comprises updating the model parameters to minimize a first loss function of the two loss functions and maximize a second loss function of the two loss functions at a same time; and
sending, by the client device, the updated model parameters back to the server device to cause the server device to update parameters of the global machine learning model based on the updated model parameters from the client device and parameters received from other client devices of the plurality of client devices;
receiving, by the client device from the server device, model parameters of an updated global machine learning model; and
performing, by the client device, another round of local training based on the received model parameters of the updated global machine learning model.

### Claim 2 (depends on 1)

The method of claim 1, wherein
the local machine learning model comprises a feature extraction layer shared by a label prediction branch and a domain classification branch,
the feature extraction layer extracting features from input training data,
the label prediction branch predicting a label for the input training data based on the extracted features, and
the domain classification branch predicting a domain from which the input training data is collected.

### Claim 3 (depends on 2)

The method of claim 2, wherein the model parameters comprise a first set of parameters and a second set of parameters of the global machine learning model, and
the constructing the local machine learning model comprises:
constructing the feature extraction layer and the label prediction branch based on the first set of parameters; and
constructing the domain classification branch based on the second set of parameters.

### Claim 4 (depends on 2)

The method of claim 2, wherein the updating the model parameters to minimize the first loss function of the two loss functions and maximize the second loss function of the two loss functions comprises:
adjusting the model parameters to minimize errors of the label prediction branch; and
adjusting the model parameters to maximize errors of the domain classification branch.

### Claim 5 (depends on 1)

The method of claim 1, wherein
the local training data comprises labeled training data collected from one or more source domains and unlabeled training data from a target domain.

### Claim 6 (depends on 5)

The method of claim 5, wherein the training the local machine learning model comprises:
training a feature extraction layer and a label prediction branch based on the labeled training data; and
training the feature extraction layer and a domain classification branch based on the labeled training data and the unlabeled training data.

### Claim 7 (depends on 1)

The method of claim 1, wherein the model parameters from the server device comprise a first set of parameters and a second set of parameters of the global machine learning model, and the training the local machine learning model comprises:
obtaining predictions from the local machine learning model in response to input training data;
updating the first set of parameters using gradient descent based on the obtained predictions; and
updating the second set of parameters using gradient ascent based on the obtained predictions.

### Claim 8 (depends on 7)

The method of claim 7, wherein the updating the first set of parameters using gradient descent comprises:
determining a new first set of parameters based on the first set of parameters and a first dual variable for restricting gradient divergence; and
wherein the updating the second set of parameters using gradient ascent comprises:
determining a new second set of parameters based on the second set of parameters and a second dual variable for restricting gradient divergence.

### Claim 9 (depends on 8)

The method of claim 8, further comprising:
updating the first dual variable based on the new first set of parameters;
updating the second dual variable based on the new second set of parameters;
obtaining an updated first set of parameters based on the updated first dual variable and the new first set of parameters; and
obtaining an updated second set of parameters based on the updated second dual variable and the new second set of parameters.

### Claim 10 (depends on 9)

The method of claim 9, wherein the sending the updated model parameters back to the server device for global update comprises:
sending the updated first set of parameters and the updated second set of parameters to the server device for aggregation.

### Claim 11

A system of a client device comprising one or more processors and one or more non-transitory computer-readable memories coupled to the one or more processors and configured with instructions executable by the one or more processors to cause the system to perform operations comprising:
receiving, from a server device, model parameters of a global machine learning model, wherein the client device is one of a plurality client devices that receive the model parameters from the server device;
constructing a local machine learning model based on the model parameters of the global machine learning model, wherein the local machine learning model comprises two branches corresponding to two loss functions;
training the local machine learning model based on local training data, wherein the training comprises updating the model parameters to minimize a first loss function of the two loss functions and maximize a second loss function of the two loss functions at a same time;
sending the updated model parameters back to the server device to cause the server device to update parameters of the global machine learning model based on the updated model parameters from the client device and parameters received from other client devices of the plurality of client devices;
receiving, from the server device, model parameters of an updated global machine learning model; and
performing another round of local training based on the received model parameters of the updated global machine learning model.

### Claim 12 (depends on 11)

The system of claim 11, wherein the local training data are collected from one or more domains, and
the local machine learning model comprises a feature extraction layer shared by a label prediction branch and a domain classification branch,
the feature extraction layer extracting features from input training data,
the label prediction branch predicting a label for the input training data based on the extracted features, and
the domain classification branch predicting a domain from which the input training data is collected.

### Claim 13 (depends on 12)

The system of claim 12, wherein the updating the model parameters to minimize the first loss function of the two loss functions comprises:
adjusting the model parameters to minimize errors of the label prediction branch.

### Claim 14 (depends on 12)

The system of claim 12, wherein the updating the model parameters to maximize the second loss function of the two loss functions comprises:
adjusting the model parameters to maximize errors of the domain classification branch.

### Claim 15 (depends on 11)

The system of claim 11, wherein the model parameters from the server device comprise a first set of parameters and a second set of parameters of the global machine learning model, and the training of the local machine learning model comprises:
obtaining predictions from the local machine learning model in response to input training data;
updating the first set of parameters using gradient descent based on the obtained predictions; and
updating the second set of parameters using gradient ascent based on the obtained predictions.

### Claim 16

A non-transitory computer-readable storage medium of a client device, configured with instructions executable by one or more processors to cause the one or more processors to perform operations comprising:
receiving, from a server device, model parameters of a global machine learning model, wherein the client device is one of a plurality client devices that receive the model parameters from the server device;
constructing a local machine learning model based on the model parameters of the global machine learning model, wherein the local machine learning model comprises two branches corresponding to two loss functions;
training the local machine learning model based on local training data, wherein the training comprises updating the model parameters to minimize a first loss function of the two loss functions and maximize a second loss function of the two loss functions at a same time;
sending the updated model parameters back to the server device to cause the server device to update parameters of the global machine learning model based on the updated model parameters from the client device and parameters received from other client devices of the plurality of client devices;
receiving, from the server device, model parameters of an updated global machine learning model; and
performing another round of local training based on the received model parameters of the updated global machine learning model.

### Claim 17 (depends on 16)

The non-transitory computer-readable storage medium of claim 16, wherein the local training data are collected from one or more domains, and
the local machine learning model comprises a feature extraction layer shared by a label prediction branch and a domain classification branch,
the feature extraction layer extracting features from input training data,
the label prediction branch predicting a label for the input training data based on the extracted features, and
the domain classification branch predicting a domain from which the input training data is collected.

### Claim 18 (depends on 16)

The non-transitory computer-readable storage medium of claim 16, wherein the model parameters from the server device comprise a first set of parameters and a second set of parameters of the global machine learning model, and the training of the local machine learning model comprises:
obtaining predictions from the local machine learning model in response to input training data;
updating the first set of parameters using gradient descent based on the obtained predictions, wherein the updating comprises determining a new first set of parameters based on the first set of parameters and a first dual variable for restricting gradient divergence; and
updating the second set of parameters using gradient ascent based on the obtained predictions, wherein the updating comprises determining a new second set of parameters based on the second set of parameters and a second dual variable for restricting gradient divergence.

### Claim 19 (depends on 1)

The method of claim 1, wherein the local training data comprises fMRI (Functional Magnetic Resonance Imaging) data collected by a medical scanner.

### Claim 20 (depends on 1)

The method of claim 1, further comprising:
quantizing, by the client device, the updated model parameters from continuous values to a smaller set of discrete finite values, and
wherein the sending the updated model parameters to the server device comprises:
sending the quantized model parameters to the server device.
