A method for evaluating data element value in a restricted federated learning scenario
Patent Information
- Application Number
- CN202611050062.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-15
- Publication Date
- 2026-10-16
AI Technical Summary
[0004]发明目的:针对现有联邦学习贡献评估方法依赖验证集、计算复杂度高、难以适用于隐私受限场景等问题,本发明提出一种验证受限的联邦学习场景下数据要素价值评估方法(CSG-Shapley)
[0015]隐私安全性高:脱离外部验证集,仅利用训练过程中产生的梯度信息,从根源上规避了引入额外数据带来的隐私泄露风险。
Smart Images

Figure FT_1 
Figure FT_2 
Figure QLYQS_1
Abstract
Description
Technical Field
[0001] This invention belongs to the field of distributed machine learning and privacy computing technology, specifically relating to a method for evaluating the value of data elements in a verification-constrained federated learning scenario. Background Technology
[0002] With the rapid development of big data and artificial intelligence technologies, distributed machine learning has gradually become an important technical approach to solve the problems of data silos and privacy protection. Federated learning, as a typical distributed collaborative training framework, completes global model construction without sharing the original data by training the model locally on each participating party and uploading only the model parameters or gradient information to the server for aggregation. This mechanism has broad application prospects in fields such as medical image analysis, financial risk control, and collaborative modeling of smart terminals. However, in the practical application of federated learning, the data scale, data quality, and data distribution of different clients often vary significantly, and the contribution of each participating party to the improvement of the global model performance is not the same. Therefore, how to fairly and reasonably quantify and evaluate the true contribution of each client has become one of the key issues in the federated learning system.
[0003] Existing technologies typically suffer from significant drawbacks: first, they incur enormous computational overhead, with time complexity increasing exponentially with the number of participants; second, they heavily rely on external validation sets, which are difficult to obtain in real-world deployments and may introduce additional data privacy risks. While some alternatives based on model performance or parameter distance exist, achieving a balance between evaluation accuracy, privacy protection, and computational efficiency remains challenging. Summary of the Invention
[0004] Objective: To address the problems of existing federated learning contribution evaluation methods, such as reliance on validation sets, high computational complexity, and difficulty in applying them to privacy-constrained scenarios, this invention proposes a data element value evaluation method (CSG-Shapley) for validation-constrained federated learning scenarios. This invention constructs a utility function through gradient reconstruction without relying on additional validation data or repeated training of sub-models. Combined with guided permutation sampling and a two-layer truncation mechanism, it achieves efficient and stable estimation of the value of client-side data elements, thereby significantly reducing computational complexity and improving evaluation robustness.
[0005] Technical Solution: 1. A federated learning participant contribution evaluation method based on gradient update to calculate Shapley values, wherein the contribution evaluation method includes two-layer truncation, sub-model reconstruction, and construction of a validation set-free utility function, characterized by the following steps:
[0006] (1) Federated model update modeling: Based on the basic framework of federated learning, the model is trained. In each round, the server distributes the global model to each client. The client trains the global model locally and then uploads the trained local model parameters to the server for aggregation to obtain a new round of global model.
[0007] (2) Gradient quantile pruning mechanism: To suppress the interference of abnormal gradients on contribution evaluation, this invention performs quantile pruning on the last layer gradient. Clients with "particularly large last layer update norms" are pruned to an upper limit τ, because if a client's update magnitude is extremely large during contribution calculation, it will "suppress" other clients in the calculation, leading to highly unstable contributions. For each client i, the L2 norm of its last layer update is calculated and collected into a subset. In the middle, a quantile level q is set, and then the gradient is obtained by cropping for each client. .
[0008] (3) Construction of utility function without validation set: Since the server does not have an independent validation set, this invention designs a weighted utility function based on gradient class-specific cosine similarity, focusing on the class-specific weights of the last layer of the model. The client contribution is quantified by "gradient reconstruction + class average similarity + magnitude confidence weight", completely freeing it from dependence on external validation set. The gradient update information generated during model training can be used as a proxy indicator to characterize the consistency of client updates with the global optimization direction, thereby being used for contribution evaluation.
[0009] (4) Shapley value approximation using guided Monte Carlo sampling: A hybrid mechanism of "fixed cycle + random sampling" is adopted to make the client's position distribution in different permutations balanced, thereby reducing the estimation variance.
[0010] (5) Two-layer truncation mechanism: The Shapley value of a participant is estimated based on its marginal gain in different combinations of participants, and the federated learning server performs utility evaluation of the Shapley value. Based on the conclusion of utility distribution between different rounds, those Shapley values with low marginal utility gains can be excluded from the calculation rounds, and this operation does not significantly affect the estimation result of the Shapley value. In addition, based on the conclusion that "the marginal utility gain generated by participants at different positions in the permutation is different", the marginal utility gain contributed by participants at later positions in the permutation is extremely small. Therefore, the relevant evaluation of these participants can be omitted when estimating the Shapley value, and it will not significantly affect the estimation result. Therefore, this paper uses inter-round truncation and intra-round truncation to reduce computational overhead without affecting the calculation of the Shapley value.
[0011] 2. The gradient quantile pruning mechanism according to claim 1, characterized in that the utility function formula is: The confidence weight of the amplitude is . The similarity function between subset S and the global model is: The weight parameters of the last layer of the model are calculated as gradient extraction objects and uploaded to the server. For each category, the gradient cosine similarity between the subset reconstructed model ∆S and the global model ∆glob is calculated separately.
[0012] The Shapley value approximation calculation method according to claim 1 is characterized in that the Shapley value is defined as: To reduce complexity, a permutation sampling approximation is employed. Through Monte Carlo guided permutation design, the client's position is evenly distributed across different permutations, thereby reducing the estimation variance.
[0013] The double-layer cutoff mechanism is constructed according to claim 1, characterized in that the inter-wheel cutoff condition is: In-wheel cutoff condition: The above mechanism reduces redundant calculations.
[0014] Beneficial effects:
[0015] High privacy and security: By eliminating the need for an external validation set and utilizing only the gradient information generated during training, the risk of privacy leakage caused by introducing additional data is avoided from the outset.
[0016] High computational efficiency: Through sub-model reconstruction and a two-layer truncation mechanism, the exponential computational complexity is reduced to the linear level. Experiments show that it can achieve a speedup of 7-8 times compared with similar high-precision methods.
[0017] The evaluation is fair and accurate: Experiments show that the method maintains a high degree of consistency with the true Shapley value and has good robustness in non-independent and identically distributed scenarios. Attached Figure Description
[0018] Figure 1 is a schematic diagram of the federated learning framework.
[0019] Figure 2 is a schematic diagram of the CSG-Shapley method. Detailed Implementation
[0020] Example: The CSG-Shapley federated learning participant contribution evaluation method based on structured gradient modeling provided by this invention is used to verify a fair, stable, and efficient quantitative evaluation of the contributions of each client in a constrained federated learning scenario. This method does not rely on independent validation data and does not require repeated training of sub-models. Instead, it directly utilizes the gradient information generated during federated training for structured modeling, thereby achieving an approximate estimation of the Shapley value. The specific operation is as follows:
[0021] 1. Establishment of Federated Training Environment and Basic Model
[0022] This embodiment constructs an experimental environment based on a typical federated learning training framework. Assume there are 10 clients in the federated system. Each client's data is independent and cannot be shared, and the data distribution may exhibit non-identical distribution (Non-IID) characteristics. Global training consists of 10 rounds. In each round, the server distributes the local model to each client i. Client i performs several rounds of gradient descent training on its local dataset to obtain local model parameters. The local model is then uploaded to the server for aggregation. The aggregation formula is: .
[0023] 2. Gradient Extraction and Quantile Clipping
[0024] In actual federated training, some clients may generate abnormally large gradient updates due to data anomalies, training instability, or malicious attacks. Directly calculating the contribution based on the original gradients can easily lead to evaluation results deviating from reality. Therefore, when using this method, the pruning quantile is set to 0.9, and gradient scaling is performed using the following scaling formula: The above processing can effectively limit the excessive influence of outlier gradients and improve the robustness of contribution estimation.
[0025] 3. Construction of Structured Sub-models
[0026] To avoid repeated training of sub-models, this embodiment utilizes the linear additivity of federated averaging to construct an arbitrary client subset model. For any client subset S, the subset gradient is calculated as follows: This method eliminates the need to retrain the model; the sub-model parameters can be obtained simply through a linear combination of gradients.
[0027] 4. Utility function calculation without validation set
[0028] Since the server lacks verification data, this embodiment constructs a utility function based on gradient direction consistency. The gradient of the last layer of the subset is calculated. And perform directional consistency calculations with the parameters of the last layer of the subset: Furthermore, an amplitude credibility weight is introduced (making the update amplitude one of the metrics for measuring contribution, and preventing clients that are "in the same direction but contribute almost nothing" from being overestimated): In the calculation of the utility function: This utility function can reflect the client's contribution to the global optimization direction in the absence of a validation set.
[0029] 5. Approximate calculation of Shapley value
[0030] The core idea of Shapley value is that the contribution of a participant should not be determined solely by its individual performance, but shall be measured by its average marginal contribution to the existing coalition in all possible joining orders. This definition method can effectively avoid unfair distribution caused by different participation sequences. The theoretical definition is: . To reduce the complexity, this embodiment adopts a guided Monte Carlo sampling method: when generating the permutation sequence of participants, a hybrid mechanism of "fixed cycle + random sampling" is adopted, where the first m key positions of the sequence (m<<n, n is the total number of participants) are cyclically allocated by all participants in a fixed order, ensuring that each participant has a fair chance to enter the front positions that significantly affect the marginal contribution, and avoiding contribution underestimation caused by being at the rear of the permutation for a long time; the n-m positions after the sequence are generated by random sampling to obtain K sequences, which takes into account the computational efficiency. This strategy significantly improves the estimation convergence speed while ensuring fairness.
[0031] 6. Two-layer truncation mechanism
[0032] To reduce the computational load, this embodiment sets two termination conditions. The first layer is inter-round truncation: . The second layer is intra-round truncation: . When the condition is satisfied, the permutation calculation is terminated in advance.
[0033] 7. Processing result analysis
[0034] This method uses the following four indicators to quantify the processing results, which are total time consumption, Pearson correlation coefficient, Spearman rank correlation coefficient, and Jensen–Shannon (JS) divergence respectively.
[0035] The total time consumption mainly reflects the computational efficiency of the method: the lower the time consumption, the higher the computational efficiency. The Pearson correlation coefficient is used to measure the degree of linear correlation between two variables, and the closer this value is to 1, the stronger the linear consistency. The Spearman rank correlation coefficient is used to measure the correlation between the ranking results of two variables, and the closer this value is to 1, the more similar the two ranking results are. The Jensen–Shannon (JS) divergence measures the similarity degree of the overall contribution distribution, and the JS divergence is an indicator for measuring the similarity of two probability distributions.
[0036] The results of this invention on the MNIST dataset in a non-independent, identically distributed scenario are as follows: total time: 38.06s, Pearson correlation coefficient: 0.919, Spearman rank correlation coefficient: 0.813, JS divergence: 0.159. Experiments show that the CSG-Shapley method proposed in this invention can still perform efficient and accurate data element value assessment in validation-constrained federated learning scenarios. This is of significant importance for contribution assessment in federated learning.
Claims
1. A method for evaluating the value of data elements in a validation-constrained federated learning scenario, the method being applied to a federated learning system comprising a central server and multiple clients, and for fairly evaluating the value of data elements from each client without requiring local data to leave the client's local storage. The method includes the following steps: (1) Federated learning training phase: During the t-th round of federated learning training, the central server distributes the global model to the selected clients. Each client performs local training based on local data, obtains the local model update gradient, and uploads the model update to the server. (2) Gradient collection and preprocessing stage: The server collects the model update information uploaded by all clients, extracts the classification weight parameters of the last layer of the model as the contribution evaluation object, calculates the norm of the last layer update gradient of each client, and performs gradient quantile pruning according to the preset quantile threshold to suppress the interference of extreme update magnitude on the evaluation results. (3) Sub-model reconstruction stage: The server performs a weighted summation of the gradients of the clients in the target subset S based on the model updates of the clients and their data scale ratios, and adds it to the initial global model parameters to reconstruct the corresponding sub-model for subsequent utility calculations; (4) Utility function construction stage without validation set: Based on the class-specific weight gradient of the last layer of the reconstructed sub-model and the single client model, the gradient cosine similarity on each category is calculated, and the average value of the cosine similarity of all categories is taken; at the same time, the magnitude confidence weight is introduced to weight the cosine similarity and construct a utility function that does not depend on the external validation set. (5) Shapley value approximation calculation stage: Guided Monte Carlo sampling is used to generate client permutation sequence, and the marginal contribution of each client is calculated under the permutation sequence; during the calculation process, a double-layer truncation mechanism of inter-wheel truncation and intra-wheel truncation is combined, and the calculation is terminated in advance when the global model update amplitude is less than the preset threshold or the current subset utility gain is lower than the set threshold. (6) Contribution value update stage: The marginal contribution of each client under different arrangements is updated online by averaging to obtain the Shapley contribution value of each client in the current round.
2. The quantile clipping method according to claim 1, characterized in that, The gradient quantile pruning is as follows: calculate the quantile threshold of the norm of the last layer gradient update for all clients, and scale the gradient vectors that exceed the threshold proportionally to within the threshold range, so as to avoid the extreme updates of a single client dominating the cosine similarity calculation.
3. The utility function construction method according to claim 1, characterized in that, The utility function construction method under the verification-constrained scenario includes: calculating the cosine similarity between the client gradient and the sub-model gradient for each category to form a category similarity matrix; averaging the category similarities to obtain a directional consistency index; and further combining the client update magnitude to construct a magnitude confidence weight to prevent clients with consistent direction but extremely small update magnitudes from being overestimated. The specific construction formula is as follows: .
4. The sub-model reconstruction method according to claim 1, characterized in that, The sub-model reconstruction is completed on the server side. The client gradients within the target subset S are weighted and summed according to the data scale ratio using the federated average aggregation rule, and then superimposed on the initial model parameters, replacing the repeated training process of the sub-model.
5. The double-layer truncation method according to claim 1, characterized in that, The two-layer truncation includes inter-round truncation based on the global model update magnitude and intra-round truncation based on subset utility gain, in order to reduce the computational overhead of invalid rounds and low-value subsets.