A federated dynamic weighted contribution evaluation method and system for data privacy protection
By encrypting model parameters and performance gain values in federated learning using differential privacy technology and homomorphic encryption algorithms, the problem of insufficient evaluation of participant contributions in existing technologies is solved, achieving privacy protection and performance improvement of the global model and incentivizing the continued participation of high-quality data holders.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- MODE OPERATION & MAINTENANCE (HANGZHOU) DATA CO LTD
- Filing Date
- 2026-05-11
- Publication Date
- 2026-06-05
AI Technical Summary
Existing federated learning methods have shortcomings in evaluating participant contributions and model aggregation. They ignore the actual differences in contributions made by each participant during training, making it difficult to incentivize the continued participation of high-quality data holders. Furthermore, they lack the ability to adapt to dynamic changes in contribution levels, resulting in poor global model convergence speed and performance, while also posing a risk of sensitive information leakage.
Differential privacy technology and homomorphic encryption algorithm are used to encrypt model parameter updates and performance gain values. A secure multi-party computation protocol is used to evaluate the contributions of participants and aggregate the model. Noise intensity and weighting coefficients are dynamically adjusted to ensure privacy protection while improving model convergence efficiency and performance stability.
It achieves end-to-end privacy protection in participant contribution evaluation and model aggregation, improves the convergence efficiency and performance stability of the global model, incentivizes the continuous participation of high-quality data holders, and prevents the leakage of sensitive information.
Smart Images

Figure CN122153970A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of data privacy protection technology, and in particular to a federal dynamic weighted contribution evaluation method and system for data privacy protection. Background Technology
[0002] With the deep integration of big data and artificial intelligence technologies, federated learning, as a distributed machine learning paradigm, can achieve multi-party collaborative modeling while ensuring data locality, and has been widely applied in privacy-sensitive fields such as financial risk control and healthcare. However, existing federated learning methods still have significant shortcomings in evaluating participant contributions and model aggregation. Traditional methods typically employ average weighting or static aggregation strategies based on data volume, ignoring the actual differences in contributions made by each participant during training, making it difficult to incentivize the continued participation of high-quality data holders. Furthermore, directly evaluating participant contributions often involves the plaintext transmission of gradient information or performance metrics, making them vulnerable to inference attacks or gradient inversion attacks, leading to the leakage of sensitive information. In addition, most methods lack the ability to adapt to dynamic changes in contribution levels and cannot adjust aggregation weights based on historical interaction records, limiting the convergence speed and final performance of the global model. Summary of the Invention
[0003] The purpose of this invention is to provide a federated dynamic weighted contribution evaluation method and system for data privacy protection, in order to overcome the shortcomings of the prior art, realize full-process privacy protection of participant contribution evaluation and model aggregation, and effectively improve the convergence efficiency and performance stability of the global model.
[0004] One embodiment of this application provides a federally-mandated dynamic weighted contribution assessment method for data privacy protection, the method comprising: Each participant trains the model parameters locally using private data and calculates the performance gain of the local model based on the public validation set. Differential privacy technology is used to add noise to the model parameter updates to generate privacy-preserving updates. At the same time, homomorphic encryption algorithm is used to encrypt the performance gain value to generate encrypted gain ciphertext. The central server receives privacy protection updates and encrypted gain ciphertexts from all participants, aggregates the encrypted gain ciphertexts using the additive property of homomorphic encryption to obtain global gain ciphertext, and uses a secure multi-party computation protocol to parse the relative contribution ratio of each participant from the global gain ciphertext to generate a contribution vector. The server dynamically calculates the weighting coefficients for the next round of aggregation based on the contribution vector and combined with historical contribution records, generates a weighting coefficient vector, and uses homomorphic encryption scalar multiplication to perform weighted processing on the privacy-preserving update to obtain the weighted update ciphertext. The server performs homomorphic aggregation on the weighted update ciphertext to obtain the global model update ciphertext, and distributes it to each participant. Each participant uses its private key to decrypt the global model update and update its local model.
[0005] Another embodiment of this application provides a federally-mandated dynamic weighted contribution assessment system for data privacy protection, the system comprising: The encryption module is used by each participant to train the model parameters locally using private data, calculate the performance gain of the local model based on the public validation set, add noise to the model parameter updates using differential privacy technology to generate privacy-preserving updates, and use homomorphic encryption algorithm to encrypt the performance gain value to generate encrypted gain ciphertext. The parsing module is used by the central server to receive privacy protection updates and encrypted gain ciphertexts from all participants, aggregate the encrypted gain ciphertexts using the additive property of homomorphic encryption to obtain global gain ciphertexts, and use a secure multi-party computation protocol to parse the relative contribution ratio of each participant from the global gain ciphertexts to generate a contribution vector. The weighting module is used by the server to dynamically calculate the weighting coefficients for the next round of aggregation based on the contribution vector and combined with historical contribution records, generate a weighting coefficient vector, and use homomorphic encryption scalar multiplication to perform weighted processing on privacy-preserving updates to obtain weighted update ciphertext. The decryption module is used by the server to perform homomorphic aggregation on the weighted update ciphertext to obtain the global model update ciphertext, and distribute it to each participant. Each participant uses its private key to decrypt the global model update and update its local model.
[0006] Another embodiment of this application provides a storage medium storing a computer program, wherein the computer program is configured to execute the method described in any of the preceding claims when running.
[0007] Another embodiment of this application provides an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the method described in any of the preceding claims.
[0008] Compared with existing technologies, the present invention provides a federated dynamic weighted contribution evaluation method for data privacy protection, which can realize full-process privacy protection of participant contribution evaluation and model aggregation, and effectively improve the convergence efficiency and performance stability of the global model. Attached Figure Description
[0009] Figure 1 A hardware structure block diagram of a computer terminal for a federated dynamic weighted contribution evaluation method for data privacy protection provided in an embodiment of the present invention; Figure 2A flowchart illustrating a federal dynamic weighted contribution evaluation method for data privacy protection provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of a federal dynamic weighted contribution evaluation system for data privacy protection provided in an embodiment of the present invention. Detailed Implementation
[0010] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0011] This invention first provides a federated dynamic weighted contribution evaluation method for data privacy protection. This method can be applied to electronic devices, such as computer terminals, specifically ordinary computers.
[0012] The following detailed explanation uses a computer terminal as an example. Figure 1 This is a hardware structure block diagram of a computer terminal for a federated dynamic weighted contribution evaluation method for data privacy protection, provided as an embodiment of the present invention. Figure 1 As shown, the computer device includes a processor, memory, and network interface connected via a system bus, wherein the memory may include non-volatile storage media and internal memory.
[0013] See Figure 2 The embodiments of the present invention provide a federated dynamic weighted contribution evaluation method for data privacy protection, which may include the following steps: S201, each participant uses private data to train and update the model parameters locally, calculates the performance gain of the local model based on the public validation set, adds noise to the model parameter update using differential privacy technology to generate privacy-preserving update, and uses homomorphic encryption algorithm to encrypt the performance gain value to generate encrypted gain ciphertext. Specifically, each participant loads its local private dataset, uses the current global model to perform multiple rounds of gradient descent training, and obtains the model parameter update vector for this iteration. Each participant loads its local private dataset and uses the current global model to perform multiple rounds of gradient descent training to obtain the model parameter update vector for this iteration.
[0014] The core of this step is that each participant completes model training locally, updates model parameters based on their own private data, and does not disclose any private data information. This provides a basis for local model updates for subsequent contribution evaluation and global aggregation. The specific implementation method is as follows: Local private datasets are unique and non-disclosureable data collections owned by each participant. They contain input samples and corresponding labels used for model training. The size and distribution of the datasets may differ among different participants. In this example, we assume there are three participants: participant 1's local private dataset contains 1,000 samples, participant 2 contains 800 samples, and participant 3 contains 1,200 samples. All samples have been preprocessed (normalized and denoised) to ensure the validity of the training data. The datasets are stored and used only locally and are not transferred across participants, thus protecting data privacy from the source.
[0015] The current global model is the result of the previous federated learning iteration, where the central server aggregates the updated global model parameters from all participants. This includes core parameters such as model weights and biases. Each participant retrieves this global model from the server via a secure channel, using it as the initial model for their local training, ensuring a consistent starting point for all participants. In this example, the global model is a neural network-based classification model, containing an input layer, two hidden layers, and an output layer. The total dimension of the model parameters is 5000, and parameter values are stored as floating-point numbers with six decimal places.
[0016] Gradient descent training is the core algorithm for local model parameter updates. Its core principle is to calculate the gradient of the loss function on the local private dataset and iteratively update the model parameters along the negative gradient direction to reduce model prediction errors and improve model performance. During training, 10 training epochs are set with a learning rate of 0.01. The learning rate is used to control the step size of parameter updates in each epoch, avoiding excessively large step sizes that lead to model non-convergence and excessively small step sizes that lead to low training efficiency. The cross-entropy loss function is used to measure the deviation between the model's prediction results and the sample labels. The loss value is calculated after each training epoch, and training can be terminated early when the loss value tends to stabilize (the difference between the losses of two adjacent epochs is less than 0.0001).
[0017] After each training round, the difference between the current model parameters and the initial global model parameters is calculated to obtain the parameter update amount for each round. After multiple rounds of training, the parameter update amounts from all rounds are summed to obtain the model parameter update vector for the current iteration. This vector has the same dimension as the global model parameters, which is 5000 dimensions. Each element in the vector corresponds to the update value of a model parameter. A positive value indicates that the parameter has increased relative to the initial global model, a negative value indicates that it has decreased, and a zero value indicates no update. In the example, the model parameter update vector for participant 1 is [v_1, v_2, ..., v_5000], where v_1 = 0.0231, v_2 = -0.0156, and the remaining elements are assigned values sequentially according to the training results. This vector fully reflects participant 1's contribution to the optimization of the global model based on local private data.
[0018] Perform forward inference on the local model on the public validation set, calculate the improvement in model accuracy relative to the previous round, and obtain the performance gain scalar. Perform forward inference on the local model on the public validation set, calculate the improvement in model accuracy relative to the previous round, and obtain the performance gain scalar.
[0019] The core of this step is to quantify the contribution of each participant's local training to the improvement of model performance, and to achieve a unified standard for performance evaluation through a public validation set, avoiding evaluation bias caused by differences in private datasets. The specific implementation method is as follows: The public validation set is a publicly available dataset accessible to all participants and the central server. It contains no private information from any participant and is used to uniformly evaluate the performance of each participant's local model, ensuring the fairness and consistency of the evaluation results. The public validation set has the same sample distribution as each participant's private dataset, with 500 samples in size, containing the same categories and features as the private datasets. In this example, the public validation set is used for an image classification task, containing 10 categories with 50 samples per category. These samples are used solely for performance evaluation and do not participate in any model training process.
[0020] Forward inference refers to inputting samples from a public validation set into a locally trained model, calculating the predicted class for each sample through forward propagation, comparing it with the sample's true label, counting the number of correctly predicted samples, and then calculating the model's accuracy. Forward inference does not involve any model parameter updates; it is only used for performance testing to ensure that the inference results accurately reflect the local model's performance level. In the example, participant 1 input 500 validation samples into the local model and obtained 482 correct predictions. The accuracy of the local model in this round is 482 / 500 = 96.4%.
[0021] The performance gain scalar is a core metric for measuring the performance improvement of the local model. It is calculated by subtracting the accuracy of the local model on the same public validation set from the accuracy of the local model in the previous round on the same set. The difference is the performance gain scalar, denoted by g, and expressed as a percentage (%). A positive performance gain scalar indicates that local training improved model performance; the larger the positive value, the greater the contribution. A negative value indicates that local training led to a decrease in model performance, with a negative contribution. A value of zero indicates that local training had no impact on model performance. In the example, participant 1's local model accuracy was 94.2% in the previous round and 96.4% in the current round, so the performance gain scalar g_1 = 96.4% - 94.2% = 2.2%; participant 2's accuracy was 93.8% in the previous round and 94.5% in the current round, so the performance gain scalar g_2 = 0.7%; participant 3's accuracy was 95.1% in the previous round and 94.8% in the current round, so the performance gain scalar g_3 = -0.3%, clearly reflecting the differences in local training contributions among the participants.
[0022] The scaling parameter of the differential privacy noise is dynamically adjusted based on the performance gain scalar, and Laplace noise of appropriate intensity is added to the model parameter update vector to generate a privacy-preserving update vector. The scaling parameter of the differential privacy noise is dynamically adjusted based on the performance gain scalar, and Laplace noise of appropriate intensity is added to the model parameter update vector to generate a privacy-preserving update vector.
[0023] The core of this step is to protect the privacy of local model parameter updates using differential privacy technology, preventing attackers from inferring the private data of participants through parameter update vectors. Simultaneously, it dynamically adjusts noise intensity to balance privacy protection with model performance. The specific implementation is as follows: Differential privacy is a privacy protection technique that works by adding a suitable amount of noise to the original data, making the outputs of adjacent datasets difficult to distinguish, thereby protecting individual information within the dataset and preventing privacy leaks. Laplace noise is a commonly used type of noise in differential privacy, offering advantages such as uniform distribution, computational simplicity, and stable privacy protection. The intensity of the noise is controlled by the scale parameter λ; a larger λ results in stronger noise and a stronger privacy protection effect, but also a greater loss in model performance; conversely, a smaller λ results in weaker noise and a smaller loss in model performance, but a weaker privacy protection effect.
[0024] The dynamic adjustment rule for the scaling parameter λ is based on the performance gain scalar g. The core logic is: the larger the performance gain scalar, the greater the contribution of the local training of the participants to the global model. To reduce the impact of noise on model performance, the noise intensity should be reduced (λ decreases); the smaller (or negative) the performance gain scalar, the smaller the contribution of the participants. The noise intensity can be appropriately increased (λ increases), which can both ensure privacy protection and reduce the interference of invalid updates on the global model. The formula for calculating the scaling parameter λ is λ=k / (|g|+ε), where k is the basic scaling coefficient, set to 0.1, and ε is a minimum value (0.001) to avoid the denominator being zero and to ensure the validity of the calculation. In the example, if participant 1's g_1 = 2.2%, then λ_1 = 0.1 / (0.022+0.001) ≈ 4.3478; if participant 2's g_2 = 0.7%, then λ_2 = 0.1 / (0.007+0.001) = 12.5; if participant 3's g_3 = -0.3%, then λ_3 = 0.1 / (0.003+0.001) = 25, clearly demonstrating the dynamic adjustment of noise intensity with performance gain.
[0025] The noise addition process involves element-wise addition of the generated Laplace noise vector to the model parameter update vector to produce a privacy-preserving update vector. The Laplace noise vector has the same dimension as the model parameter update vector (5000 dimensions), and each element follows a Laplace distribution with parameter λ, meaning the noise value follows Laplace(0,λ), and the range of noise values is positively correlated with λ. In the example, if an element in participant 1's model parameter update vector is 0.0231, and the corresponding Laplace noise value is 0.0012 (following Laplace(0,4.3478)), then this element in the privacy-preserving update vector is 0.0231 + 0.0012 = 0.0243; if a parameter update element in participant 3 is -0.0089, and the corresponding noise value is 0.0035 (following Laplace(0,25)), then this element in the privacy-preserving update vector is -0.0089 + 0.0035 = -0.0054. By adding noise, the privacy-preserving update vector retains the core information of the original parameter update while masking the details of private data through noise, effectively preventing privacy leakage. At the same time, the dynamically adjusted noise intensity balances privacy protection and model performance.
[0026] The performance gain scalar is encrypted using a homomorphic encryption algorithm with the server's public key. The encrypted ciphertext and the privacy protection update vector are then encapsulated into a unified data packet to generate the encrypted gain ciphertext and privacy protection update to be uploaded.
[0027] The performance gain scalar is encrypted using a homomorphic encryption algorithm with the server's public key. The encrypted ciphertext and the privacy protection update vector are then encapsulated into a unified data packet to generate the encrypted gain ciphertext and privacy protection update to be uploaded.
[0028] The core of this step is to encrypt and protect the performance gain scalar to prevent it from being stolen or tampered with during transmission. Simultaneously, it unifies privacy protection updates with the encrypted gain ciphertext encapsulation to ensure the standardization and security of data transmission. The specific implementation method is as follows: Homomorphic encryption is a special type of encryption algorithm. Its core characteristic is that after performing a specific operation on the ciphertext, the decryption result is the same as the result of performing the same operation on the plaintext. Operations on the ciphertext field can be completed without decryption, making it highly suitable for the "data-free, computation-enabled" requirements of federated learning. This study selects an additive homomorphic encryption algorithm, which supports ciphertext addition operations and can meet the subsequent server's need to aggregate encrypted gain ciphertexts. The encryption process only requires the central server's public key, and the decryption process only requires the server's private key, ensuring the security and uniqueness of the encryption.
[0029] The server public key is a public key generated by the central server, used by all participants to encrypt data. This public key can be distributed to all participants through a secure channel, ensuring no privacy leaks. The server private key is kept solely by the server and used for subsequent decryption and computation of the ciphertext; its disclosure is strictly prohibited. During encryption, each participant inputs its own performance gain scalar (plaintext) into a homomorphic encryption algorithm, which is then encrypted using the server public key to generate encrypted gain ciphertext. This ciphertext is a string that cannot be directly deciphered; only by decrypting it using the server private key can the original performance gain scalar be obtained. In the example, participant 1's performance gain scalar g_1 = 2.2% (plaintext 0.022), after being encrypted using the server's public key, generates the encrypted gain ciphertext "E(0.022)". Participant 2's g_2 = 0.7% (plaintext 0.007), after encryption, generates the ciphertext "E(0.007)". Participant 3's g_3 = -0.3% (plaintext -0.003), after encryption, generates the ciphertext "E(-0.003)". Even if the ciphertext is intercepted during transmission, the original performance gain information cannot be deciphered.
[0030] Packet encapsulation integrates the privacy-preserving update vector and the encrypted gain ciphertext into a unified data packet, facilitating subsequent uploading and server processing. During encapsulation, the data is formatted, and auxiliary information such as participant identifiers, data types, and timestamps are added to ensure the server can accurately identify the uploaded data from each participant. Participant identifiers distinguish different participants; in this example, participant 1 is identified as "P1," participant 2 as "P2," and participant 3 as "P3." Timestamps mark the data generation time with millisecond precision, in the format "year-month-day-hour-minute-second-millisecond," ensuring data sequence. Data types differentiate the privacy-preserving update vector and the encrypted gain ciphertext, facilitating subsequent server splitting and processing. After encapsulation, the encrypted gain ciphertext and privacy-preserving update are generated for uploading. The data packet is uploaded to the central server via a secure channel, employing an encrypted transmission protocol to further ensure data security and prevent data leakage and tampering during transmission.
[0031] S202, the central server receives privacy protection updates and encrypted gain ciphertexts from all participants, aggregates the encrypted gain ciphertexts using the additive property of homomorphic encryption to obtain global gain ciphertext, and uses a secure multi-party computation protocol to parse the relative contribution ratio of each participant from the global gain ciphertext to generate a contribution vector. Specifically, the central server receives privacy-preserving update vectors and encryption gain ciphertexts uploaded by all participants, indexes them according to the participant identifiers, and stores them to form a participant data set; The central server receives privacy-preserving update vectors and encryption gain ciphertexts uploaded by all participants, indexes them according to the participant identifiers, and stores them to form a participant data set.
[0032] The core of this step is to securely receive, orderly index, and reliably store multi-party data in federated learning, providing a standardized data foundation for subsequent encrypted aggregation and contribution calculation. The entire process avoids accessing any participant's plaintext privacy information. The specific implementation method is as follows: The central server, acting as the collaborative scheduling node for federated learning, receives data packets uploaded by each participant through an encrypted secure channel. This channel employs an end-to-end encrypted transmission protocol, resisting eavesdropping, tampering, and replay attacks during transmission. Data reception latency is controlled within milliseconds, meeting the real-time requirements of synchronous uploads by multiple participants. The server sets up a data validity verification mechanism on the receiving port, verifying the format integrity, timestamp validity, and participant identification authenticity of uploaded data packets item by item, discarding invalid data packets with incorrect formats, timeouts, or forgeries, and retaining only legitimate and valid data.
[0033] The participant identifier is a unique number that distinguishes different data providers. It is uniformly assigned by the system during the federated learning initialization phase and has the characteristics of being non-repeatable and tamper-proof. In this example, the federated learning includes three legitimate participants, with corresponding identifiers P_1, P_2, and P_3. The server uses the identifiers to accurately classify the data. Each legitimate data packet contains two core components: first, a privacy-preserving update vector processed with differential privacy, whose dimension is consistent with the dimension of the global model parameters (in this example, a 5000-dimensional floating-point vector); and second, a homomorphically encrypted gain ciphertext, which is a fixed-length encrypted string with no readable plaintext information.
[0034] The server establishes a structured index relationship using participant identifiers as keys, binding and storing the privacy-preserving update vector corresponding to each participant with the encrypted gain ciphertext. The index structure includes four pieces of information: participant identifier, data reception timestamp, data type tag, and data storage address. The timestamp uses millisecond precision to ensure that the data in each iteration is traceable and aligned. All data that has passed verification and completed index binding constitutes the participant data set for this iteration. This set only stores the ciphertext and privacy-preserving data. The server cannot obtain any participant's original performance gain, local private data, or un-noiseed model update information throughout the process, ensuring data privacy and security from the storage level.
[0035] By utilizing the additive homomorphic property of homomorphic encryption, all encrypted gain ciphertexts are added together item by item to obtain the aggregated global gain ciphertext; By utilizing the additive homomorphic property of homomorphic encryption, all encrypted gain ciphertexts are added together one by one to obtain the aggregated global gain ciphertext.
[0036] The core of this step is to leverage the ciphertext operation characteristics of homomorphic encryption to achieve ciphertext aggregation of global gains without decrypting the ciphertext of any individual participant's performance gain. This achieves the privacy protection goal of "operations are executable, plaintext is invisible." The specific implementation method is as follows: The homomorphic encryption algorithm used in this method has the property of additive homomorphism. The core meaning of this property is that for any two plaintexts m_1 and m_2, the result of adding their corresponding ciphertexts E(m_1) and E(m_2) in the ciphertext field is completely equivalent to the ciphertext E(m_1+m_2) obtained by first adding the plaintexts and then encrypting them, that is, E(m_1)+E(m_2)=E(m_1+m_2). The server only needs to perform the addition operation in the ciphertext field and can obtain the encryption result of the global gain without decryption. The original performance gain plaintext of any participant is not touched at all.
[0037] The server iterates through all encrypted gain ciphertexts in the participant's dataset, performing a homomorphic addition operation on each ciphertext according to the participant's identifier order. The operation only performs algebraic operations on the ciphertext strings, without involving any plaintext deconstruction or data parsing. The computational efficiency is linearly related to the number of participants and supports multi-party parallel aggregation. In the example, the plaintext performance gains of the three participants are g_1=0.022, g_2=0.007, and g_3=-0.003, corresponding to encrypted gain ciphertexts E(g_1), E(g_2), and E(g_3). The server performs a homomorphic addition operation on these three ciphertexts to obtain the global gain ciphertext E(g_1+g_2+g_3)=E(0.026). This ciphertext is the encrypted form of the global performance gain; the individual gain value of any participant cannot be deduced solely from the ciphertext.
[0038] The global gain ciphertext after aggregation maintains the same format and length as the individual encrypted gain ciphertext, and can be directly used for subsequent secure multi-party computation and joint decryption. The operation process is free of data distortion and precision loss, which not only fulfills the requirement of global gain aggregation, but also strictly adheres to the constraints of data privacy protection, providing a secure aggregated data foundation for subsequent contribution calculation.
[0039] Initiate a secure multi-party computation protocol, collaborate with all participants to jointly decrypt the global gain ciphertext, obtain the original performance gain value of each participant, calculate the relative contribution ratio, and generate an initial contribution vector. Initiate a secure multi-party computation protocol, collaborate with all participants to jointly decrypt the global gain ciphertext, obtain the original performance gain value of each participant, calculate the relative contribution ratio, and generate an initial contribution vector.
[0040] The core of this step is to achieve joint decryption of the global gain ciphertext and calculation of the contribution ratio through secure multi-party computation, avoiding the central server from obtaining the plaintext information of any participant individually, and completing the quantification of contribution under the premise of privacy compliance. The specific implementation method is as follows: The Secure Multi-Party Computation Protocol (MPCP) is a cryptographic protocol that supports collaborative computation among multiple participants without disclosing their private data. This protocol is initiated by a central server and involves all participants. It adopts a secret-sharing collaborative decryption mode, splitting the decryption key of the global gain ciphertext into multiple key fragments, which are held by the server and each participant respectively. Decryption can only be completed when all participants collaboratively provide key fragments. No single participant or server can complete decryption alone, thus preventing plaintext leakage at the computational level.
[0041] After joint decryption, the server and all participating parties jointly obtain the plaintext result of the global performance gain. In this example, the global performance gain is 0.026. Under protocol constraints, each participating party only knows its own performance gain plaintext. The server can only obtain the global gain and the relative contribution ratio of all participating parties; it cannot obtain the individual performance gain plaintext of any single participating party. The relative contribution ratio is calculated based on the global performance gain. The relative contribution ratio of a single participating party is the ratio of that party's performance gain plaintext to the global performance gain plaintext, reflecting the degree to which that party's local training contributes to the improvement of the global model performance. Positive values indicate positive contributions, and negative values indicate negative contributions.
[0042] In the example, the plaintext performance gains of the three participants are g_1=0.022, g_2=0.007, and g_3=-0.003, respectively, and the global gain G=0.026. Their relative contribution ratios are calculated as c_1=0.022 / 0.026≈0.8462, c_2=0.007 / 0.026≈0.2692, and c_3=-0.003 / 0.026≈-0.1154. Arranging the relative contribution ratios of all participants in order of their identifiers forms an initial contribution vector. In this example, the initial vector is [c_1,c_2,c_3]=[0.8462,0.2692,-0.1154]. This vector intuitively reflects the original contribution differences of each participant in this iteration, without revealing any individual plaintext information of any participant throughout the process.
[0043] The initial contribution vector is normalized to ensure that the sum of all components is 1, and the final contribution vector is output.
[0044] The initial contribution vector is normalized to ensure that the sum of all components is 1, and the final contribution vector is output.
[0045] The core of this step is to eliminate numerical redundancy and imbalance in the initial contribution vector through normalization, constraining the contribution ratio within a standard range so that the vector meets the mathematical requirements for subsequent weighted aggregation. The specific implementation method is as follows: The sum of the components in the initial contribution vector may not be 1 and may contain negative values, making it unsuitable for direct use in subsequent weighting coefficient calculations. Therefore, the L1 normalization method is used for processing. This method uses the sum of the absolute values of all components as the normalization denominator, divides each component by the denominator, and makes the sum of the absolute values of all components after processing equal to 1. This preserves the positive and negative attributes of the contribution, satisfies the standardization requirements, and is compatible with the mathematical logic of federated learning model aggregation.
[0046] The normalization calculation formula is w_i=c_i / Σ|c_j|, where w_i is the normalized contribution of the i-th participant, c_i is the initial contribution, and Σ|c_j| is the sum of the absolute values of the initial contributions of all participants. In the example, the initial contribution vector is [0.8462, 0.2692, -0.1154]. The sum of the absolute values of all components is |0.8462|+|0.2692|+|-0.1154|=1.2308. Substituting these values into the formula, the normalized contribution values are w_1=0.8462 / 1.2308≈0.688, w_2=0.2692 / 1.2308≈0.219, and w_3=-0.1154 / 1.2308≈-0.094. The sum of the three components is 0.688+0.219-0.094=1, which meets the standardization requirements.
[0047] The normalization process involves only pure numerical calculations and does not change the relative magnitudes of the contributions from each participant. Positive contributions remain positive, and negative contributions remain negative. The resulting vector is the final contribution vector, which in this example is [0.688, 0.219, -0.094]. This vector possesses standard mathematical properties and can be directly used for subsequent dynamic weighting coefficient calculations. It accurately quantifies the differences in contributions from each participant and fully meets the dual requirements of privacy protection and model aggregation in federated learning, providing a reliable contribution basis for the weighted aggregation in this round of federated learning.
[0048] S203, the server dynamically calculates the weighting coefficients for the next round of aggregation based on the contribution vector and combined with historical contribution records, generates a weighting coefficient vector, and uses homomorphic encryption scalar multiplication to perform weighted processing on the privacy-preserving update to obtain the weighted update ciphertext; Specifically, the server reads the historical contribution record database, obtains the contribution sequence of each participant in the previous rounds, and concatenates it with the contribution vector of the current round to form a contribution time series matrix; The server reads the historical contribution record database, obtains the contribution sequence of each participant in the previous rounds, and concatenates it with the contribution vector of the current round to form a contribution time series matrix.
[0049] The core of this step is to integrate the historical contribution information of the participants from multiple iterations with the contribution data of the current round, and construct a time-series data matrix. This provides a complete time-series basis for dynamically calculating long-term stable weighting coefficients. The entire process only processes the contribution values and does not touch any raw data or plaintext model information. The specific implementation method is as follows: The historical contribution record database is a structured database on the central server specifically used to store the contributions of each participant after each iteration of federated learning. It employs persistent storage, automatically archiving and saving the final contribution vector for each iteration by participant identifier and iteration number. Database fields include a unique participant identifier, iteration number, contribution value for the corresponding iteration, and a timestamp indicating data generation. The timestamp uses millisecond precision to ensure that contribution data for each iteration is traceable, aligned, and searchable. The database supports fast queries by participant identifier and iteration range, with read latency controlled within milliseconds, meeting the real-time requirements of dynamic weighted calculation.
[0050] The server traces back a specified number of historical rounds based on the current iteration round, reading the contribution sequence of each participant in the corresponding historical round. The number of rounds traced is usually set to 3 to 5 rounds, which can fully reflect the long-term contribution stability of the participants and avoid computational redundancy due to excessive data volume. In the example, the current iteration is the 4th round, and the historical data of the previous 3 rounds are traced. Federated learning includes 3 participants, identified as P_1, P_2, and P_3.
[0051] The retrieved historical contribution sequence is as follows: Round 1 contribution vector [0.62, 0.28, 0.10], Round 2 [0.67, 0.23, 0.10], Round 3 [0.69, 0.22, 0.09], and the final contribution vector for the current Round 4 is [0.688, 0.219, -0.094]. The historical contribution sequence and the current round contribution vector are then horizontally concatenated according to the iteration rounds from earliest to latest. Each row corresponds to the multi-round contribution values of one participant, and each column corresponds to one iteration round, ultimately forming a contribution time series matrix.
[0052] In the example, the contribution time series matrix for the three participants and four iterations has a 3x4 structure. The first row corresponds to the sequence [0.62, 0.67, 0.69, 0.688] for participant P_1, the second row corresponds to the sequence [0.28, 0.23, 0.22, 0.219] for participant P_2, and the third row corresponds to the sequence [0.10, 0.10, 0.09, -0.094] for participant P_3. This matrix fully preserves the temporal variation characteristics of each participant's contribution, reflecting both the immediate contribution in this round and covering long-term historical performance, providing standardized time series data input for subsequent comprehensive contribution weight calculation.
[0053] An exponentially weighted moving average algorithm with a forgetting factor is used to calculate the contribution time series matrix, obtain the comprehensive contribution weight of each participant, and generate the initial weighting coefficients. An exponentially weighted moving average algorithm with a forgetting factor is used to calculate the contribution time series matrix, obtain the comprehensive contribution weight of each participant, and generate the initial weighting coefficients.
[0054] The core of this step is to use an exponentially weighted moving average algorithm with a forgetting factor to integrate the historical and current contributions of the participants, weaken the influence of outdated data, strengthen the weight of recent contributions, and generate a comprehensive contribution weight that balances stability and timeliness. This avoids abnormal weighting coefficients caused by fluctuations in contributions in a single round. The specific implementation method is as follows: The exponentially weighted moving average algorithm with a forgetting factor is a time-series data smoothing algorithm. Its core advantage is that it assigns exponentially decaying weights to data at different time points. The forgetting factor controls the rate at which historical data is forgotten, giving higher weights to contribution data closer to the current round and lower weights to data from more distant rounds. This smooths out fluctuations in single-round contributions while quickly responding to recent changes in participant contributions. The forgetting factor β in the algorithm ranges from 0 to 1, and is typically set to 0.9. This value balances the strength of historical data retention with the sensitivity to recent data. If β is too large, it becomes overly reliant on historical data; if β is too small, it becomes susceptible to noise in single rounds.
[0055] The core calculation formula of the algorithm is: w_i_t=β×w_i_(t-1)+(1-β)×c_i_t, where w_i_t is the comprehensive contribution weight of participant i in round t, w_i_(t-1) is the comprehensive contribution weight in round t-1, c_i_t is the contribution value of participant i in round t, 1-β is the weighting coefficient of the contribution in the current round, and β is the retention ratio of the historical comprehensive weight.
[0056] Taking participant P_1 as an example, the iteration rounds are from 1 to 4, the forgetting factor β=0.9, the initial weight w_i_0=0, the calculation in the first round is w_1_1=0.9×0+0.1×0.62=0.062, the calculation in the second round is w_1_2=0.9×0.062+0.1×0.67=0.1228, the calculation in the third round is w_1_3=0.9×0.1228+0.1×0.69=0.17952, and the calculation in the fourth round is w_1_4=0.9×0.17952+0.1×0.688≈0.2304.
[0057] Following the same calculation logic, the overall contribution weight of participant P_2 is approximately 0.0785, while the overall contribution weight of participant P_3, due to its negative contribution in this round, is approximately -0.0312. The overall contribution weight of all participants is the initial weighting coefficient. This coefficient integrates the temporal contribution information from multiple rounds, making it more stable and reasonable than the contribution of a single round, effectively avoiding the weighting anomaly caused by fluctuations in a single training session.
[0058] The initial weighting coefficients are normalized to ensure that the sum of all coefficients is 1, and a weighting coefficient vector is generated. The initial weighting coefficients are normalized to ensure that the sum of all coefficients is 1, thus generating a weighting coefficient vector.
[0059] The core of this step is to map the initial weighting coefficients to standard proportions through normalization, ensuring that the sum of the weighting coefficients of all participants is strictly equal to 1. This satisfies the mathematical constraints of subsequent federated learning model aggregation, while preserving the relative differences in the overall contributions of each participant. The specific implementation method is as follows: The initial weighting coefficients were calculated using an exponentially weighted moving average algorithm with a forgetting factor. Since the values can be positive or negative and the sum is not equal to 1, they cannot be directly used for weighted aggregation in model updates. Therefore, the L1 norm normalization method is used to process them. This method uses the sum of the absolute values of all initial weighting coefficients as the normalization denominator. Each initial weighting coefficient is divided by the denominator so that the sum of the absolute values of the normalized coefficients is 1. This method preserves the positive or negative attributes of the contribution and meets the numerical requirements of weighted aggregation.
[0060] The normalization calculation formula is: α_i=w_i / Σ|w_j|, where α_i is the normalized weighted coefficient of participant i, w_i is the initial weighted coefficient of the participant, and Σ|w_j| is the sum of the absolute values of the initial weighted coefficients of all participants.
[0061] In the example, the initial weighting coefficients for the three participants are w_1≈0.2304, w_2≈0.0785, and w_3≈-0.0312, respectively. The sum of the absolute values of all coefficients is |0.2304|+|0.0785|+|-0.0312|=0.3401. Substituting these values into the formula, we obtain the normalized weighting coefficients: α_1=0.2304 / 0.3401≈0.677, α_2=0.0785 / 0.3401≈0.231, α_3=-0.0312 / 0.3401≈-0.008.
[0062] After normalization, the sum of the three coefficients is 0.677 + 0.231 - 0.008 = 1, which fully satisfies the mathematical requirements of weighted aggregation. The normalized weighted coefficients of all participants are arranged in order of their identifiers to generate the final weighted coefficient vector. In this example, the weighted coefficient vector is [0.677, 0.231, -0.008]. This vector accurately quantifies the dynamic comprehensive contribution of each participant. Positive coefficients indicate a positive contribution to the global model; the larger the coefficient, the higher the weight. Negative coefficients indicate a weaker contribution and are appropriately suppressed during aggregation to ensure the rationality and efficiency of the global model aggregation.
[0063] By leveraging the scalar multiplication property of homomorphic encryption, the privacy-preserving update vector of each participant is multiplied in the ciphertext field with the corresponding weighting coefficient to obtain the weighted update ciphertext.
[0064] By leveraging the scalar multiplication property of homomorphic encryption, the privacy-preserving update vector of each participant is multiplied in the ciphertext field with the corresponding weighting coefficient to obtain the weighted update ciphertext.
[0065] The core of this step is to leverage the scalar multiplication property of homomorphic encryption to complete the weighted operation of the ciphertext field without decryption or access to the plaintext of the privacy-preserving update vector. This ensures the privacy and security of the model update data throughout the process, while simultaneously achieving the core objective of weighted operation based on contribution. The specific implementation method is as follows: The homomorphic encryption algorithm used in this study supports both additive homomorphism and scalar multiplication homomorphism. The core characteristic of scalar multiplication homomorphism is that for the ciphertext E(m) and scalar coefficient k corresponding to plaintext m, the scalar multiplication result E(m)×k in the ciphertext field is equivalent to the encrypted result E(m×k) after the plaintext operation. The server does not need to decrypt any privacy-protected update data, and can complete the weighting process only through ciphertext algebra operations. It cannot obtain any plaintext information of model updates throughout the process, thus ensuring data privacy from the computational level.
[0066] The privacy-preserving update vector is the model parameter update vector of each participant after differential privacy noise addition. Its dimension is consistent with the global model parameter. In the example, it is a 5000-dimensional floating-point vector. This vector is stored in the participant data set on the server in ciphertext or privacy-preserving form without any decryption operation.
[0067] The server matches the corresponding weighting coefficients according to the participant identifiers, and performs element-wise encrypted scalar multiplication of each participant's privacy-preserving update vector with the normalized weighting coefficients. The operation is performed independently for each parameter dimension in the vector, and the operation rules follow the definition of scalar multiplication in homomorphic encryption. The operation efficiency is linearly related to the vector dimension, and it can support fast weighting of high-dimensional model parameters.
[0068] In the example, the weighting coefficient of participant P_1 is 0.677, and the element of a certain dimension in its privacy protection update vector is 0.0243. After the ciphertext field multiplication, this element becomes 0.0243×0.677≈0.0165, and the corresponding ciphertext changes from E(0.0243) to E(0.0165). The weighting coefficient of participant P_3 is -0.008, and the element of a certain dimension in its privacy protection update vector is -0.0054. After the ciphertext field multiplication, this element becomes -0.0054×(-0.008)=0.0000432, and the corresponding ciphertext undergoes a weighting transformation simultaneously.
[0069] After the privacy-preserving update vectors of all participants undergo ciphertext field weighting, a corresponding weighted update ciphertext is generated. Each participant has a set of weighted update ciphertexts, and the ciphertext format remains consistent with the original privacy-preserving update vectors, allowing them to be directly used for subsequent homomorphic aggregation operations. This step, while strictly adhering to data privacy constraints, completes the core operation of dynamic weighting, laying the foundation for accurate aggregation of global model updates.
[0070] S204, the server performs homomorphic aggregation on the weighted update ciphertext to obtain the global model update ciphertext, and distributes it to each participant. Each participant uses its private key to decrypt the global model update and update its local model.
[0071] Specifically, the server homomorphically adds the weighted update ciphertexts of all participants to obtain the aggregated global model update ciphertext; The server homomorphically adds the weighted update ciphertexts of all participants to obtain the aggregated global model update ciphertext.
[0072] The core of this step relies on the additive homomorphic property of homomorphic encryption to aggregate the weighted update ciphertexts of all participants without decryption. This integrates the model update information weighted according to each party's contribution, forming an encrypted form of the global model update. This ensures data privacy while completing the aggregated calculation of the global model update. The specific implementation method is as follows: The weighted update ciphertext is the ciphertext data obtained by weighting the privacy-preserving update vectors of each participant through scalar multiplication of the ciphertext field. Its dimension is completely consistent with the dimension of the global model parameters. In the example, it is a 5000-dimensional floating-point ciphertext vector. Each dimension corresponds to the weighted update ciphertext of a model parameter. The ciphertext form is an algebraic symbol that cannot be directly interpreted and can only be decrypted and restored to the plaintext parameter by a specified private key.
[0073] The homomorphic encryption algorithm used in this study possesses the complete additive homomorphic property. The core of this property is that for any number of plaintexts m_1, m_2, ..., m_n, their corresponding ciphertexts E(m_1), E(m_2), ..., E(m_n) are added item by item within the ciphertext field. The resulting aggregate ciphertext is equivalent to the sum of all plaintexts before encryption, i.e., E(m_1) + E(m_2) + ... + E(m_n) = E(m_1 + m_2 + ... + m_n). This characteristic ensures that the server does not need to decrypt the weighted update ciphertext of any individual participant; it only needs to perform the addition operation within the ciphertext field to obtain the encrypted result of the global model update. The server does not access any participant's model update plaintext throughout the process, fundamentally protecting the privacy of all participants' data.
[0074] During the aggregation process, the server iterates through all weighted update ciphertexts in the participant datasets according to the participant identifier order. It performs element-wise homomorphic addition on the ciphertext vectors, with the operation executed independently for each model parameter dimension. This ensures that the weighted updates for each dimension are accurately aggregated without omissions or misalignments. In the example, the federated learning involves three participants, whose weighted update ciphertexts are E(Δw_1), E(Δw_2), and E(Δw_3), where Δw_1, Δw_2, and Δw_3 are the weighted plaintext update vectors of each participant. The server performs homomorphic addition on these three vectors to obtain the global model update ciphertext E(Δw_1+Δw_2+Δw_3)=E(ΔW), where ΔW is the plaintext parameter vector of the global model update.
[0075] The aggregation operation process is free of data distortion and precision loss. The computational efficiency is linearly related to the number of participants and the dimensionality of model parameters. It can support the rapid aggregation of multi-participant, high-dimensional models. The global model update ciphertext after aggregation is consistent with the format of the single weighted update ciphertext. It contains the weighted contributions of all participants and is in an encrypted state. It can be directly used for subsequent secure distribution and decryption operations, providing a secure and complete encrypted data foundation for the synchronous update of the global model.
[0076] The server broadcasts the global model update ciphertext to all participants via a secure channel; The server broadcasts the global model update ciphertext to all participants via a secure channel.
[0077] The core of this step is to achieve secure, efficient, and synchronous distribution of the global model update ciphertext, ensuring that all participants can obtain the encrypted global update data in a timely and complete manner, while resisting attacks such as eavesdropping, tampering, and replay during transmission, and guaranteeing the security and consistency of data transmission. The specific implementation method is as follows: The secure channel is a dedicated communication link between the server and all participating parties for transmitting encrypted data. It employs an end-to-end encrypted transmission protocol, performing a second encryption on the global model update ciphertext before data transmission. The encryption key is a pre-negotiated session key between the server and all participating parties, updated with each iteration to further enhance transmission security and prevent privacy risks caused by key leakage. The secure channel supports parallel transmission by multiple participants, with transmission latency controlled within 10 milliseconds, ensuring all participants can receive data synchronously and avoiding iteration synchronization issues caused by transmission delays.
[0078] Broadcasting refers to the server simultaneously sending the global model update ciphertext to all participants, rather than sending it to each participant individually. This method improves distribution efficiency, ensures that all participants receive data at the same time, and provides a guarantee for subsequent local model synchronization updates. Before broadcasting, the server performs an integrity check on the global model update ciphertext. By calculating the hash value of the ciphertext, it verifies whether the ciphertext is complete and has not been tampered with. If the check fails, the aggregation calculation is re-performed to ensure that the broadcast ciphertext is accurate; if the check passes, the broadcast process is initiated.
[0079] In the example, after the server completes the integrity verification of the global model update ciphertext E(ΔW), it simultaneously broadcasts the ciphertext to participants P_1, P_2, and P_3 via a secure channel. Each participant's receiving port is equipped with a data reception verification mechanism. After receiving the data, it calculates the hash value of the ciphertext and compares it with the hash value sent by the server. If the comparison matches, the reception is confirmed as successful, the ciphertext is stored, and preparations are made for subsequent decryption operations. If the comparison does not match, a retransmission request is sent to the server. Upon receiving the request, the server rebroadcasts the ciphertext until all participants have successfully received the complete and error-free global model update ciphertext.
[0080] In addition, during the broadcast process, the server records the reception status of each participant, including the reception time and reception result, forming a broadcast log for subsequent iteration anomaly investigation. This ensures that the distribution process is traceable and controllable, guaranteeing both the security of data transmission and the efficiency and consistency of distribution.
[0081] Each participant uses its own private key to decrypt the received global model update ciphertext and obtain the global model update parameters in plaintext form; Each participant uses its own private key to decrypt the received global model update ciphertext and obtain the global model update parameters in plaintext form.
[0082] The core of this step is to securely decrypt the encrypted global model update data, restoring it to plaintext parameters to provide core input for local model updates by participating parties. Simultaneously, it ensures that only authorized participants can decrypt the data, preventing unauthorized access and data leakage. The specific implementation method is as follows: The private key is a unique decryption key generated independently by each participant during the federated learning initialization phase. It is used in conjunction with the server's public key and the homomorphic encryption algorithm. The private key is kept secret by each participant and is accessible only to that participant; the server and other participants cannot obtain it. The private key is unique, immutable, and cannot be disclosed, making it the core component ensuring decryption security. Each participant's private key can only decrypt ciphertext encrypted with the corresponding server's public key, ensuring the uniqueness and security of decryption and preventing unauthorized decryption.
[0083] The decryption process is completed locally by the participating parties, without any data uploads or disclosure of the decrypted plaintext information to the server or other participating parties, fully complying with the core requirements of data privacy protection. During decryption, the participating parties input the received global model update ciphertext into their local decryption module, call their own private key, and perform element-by-element decryption operations according to the decryption rules of the homomorphic encryption algorithm, restoring the unreadable ciphertext to the plaintext form of the global model update parameters.
[0084] In the example, participant P_1 uses its private key SK_1 to decrypt the received global model update ciphertext E(ΔW). After decryption, the global model update parameter ΔW in plaintext form is obtained. This parameter is a 5000-dimensional floating-point vector, and each element corresponds to the global update value of a model parameter. For example, the first element in ΔW is 0.0165, the second element is -0.0105, and the remaining elements are assigned values according to the aggregation result, which fully reflects the direction and magnitude of global model optimization after the weighted contributions of all participants.
[0085] After decryption, the participants perform integrity and validity checks on the plaintext global model update parameters. The checks include whether the parameter dimensions are consistent with the local model and whether the parameter values are within a reasonable range. If the check fails, it indicates that there is an anomaly in the decryption process or that the ciphertext has been tampered with. The participants will abandon this update and send an anomaly report to the server. If the check passes, the global model update parameters are confirmed to be valid. The parameters are stored and preparations are made for subsequent local model fusion update operations to ensure that the decrypted parameters can be directly used for model updates.
[0086] The participants will merge the decrypted global model update parameters with the local current model to update the local model parameters and complete this round of federated learning iteration.
[0087] The participants will merge the decrypted global model update parameters with the local current model to update the local model parameters and complete this round of federated learning iteration.
[0088] The core of this step is to integrate the updates of the local model and the global model, incorporating the optimization information aggregated globally into the local model to complete the local model update. This also lays the foundation for the next round of federated learning iterations. The entire process is completed locally by the participating party, without leaking any local model information. The specific implementation method is as follows: The local current model represents the model parameters trained locally by each participant in this round, before being integrated with the global update. It includes core parameters such as weights and biases, and its dimensions are consistent with the global model update parameters (5000 dimensions in the example). This model is stored only locally by the participant and represents the result of training on their own private data; it is not disclosed externally. The global model update parameters are the optimized parameters resulting from the weighted aggregation of contributions from all participants. They reflect the overall optimization direction of federated learning. The integration process combines the global optimization information with the local training results to achieve iterative upgrades of the local model.
[0089] Model fusion adopts a parameter stacking method. The core calculation formula is: w_new=w_old+ΔW, where w_new is the updated local model parameter, w_old is the current local model parameter, and ΔW is the decrypted global model update parameter. The stacking process is element-wise addition, which ensures that each model parameter can be accurately updated. This preserves the effective results of local training and integrates the global optimization contribution, thereby achieving an overall improvement in model performance.
[0090] In the example, in the local current model parameter w_old of participant P_1, the weight value of one dimension is 0.5231, and the update value of the corresponding dimension in the global model update parameter ΔW is 0.0165. After fusion, the weight value of this dimension is 0.5231 + 0.0165 = 0.5396. The bias value of another dimension is -0.1258, the global update value is -0.0105, and the bias value after fusion is -0.1258 + (-0.0105) = -0.1363. All other dimensions are fused according to the same rule.
[0091] After fusion, the participants perform performance verification on the updated local model parameters. They then perform forward inference on their local private dataset or a public validation set, calculating performance metrics such as accuracy and loss to verify the effectiveness of the model update. If performance metrics improve, the update is considered successful; if performance metrics decline, anomaly information is recorded for use in the next round of training optimization. After a successful update, the participants store the updated local model as the basis for the initial global model in the next federated learning iteration, simultaneously marking the completion of this iteration and sending an iteration completion confirmation signal to the server.
[0092] Once all participants have completed their local model updates and sent confirmation signals, the server confirms that this round of federated learning iterations is complete, records the relevant data of this round of iterations (including contribution vectors, weighting coefficient vectors, global model update parameters, etc.), and archives it to the historical contribution record database to provide historical data support for the dynamic weighted calculation of the next round of iterations. At this point, the entire federated learning iteration process is complete.
[0093] Another embodiment of the present invention provides a federally-mandated dynamic weighted contribution evaluation system for data privacy protection, see [link to relevant documentation]. Figure 3 The system may include: The encryption module 301 is used by each participant to train the model parameters locally using private data, calculate the performance gain of the local model based on the public validation set, add noise to the model parameter update using differential privacy technology to generate privacy-protected update, and use homomorphic encryption algorithm to encrypt the performance gain value to generate encrypted gain ciphertext. The parsing module 302 is used by the central server to receive privacy protection updates and encrypted gain ciphertexts from all participants, aggregate the encrypted gain ciphertexts through the additive property of homomorphic encryption to obtain global gain ciphertexts, and use a secure multi-party computation protocol to parse the relative contribution ratio of each participant from the global gain ciphertexts to generate a contribution vector. The weighting module 303 is used by the server to dynamically calculate the weighting coefficients for the next round of aggregation based on the contribution vector and combined with historical contribution records, generate a weighting coefficient vector, and use homomorphic encryption scalar multiplication to perform weighted processing on the privacy protection update to obtain the weighted update ciphertext. The decryption module 304 is used by the server to perform homomorphic aggregation on the weighted update ciphertext to obtain the global model update ciphertext, and distribute it to each participant. Each participant uses its private key to decrypt the global model update and update its local model.
[0094] This invention also provides a storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when running.
[0095] This invention also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0096] Specifically, the aforementioned electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the aforementioned processor, and the input / output device is connected to the aforementioned processor.
[0097] The above description, based on the embodiments shown in the figures, details the structure, features, and effects of the present invention. The above description is only a preferred embodiment of the present invention, but the present invention is not limited to the scope of implementation shown in the figures. Any changes made in accordance with the concept of the present invention, or equivalent embodiments modified to have equivalent changes, that do not exceed the spirit covered by the specification and figures, should be within the protection scope of the present invention.
Claims
1. A federally-mandated dynamic weighted contribution evaluation method for data privacy protection, characterized in that, The method includes: Each participant trains the model parameters locally using private data and calculates the performance gain of the local model based on the public validation set. Differential privacy technology is used to add noise to the model parameter updates to generate privacy-preserving updates. At the same time, homomorphic encryption algorithm is used to encrypt the performance gain value to generate encrypted gain ciphertext. The central server receives privacy protection updates and encrypted gain ciphertexts from all participants, aggregates the encrypted gain ciphertexts using the additive property of homomorphic encryption to obtain global gain ciphertext, and uses a secure multi-party computation protocol to parse the relative contribution ratio of each participant from the global gain ciphertext to generate a contribution vector. The server dynamically calculates the weighting coefficients for the next round of aggregation based on the contribution vector and combined with historical contribution records, generates a weighting coefficient vector, and uses homomorphic encryption scalar multiplication to perform weighted processing on the privacy-preserving update to obtain the weighted update ciphertext. The server performs homomorphic aggregation on the weighted update ciphertext to obtain the global model update ciphertext, and distributes it to each participant. Each participant uses its private key to decrypt the global model update and update its local model.
2. The method according to claim 1, characterized in that, Each participant locally trains and updates its model parameters using private data, calculates the performance gain of its local model based on a public validation set, adds noise to the model parameter updates using differential privacy technology to generate privacy-preserving updates, and simultaneously encrypts the performance gain values using a homomorphic encryption algorithm to generate encrypted gain ciphertext, including: Each participant loads its local private dataset, performs multiple rounds of gradient descent training using the current global model, and obtains the model parameter update vector for this iteration. Perform forward inference on the local model on the public validation set, calculate the improvement in model accuracy relative to the previous round, and obtain the performance gain scalar. The scaling parameter of the differential privacy noise is dynamically adjusted based on the performance gain scalar, and Laplace noise of appropriate intensity is added to the model parameter update vector to generate a privacy-preserving update vector. The performance gain scalar is encrypted using a homomorphic encryption algorithm with the server's public key. The encrypted ciphertext and the privacy protection update vector are then encapsulated into a unified data packet to generate the encrypted gain ciphertext and privacy protection update to be uploaded.
3. The method according to claim 2, characterized in that, The central server receives privacy-preserving updates and encrypted gain ciphertexts from all participants. It aggregates the encrypted gain ciphertexts using the additive property of homomorphic encryption to obtain a global gain ciphertext. Then, it uses a secure multi-party computation protocol to parse the relative contribution ratio of each participant from the global gain ciphertext, generating a contribution vector, including: The central server receives privacy-preserving update vectors and encryption gain ciphertexts uploaded by all participants, indexes them according to the participant identifiers, and stores them to form a participant data set. By utilizing the additive homomorphic property of homomorphic encryption, all encrypted gain ciphertexts are added together item by item to obtain the aggregated global gain ciphertext; Initiate a secure multi-party computation protocol, collaborate with all participants to jointly decrypt the global gain ciphertext, obtain the original performance gain value of each participant, calculate the relative contribution ratio, and generate an initial contribution vector. The initial contribution vector is normalized to ensure that the sum of all components is 1, and the final contribution vector is output.
4. The method according to claim 3, characterized in that, The server dynamically calculates the weighting coefficients for the next round of aggregation based on the contribution vector and historical contribution records, generating a weighting coefficient vector. It then uses homomorphic encryption and scalar multiplication to weight the privacy-preserving update, obtaining the weighted update ciphertext, including: The server reads the historical contribution record database, obtains the contribution sequence of each participant in the previous rounds, and concatenates it with the contribution vector of the current round to form a contribution time series matrix. An exponentially weighted moving average algorithm with a forgetting factor is used to calculate the contribution time series matrix, obtain the comprehensive contribution weight of each participant, and generate the initial weighting coefficients. The initial weighting coefficients are normalized to ensure that the sum of all coefficients is 1, and a weighting coefficient vector is generated. By leveraging the scalar multiplication property of homomorphic encryption, the privacy-preserving update vector of each participant is multiplied in the ciphertext field with the corresponding weighting coefficient to obtain the weighted update ciphertext.
5. The method according to claim 4, characterized in that, The server performs homomorphic aggregation on the weighted update ciphertext to obtain the global model update ciphertext, and distributes it to each participant. Each participant uses its private key to decrypt the global model update and update its local model, including: The server homomorphically adds the weighted update ciphertexts of all participants to obtain the aggregated global model update ciphertext. The server broadcasts the global model update ciphertext to all participants via a secure channel; Each participant uses its own private key to decrypt the received global model update ciphertext and obtain the global model update parameters in plaintext form; The participants will merge the decrypted global model update parameters with the local current model to update the local model parameters and complete this round of federated learning iteration.
6. A federally-mandated dynamic weighted contribution evaluation system for data privacy protection, characterized in that, The system includes: The encryption module is used by each participant to train the model parameters locally using private data, calculate the performance gain of the local model based on the public validation set, add noise to the model parameter updates using differential privacy technology to generate privacy-preserving updates, and use homomorphic encryption algorithm to encrypt the performance gain value to generate encrypted gain ciphertext. The parsing module is used by the central server to receive privacy protection updates and encrypted gain ciphertexts from all participants, aggregate the encrypted gain ciphertexts using the additive property of homomorphic encryption to obtain global gain ciphertexts, and use a secure multi-party computation protocol to parse the relative contribution ratio of each participant from the global gain ciphertexts to generate a contribution vector. The weighting module is used by the server to dynamically calculate the weighting coefficients for the next round of aggregation based on the contribution vector and combined with historical contribution records, generate a weighting coefficient vector, and use homomorphic encryption scalar multiplication to perform weighted processing on privacy-preserving updates to obtain weighted update ciphertext. The decryption module is used by the server to perform homomorphic aggregation on the weighted update ciphertext to obtain the global model update ciphertext, and distribute it to each participant. Each participant uses its private key to decrypt the global model update and update its local model.
7. The system according to claim 6, characterized in that, The encryption module is specifically used for: Each participant loads its local private dataset, performs multiple rounds of gradient descent training using the current global model, and obtains the model parameter update vector for this iteration. Perform forward inference on the local model on the public validation set, calculate the improvement in model accuracy relative to the previous round, and obtain the performance gain scalar. The scaling parameter of the differential privacy noise is dynamically adjusted based on the performance gain scalar, and Laplace noise of appropriate intensity is added to the model parameter update vector to generate a privacy-preserving update vector. The performance gain scalar is encrypted using a homomorphic encryption algorithm with the server's public key. The encrypted ciphertext and the privacy protection update vector are then encapsulated into a unified data packet to generate the encrypted gain ciphertext and privacy protection update to be uploaded.
8. The system according to claim 7, characterized in that, The parsing module is specifically used for: The central server receives privacy-preserving update vectors and encryption gain ciphertexts uploaded by all participants, indexes them according to the participant identifiers, and stores them to form a participant data set. By utilizing the additive homomorphic property of homomorphic encryption, all encrypted gain ciphertexts are added together item by item to obtain the aggregated global gain ciphertext; Initiate a secure multi-party computation protocol, collaborate with all participants to jointly decrypt the global gain ciphertext, obtain the original performance gain value of each participant, calculate the relative contribution ratio, and generate an initial contribution vector. The initial contribution vector is normalized to ensure that the sum of all components is 1, and the final contribution vector is output.
9. A storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program is configured to execute the method of any one of claims 1-5 when it is run.
10. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the method of any one of claims 1-5.