The application relates to the field of
artificial intelligence and discloses a federal learning gradient defense method based on
label repetition rate. Through
rank analysis of a relationship equation of gradient leakage data, it is found that if the same
label exists in batch samples and the obtained
label prediction probability is similar, the effect of the gradient leakage
attack can be effectively reduced, that is, it is difficult to reconstruct the input sample from the gradient. Therefore, in the
data set loading stage, the samples of the
data set are placed in the corresponding label bucket according to the label category, then the samples are placed in the corresponding confidence layer according to the confidence in the label bucket, finally, the sample combination is formed according to the setting of the label
repetition number, and the sample combination is shuffled to form a new
data set. The federal learning gradient defense method based on the label repetition rate proves that the label repetition rate can defend against the gradient leakage
attack in theory through
rank analysis of the relationship equation of the gradient leakage data, and the method is verified in practical application.