The invention relates to the technical field of
machine learning, in particular to a user local data distribution reasoning
attack method based on federal learning. The method comprises the steps of generating an auxiliary
data set, constructing a simulated
attack user
data set, training a shadow model, training a user model, calculating
cosine similarity, adjusting the data proportion of various labels in the simulated
attack user
data set, forming an updated federal learning
global model, judging a training termination condition, and obtaining a training result. Obtaining local data distribution of the target attack user; according to the method, the data privacy security problem caused by federal learning distributed training characteristics is solved; by deploying an auxiliary data set and a shadow model at a
server side, analyzing and simulating an attack user data set by using a
gradient direction, the distribution of local data of a target attack user on each category is dynamically deduced, the
label distribution of the target attack user is revealed, and meanwhile, the method has relatively high concealment, adaptability and effectiveness.