Batch multi-granularity verifiable federal forgetting learning method based on synthetic agent and adapter
By combining synthetic agents and sparse adapters, the problems of high forgetting costs and incomplete verification in federated learning are solved, achieving efficient and reliable multi-granularity forgetting effects, which are suitable for distributed environments.
Patent Information
- Application Number
- CN202511807562.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-03
- Publication Date
- 2026-02-10
AI Technical Summary
Existing federated learning suffers from high costs of forgetting, enormous computational and communication overhead, lacks flexibility, and has imperfect means of reliably verifying the effects of forgetting, making it difficult to objectively prove whether data knowledge has truly been removed.
A method combining synthetic surrogate and sparse adapter is adopted. Synthetic surrogate dataset is generated through data distillation, key layers are identified and sparse adapters are inserted for controlled overwriting, and the forgetting effect is verified by a verification adapter. Combined with adversarial gradient optimization and sparse regularization strategy, efficient and verifiable multi-granular forgetting is achieved.
It enables efficient support for multi-granularity forgetting without compromising privacy, reduces computation and communication costs, ensures the reliability and verifiability of forgetting operations, and is suitable for distributed federated environments with multiple clients and multiple tasks.
Smart Images

Figure CN121503732A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to artificial intelligence and privacy protection technologies, specifically to a batch multi-granularity verifiable federated forgetting learning method based on synthetic agents and adapters. Background Technology
[0002] With the rapid development of artificial intelligence technology, deep learning models have been widely used in fields such as computer vision, natural language processing, and intelligent decision-making. Model training often relies on large amounts of distributed user data, which, while improving performance, also brings risks such as privacy leaks and data misuse.
[0003] Federated learning, as a decentralized distributed training scheme, allows data to participate in model construction without leaving the local machine, thus mitigating privacy issues. However, in practical applications, users may want to withdraw previously contributed data, and the corresponding knowledge may still remain in the model, leading to the federated forgetting problem. Existing research mainly supports three forgetting granularities: (1) client-level forgetting, which removes the influence of the entire client on the global model; (2) sample-level forgetting, which eliminates the contribution of specific training samples to the model; and (3) category-level forgetting, which weakens the model's ability to distinguish certain labels.
[0004] Despite some progress in related research, there are still significant shortcomings: First, the cost of forgetting is generally high, requiring retraining of the model or multiple rounds of reverse updates, resulting in huge communication and computational overhead; second, there is a lack of a unified mechanism that can simultaneously support batch sample and category forgetting, resulting in insufficient flexibility; and third, reliable verification methods for the forgetting effect are still imperfect, making it difficult to objectively prove whether data knowledge has truly been removed.
[0005] Therefore, it is necessary to design a novel federated forgetting method that can efficiently support multi-granularity batch forgetting under privacy protection constraints and has verifiability. Summary of the Invention
[0006] Purpose of the invention: The purpose of this invention is to address the shortcomings of existing technologies and provide a batch multi-granularity verifiable federated forgetting learning method based on synthetic agents and adapters.
[0007] Technical Solution: This invention provides a batch multi-granularity verifiable federated forgetting learning method based on synthetic agents and adapters, involving parties including clients and federated servers. Global Model Sparse adapter is denoted as and verification adapter Let the set of all clients be denoted as the client set. , Indicates the number of clients, each client All have a size of Local real dataset , ;
[0008] Meanwhile, the client Based on its local dataset Generate synthetic proxy datasets through data distillation Using synthetic proxy datasets As a compressed representation of the original training gradient information, it is further divided into a set of forgetting proxies for performing forgetting operations. and a reserved proxy set used to maintain model performance ;
[0009] Federal server Deployed in the cloud or at the edge, it is used for global parameter aggregation and critical layer sensitivity analysis;
[0010] Global Model The model parameters (e.g., using CNN, Transformer, or other deep structures) are , Indicates the first All trainable parameters of a layer, including the weights, biases, and normalized or attention module parameters corresponding to the layer structure;
[0011] Forget the target layer set The key layer identification module selects the key layer based on the model layer sensitivity.
[0012] The sparse adapter Inserted into each forgotten target layer In this process, sparse masking is used to modify only some parameters, enabling controlled overwriting of forgotten target knowledge; the verification adapter Used to test the reversibility of forgetting effects during the validation phase;
[0013] The specific implementation process of the aforementioned participating parties is as follows:
[0014] Step S1: Synthetic proxy generation, the client uses the local dataset Synthetic distillation is performed to compress the original training samples into a small proxy set. The proxy set is divided by category and sample granularity to support batch forgetting at the category and sample levels, and serves as a fast gradient approximation source for forgetting operations.
[0015] Step S2: Key layer identification, federated server After receiving local model updates uploaded by each client, the differences in parameters between the global model and each client's model at the same network layer are compared to calculate the... The degree of parameter variation in the layer;
[0016] Its degree of difference is defined as follows: where For client indexing, , Indicates client In the The first layer Update the value of each parameter; This is the element index of the parameter vector for this layer, and Indicates the current global model at the [number]th [year]. The first layer One parameter:
[0017] ;
[0018] This difference Used to measure the The layer's sensitivity to task knowledge;
[0019] Federation server Based on this, select several layers with the highest degree of difference to form a set of forgetting target layers. For use in subsequent sparse adapters Injection and forgetting operations;
[0020] Step S3, Adapter Injection, forgetting to introduce a sparse adapter in the target layer. First, it's necessary to determine which parameters need to be modified, and then generate a sparse mask for that layer. ;
[0021] The sparse mask is generated by: scoring all parameters of the layer based on the parameter changes, gradient magnitude, or activation magnitude of the model in that layer, and then selecting a small subset of the most relevant parameters as updatable parameters, while keeping the rest of the parameters unchanged.
[0022] The selected parameter position is marked as 1 in the mask, and the rest are marked as 0; the sparse mask obtained in this way ensures that the forgetting operation only applies to a small number of key parameters, avoiding interference with the overall model and reducing the amount of computation.
[0023] Inserting a sparse adapter At that time, the commonly used small parameter module approach is adopted to integrate the sparse adapter. With mask After combining, add to the first Layers, Sparse Adapter It does not change the original backbone parameters, but works as an "additional patch" so that the parameters of this layer become the following during training or inference: ;
[0024] in This indicates element-wise multiplication;
[0025] Since the parameters of the main model are not modified at all, all forgetting-related adjustments are concentrated inside the sparse adapter. Therefore, the forgetting process is controllable, and the model can be restored to its original state by removing the sparse adapter if necessary.
[0026] Step S4: Forget about execution (knowledge overwriting)
[0027] During the forgetting execution phase, the forgetting proxy set is utilized. With reserved agent set Parameters of sparse adapter The objective function for adversarial optimization is:
[0028] ;
[0029] in, For the frozen backbone model parameters, To forget the intensity coefficient, Weights for sparsity constraints. Sparse adapter parameters. It represents all trainable compensation parameters inserted in each forgetting target layer. It is the only part of the model that is allowed to be updated and is used to achieve local knowledge overwriting without changing the backbone model.
[0030] Step S5: After completing the forgetting process, perform restorative fine-tuning of the sparse adapter parameters. Specifically, keep the global model backbone parameters frozen and only use the retained proxy set. The sparse adapter, after being updated during the forgetting phase, is retrained. This process aims to correct the performance bias caused by the forgetting operation on non-forgotten categories, restore the model's predictive ability on retained categories, and ensure that forgotten target knowledge is not relearned. Through this local fine-tuning, the model can maintain overall performance stability while preserving the forgetting effect.
[0031] Step S6, Forget Verification
[0032] Freeze the backbone parameters of the global model, remove the sparse adapter, and initialize the validation adapter. And in forgetting the proxy set Training:
[0033]
[0034] If the verification adapter If the original forgetting accuracy cannot be restored, the forgetting operation is considered successful; otherwise, the forgetting operation is considered a failure.
[0035] This invention significantly improves the quality of forgetting and the credibility of models in federated learning environments from three dimensions: efficiency, reliability, and verifiability. First, in the agent generation stage, efficient compression of original samples is achieved through synthetic distillation, preserving gradient information without compromising privacy, allowing the forgetting process to execute quickly without accessing real data. Second, in the key layer identification and adapter injection stages, layer sensitivity analysis and a sparse masking mechanism are introduced to make the forgetting operation directional and reversible, avoiding excessive interference to the global model. Third, in the forgetting execution stage, adversarial gradient optimization and sparse regularization strategies achieve dual-level controllable forgetting at both the category and sample levels, balancing thoroughness and model recoverability. Fourth, in the recovery and fine-tuning stage, a lightweight sparse adapter update and snapshot mechanism are employed, greatly reducing computational and communication costs while supporting model version rollback and audit trails. Finally, in the forgetting verification stage, an independent verification adapter is built, enabling externally verifiable testing of the forgetting results, ensuring that the forgetting operation is genuine, irreversible, and provable, providing an engineering-level implementation foundation for the "right to be forgotten" in federated learning.
[0036] Further, step 1 generates a synthetic proxy dataset. The specific method is as follows:
[0037] S1.1, Categorical Distillation and Proximity Subset Generation: This involves processing the client's local dataset. For each class c, generate a corresponding proxy subset separately. This fine-grained proxy generation ensures that, during category-level forgetting, only the corresponding proxies need to be precisely removed. For sample-level forgetting, the information generates a minimal surrogate control set for a single target sample to support accurate sample forgetting;
[0038] S1.2 Efficient Gradient Matching and Compression: During the generation of synthetic proxies, a gradient matching mechanism is used to compress the proxies data. Able to approximate real data The training effect; its core idea is that the proxy data should generate parameter update directions similar to the real data, so that it can still effectively replace the real data even with a very small scale. The optimization objective for generating the proxy set is:
[0039] ;
[0040] in and These represent the gradients of the proxy data and the real data under the same model parameters, respectively. It is a gradient similarity metric;
[0041] This mechanism ensures small-scale... Able to provide the original The almost identical parameter update directions thus become a source of fast gradient approximation in the forgotten execution (step S4);
[0042] S1.3 Dynamic proportional control and communication optimization: through proportional parameters Control the size of the synthesized data to satisfy:
[0043] ;
[0044] Where s (e.g., s) This significantly reduces the size of the agent set, achieving an order-of-magnitude reduction in communication and storage overhead, and greatly improving the efficiency of federated forgetting; it should be emphasized that the scaling parameter s is only used to control the overall agent set. The size is unrelated to the user's specific forgetting goal;
[0045] In generating a complete agent set Then, the system will further divide the proxy data into forget proxy sets according to the target category or target sample based on the forget request. and retain agent set ;
[0046] S1.4 Privacy Preservation and Enhanced Security: Proxy Data It contains only statistical features and does not disclose the original sample. During proxy generation or transmission, it incorporates differential privacy noise to enhance security.
[0047] Furthermore, the specific methods for key layer identification and adapter injection are as follows:
[0048] S2.1 Layer Sensitivity Measurement and Knowledge Density Analysis: After receiving local model updates uploaded by each client, the federated server calculates the degree of difference based on the parameter changes of each layer. To measure the model's first The sensitivity of a layer to task knowledge. A greater degree of dissimilarity indicates that the layer played a more important role in feature representation or decision-making during training, and its impact on forgetting the target is more significant. Based on this, the server selects several layers with the highest dissimilarity from all network layers to form a set of forgetting target layers. This is used for subsequent sparse adapter injection and forgetting operations;
[0049] S2.2 Sensitive Layer Priority and Stability Selection Strategy: Select the top K layers with the largest differences as... Where K is a preset small integer (e.g., K0). This strategy ensures that the sparse adapter is only inserted into the layer with the most dense knowledge storage and the most critical to the forgetting operation in the model; the server maintains this state over multiple rounds. The stability of the set is improved to reduce switching overhead.
[0050] S3.1 Construction of Selective Sparsity Mask: Sparse Adapter The parameters are determined by the sparse mask. Control, mask activation ratio The sparse mask Based on parameters during training The sensitivity or activation value is dynamically learned to ensure that the sparse adapter can selectively activate... The parameters most relevant to forgetting the goal are adjusted to achieve ultra-fine granularity.
[0051] S3.2 Knowledge Overwriting and Reversibility Design: Sparse Adapter Always keep the trunk parameters frozen Unchanged, all the effects of forgetting are conveyed through small-scale sparse adapter parameters. This is reflected in the fact that the forgetting operation is reversible: removing the sparse adapter restores the original trunk parameters;
[0052] S3.3, Federated Aggregation: Sparse Adapter Update Use a weighted average based on the size of the local dataset:
[0053] ;
[0054] This aggregation mechanism ensures the sparse adapter It integrates the knowledge overwrite requirements of all clients.
[0055] Furthermore, the specific method for forgetting to execute step S4 is as follows:
[0056] S4.1 Adversarial Gradient Optimization (Knowledge Overwriting Core):
[0057] During the forgetting execution phase, sparse adapter parameters Updates are performed using an adversarial objective function to achieve targeted knowledge overwriting of the target category or sample;
[0058] This optimization process is performed only for the sparse adapter, and the backbone model parameters... By maintaining a frozen state, the controllability and reversibility of the forgetting operation can be guaranteed. The optimization objective can be expressed as:
[0059] ;
[0060] in, This represents all sparse adapter parameters inserted on each forgetting target layer; To forget the loss on the proxy set, its gradient ascent term Used to weaken the model's ability to distinguish between forgotten categories or forgotten samples; To preserve the loss over the proxy set, its gradient descent term is used to maintain the performance of the non-forgotten classes; coefficients Controlling the intensity of forgetting The sparsity regularization coefficient is used to limit the number of effective parameters in the sparse adapter, so that the forgetting effect is concentrated in the critical region.
[0061] Through the aforementioned adversarial update, the sparse adapter gradually overwrites the target knowledge while avoiding irreversible damage to the backbone model.
[0062] S4.2, Sparsity Regularization and Parameter Control: Objective Function In Item for Norm regularization ensures adapter Its sparsity limits the size of the adapter and the range of interference to the backbone network;
[0063] S4.3 Early Stopping Mechanism and Performance Balance: The termination condition of the forgetting process is based on performance balance: when The loss increases beyond a preset threshold (indicating that forgetting has been sufficient) and The forgetting process terminates when the accuracy remains within tolerable limits (indicating that the loss of retained knowledge is acceptable).
[0064] Furthermore, the specific method for restoring the fine-tuning in step S5 is as follows:
[0065] S5.1 Local Adapter Fine-tuning: After forgetting to execute S4, only update the sparse adapter parameters. Maintain backbone parameters Freeze, in the reserve set Make minor adjustments:
[0066] ;
[0067] This step is crucial for knowledge calibration, eliminating the negative effects of the forgetting operation S4 with minimal computational cost.
[0068] S5.2 Snapshot Mechanism and Auditing: The server saves sparse adapter parameters. A snapshot. Because... It is small in size and reversible, and the snapshot mechanism supports task rollback and forget auditing, meeting the requirements for traceability.
[0069] Furthermore, the specific method for forgetting verification in step S6 is as follows:
[0070] S6.1 Initialization during the verification phase: After forgetting execution and resuming fine-tuning, freeze the global model backbone parameters. Remove all sparse adapters and initialize only the lightweight verification adapter. ;
[0071] S6.2 Verification of adapter training: In the forgotten proxy set Upgrade the training and validation adapter, and update the parameters as follows:
[0072] ;
[0073] in To validate the learning rate, the process attempts to recover the model's original performance to test whether forgetting is reversible.
[0074] S6.3, Successful Detection: Calculate and verify the adapter in accuracy When satisfied ( If the threshold for forgetting is reached, forgetting is considered successful; otherwise, a second forgetting process is triggered.
[0075] S6.4 Result Recording and Verifiability Guarantee: The server generates a verification report and verifies it through multiple resampling to ensure the verifiability and consistency of category-level and sample-level forgetting.
[0076] This invention also discloses a batch multi-granularity verifiable federated forgetting learning system based on synthetic agents and adapters, including a federated environment configuration module, a synthetic agent generation module, a key layer identification module, an adapter injection module, a forgetting execution module, a recovery fine-tuning module, and a verification module;
[0077] The federated environment configuration module initializes the system configuration; the synthetic agent generation module constructs agent sets for forgetting and retention through data distillation. and This invention comprises a data compression mechanism specifically for federated forgetting; a key layer identification module that selects highly sensitive layers based on parameter differences, representing a functional improvement over existing sensitivity analysis; an adapter injection module that inserts sparse adapters into the target layer, a core innovation of this invention, used to perform reversible knowledge overwriting within a controllable subspace; a forgetting execution module that utilizes a proxy set to perform gradient ascent forgetting in the adapter subspace, a major technical contribution of this invention; a recovery fine-tuning module that uses existing fine-tuning ideas to perform restorative fine-tuning of the sparse adapter parameters; and a verification module that trains independent verification adapters to determine whether forgetting is recoverable. Through the synergy of these modules, this invention achieves efficient, controllable, and verifiable federated forgetting of both category-level and sample-level knowledge.
[0078] Beneficial effects: Compared with the prior art, the present invention has the following advantages: (1) The present invention introduces a combination mechanism of synthetic proxy data and sparse adapter in a federated environment for the first time, and realizes efficient batch forgetting of model knowledge through data compression and structural reversible design. (2) The layer sensitivity identification method of the present invention can accurately locate the network layer that is most critical to knowledge storage, so that the forgetting operation focuses on the most influential model parameters, significantly improving the targeting and efficiency of forgetting. (3) The sparse adapter injection and adversarial gradient optimization strategy proposed in the present invention can effectively protect the performance of non-forgotten categories while realizing fast forgetting, so that the model can achieve a balance between forgetting and retention. (4) The present invention realizes the verifiability of forgetting effect by introducing a verification adapter mechanism, which can effectively verify and prove that the knowledge of the target category or sample has been completely removed from the model, ensuring the reliability and verifiability of the forgetting process, and meeting the technical requirements of data security and privacy compliance. (5) The system of the present invention has the characteristics of lightweight, revocable and traceable, and can run efficiently in a distributed federated environment with multiple clients and multiple tasks, with good system scalability and engineering application prospects. Attached Figure Description
[0079] Figure 1 This is a system module diagram of the present invention;
[0080] Figure 2 This is a flowchart of the forgetting method in this invention;
[0081] Figure 3 This is a schematic diagram of the overall process of federal forgetting in this invention;
[0082] Figure 4 This is a design diagram of the overall system framework in this invention. Detailed Implementation
[0083] The technical solution of the present invention will be described in detail below, but the scope of protection of the present invention is not limited to the embodiments described.
[0084] like Figure 1 and Figure 3As shown, this invention discloses a batch multi-granularity verifiable federated forgetting learning system based on synthetic proxies and adapters, mainly comprising a synthetic proxies generation module, a key layer identification module, an adapter injection module, a forgetting execution module, a recovery fine-tuning module, and a forgetting verification module. The synthetic proxies generation module performs synthetic distillation on local data from each client to generate a small-scale proxy dataset to replace the original data, achieving efficient training and privacy protection. The key layer identification module analyzes changes in model parameters and selects the layer with the highest sensitivity as the forgetting target layer. The adapter injection module inserts a sparse adapter into the target layer, activating only some parameters to perform the forgetting operation, while keeping the backbone model frozen, forming a reversible update space. The forgetting execution module uses the forgotten proxy set for adversarial gradient optimization, weakening the model's discriminative ability on the target category or sample, achieving knowledge overwriting. The recovery fine-tuning module fine-tunes the sparse adapter on the retained proxy set, repairing performance loss and supporting rollback and auditing through a snapshot mechanism. The forgetting verification module freezes the backbone network and retrains the verification adapter; if the verification adapter cannot recover the forgetting accuracy, the forgetting is considered successful.
[0085] like Figure 2 and Figure 4 As shown, the specific execution process of the batch multi-granularity verifiable federated forgetting learning method based on synthetic agents and adapters is as follows:
[0086] Step S1: Generate a synthetic proxy dataset. The client then uses the local dataset. Synthetic distillation is performed to compress the original training samples into a small proxy set. The proxy set is divided by category and sample granularity to support batch forgetting at the category and sample levels, and serves as a fast gradient approximation source for forgetting operations.
[0087] Step S2: Identify the key layer, the federated server. After receiving local model updates uploaded by each client, the differences in parameters between the global model and each client's model at the same network layer are compared to calculate the... Layer parameter variability ;
[0088] ;
[0089] in For client indexing, , Indicates client In the The first layer Update the value of each parameter; This is the element index of the parameter vector for this layer, and Indicates the current global model at the [number]th [year]. The first layer One parameter;
[0090] Then the federated server based on Select the layers with the highest degree of difference to form a set of forgetting target layers. ;
[0091] Step S3: Inject the sparse adapter First, determine the parameters that need to be modified in the forgetting target layer, and then generate a sparse mask for that forgetting target layer. ;
[0092] Injecting sparse adapters At that time, the sparse adapter With sparse mask After combining, add to the first Layer, making the first The layer parameters become as follows during training or inference: ;
[0093] in This indicates element-wise multiplication;
[0094] Step S4: Perform forgetting to achieve knowledge overwriting, using forgetting proxy sets. With reserved agent set For sparse adapters parameters The objective function for adversarial optimization is:
[0095] ;
[0096] in, For the frozen backbone model parameters, To forget the intensity coefficient, Weights are used to constrain sparsity;
[0097] Step S5: After completing the forgetting execution, perform restorative fine-tuning of the sparse adapter parameters, that is, keep the global model backbone parameters frozen and only use the retained surrogate set. Retrain the sparse adapter after it has undergone the forgetting phase update;
[0098] Step S6, Forget Verification
[0099] Freeze the backbone parameters of the global model, remove the sparse adapter, and initialize the validation adapter. And in forgetting the proxy set The above training: The formula is: ;
[0100] If the verification adapter If the original forgetting accuracy cannot be restored, the forgetting operation is considered successful; otherwise, the forgetting operation is considered a failure.
[0101] This invention aims to improve forgetting efficiency and verifiability, and is applicable to privacy-sensitive federated learning tasks in scenarios such as mobile terminal data modeling, smart device collaborative training, and edge computing. It can be used to handle user-subjected category-level or sample-level data retraction requests.
[0102] First, data distillation generates a synthetic proxy set categorized by class, achieving batch compressed representation of the target class or samples without revealing the original data. Then, layer sensitivity analysis is used to locate key model layers, and a sparse adapter is injected into them. Gradient ascent driven by the synthetic proxy weakens the model's memory of the forgotten target. Based on this, the sparse adapter is fine-tuned by retaining proxy data to maintain performance for non-forgotten classes. Finally, this invention employs a verification mechanism based on the adapter's reversibility: if the adapter cannot recover the forgotten accuracy when the main model is frozen, then the forgetting is proven successful. This approach balances privacy protection, efficient forgetting, and verifiable results, making it suitable for federated learning systems with multiple forgetting requirements.
[0103] In this embodiment, step 1 generates a synthetic proxy dataset. The specific method is as follows:
[0104] Step S1.1, Categorical Distillation and Proximity Subset Generation: This involves processing the client's local dataset... For each class c, generate a corresponding proxy subset separately. For sample-level forgetting, a minimal surrogate control set is generated for each individual target sample;
[0105] Step S1.2, Efficient Gradient Matching and Compression: During the generation of the synthetic proxy, a gradient matching mechanism is used to compress the proxy data. Able to approximate real data The training effect, and the optimization objective for generating the proxy set are:
[0106] ;
[0107] in, and These represent the gradients of the proxy data and the real data under the same model parameters, respectively. It is a gradient similarity metric;
[0108] Step S1.3, Dynamic Proportional Control and Communication Optimization: Through proportional parameters Control the size of the synthesized data to satisfy: ;
[0109] Where s ;
[0110] In generating a complete agent set Then, based on the forgetting request, the system further divides the proxy data into forgetting proxy sets according to the target category or target sample. and retain agent set ;
[0111] Step S1.4, Privacy Preservation and Security Enhancement: Proxy Data It only contains statistical features and does not reveal the original sample.
[0112] The specific method for key layer identification and adapter injection in this embodiment is as follows:
[0113] Step S2.1: Layer sensitivity measurement and knowledge density analysis;
[0114] After receiving local model updates uploaded by each client, the federated server S calculates the degree of difference based on the parameter changes at each layer. To measure the model's first Based on the sensitivity of each layer to task knowledge, the federated server S selects several layers with the highest degree of difference from all network layers to form a set of forget-the-target layers. ;
[0115] Step S2.2: Sensitive layer priority and stability selection strategy;
[0116] Take the top K layers with the largest differences as Where K is a preset small integer (e.g., K0). The federated server S maintained its position for multiple consecutive rounds. The stability of a set;
[0117] Step S3.1: Construction of selective sparsity mask;
[0118] Sparse adapter The parameters are determined by the sparse mask. Control, mask activation ratio ;
[0119] During training, based on parameters Sparse masks are obtained by dynamically learning the sensitivity or activation values. ;
[0120] Step S3.2: Knowledge Overwriting and Reversibility Design;
[0121] Sparse adapter Always keep the trunk parameters frozen Unchanged, all the effects of forgetting are conveyed through small-scale adapter parameters. To reflect;
[0122] Step S3.3, Federated Aggregation, Sparse Adapter The weighted average based on the size of the local dataset is calculated using the following formula: .
[0123] This embodiment injects a sparse adapter. Time sparse mask The generation method is as follows:
[0124] First, based on the global model Scoring is performed on all parameters of the forgetting target layer, ignoring parameter changes, gradient magnitude, or activation amplitude.
[0125] Then, select the "most relevant" parameters with a smaller proportion from all parameters as updatable parameters, while keeping the remaining parameters unchanged; the selected parameters are marked as 1 in the mask, and the rest are marked as 0.
[0126] The specific method for forgetting to execute step S4 in this embodiment is as follows:
[0127] S4.1, Adversarial Gradient Optimization;
[0128] During the forgetting execution phase, sparse adapter parameters Updates are performed using an adversarial objective function to achieve targeted knowledge overwriting of the target category or sample; backbone model parameters By maintaining a frozen state at all times, the controllability and reversibility of the forgetting operation are ensured. The optimization objective is expressed as:
[0129] ;
[0130] in, This represents all sparse adapter parameters inserted on each forgetting target layer; To forget the loss on the proxy set, its gradient ascent term Used to weaken the model's ability to distinguish between forgotten categories or forgotten samples; To preserve the loss over the proxy set, its gradient descent term is used to maintain the performance of the non-forgotten classes; coefficients Controlling the intensity of forgetting The sparsity regularization coefficient is used to limit the number of effective parameters in the sparse adapter, so that the forgetting effect is concentrated in the critical region.
[0131] S4.2, Sparsity Regularization and Parameter Control, Objective Function In Item for Norm regularization;
[0132] S4.3 Early Stopping Mechanism and Performance Balance: The termination condition of the forgetting process is based on performance balance: when The loss on the surface increases beyond the preset threshold and When the accuracy remains within the tolerance range, terminate the forgetting execution.
[0133] The specific method for restoring fine-tuning in step S5 of this embodiment is as follows:
[0134] S5.1 Local adapter fine-tuning: After execution, only the sparse adapter parameters are updated. Maintain backbone parameters Freeze, in the reserve set Make minor adjustments:
[0135] ;
[0136] S5.2 Snapshot Mechanism and Auditing: The federated server saves sparse adapter parameters. A snapshot.
[0137] The specific method for forgetting verification in step S6 of this embodiment is as follows:
[0138] S6.1 Initialization during the verification phase: After forgetting execution and resuming fine-tuning, freeze the global model backbone parameters. Remove all sparse adapters and initialize only the lightweight verification adapter. ;
[0139] S6.2 Verification of adapter training: In the forgotten proxy set Upgrade the training and validation adapter, and update the parameters as follows:
[0140] ;
[0141] in To validate the learning rate, this process attempts to recover the model's original performance to test whether forgetting is reversible.
[0142] S6.3, Successful Detection: Calculate and verify the adapter in accuracy When satisfied If the forgetting is successful, then forgetting is considered successful; otherwise, a second forgetting is triggered.
[0143] S6.4 Result Recording and Verifiability Guarantee: The server generates a verification report and verifies it through multiple resampling to ensure the verifiability and consistency of category-level and sample-level forgetting.
[0144] To further illustrate the applicability and advantages of the method of the present invention, a typical application scenario and effect are given below.
[0145] The technical solution of this invention is applied to federated learning scenarios such as distributed image recognition, text classification, and medical auxiliary diagnosis, where each client is an intelligent terminal or institutional node with independent data, and the global model is trained in a unified and coordinated manner by the federated server.
[0146] When a user or organization requests to "delete contributions of a specific category or sample", this invention uses synthetic proxy data to replace the original data to perform a forgetting operation, and achieves local overwriting and global verifiability through an adapter mechanism.
[0147] Compared to traditional forgetting methods that require retraining the model or performing multiple rounds of costly back-end optimization, this invention updates only a small number of sparse adapter parameters during the forgetting process, significantly reducing computational and communication overhead. Simultaneously, it effectively maintains the model's performance on non-forgotten categories through recovery fine-tuning. In contrast to existing methods that struggle to determine whether forgetting has truly taken effect, this invention relies on a recoverability detection mechanism for the verification adapter to achieve quantitative verification of the forgetting effect, providing clear evidence of "forgotten" without accessing the original data.
[0148] As can be seen from the above embodiments, this invention achieves efficient forgetting and verifiability of target categories or samples by introducing synthetic agents and sparse adapter mechanisms into federated learning. This method completes knowledge overwriting without accessing the original data, ensuring both privacy and security while improving forgetting efficiency. Furthermore, as... Figure 4 As shown, the overall system framework of this invention adopts a server-client collaborative approach: the server is responsible for global model aggregation, key layer sensitivity identification, and forgetting verification, while the client performs agent generation and adapter updates, achieving full-process privacy protection and distributed high-efficiency computing. Furthermore, the reversible design of the adapter makes the forgetting process controllable and traceable, avoiding interference with non-target knowledge; through an independent detection mechanism for verifying the adapter, quantitative evaluation and reliable verification of the forgetting results are achieved, ensuring the stability and reliability of the model after forgetting.
[0149] This invention can be applied to typical federated learning scenarios, such as client groups consisting of smartphones, wearable devices, vehicle terminals, or edge computing nodes, for training privacy-sensitive tasks such as image classification models, behavior recognition models, or keyboard prediction models.
Claims
1. A batch multi-granularity verifiable federated forgetting learning method based on synthetic agents and adapters, characterized in that, The parties involved include the client and the federated server. Global Model Sparse adapter is denoted as and verification adapter Let the set of all clients be denoted as the client set. , Indicates the number of clients, each client All have a size of Local real dataset , ; The client Based on its local dataset Generate synthetic proxy datasets through data distillation The federal server Deployed in the cloud or at the edge; the global model The model parameters are , Indicates the first All trainable parameters of the layer; forget the target layer set The key layer identification module selects the sparse adapter based on the model layer sensitivity; Inserted into each forgotten target layer In this process, only some parameters are modified using a sparse mask; the verification adapter Used to test the reversibility of forgetting effects during the validation phase; The specific implementation process of the aforementioned participating parties is as follows: Step S1: Generate a synthetic proxy dataset. The client then uses the local dataset. Synthetic distillation is performed to compress the original training samples into a small proxy set. The proxy set is divided by category and sample granularity to support batch forgetting at the category and sample levels, and serves as a fast gradient approximation source for forgetting operations. Step S2: Identify the key layer, the federated server. After receiving local model updates uploaded by each client, the differences in parameters between the global model and each client's model at the same network layer are compared to calculate the... Layer parameter variability ; ; in For client indexing, , Indicates the client In the The first layer Update the value of each parameter; This is the element index of the parameter vector for this layer, and Indicates the current global model at the [number]th [time]. The first layer One parameter; Then the federated server based on Select the layers with the highest degree of difference to form a set of forgetting target layers. ; Step S3: Inject the sparse adapter First, determine the parameters that need to be modified in the forgetting target layer, and then generate a sparse mask for that forgetting target layer. ; Injecting sparse adapters At that time, the sparse adapter With sparse mask After combining, add to the first Layer, making the first The layer parameters become as follows during training or inference: ; in This indicates element-wise multiplication; Step S4: Perform forgetting to achieve knowledge overwriting, using forgetting proxy sets. With reserved proxy set For sparse adapters parameters The objective function for adversarial optimization is: ; in, For the frozen backbone model parameters, To forget the intensity coefficient, Weights are used to constrain sparsity; Step S5: After completing the forgetting execution, perform restorative fine-tuning of the sparse adapter parameters, that is, keep the global model backbone parameters frozen and only use the retained surrogate set. Retrain the adapter that has undergone the forgetting phase update; Step S6, Forget Verification Freeze the backbone parameters of the global model, remove the sparse adapter, and initialize the validation adapter. And in forgetting the proxy set The above training: The formula is: ; If the verification adapter If the original forgetting accuracy cannot be restored, the forgetting operation is considered successful; otherwise, the forgetting operation is considered a failure.
2. The batch multi-granularity verifiable federated forgetting learning method based on synthetic agents and adapters according to claim 1, characterized in that, Step 1 generates a synthetic proxy dataset. The specific method is as follows: Step S1.1, Categorical Distillation and Proximity Subset Generation: This involves processing the client's local dataset... For each class c, generate a corresponding proxy subset separately. For sample-level forgetting, a minimal surrogate control set is generated for each individual target sample; Step S1.2, Efficient Gradient Matching and Compression: During the generation of the synthetic proxy, a gradient matching mechanism is used to compress the proxy data. Able to approximate real data The training effect, and the optimization objective for generating the proxy set are: ; in, and These represent the gradients of the proxy data and the real data under the same model parameters, respectively. It is a gradient similarity metric; Step S1.3, Dynamic Proportional Control and Communication Optimization: Through proportional parameters Control the size of the synthesized data to satisfy: ; Where s ; In generating a complete agent set Then, based on the forgetting request, the system further divides the proxy data into forgetting proxy sets according to the target category or target sample. and retain agent set ; Step S1.4, Privacy Preservation and Security Enhancement: Proxy Data It only contains statistical features and does not reveal the original sample.
3. The batch multi-granularity verifiable federated forgetting learning method based on synthetic agents and adapters according to claim 1, characterized in that, The specific methods for identifying and injecting sparse adapters in the key layer are as follows: Step S2.1: Layer sensitivity measurement and knowledge density analysis; After receiving local model updates uploaded by each client, the federated server S calculates the degree of difference based on the parameter changes at each layer. To measure the model's first Based on the sensitivity of each layer to task knowledge, the federated server S selects several layers with the highest degree of difference from all network layers to form a set of forget-the-target layers. ; Step S2.2: Sensitive layer priority and stability selection strategy; Take the top K layers with the largest differences as Where K is a preset small integer (e.g., K0). ); . Federation server S maintained its position in multiple consecutive rounds. The stability of a set; Step S3.1: Construction of selective sparsity mask; Sparse adapter The parameters are determined by the sparse mask. Control, mask activation ratio ; During training, based on parameters Sparse masks are obtained by dynamically learning the sensitivity or activation values. ; Step S3.2: Knowledge Overwriting and Reversibility Design; Sparse adapter Always keep the trunk parameters frozen Unchanged, all the effects of forgetting are conveyed through small-scale sparse adapter parameters. To reflect; Step S3.3, Federated Aggregation, Sparse Adapter The weighted average based on the size of the local dataset is calculated using the following formula: .
4. The batch multi-granularity verifiable federated forgetting learning method based on synthetic agents and adapters according to claim 1 or 3, characterized in that, Injecting sparse adapters Time sparse mask The generation method is as follows: First, based on the global model Scoring is performed on all parameters of the target layer, ignoring parameter variations, gradient magnitudes, or activation amplitudes. Then, select the "most relevant" parameters with a smaller proportion from all parameters as updatable parameters, while keeping the remaining parameters unchanged; the selected parameters are marked as 1 in the mask, and the rest are marked as 0.
5. The batch multi-granularity verifiable federated forgetting learning method based on synthetic agents and adapters according to claim 1, characterized in that, The specific method for forgetting to execute step S4 is as follows: S4.1, Adversarial Gradient Optimization; During the forgetting execution phase, sparse adapter parameters Updates are performed using an adversarial objective function to achieve targeted knowledge overwriting of the target category or sample; backbone model parameters By maintaining a frozen state at all times, the controllability and reversibility of the forgetting operation are ensured. The optimization objective is expressed as: ; in, This represents all sparse adapter parameters inserted on each forgetting target layer; To forget the loss on the proxy set, its gradient ascent term Used to weaken the model's ability to distinguish between forgotten categories or forgotten samples; To preserve the loss over the proxy set, its gradient descent term is used to maintain the performance of the non-forgotten classes; coefficients Controlling the intensity of forgetting The sparsity regularization coefficient is used to limit the number of effective parameters in the sparse adapter, so that the forgetting effect is concentrated in the critical region. S4.2, Sparsity Regularization and Parameter Control, Objective Function In Item for Norm regularization; S4.3 Early Stopping Mechanism and Performance Balance: The termination condition of the forgetting process is based on performance balance: when The loss on the surface increases beyond the preset threshold and When the accuracy remains within the tolerance range, terminate the forgetting execution.
6. The batch multi-granularity verifiable federated forgetting learning method based on synthetic agents and adapters according to claim 1, characterized in that, The specific method for restoring the fine-tuning in step S5 is as follows: S5.1 Local sparse adapter fine-tuning: After execution, only the sparse adapter parameters are updated. Maintain backbone parameters Freeze, in the reserve set Make minor adjustments: ; S5.2 Snapshot Mechanism and Auditing: The federated server saves sparse adapter parameters. A snapshot.
7. The batch multi-granularity verifiable federated forgetting learning method based on synthetic agents and adapters according to claim 1, characterized in that, The specific method for the forgetting verification in step S6 is as follows: S6.1 Initialization during the verification phase: After forgetting execution and resuming fine-tuning, freeze the global model backbone parameters. Remove all sparse adapters and initialize only the lightweight verification adapter. ; S6.2 Verification of adapter training: In the forgotten proxy set Upgrade the training and validation adapter, and update the parameters as follows: ; in To validate the learning rate, this process attempts to recover the model's original performance to test whether forgetting is reversible; S6.3, Successful Detection: Calculate and verify the adapter in accuracy When satisfied If the forgetting is successful, then forgetting is considered successful; otherwise, a second forgetting is triggered. S6.4 Result Recording and Verifiability Guarantee: The server generates a verification report and verifies it through multiple resampling operations to ensure the verifiability and consistency of category-level and sample-level forgetting.
8. A system for implementing the batch multi-granularity verifiable federated forgetting learning method based on synthetic agents and adapters as described in any one of claims 1 to 7, characterized in that, It includes a federated environment configuration module, a synthetic agent generation module, a critical layer identification module, an adapter injection module, a forget execution module, a recovery fine-tuning module, and a verification module; The Federation environment configuration module initializes the system configuration; the synthetic agent generation module constructs agent sets for forgetting and retention through data distillation. and ; The key layer identification module selects highly sensitive layers based on parameter differences; the adapter injection module inserts sparse adapters into the target layer and performs reversible knowledge overwriting in a controllable subspace. The forgetting execution module performs gradient ascent forgetting in the sparse adapter subspace using the proxy set, while the recovery fine-tuning module performs recovery fine-tuning of the sparse adapter parameters. The verification module determines whether forgetting is recoverable by training an independent verification adapter.