Servers, methods and systems for fair and secure vertical federated learning
View Patent ↗Servers, methods and systems are disclosed for fair and secure vertical federated learning. Fair and secure vertical federated learning (FSVFL) systems are disclosed that achieve one or more of the following properties: model fairness, high security, high accuracy, high efficiency, and/or high generality. Private data is retained on local computing systems, which share only their model outputs, and a server or a trusted computing system shares only model gradients and randomly partitioned sets of data sample identifiers with untrusted computing systems. A fairness constraint protects protected classes of data samples against model training resulting in bias on the basis of the protected classes.
1 . A method for training a primary machine learning model using vertical federated learning, comprising:
obtaining a plurality of labels, each label identifying a ground truth prediction for a feature of a data sample of a plurality of data samples;
obtaining protected class information identifying one or more protected classes;
generating partition data identifying one or more positive data samples of the plurality of data samples, each positive data sample being associated with a label having a positive ground truth prediction indicating positive membership of the data sample in a class of a plurality of classes;
performing a plurality of training iterations, wherein performing a training iteration includes:
obtaining, from each computing system of a plurality of computing systems, an output of a local machine learning model of the computing system based on a local dataset of the computing system;
processing the outputs of the plurality of computing systems to generate a prediction;
processing the prediction and the one or more labels to generate a loss;
processing the loss and the protected class information to generate an unfairness measure indicating a degree to which the prediction is affected by a given data sample's positive membership in a protected class;
processing the loss to generate a loss gradient for training the primary machine learning model;
processing the unfairness measure to generate a unfairness gradient for training the primary machine learning model;
adjusting a plurality of learnable parameters of the primary machine learning model based on the loss gradient and the unfairness gradient; and
for each of one or more passive computing systems of the plurality of computing systems:
computing a local loss gradient for training the local machine learning model of the passive computing system;
computing a local unfairness gradient for training the local machine learning model of the passive computing system;
sending the partition data, the local loss gradient, and the local unfairness gradient to the passive computing system;
receiving a set of patched local gradients for the local machine learning model of the passive computing system, based on the local unfairness gradient;
processing the patched local gradients to compute a further unfairness gradient; and
sending the further unfairness gradient to the passive computing system;
wherein the training iterations are performed until a convergence condition is satisfied.
2 . The method of claim 1 , wherein:
the plurality of local machine learning models includes the primary machine learning model;
the plurality of computing systems includes a task owner computing system comprising the primary machine learning model;
processing the outputs of the plurality of computing systems to generate a prediction comprises providing the outputs to a global machine learning model to generate a global prediction;
the loss gradient for training the primary machine learning model is generated by processing the loss and the global machine learning model;
the unfairness gradient for training the primary machine learning model is generated by processing the unfairness measure and the global machine learning model; and
adjusting the plurality of learnable parameters of the primary machine learning model based on the loss gradient and the unfairness gradient comprises:
sending the loss gradient and the unfairness gradient to the task owner computing system; and
at the task owner computing system, adjusting the plurality of learnable parameters of the primary machine learning model based on the loss gradient and the unfairness gradient.
3 . The method of claim 1 , wherein:
the plurality of local machine learning models includes the primary machine learning model;
the plurality of computing systems includes a task owner computing system comprising the primary machine learning model;
processing the outputs of the plurality of computing systems to generate a prediction comprises summing the outputs to generate the prediction, the prediction being an aggregated prediction;
the loss gradient for training the primary machine learning model is generated by processing the loss and the aggregated prediction;
the unfairness gradient for training the primary machine learning model is generated by processing the unfairness measure and the aggregated prediction; and
adjusting the plurality of learnable parameters of the primary machine learning model based on the loss gradient and the unfairness gradient comprises:
sending the loss gradient and the unfairness gradient to the task owner computing system; and
at the task owner computing system, adjusting the plurality of learnable parameters of the primary machine learning model based on the loss gradient and the unfairness gradient.
4 . The method of claim 1 , wherein:
the plurality of local machine learning models includes the primary machine learning model;
the plurality of computing systems includes a task owner computing system comprising the primary machine learning model;
obtaining the outputs of the plurality of computing systems comprises:
receiving the outputs at a server; and
sending the outputs from the server to the task owner computing system;
processing the outputs of the plurality of computing systems to generate a prediction comprises summing the outputs, at the task owner computing system, to generate the prediction, the prediction being an aggregated prediction;
the loss gradient for training the primary machine learning model is generated by processing the loss and the aggregated prediction;
the unfairness gradient for training the primary machine learning model is generated by processing the unfairness measure and the aggregated prediction at the task owner computing system; and
adjusting the plurality of learnable parameters of the primary machine learning model based on the loss gradient and the unfairness gradient comprises, at the task owner computing system, adjusting the plurality of learnable parameters of the primary machine learning model based on the loss gradient and the unfairness gradient.
5 . The method of claim 1 , wherein the unfairness measure is a difference in equal opportunity (DEO) measure.
6 . The method of claim 1 , wherein the prediction is a multi-dimensional prediction comprising a prediction with respect to each data sample of a plurality of data samples represented in the local datasets.
7 . The method of claim 6 , wherein the plurality of data samples represented in the local datasets comprise a plurality of vertically partitioned data samples.
8 . The method of claim 1 , further comprising repeating one or more times the steps of: obtaining the outputs, processing the outputs, generating the loss, generating the unfairness measure, generating the loss gradient, generating the unfairness gradient, adjusting the plurality of learnable parameters of the primary machine learning model, generating the partition data, and for each passive computing system, the steps of:
computing the local loss gradient;
computing the local unfairness gradient;
sending the partition data, the local loss gradient, and the local unfairness gradient to the passive computing system;
receiving the set of patched local gradients;
computing the further unfairness gradient; and
sending the further unfairness gradient to the passive computing system.
9 . The method of claim 1 , further comprising, for each passive computing system:
at the passive computing system:
processing the local unfairness gradient, using the local machine learning model, to generate the set of patched local gradients;
sending the set of patched local gradients;
receiving the further unfairness gradient; and
adjusting a plurality of learnable parameters of the local machine learning model based on the further unfairness gradient.
10 . A server comprising:
a processing device; and
a memory storing thereon machine-executable instructions which, when executed by the processing device, cause the server to train a primary machine learning model stored on a task owner computing system, using vertical federated learning, by:
obtaining a plurality of labels, each label identifying a ground truth prediction for a feature of a data sample of a plurality of data samples;
obtaining protected class information identifying one or more protected classes;
generating partition data identifying one or more positive data samples of the plurality of data samples, each positive data sample being associated with a label having a positive ground truth prediction indicating positive membership of the data sample in a class of a plurality of classes;
performing a plurality of training iterations, wherein performing a training iteration includes:
obtaining, from each computing system of a plurality of computing systems, an output of a local machine learning model of the computing system based on a local dataset of the computing system;
processing the outputs of the plurality of computing systems to generate a prediction;
processing the prediction and the one or more labels to generate a loss;
processing the loss and the protected class information to generate an unfairness measure indicating a degree to which the prediction is affected by a given data sample's positive membership in a protected class;
processing the loss to generate a loss gradient for training the primary machine learning model;
processing the unfairness measure to generate a unfairness gradient for training the primary machine learning model;
sending the loss gradient and the unfairness gradient to the task owner computing system for training of the primary machine learning model; and
for each of one or more passive computing systems of the plurality of computing systems:
computing a local loss gradient for training the local machine learning model of the passive computing system;
computing a local unfairness gradient for training the local machine learning model of the passive computing system;
sending the partition data, the local loss gradient, and the local unfairness gradient to the passive computing system;
receiving a set of patched local gradients for the local machine learning model of the passive computing system, based on the local unfairness gradient;
processing the patched local gradients to compute a further unfairness gradient; and
sending the further unfairness gradient to the passive computing system;
wherein the training iterations are performed until a convergence condition is satisfied.
11 . The server of claim 10 , wherein:
the memory stores a global machine learning model;
the plurality of local machine learning models includes the primary machine learning model;
the plurality of computing systems includes the task owner computing system;
processing the outputs of the plurality of computing systems to generate a prediction comprises providing the outputs to a global machine learning model to generate a global prediction;
the loss gradient for training the primary machine learning model is generated by processing the loss and the global machine learning model; and
the unfairness gradient for training the primary machine learning model is generated by processing the unfairness measure and the global machine learning model.
12 . The server of claim 10 , wherein:
the plurality of local machine learning models includes the primary machine learning model;
the plurality of computing systems includes the task owner computing system;
processing the outputs of the plurality of computing systems to generate a prediction comprises summing the outputs to generate the prediction, the prediction being an aggregated prediction;
the loss gradient for training the primary machine learning model is generated by processing the loss and the aggregated prediction; and
the unfairness gradient for training the primary machine learning model is generated by processing the unfairness measure and the aggregated prediction.
13 . The server of claim 10 , wherein the unfairness measure is a difference in equal opportunity (DEO) measure.
14 . The server of claim 10 , wherein the prediction is a multi-dimensional prediction comprising a prediction with respect to each data sample of a plurality of data samples represented in the local datasets.
15 . The server of claim 14 , wherein the plurality of data samples represented in the local datasets comprise a plurality of vertically partitioned data samples.
16 . The server of claim 10 , wherein the machine-executable instructions, when executed by the processing device, further cause the server to repeating one or more times the steps of: obtaining the outputs, processing the outputs, generating the loss, generating the unfairness measure, generating the loss gradient, generating the unfairness gradient, and sending the loss gradient and the unfairness gradient to the task owner computing system.
17 . A non-transitory processor-readable medium having machine-executable instructions stored thereon which, when executed by a processor of a server, cause the server to train a primary machine learning model stored on a task owner computing system, using vertical federated learning, by:
obtaining a plurality of labels, each label identifying a ground truth prediction for a feature of a data sample of a plurality of data samples;
obtaining protected class information identifying one or more protected classes;
generating partition data identifying one or more positive data samples of the plurality of data samples, each positive data sample being associated with a label having a positive ground truth prediction indicating positive membership of the data sample in a class of a plurality of classes;
performing a plurality of training iterations, wherein performing a training iteration includes:
obtaining, from each computing system of a plurality of computing systems, an output of a local machine learning model of the computing system based on a local dataset of the computing system;
processing the outputs of the plurality of computing systems to generate a prediction;
processing the prediction and the one or more labels to generate a loss;
processing the loss and the protected class information to generate an unfairness measure indicating a degree to which the prediction is affected by a given data sample's positive membership in a protected class;
processing the loss to generate a loss gradient for training the primary machine learning model;
processing the unfairness measure to generate a unfairness gradient for training the primary machine learning model;
sending the loss gradient and the unfairness gradient to the task owner computing system for training of the primary machine learning model; and
for each of one or more passive computing systems of the plurality of computing systems:
computing a local loss gradient for training the local machine learning model of the passive computing system;
computing a local unfairness gradient for training the local machine learning model of the passive computing system;
sending the partition data, the local loss gradient, and the local unfairness gradient to the passive computing system;
receiving a set of patched local gradients for the local machine learning model of the passive computing system, based on the local unfairness gradient;
processing the patched local gradients to compute a further unfairness gradient; and
sending the further unfairness gradient to the passive computing system;
wherein the training iterations are performed until a convergence condition is satisfied.
18 . The non-transitory processor-readable medium of claim 17 , wherein the unfairness measure is a difference in equal opportunity (DEO) measure.
19 . The non-transitory processor-readable medium of claim 17 , wherein the prediction is a multi-dimensional prediction comprising a prediction with respect to each data sample of a plurality of data samples represented in the local datasets.
20 . The non-transitory processor-readable medium of claim 19 , wherein the plurality of data samples represented in the local datasets comprise a plurality of vertically partitioned data samples.