Differential privacy gradient self-adaptive clipping method and device based on fractional numbers
Патент · CN B
Полный текст
The invention discloses a differential privacy gradient self-adaptive clipping method based on a fractional number, which comprises the following steps of 1, sampling a batch of sample data with privacy information, inputting the sample data into a classification model, calculating the gradient of the sample data in the classification model, calculating a two-norm based on the gradient, 2, constructing a privacy histogram of the two-norm based on a current clipping threshold value, 3, determining a new clipping threshold value based on the privacy histogram and the fractional number, 4, updating the current clipping threshold value by using the new clipping threshold value when the new clipping threshold value does not meet the requirement, and then jumping to execute the step 1, 5, counting privacy overhead and outputting the privacy overhead and the final new clipping threshold value. The method and the device acquire gradient distribution information on the premise of meeting differential privacy, dynamically set a clipping threshold value in the training process based on quantiles, improve the model performance, and are suitable for low-computational-effort scenes by removing the cost of screening the clipping threshold value based on sample data.