Blockchain-based federated feature forgetting method and system

By introducing Gaussian noise and feature-sensitive quantification into federated learning, and combining blockchain technology and smart contract management, the computational overhead and privacy protection issues in multi-feature forgetting are solved, achieving an efficient and transparent feature forgetting process.

CN122264166APending Publication Date: 2026-06-23INNER MONGOLIA UNIV OF TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
INNER MONGOLIA UNIV OF TECH
Filing Date
2026-03-27
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Existing blockchain-based federated learning architectures suffer from high computational overhead when features are forgotten, and lack transparency and privacy protection, making it difficult to effectively handle scenarios involving the joint forgetting of multiple features.

Method used

We employ Gaussian noise addition and feature-sensitive quantification, utilize blockchain technology for feature forgetting, introduce mask weight optimization and sparsity regularization, and combine smart contract management model updates to ensure transparency and privacy protection.

Benefits of technology

It reduces the computational complexity of feature forgetting, improves forgetting efficiency and privacy protection, and ensures the transparency and immutability of model updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122264166A_ABST
    Figure CN122264166A_ABST
Patent Text Reader

Abstract

The application discloses a kind of federal feature forgetfulness method and system based on blockchain, it is related to computer technology field.The method comprises: when client receives the multi-feature forgetfulness request initiated by user to global model, client adds Gaussian noise to the feature to be forgotten in multi-feature forgetfulness request;Global model is trained based on the local dataset of all clients;Local dataset includes multiple features;The feature to be forgotten is the feature that user expects to remove from global model;Client calculates the sensitivity of the feature to be forgotten after adding Gaussian noise, and determines the mask weight of the feature to be forgotten based on sensitivity;Sensitivity is used to quantify the degree of influence of the feature to be forgotten on global model;Blockchain updates global model based on the mask weight of the feature to be forgotten, and obtains global model after feature forgetfulness.The method reduces the complexity of model calculation in the process of feature forgetfulness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a blockchain-based federated feature forgetting method and system. Background Technology

[0002] Federated Learning (FL), as a distributed machine learning paradigm, allows multiple participants to collaboratively train a model without disclosing their data. However, traditional federated learning structures rely on a central server for model aggregation and maintenance, which, when attacked, can impact the entire system, leading to a single point of failure. Blockchain-based Federated Learning (BCFL) provides a more secure and transparent execution environment, effectively addressing the single point of failure and data tampering issues inherent in traditional federated learning.

[0003] In recent years, users' demands for the right to be forgotten have been increasing, requiring systems to efficiently remove specific users' contribution data from trained models. However, most existing BCFL architectures consider the task publisher's perspective, focusing privacy protection on the model training and validation phases. This aims to ensure the security and efficiency of the entire federated training process and improve the accuracy and stability of the global model, but rarely considers the client's perspective, as clients do not have the right to remove their own features from the global model. Federated Unlearning, which removes the influence of specific client data from the trained model, is crucial for fulfilling the right to be forgotten and addressing scenarios such as data poisoning attacks.

[0004] However, when it is necessary to remove specific features, all data must be forgotten and retrained to supplement the data, which significantly increases the computational cost. Summary of the Invention

[0005] Therefore, it is necessary to provide a blockchain-based federated feature forgetting method and system to address the aforementioned technical problems. This method reduces the computational complexity of the model during the feature forgetting process.

[0006] The present invention adopts the following technical solution: This invention provides a blockchain-based federated feature forgetting method, which is applied to a blockchain-based federated feature forgetting system, including multiple clients and a blockchain; the method includes: When a client receives a multi-feature forgetting request from a user to the global model, the client adds Gaussian noise to the features to be forgotten in the multi-feature forgetting request; the global model is jointly trained based on the local datasets of all clients; the local datasets include multiple features; the features to be forgotten are the features that the user expects to remove from the global model; The client calculates the sensitivity of the feature to be forgotten after adding Gaussian noise, and determines the mask weight of the feature to be forgotten based on the sensitivity; the sensitivity is used to quantify the degree of influence of the feature to be forgotten on the global model; The blockchain updates the global model based on the mask weights of the features to be forgotten, thus obtaining the global model after feature forgetting.

[0007] Optionally, the local dataset includes multiple features; the mask weights for the features to be forgotten are determined based on sensitivity, specifically including: Based on the sensitivity of the features to be forgotten, the objective function for multi-feature forgetting is optimized using gradient descent until the objective function value is minimized, thus obtaining the mask weight for each feature to be forgotten. The higher the sensitivity of the feature to be forgotten, the larger the mask weight of that feature. The objective function for multi-feature forgetting is: ; in, The objective function value for multi-feature forgetting. For the first i Mask weights for features to be forgotten. m For local datasets The number of features to be forgotten in the middle For global models, For regularization sparsity, For the first i Gaussian noise for features to be forgotten It is the mean of all disturbances. For the perturbed local dataset, This is the output after perturbing the global model data. This is the output of the global model. Features to be forgotten Sensitivity Represents the L1 norm. Represents the L2 norm. This is due to sensitivity loss.

[0008] Optionally, the global model is updated based on the mask weights of the features to be forgotten to obtain the global model after feature forgetting, specifically including: Based on the mask weights of the features to be forgotten, the parameters of the global model are fine-tuned with the objective function value as the minimum, resulting in the global model after feature forgetting.

[0009] Optionally, the method further includes: For each client, the client trains a local model using the local dataset and calculates the hash value of the local model after training is complete; The client uploads all generated hash values ​​to the blockchain, so that the blockchain can automatically aggregate all hash values ​​through smart contracts. The client updates its local model based on the aggregated hash value; the aggregated hash value represents the state of the global model jointly trained by all clients.

[0010] Optionally, all hash values ​​are aggregated using a preset aggregation algorithm; the preset aggregation algorithm includes a federated average algorithm.

[0011] Optionally, the local model is updated based on the aggregate hash value, specifically including: The parameters of the global model corresponding to the aggregate hash value are determined as the initial parameters of the client's local model; Based on the client's local dataset, the local model with initial parameters is trained to obtain the updated local model.

[0012] Optionally, the method further includes: After updating the local model of the client that initiated the multi-feature forgetting request, the hash of the updated local model is recorded in the blockchain to ensure the transparency and immutability of the feature forgetting operation.

[0013] This invention provides a blockchain-based federated feature forgetting system, comprising: multiple clients and a blockchain; Multiple client modules are configured to add Gaussian noise to the features to be forgotten in the multi-feature forgetting request initiated by the user to the global model when the client receives such a request. The global model is jointly trained based on the local datasets of all clients. The local datasets include multiple features. The features to be forgotten are those that the user expects to remove from the global model. The client calculates the sensitivity of the features to be forgotten after adding Gaussian noise and determines the mask weights of the features to be forgotten based on the sensitivity. The sensitivity is used to quantify the degree of influence of the features to be forgotten on the global model. Blockchain is used to update the global model based on the mask weights of the features to be forgotten, resulting in a global model after feature forgetting.

[0014] The above-mentioned at least one technical solution adopted in this invention can achieve the following beneficial effects: When the client receives a multi-feature forgetting request from a user to the global model, it adds Gaussian noise to the features to be forgotten in the request, calculates the sensitivity of the features after adding Gaussian noise, and determines the mask weights of the features to be forgotten based on the sensitivity. By assigning a learnable mask weight to each feature to be forgotten, the contribution of the features to be forgotten in the forgetting process is dynamically adjusted, focusing on specific features rather than all features or samples for forgetting, thus avoiding invalid calculations for irrelevant features. The blockchain updates the global model based on the mask weights of the features to be forgotten, obtaining the global model after feature forgetting. This method reduces the computational complexity of the model during feature forgetting. Attached Figure Description

[0015] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings:

[0016] Figure 1 A diagram illustrating a flexible coupling framework for blockchain-based federated learning provided by this invention; Figure 2 A schematic diagram of a blockchain-based federated feature forgetting method provided by the present invention; Figure 3 The Joint-FU architecture diagram provided for this invention; Figure 4 This is a schematic diagram illustrating the model accuracy provided by the present invention. Figure 5 Feature sensitivity comparison chart provided for this invention; Figure 6 This invention provides a schematic diagram illustrating the success rate of member reasoning attacks. Figure 7 A schematic diagram illustrating the time overhead provided by this invention. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0018] Devices such as desktop computers, servers, and laptops are capable of executing the present invention. For ease of explanation, the following description will focus on servers as the executing entity.

[0019] Federated Learning (FL), as a distributed machine learning paradigm, allows multiple participants to collaboratively train a model without revealing their data, sharing only gradient information rather than the original data, thus effectively solving the problems of data privacy and data silos. However, traditional federated learning relies on a central server for model aggregation and maintenance. When this server is attacked, it can affect the entire system, leading to a single point of failure. Furthermore, it is vulnerable to attacks from malicious clients submitting invalid or harmful updates, which can severely impact the performance of the global model. In recent years, blockchain technology, due to its decentralized, immutable, and transparent characteristics, has been widely used to address data security and privacy issues. Figure 1 The blockchain-based federated learning flexible coupling framework diagram provided by this invention is as follows: Figure 1 As shown, Blockchain-based Federated Learning (BCFL) provides a more secure and transparent execution environment, effectively addressing the single point of failure and data tampering issues inherent in traditional federated learning. Blockchain enhances system automation and transparency through smart contracts, offering a new solution for data security and trust mechanisms. Furthermore, smart contracts implement incentive mechanisms to encourage more clients to participate in the federated learning process.

[0020] In recent years, users' demands for the right to be forgotten have been increasing, requiring systems to efficiently remove specific users' contribution data from trained models to meet legal and ethical requirements. However, most existing BCFL architectures consider the task publisher's perspective, focusing privacy protection on the model training and validation phases. Their aim is to ensure the security and efficiency of the entire federated training process and improve the accuracy and stability of the global model, but they rarely consider the client's perspective. Clients essentially have no right to remove their own features from the global model. Federated Unlearning, which removes the influence of specific client data from the trained model, is crucial for fulfilling the right to be forgotten and addressing scenarios such as data poisoning attacks.

[0021] Therefore, this paper considers applying forgetting methods to the BCFL architecture to form a blockchain-based federated forgetting method, allowing each client to be not only a data contributor but also an active participant in privacy protection. Clients can proactively initiate forgetting requests for certain feature values, requesting that their contributed data and gradients be forgotten from the global model. Existing feature forgetting methods mainly focus on sample, category, or client-level forgetting, with relatively little research on feature-level forgetting. The Ferrari method proposes a federated feature forgetting framework based on feature sensitivity optimization. Although it has achieved significant results in single-feature forgetting, it still has some limitations; its efficiency and effectiveness may not be ideal for scenarios requiring the simultaneous forgetting of multiple related features. Secondly, the advantages of blockchain, such as transparency and immutability, should be leveraged to ensure the fairness and trustworthiness of forgetting operations even among multiple clients and servers, while recording all client forgetting requests and corresponding operation history.

[0022] Existing research on federated forgetting schemes mainly focuses on three aspects: passive forgetting, active forgetting, and forgetting verification. Passive forgetting refers to the target client submitting a forgetting request but not participating in subsequent complex computational iterations; the forgetting task is undertaken by other parts of the system (such as the server or remaining clients). For example, researchers retain historical data and fine-tune the deletion of the target client's contribution; researchers optimize forgetting efficiency through selective storage and adaptive rollback; other studies introduce constraints (such as projected gradient penalties, random initialization, and skewness estimation) to guide forgetting. Researchers achieve forgetting by amplifying the gradients of remaining clients and reducing the gradients of the target client. However, server-independent forgetting relies on historical data and lacks real-time input, which may lead to poor forgetting performance, especially in non-independent and identically distributed (Non-IID) scenarios, where bias exists and adaptability is limited. In contrast, client-assisted forgetting optimizes the global model by aggregating updates from remaining clients. For example, edEraser achieves forgetting by calibrating historical gradients, Fast-FedUL optimizes storage, Sharding Eraser compresses storage, and FedRecover computes updates from remaining clients to avoid computational overhead. Methods such as SFU and KNOT optimize the forgetting process through client-side clustering and grouping. However, client-assisted forgetting needs to consider implementation issues in dynamically changing and resource-constrained environments, and further exploration is needed on forgetting efficiency, dynamic adaptability, and security and privacy.

[0023] Active forgetting refers to the active participation of the target client in the forgetting process after requesting forgetting. It can be divided into two methods: forgetting partial data and forgetting the entire client. When forgetting partial data, retraining is a direct approach. Researchers have used methods such as quantifying the model and rolling back detection effects, and optimizing forgetting through grouping and anti-learning schemes. However, this method is complex, computationally and communicationally expensive, and the client needs to remain in the system to participate in forgetting, conflicting with the request-and-leave behavior. When forgetting the entire client, some research methods use gradient ascent, while others improve efficiency through model cleanup. However, this requires the client to continue participating with other clients. Active forgetting emphasizes the active participation of the target client, which can improve forgetting accuracy and efficiency, but further exploration is needed regarding dynamic adaptability and security / privacy.

[0024] The validation mechanism is a crucial part of federated forgetting, allowing participants to verify the effectiveness of forgetting. On the client side, researchers validate the forgetting effect by evaluating the performance of audit datasets and by tracking labeled subsets of data. On the server side, researchers terminate learning by assessing model differences, summarize forgetting based on validation accuracy and standard deviation, stop learning when the model converges, rely on knowledge prediction results, and evaluate whether data deletion exceeds the budget.

[0025] Federated forgetting learning is a promising paradigm for protecting distributed client data ownership, eliminating the influence of historical data in the model and addressing the right to be forgotten problem. However, existing work requires servers to retain historical parameters, which can still be used even after the client exits. Therefore, decentralized federated forgetting learning has attracted attention: researchers have proposed a blockchain-enhanced trusted federated anti-learning framework, incorporating on-chain and off-chain components, and verifying data forgetting through a chameleon hash function protocol. Researchers have also proposed the BlockFUL framework, employing a dual-chain structure to handle forgetting requests and verify data forgetting. Finally, researchers are focusing their research on AIGC scenarios, protecting privacy and data security.

[0026] In scenarios where clients request the removal of sensitive features while continuing to participate in federated learning, the Ferrari method fills this crucial gap. Inspired by Lipschitz continuity, it offers an effective solution to the feature forgetting problem in federated learning. Perturbations are generated on the target features, and then the model's sensitivity to these perturbations is estimated using a Monte Carlo method. Based on this estimate, the model parameters are updated to reduce the model's dependence on specific features, thus achieving forgetting. This process requires only the target client's local dataset without the involvement of other clients, protecting privacy while maintaining the original performance of the global model, providing an efficient and practical solution for feature forgetting in federated learning.

[0027] While the Ferrari method has made significant progress in feature forgetting, it still has some limitations. First, it primarily targets the forgetting of single features, and its efficiency and effectiveness may be less than ideal for scenarios requiring the simultaneous forgetting of multiple related features. Second, there is still room for improvement in privacy protection, as the model may still retain some weak information about the forgotten features. Finally, the Ferrari method lacks transparency and traceability; it cannot record the history of model updates, making it difficult to verify the legitimacy and authenticity of model updates.

[0028] To address the limitations of existing methods, this invention proposes a Joint Feature Unlearning (Joint-FU) method, which significantly reduces the computational overhead of feature forgetting by introducing multi-feature joint forgetting, regularization, and blockchain technology.

[0029] The technical solutions provided by the various embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0030] Figure 2 This is a schematic diagram of a blockchain-based federated feature forgetting method according to the present invention, which specifically includes the following steps: S201: When the client receives a multi-feature forgetting request from the user to the global model, the client adds Gaussian noise to the features to be forgotten in the multi-feature forgetting request; the global model is jointly trained based on the local datasets of all clients; the local datasets include multiple features; the features to be forgotten are the features that the user expects to remove from the global model.

[0031] The local dataset and local model are not specifically limited in this invention. For example, taking an e-commerce store as the client, the local dataset of the e-commerce store includes user name, age, historical consumption amount, consumption frequency, and browsing duration. The local model of the e-commerce store adopts a logistic regression model. The input of the local model is user name, age, historical consumption amount, consumption frequency, and browsing duration, and the output of the local model is the probability of purchasing the target product.

[0032] The hash value of the local model is calculated using a hash algorithm, such as SHA-3.

[0033] Figure 3 The Joint-FU architecture diagram provided by this invention is as follows: Figure 3 As shown, Joint-FU aims to provide a secure, transparent, and efficient execution environment for federated learning tasks by leveraging the decentralized nature of blockchain technology, and supports efficient federated anti-learning functionality. Through smart contracts, it manages client registration, records model updates, and schedules anti-learning operations, achieving automatic deployment and address management, ensuring the transparency and traceability of the model training process. The overall architecture consists of multiple clients and a blockchain.

[0034] In an exemplary embodiment, the method further includes: for each client, the client trains a local model using a local dataset and calculates the hash value of the local model after training is complete; the client uploads all generated hash values ​​to the blockchain so that the blockchain automatically aggregates all hash values ​​through a smart contract, and the client updates the local model based on the aggregated hash value; the aggregated hash value represents the state of the global model jointly trained by all clients.

[0035] Specifically, during the training phase, each client Utilizing its local dataset Train a local model independently After training is complete, the client calculates the hash value of the local model. This is to ensure the integrity and uniqueness of the model.

[0036] A global model is trained jointly using local datasets from all clients.

[0037] The client uploads all generated hash values ​​to the blockchain, so that the blockchain can automatically aggregate all hash values ​​through smart contracts. The client updates its local model based on the aggregated hash value; the aggregated hash value represents the state of the global model jointly trained by all clients.

[0038] In one exemplary embodiment, all hash values ​​are aggregated using a preset aggregation algorithm; the preset aggregation algorithm includes a federated average algorithm.

[0039] In an exemplary embodiment, updating the local model based on the aggregated hash value specifically includes: determining the parameters of the global model corresponding to the aggregated hash value as the initial parameters of the client's local model; and training the local model with the initial parameters based on the client's local dataset to obtain the updated local model.

[0040] Specifically, when the model hash value of all clients Once all hashes are submitted to the smart contract, the contract automatically initiates the aggregation process. The smart contract collects all hashes submitted by clients and calculates the aggregated hash value according to a preset algorithm. This aggregate hash value represents the state of the global model. This aggregates contributions from all clients. The specific aggregation process is as follows:

[0041] (a) Collecting hash values: The smart contract collects all hash values ​​submitted by clients. .

[0042] (b) Calculate the aggregate hash value: Calculate the aggregate hash value according to the preset aggregation algorithm. .

[0043] (c) Broadcasting the aggregation results: After the calculation is complete, the smart contract will... The broadcast is sent to all clients so that they can update their local models, thus completing a global training iteration.

[0044] The client submits the hash value to a smart contract on the blockchain to record and verify the model's state. This process not only ensures the transparency of model updates but also provides the basis for subsequent aggregation and forgetting operations.

[0045] S202: The client calculates the sensitivity of the feature to be forgotten after adding Gaussian noise, and determines the mask weight of the feature to be forgotten based on the sensitivity; the sensitivity is used to quantify the degree of influence of the feature to be forgotten on the global model.

[0046] In an exemplary embodiment, the local dataset includes multiple features; determining the mask weights of the features to be forgotten based on sensitivity specifically includes: optimizing the objective function for forgetting multiple features using gradient descent based on the sensitivity of the features to be forgotten until the objective function value is minimized, thereby obtaining the mask weight of each feature to be forgotten; the higher the sensitivity of the feature to be forgotten, the greater the mask weight of the corresponding feature to be forgotten.

[0047] Specifically, in machine learning, particularly in feature forgetting tasks, Lipschitz continuity is used to quantify a model's sensitivity to changes in input features. The mathematical definition of Lipschitz continuity is: a function... It is called Lipschitz continuous if a constant exists. This makes it possible for all The inequality that satisfies formula (1) is:

[0048] (1); Where ||.|| denotes the norm, L This is the Lipschitz constant. and Both are functions. This definition indicates that the change in the function's output is limited by a linear function of the change in the input, and the Lipschitz constant L describes the maximum rate of this change.

[0049] The feature sensitivity is calculated using formula (2): (2); in, Features Sensitivity Features The expected value E is the average of all possible perturbations. Essentially, this formula measures the average rate of change of the model output with respect to perturbations of the input features, i.e., the rate of change of the model output with respect to perturbations of the features. The sensitivity of the model to specific features is minimized. By minimizing this sensitivity, this invention can make the model insensitive to certain features, thereby achieving feature forgetting.

[0050] In practical applications, it may be necessary to forget multiple related features simultaneously, rather than a single feature. For example, it may be necessary to forget both a user's name and age simultaneously. This invention formalizes the multi-feature joint forgetting problem in Functional Forgetting (FL) as follows:

[0051] Suppose a containing K One client and Q A federated learning system on multiple servers jointly trains a global model. Each client k Holding a local dataset Each data sample x Contains multiple features Client Request to forget multiple features simultaneously from the global model The goal of this invention is to optimize feature sensitivity so that the model becomes insensitive to these features, thereby achieving forgetting.

[0052] Specifically, this invention defines the initial objective function for multi-feature forgetting as formula (3): (3); in, The objective function value for multi-feature forgetting. For the first i Mask weights for features to be forgotten. m For local datasets The number of features to be forgotten in the middle For global models, For regularization sparsity, For the first i Gaussian noise for features to be forgotten It is the mean of all disturbances. For the perturbed local dataset, This is the output after perturbing the global model data. This is the output of the global model. Features to be forgotten Sensitivity Represents the L2 norm. This is due to sensitivity loss.

[0053] To effectively handle joint forgetting of multiple features, this invention introduces a feature sensitivity weighting mechanism. Specifically, for each feature... Assign a learnable mask weight. This indicates the importance of the feature in the forgetting process. The objective function for multi-feature forgetting is formula (4):

[0054] (4); in, The objective function value for multi-feature joint forgetting. for i Mask weights for each feature m For sample data The characteristic number in For global models, For regularization sparsity, Features Gaussian noise, The sample data after perturbation. Represents the L1 norm.

[0055] Specifically, in the forgetting phase, the client first initiates a forgetting request, the smart contract records the request and begins scheduling. For clients requesting to forget... It will feature the data in its dataset The perturbation is applied, and the feature sensitivity is calculated. The specific steps are as follows:

[0056] (a) Feature perturbation generation: Client For each feature Generate Gaussian noise and add it to the data sample x In the process, perturbed samples are generated. .

[0057] (b) Sensitivity calculation: The client calculates the sensitivity of each feature, that is, the rate of change of the model output in response to feature perturbations.

[0058] (c) Mask weight learning: The client learns the mask weights for each feature by optimizing the objective function. At the same time, a sparse regularization term is introduced to ensure the sparsity of the mask weights and prevent all features from being forgotten.

[0059] Blockchain provides a means to track and verify model updates. Deployed on powerful edge servers—these are miner nodes—blockchain offers a decentralized and secure architecture for the entire system. Blockchain allows for the automated execution of program logic via smart contracts when predefined conditions are met. All conditions are transparent and immutable to participating clients. In blockchain, the consensus algorithm plays a central role, determining how new blocks are formed, verified, and accepted. Once miners reach a consensus, a new block is added to the blockchain. FL clients are responsible for processing their own data samples and training models based on their local datasets. They then upload their local model updates to the blockchain, where miners execute a verification mechanism; only verified updates are used to update the global model.

[0060] S203: The blockchain updates the global model based on the mask weights of the features to be forgotten, thus obtaining the global model after feature forgetting.

[0061] In an exemplary embodiment, the global model is updated based on the mask weights of the features to be forgotten to obtain the global model after feature forgetting. Specifically, this includes: fine-tuning the parameters of the global model based on the mask weights of the features to be forgotten, with the objective function value being minimized, to obtain the global model after feature forgetting.

[0062] The client performs joint sensitivity optimization on the current global model, while introducing regularization and differential privacy. It calculates the joint sensitivity and regularization terms, adds differential privacy noise, and updates the global model. After the update, the miner node records the updated global model hash in the blockchain, ensuring the transparency and immutability of the forgetting operation. The smart contract verifies the update result, ensuring the forgetting operation meets predefined conditions, thus completing the forgetting phase.

[0063] The system comprehensively verifies the results of the forgetting operation to ensure that the forgetting effect meets expectations. The client first evaluates the updated global model using local data, calculating performance metrics such as accuracy and loss after forgetting features, and submits these evaluation results to the smart contract. Subsequently, the client uses a ModelInversion Attack (MIA) to evaluate the privacy protection effect after forgetting features, ensuring that the model cannot recover forgotten features, and submits the privacy verification result to the smart contract as well. The smart contract aggregates all client evaluations and privacy verification results, generates a final verification report, and records this report on the blockchain, thereby ensuring the transparency and immutability of the entire verification process.

[0064] A blockchain-based federated feature forgetting system includes: multiple clients and a blockchain; multiple clients, used to add Gaussian noise to the features to be forgotten in the multi-feature forgetting request when a client receives a multi-feature forgetting request initiated by a user to the global model; the global model is jointly trained based on the local datasets of all clients; the local datasets include multiple features; the features to be forgotten are the features that the user expects to remove from the global model; the clients calculate the sensitivity of the features to be forgotten after adding Gaussian noise, and determine the mask weights of the features to be forgotten based on the sensitivity; the sensitivity is used to quantify the degree of influence of the features to be forgotten on the global model; the blockchain is used to update the global model based on the mask weights of the features to be forgotten, to obtain the global model after feature forgetting.

[0065] In an exemplary embodiment, to demonstrate the advantages of Joint-FU in convergence, the present invention performs the following theoretical analysis: Objective function It's about model parameters. and mask weights m The function is a convex function. Therefore, the optimization process has good convergence; the sparse regularization term ensures the sparsity of the mask weights, avoiding the situation where all features are forgotten. This not only improves the stability of the optimization but also ensures the focus of the forgetting process. Therefore, theoretically, under appropriate conditions, Joint-FU can converge to the global optimum at a linear rate. To analyze the theoretical guarantee of Joint-FU's forgetting effect, this invention considers the following points: by optimizing feature sensitivity, Joint-FU can significantly reduce the model's sensitivity to forgotten features, thereby achieving effective forgetting; sparse regularization ensures that only important features are forgotten, avoiding unnecessary feature forgetting, thus improving the forgetting effect. Therefore, theoretically, under appropriate conditions, Joint-FU can achieve effective forgetting of specified features while keeping the model's sensitivity to other features unchanged.

[0066] (1) Experimental environment The experimental environment for this invention was configured with an Intel(R) Core(TM) i5-11500 processor, paired with an NVIDIA GeForce GTX 3060 GPU, and 16.0 GB of system memory for efficient model training. For the blockchain environment, Ganache was chosen as the Ethereum test network, and the Brownie framework was used for smart contract development and testing to ensure the convenience and reliability of blockchain-related operations. Python 3.9 was used as the primary programming language, along with CUDA 11.8 and PyTorch 2.0.0 to build the model training framework, fully utilizing the GPU's computing power to accelerate the training process. The learning rate was set to 0.0001, the model used was ResNet18, the total number of clients was 10, and the proportion of clients participating in training was 0.4. A stochastic gradient descent optimizer with a momentum of 0.5 was used, along with random differential privacy noise with a standard deviation ranging from 0.05 to 1.0. Training and model saving functions were enabled. During training, an attack client was simulated to inject multiple backdoor features and trigger labels into its local dataset. Different pixel patterns were added to the top-left, top-right, and bottom 5×5 pixel regions, and these images were labeled with the attacker-specified category. The perturbation was applied to each backdoor feature location, and a joint sensitivity value was calculated.

[0067] (2) Dataset This invention used four datasets in its experiments: MNIST, FashionMNIST, CIFAR-10, and CIFAR-100. MNIST (Modified National Institute of Standards and Technology database) is a classic benchmark for handwritten digit recognition, containing 70,000 single-channel grayscale images of 28×28 pixels, with 60,000 used for training and 10,000 for testing. The images cover 10 categories from 0 to 9, with a balanced sample size of approximately 7,000 images per category. FashionMNIST is a modern alternative to MNIST, also containing 70,000 grayscale images of 28×28 pixels (60,000 for training / 10,000 for testing), but covering 10 categories of clothing items, including T-shirts, trousers, pullovers, dresses, coats, sandals, shirts, sneakers, bags, and ankle boots. CIFAR-10 (Canadian Institute for Advanced Research) is the core benchmark for color image classification, containing 60,000 32×32×3 (RGB) color images, with 50,000 training images and 10,000 test images, covering 10 general object categories, such as airplanes and cars. CIFAR-100 is of similar size to CIFAR-10, but further subdivides the 10 categories into 100 finer-grained categories, with only 600 images per category, including 500 training images and 100 test images.

[0068] Table 1 shows the correspondence between datasets and model structures.

[0069] Table 1. Correspondence between Datasets and Model Structures (3) Evaluation indicators To comprehensively evaluate the performance of the Joint-FU method, the following experimental metrics are defined in this invention: Privacy Protection Effectiveness: The privacy protection effectiveness is evaluated using Model Inversion Attack (MIA), a core tool for assessing whether the model has truly forgotten the target data. The basic idea is that if the model can still correctly classify the target sample with high confidence, it indicates that the sample information has been retained; otherwise, forgetting is considered successful. The specific metric is the Attack Success Rate (ASR), which is the probability that the attacker successfully recovers the forgotten features. If the accuracy drops to 50% and the recall approaches 0, it indicates that the model can no longer distinguish the target data, and forgetting is successful. The specific attack process is as follows:

[0070] (a) Shadow model training: Train multiple shadow models with the same structure as the target model on the auxiliary dataset to generate positive and negative sample labels (belonging to / not belonging to the training set).

[0071] (b) Attack Model Construction: Use the output probability vector and loss value of the shadow model as features to train a binary classification attacker (logistic regression / MLP).

[0072] (c) Target model attack: Input the output features of the target model into the attacker to determine whether the sample is a member of the training set.

[0073] Forgetting effect: The forgetting effect is evaluated by calculating feature sensitivity. The specific metric is feature sensitivity (FS), which is the sensitivity of the model output to feature perturbations.

[0074] Model performance: Model performance is evaluated by the accuracy (Acc) on the test set, which measures the model's ability to generalize on non-target data.

[0075] Time efficiency: Time efficiency is evaluated by recording the runtime of training and forgetting operations.

[0076] System auditability metrics: Based on the characteristics of integrated blockchain, additional metrics are designed as shown in Table 2: Table 2 Design Indicators 1. Model utility This experiment validates the model's utility on the MNIST, FashionMNIST, CIFAR-10, and CIFAR-100 datasets. Figure 4 This is a schematic diagram illustrating the accuracy of the model provided by the present invention, such as... Figure 4 As shown, the Joint-FU method maintains high model performance while forgetting features. Although accuracy drops slightly on some datasets, its overall performance is better than or close to other baseline methods. This indicates that the Joint-FU method can effectively balance model performance and privacy protection while forgetting features, and the introduction of blockchain does not significantly affect model utility.

[0077] 2. Forgetting effect and attack success rate Figure 5 The feature sensitivity comparison diagram provided by this invention, such as Figure 5 As shown, the Joint-FU method significantly reduces feature sensitivity across various datasets, indicating its effectiveness in achieving feature forgetting. Although its feature sensitivity is slightly higher than the Retrain method on some datasets, its overall performance is superior to or close to other baseline methods, especially on complex datasets.

[0078] Figure 6 This is a schematic diagram illustrating the success rate of member inference attacks provided by the present invention, such as... Figure 6 As shown, the attack success rate of the Joint-FU method on different datasets is as follows: MNIST: The attack success rate of Joint-FU is 0.4872, which is slightly higher than Retrain (0.4723), but lower than FedEraser (0.4975) and Ferrari (0.5215), and significantly lower than FedAvg (0.9233).

[0079] FMNIST: Joint-FU had an attack success rate of 0.5089, comparable to Retrain (0.4987) and Ferrari (0.4976), slightly higher than FedEraser (0.5083), and significantly lower than FedAvg (0.9392).

[0080] The attack success rate of Cifar10: Joint-FU is 0.4927, which is significantly lower than FedAvg (0.9561) and is basically at the same level as the attack effectiveness of Retrain (0.3925), FedEraser (0.5110) and Ferrari (0.4325).

[0081] Cifar100: Joint-FU has an attack success rate of 0.5264, which is slightly higher than Retrain (0.4067), FedEraser (0.5080) and Ferrari (0.4412), basically at the same level, and significantly lower than FedAvg (0.9380).

[0082] Experimental results show that while Joint-FU enhances privacy protection, it also has some impact on model performance. Further research is needed to strike a balance between privacy protection and model performance by adjusting the privacy budget ϵ and noise intensity σ, depending on the specific circumstances.

[0083] 3. Efficiency Figure 7 A time overhead diagram provided for this invention, such as Figure 7 As shown in the experimental results, the Joint-FU method demonstrates particularly outstanding performance in terms of time efficiency, especially when handling complex datasets. On the Cifar10 dataset, its runtime is 17.62 seconds, slightly longer than the Ferrari method (17.33 seconds), but significantly shorter than the Retrain method (1309.5 seconds) and the FedEraser method (284.5 seconds). By jointly optimizing sensitivity, it simultaneously handles the forgetting of multiple features, avoiding the redundant computation caused by processing features one by one. This joint optimization strategy significantly reduces computational cost and improves the efficiency of the forgetting operation.

[0084] 4. Blockchain overhead In the experimental environment of this invention, Ganache defaults to auto-mine mode, which means that as soon as a transaction arrives, it is immediately packaged into a block without delay or fixed block intervals. This mode greatly improves transaction processing speed, enabling rapid response of blockchain operations. Joint-FU asynchronously records the model hash value once after each client training is completed. This strategy not only effectively saves gas costs but also maintains the clear readability of the training log.

[0085] Regarding blockchain overhead, verifiable model update records and tamper-resistant aggregation processes have been implemented, and the impact on system performance is controllable (additional latency is less than 20 seconds), as shown in Table 3.

[0086] Table 3 Blockchain Overhead Experimental results show that Joint-FU achieves effective federated forgetting. While enhancing privacy protection, it has some impact on model performance. By adjusting the privacy budget ϵ and noise intensity σ, a balance can be achieved between privacy protection and model performance. The Joint-FU method can forget multiple features simultaneously, significantly improving forgetting efficiency. By introducing a regularization term, mutual interference between features is reduced, ensuring that the sensitivity of each feature decreases independently. Furthermore, the integration of the blockchain enhances the transparency and security of the system, ensuring the immutability and traceability of all operations. Through smart contract management, automatic deployment and address management are achieved, improving the system's automation level. Simultaneously, the blockchain has short transaction latency per round, reasonable gas consumption, and the entire system can be deployed in a local private blockchain environment. Overall, the Joint-FU method achieves a good balance between privacy protection, forgetting effectiveness, and model performance, providing an effective solution to the feature forgetting problem in federated learning.

[0087] This invention proposes a highly efficient solution for the joint forgetting problem of multiple features in federated learning (FL) environments: Joint-FU. By introducing a feature-sensitive weighting mechanism and sparse regularization, it effectively solves the feature conflict and optimization instability problems in joint forgetting of multiple features. The smart contract automatically manages the entire process of registration, training, model ownership, and anti-learning, with all updates recorded on the blockchain. Local private chain deployment has low latency and reasonable gas consumption, combining auditability and cost-effectiveness, providing a feasible technical path for the right to be forgotten in federated learning environments that balances efficiency, privacy, and compliance. Future work can further design adaptive aggregation and personalized anti-learning strategies for non-IID data distribution based on the existing framework to alleviate model drift and forgetting residue problems caused by data heterogeneity; simultaneously, it can introduce a node reputation mechanism based on behavioral history and contribution quality, using blockchain smart contracts to achieve public and verifiable updates of reputation values, and dynamically adjust client selection, aggregation weights, and incentive allocation accordingly, thereby continuously improving the robustness, fairness, and scalability of the system while ensuring privacy and compliance.

[0088] The main contributions of this invention include: 1. A highly efficient multi-feature joint forgetting framework is proposed. This invention introduces a blockchain environment to record model updates and feature forgetting operations, enhancing the system's transparency and security, and ensuring the immutability and traceability of all update operations.

[0089] 2. A multi-feature sensitivity weighting mechanism is introduced, which dynamically adjusts the contribution of each feature in the forgetting process by assigning a learnable mask weight to each feature. Simultaneously, Joint-FU ensures the focus of the forgetting process through sparse regularization, avoiding unnecessary feature forgetting. This method not only effectively avoids conflicts between features but also significantly improves the stability and efficiency of the forgetting process.

[0090] 3. A local blockchain testing environment was built using Ganache and Brownie. Experiments verified that the method proposed in this invention performs well in terms of privacy protection, forgetting effect, and model performance, providing an effective solution to the feature forgetting problem in federated learning.

[0091] When applying the blockchain-based federated feature forgetting method provided by this invention, it is not necessary to... Figure 2 The steps shown are executed in sequence. The specific execution order of each step can be determined as needed, and this invention does not impose any restrictions on it.

[0092] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0093] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this invention.

Claims

1. A blockchain-based federated feature forgetting method, characterized in that, The method is applied to a blockchain-based federated feature forgetting system, which includes multiple clients and a blockchain; the method includes: When a client receives a multi-feature forgetting request from a user to the global model, the client adds Gaussian noise to the features to be forgotten in the multi-feature forgetting request; the global model is jointly trained based on the local datasets of all clients; the local datasets include multiple features; the features to be forgotten are the features that the user expects to remove from the global model; The client calculates the sensitivity of the feature to be forgotten after adding Gaussian noise, and determines the mask weight of the feature to be forgotten based on the sensitivity; the sensitivity is used to quantify the degree of influence of the feature to be forgotten on the global model; The blockchain updates the global model based on the mask weights of the features to be forgotten, thus obtaining the global model after feature forgetting.

2. The method as described in claim 1, characterized in that, The local dataset includes multiple features; determining the mask weights of the features to be forgotten based on the sensitivity specifically includes: Based on the sensitivity of the features to be forgotten, the objective function for multi-feature forgetting is optimized using gradient descent until the objective function value is minimized, thus obtaining the mask weight for each feature to be forgotten. The higher the sensitivity of the feature to be forgotten, the greater its corresponding mask weight. The objective function for multi-feature forgetting is: ; in, The objective function value for multi-feature forgetting. For the first i Mask weights for features to be forgotten. m For local datasets The number of features to be forgotten in the middle For global models, For regularization sparsity, For the first i Gaussian noise for features to be forgotten It is the mean of all disturbances. For the perturbed local dataset, This is the output after perturbing the global model data. This is the output of the global model. Features to be forgotten Sensitivity Represents the L1 norm. Represents the L2 norm. This is due to sensitivity loss.

3. The method as described in claim 2, characterized in that, The process of updating the global model based on the mask weights of the features to be forgotten to obtain the global model after feature forgetting specifically includes: Based on the mask weights of the features to be forgotten, the parameters of the global model are fine-tuned with the objective function value as the minimum, resulting in the global model after feature forgetting.

4. The method as described in claim 1, characterized in that, The method further includes: For each client, the client trains a local model using the local dataset and calculates the hash value of the local model after training is complete; The client uploads all generated hash values ​​to the blockchain, so that the blockchain can automatically aggregate all hash values ​​through smart contracts. The client updates its local model based on the aggregated hash values; the aggregated hash values ​​represent the state of the global model jointly trained by all clients.

5. The method as described in claim 1, characterized in that, All hash values ​​are aggregated using a preset aggregation algorithm, which includes a federated average algorithm.

6. The method as described in claim 1, characterized in that, The update of the local model based on the aggregated hash value specifically includes: The parameters of the global model corresponding to the aggregated hash value are determined as the initial parameters of the client's local model; Based on the client's local dataset, the local model with initial parameters is trained to obtain the updated local model.

7. The method as described in claim 6, characterized in that, The method further includes: After updating the local model of the client that initiated the multi-feature forgetting request, the hash of the updated local model is recorded in the blockchain to ensure the transparency and immutability of the feature forgetting operation.

8. A blockchain-based federated feature forgetting system, characterized in that, include: Multiple clients and blockchains; Multiple clients are used to add Gaussian noise to the features to be forgotten in the multi-feature forgetting request when the client receives a multi-feature forgetting request from the user to the global model. The global model is jointly trained based on the local datasets of all clients; the local datasets include multiple features; the features to be forgotten are the features that the user expects to remove from the global model; The client calculates the sensitivity of the feature to be forgotten after adding Gaussian noise, and determines the mask weight of the feature to be forgotten based on the sensitivity; the sensitivity is used to quantify the degree of influence of the feature to be forgotten on the global model; Blockchain is used to update the global model based on the mask weights of the features to be forgotten, resulting in a global model after feature forgetting.