Federal semi-supervised training method based on adaptive and reciprocal prototype learning

Through the three-stage strategy of adaptive and reciprocal prototype learning, the "cold start" and "knowledge bottleneck" problems in federated semi-supervised learning are solved, the convergence speed and accuracy of the model are improved, and efficient model training and optimization are achieved.

CN120851141APending Publication Date: 2025-10-28EAST CHINA NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511341712.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-19
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

Existing federated semi-supervised learning suffers from problems such as inefficient "cold start" and "knowledge bottleneck" that limit model performance. In particular, the quality of pseudo-labels is poor in the early stages of training, resulting in slow system convergence and low training efficiency.

Method used

A federated semi-supervised training method based on adaptive and reciprocal prototype learning is adopted. Through a three-stage strategy: warm-up stage, teacher-guided stage and reciprocal learning stage, adaptive threshold, global prototype set and dynamically adjusted prototype consistency loss are used to optimize client local training and global model aggregation.

Benefits of technology

It significantly improves the convergence speed and final accuracy of the model, solves the "cold start" problem, and breaks the "knowledge bottleneck" through the "student feedback" mechanism, achieving efficient model training and optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120851141A_ABST
    Figure CN120851141A_ABST
Patent Text Reader

Abstract

The invention discloses a federal semi-supervised training method based on self-adaption and reciprocal prototype learning, and aims to solve the problems of'cold start 'convergence and'knowledge bottleneck' performance limitation in federal semi-supervised learning (FSSL). The invention provides a dynamic three-stage learning strategy, and the learning process is evolved from a one-way mode to a two-way mode through self-adaptive adjustment. The core of the method is that in the first stage, unlabeled data is activated through a self-adaptive threshold value driven by a server, and cold start is solved; in the second stage, a server prototype is used for conducting one-way guidance, and convergence is accelerated; and in the third stage, a reciprocal learning mechanism is established, the client is allowed to feed back the local high-quality prototype to the server, and the knowledge bottleneck is broken. Experimental results on data sets such as CIFAR-100 and the like show that compared with an existing baseline method, the performance of the method is remarkably improved in a highly heterogeneous federated scene, and the superiority of the method in the aspects of accelerating model convergence and improving final precision is effectively proved.
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 more specifically, to the intersection of model training algorithms and prototype learning within a federated learning framework. It is a method for improving model performance in federated semi-supervised learning through adaptive and reciprocal prototype learning. Background Technology

[0002] It involves two main background technologies: federated semi-supervised learning and prototype learning.

[0003] 1) Federal Semi-Supervised Learning

[0004] With the development of edge computing and IoT technologies, massive amounts of data are generated at the edge devices, providing opportunities for training artificial intelligence models. However, data privacy and security regulations and the phenomenon of data silos limit traditional centralized training models. Federated learning (FL), as a distributed machine learning paradigm, addresses this challenge through the core idea of ​​"the data doesn't move, the model moves." It allows multiple clients to train models locally using their own data, only transmitting model updates (such as parameters or gradients) to a central server for aggregation, thereby collaboratively building a global model without exposing the original data.

[0005] In practical applications, most data on client devices is unlabeled, and data labeling is costly, making "label scarcity" a major obstacle to the implementation of federated learning. Federated Semi-Supervised Learning (FSSL) aims to solve this problem. In the mainstream "Labels-at-Server" setup, a central server holds a portion of high-quality labeled data, while a massive number of clients only have unlabeled data.

[0006] Existing techniques typically employ pseudo-labeling to utilize this unlabeled data. The process involves a server training an initial model based on its labeled data and distributing it to clients. Clients then use this model to predict local unlabeled data, using samples with prediction confidence above a certain fixed threshold and their prediction results as training data with "pseudo-labels" for updating their local models. However, the performance of this method is severely limited by the quality of the pseudo-labels, especially in the early stages of training when the global model performance is poor, making it difficult to generate a sufficient number of accurate pseudo-labels. This leads to slow system convergence and low training efficiency.

[0007] 2) Prototype learning

[0008] Prototype learning is a representation learning method based on metric learning. Its core idea is to learn a representative center point, or "prototype," in the feature embedding space for each data category. This prototype is typically obtained by averaging the feature vectors of all samples belonging to that category. During classification, the new sample's feature vector is calculated to be assigned to the category corresponding to the nearest prototype by measuring the distance between the new sample's feature vector and the prototypes of each category.

[0009] In distributed learning environments, prototypes, as low-dimensional and compact aggregated representations of data distributions, can serve as efficient knowledge carriers for transfer between different nodes without exchanging high-dimensional and complex model parameters. In existing federated learning techniques, prototype learning is primarily used to address problems arising from heterogeneous client data distributions (Non-IID). Related technical solutions involve exchanging and aggregating prototypes among clients, and using the aggregated global prototype to regularize local model training, thereby encouraging each client to learn more consistent feature representations. Summary of the Invention

[0010] The purpose of this invention is to overcome the problems of low efficiency during "cold start" and limited model performance due to "knowledge bottleneck" in existing federated semi-supervised learning techniques, and to provide a federated semi-supervised training method based on adaptive and reciprocal prototype learning, which aims to significantly improve the model convergence speed and final accuracy.

[0011] The specific technical solution for achieving the objective of this invention is as follows:

[0012] A federated semi-supervised training method based on adaptive and reciprocal prototype learning is characterized by using an adaptive three-stage learning strategy to collaboratively train a global model. This three-stage strategy—a warm-up stage, a teacher-guided stage, and a reciprocal learning stage—is implemented by adjusting the specific execution methods of the steps at different stages, and specifically includes the following steps:

[0013] S1, Server model training, state generation and distribution;

[0014] S2, Phased local training and uploading on the client;

[0015] S3, phased global server aggregation;

[0016] Specifically, step S1 includes:

[0017] In each communication round At the outset, the server first utilizes its limited number of locally labeled datasets. For the current model Training is performed, a process designed to minimize supervised loss, thereby updating the model to a state that fits the locally labeled data on the server, resulting in the global model for this round. The aforementioned supervised loss The calculation is as follows:

[0018]

[0019] in, A locally labeled dataset from the server A small batch of sampled data. Representation Model For input samples Predicted as category The probability of;

[0020] After training is complete, the server further generates state information to guide client training, along with the global model. Distributed together to the selected client set in this round The status information includes:

[0021] 1) Adaptive threshold To address the cold start problem during the initial training phase, the server calculates a dynamic global confidence threshold; this threshold is based on the global model's locally labeled dataset on the server. The average prediction confidence level is dynamically calculated. This represents the expected value being sought; in this scenario, it means calculating the average of all corresponding values ​​for all samples, which reflects the current "proficiency" of the server model; its calculation formula is:

[0022]

[0023] 2) Global Prototype Set When training enters later stages, the server will use its locally labeled data. Calculate prototypes for all categories to form a global prototype set, which is used to guide the client's feature learning;

[0024] Step S2 involves the client executing different local training tasks based on its current learning stage (warm-up stage, teacher-guided stage, or reciprocal learning stage), specifically including:

[0025] S2-1, Local training during the warm-up phase (Phase 1):

[0026] This stage is the initial training phase, and its core objective is to quickly activate the client's unlabeled data using adaptive thresholding, thus solving the "cold start" problem; Models distributed by the receiving server and adaptive threshold The client uses the threshold. Its local unlabeled data Filtering and generating pseudo-labels are performed to minimize consistency loss. To update its local model:

[0027]

[0028] in, For client-side local unlabeled datasets A small batch of data sampled from the middle; This is an unlabeled sample in the batch; For the received global model For the sample The predicted probability distribution made by the weakly enhanced view; This is an indicator function; its value is 1 when the condition is met, and 0 otherwise. The loss function; According to The generated pseudo-tags The local model currently being trained on the client. For the same sample The predicted probability distribution made by the strongly enhanced view;

[0029] The transition from the warm-up phase to the teacher-guided phase is determined by the Feature-Space Separation (FSS) score. After local training during the warm-up phase, the server calculates the FSS score based on its labeled data. This score quantifies the inter-class separation and intra-class compactness of the feature space learned by the model. The formula for calculating the FSS score is as follows:

[0030]

[0031] in, In the first The feature space separation score calculated in each communication round; The server indexes categories based on its tagged data. The calculated prototype is usually the mean of the feature vectors of all samples in that category; Represents the square of the Euclidean distance; For feature extractor (by (as parameters) applied to the sample The resulting feature vector; This indicates all real labels for samples expectations, It is a very small positive number, used to prevent the denominator from being zero;

[0032] To prevent extremely small values ​​where the denominator is zero; when the mean of the FSS score within a preset window period exceeds a pre-set threshold. And the standard deviation is lower than the pre-set threshold. At this point, the system automatically switches to the teacher-guided phase;

[0033] S2-2, Local training in the teacher-guided phase (Phase 2):

[0034] Once the FSS score meets the preset stage transition conditions, the teacher-guided stage begins. The goal is to provide structured guidance to the client using the server's reliable knowledge; the server distributes the model and adaptive thresholds, along with its calculated global prototype set. Client Local training objective function In addition to the existing consistency loss, a prototype consistency loss is added. :

[0035] (5)

[0036] in, The hyperparameter controlling the weights of the prototype loss term; the prototype consistency loss aims to align the feature vectors of local samples with the global prototype corresponding to their pseudo-labels, and is calculated using the following formula:

[0037]

[0038] in: For small batches Chinese counterfeit labels pass threshold The effective subset of samples selected; For client-side local models Feature extractor; For the global prototype set distributed from the server In the middle, with pseudo tags The corresponding category prototype; Represents the square of the Euclidean distance;

[0039] The transition from the teacher-guided phase to the reciprocal learning phase is determined by the Global Client Pseudo-Label Confidence Aggregation (GCPLCA) score. Before each round of local training in the teacher-guided phase, each selected client calculates its model's average maximum confidence on all unlabeled local data and reports this value to the server. The server aggregates the confidence scores of all clients to obtain the GCPLCA score. A transition occurs when the mean GCPLCA score within a preset window exceeds a pre-set threshold. And the standard deviation is lower than the pre-set threshold. At that time, the system automatically switches to the reciprocal learning phase;

[0040] S2-3, Local training and feedback in the reciprocal learning phase (Phase 3):

[0041] The goal of the reciprocal learning phase is to break through the "knowledge bottleneck"; client-side Continue using the same objective function as in Phase 2. Local model training is performed; simultaneously, the client generates and uploads feedback information; specifically, the client uses its mature local model to filter out predictions with confidence levels higher than a more stringent threshold. in, And calculate its local category prototype based on high-confidence samples. After training, the client uploads the updated local model and the calculated local prototype to the server.

[0042] Step S3 involves the server executing different global aggregation tasks based on the current learning stage, specifically including:

[0043] The server performs model aggregation, which involves receiving all local models uploaded by the selected clients, performing a weighted average aggregation of the models, and obtaining the initial model for the next round of server training.

[0044]

[0045] This represents the total amount of data from all selected clients in this round.

[0046] During the reciprocal learning phase (Phase 3), the server reciprocally updates the global prototype while aggregating the model; the server first aggregates the local prototypes uploaded by all clients to form the "student consensus" prototype. Then, he presented his own "teacher" archetype. By weighted fusion with the student consensus prototype, the premomentum global prototype is obtained:

[0047]

[0048] in It is a communication round An adaptive weighting mechanism is used to balance the importance of teacher knowledge and student feedback. Finally, to ensure smooth and stable prototype updates, a momentum update method is employed to obtain a knowledge-enriched, optimized version of the new global prototype for the next round. :

[0049]

[0050] in The momentum coefficient;

[0051] Repeat steps S1-S3 until the global model reaches the target accuracy or converges.

[0052] The beneficial effects of this invention include:

[0053] 1) By introducing an adaptive threshold mechanism in the early stage of training, this invention can dynamically adjust the selection criteria of pseudo-labels according to the proficiency of the global model, which significantly improves the utilization rate of unlabeled data in the early stage and effectively solves the "cold start" problem in traditional federated semi-supervised learning, thereby greatly accelerating the convergence speed of the model.

[0054] 2) By introducing a prototype learning mechanism that combines teacher guidance and reciprocal learning in the later stages of training, this invention not only utilizes the server's reliable knowledge to effectively guide and regularize client training, but also innovatively establishes a "student feedback" channel, allowing the client's high-quality knowledge to feed back into the global model. This successfully breaks through the "knowledge bottleneck" caused by the server's limited labeled data, enabling the final trained global model to converge to a higher-precision optimal solution.

[0055] 3) The three-stage strategy and automatic conversion mechanism designed in this invention enable the entire learning process to intelligently adapt to the state of the model at different stages, and achieve a smooth transition from rapid start-up to deep optimization without manual intervention, thereby enhancing the automation and robustness of the method. Attached Figure Description

[0056] Figure 1 This is a flowchart of the present invention;

[0057] Figure 2 This is a schematic diagram illustrating the process of the present invention;

[0058] Figure 3 This is a schematic diagram illustrating the bottleneck resolution process of the present invention;

[0059] Figure 4 This is a schematic diagram illustrating the cold start solution of the present invention;

[0060] Figure 5 This is a schematic diagram illustrating the adaptive threshold solution of the present invention. Detailed Implementation

[0061] The present invention will be further described in detail below with reference to the specific embodiments and accompanying drawings. The processes, conditions, experimental methods, etc., for implementing the present invention, except as specifically mentioned below, are all common knowledge and general knowledge in the art. For those skilled in the art, other drawings and other implementation methods can be obtained based on these drawings without any creative effort.

[0062] This invention proposes a federated semi-supervised training method based on adaptive and reciprocal prototype learning, aiming to solve the "cold start" and "knowledge bottleneck" problems in federated semi-supervised learning through a dynamic three-stage learning strategy. The specific implementation of this method includes the following steps:

[0063] S1. Server Model Training, State Generation and Distribution. At the beginning of each federated learning communication round, the server performs local training and generates guiding state information for this round. It then distributes the updated model and state information to the selected clients.

[0064] S2. Phased Local Training and Upload by Clients. Selected clients train their models locally using the corresponding objective function based on their current learning phase (warm-up phase, teacher-guided phase, and reciprocal learning phase), and then upload the training results to the server.

[0065] S3. Phased Global Aggregation on the Server. The server receives data uploaded by the client and performs corresponding global aggregation operations based on the current learning phase, including model aggregation and prototype updates at specific phases.

[0066] The following is a detailed explanation of each step:

[0067] Step S1 specifically includes:

[0068] In each communication round At the outset, the server first utilizes its limited number of locally labeled datasets. For the current model Training is performed by minimizing the supervised cross-entropy loss as shown in equation (1). The purpose of this process is to enable the model to fully learn the knowledge from the labeled data, thereby updating the model to a state that can fit the local labeled data on the server, thus obtaining the global model for this round. .

[0069]

[0070] in, From server labeled dataset A small batch of data sampled from the middle. Representation Model Predicting probabilities.

[0071] After training is complete, the server further generates state information to guide client training, along with the global model. Distributed together to the selected client set in this round The status information includes:

[0072] 1) Adaptive threshold To address the cold start problem during the initial training phase, the server calculates a dynamic global confidence threshold. This threshold is based on the global model's performance on the server's labeled dataset. The average prediction confidence level is dynamically calculated and reflects the current "proficiency" of the server model. The calculation formula is as follows:

[0073]

[0074] 2) Global Prototype Set When training enters later stages, the server will use its labeled data. Prototypes for all categories are calculated to form a global prototype set, which is used to guide the feature learning of the client.

[0075] Step S2 involves the client executing different local training tasks based on the current learning stage, specifically including:

[0076] S2-1, Local training during the warm-up phase (Phase 1):

[0077] This stage is the initial training phase, and its core objective is to quickly activate the client's unlabeled data using an adaptive threshold, thus solving the "cold start" problem. (Client) Models distributed by the receiving server and adaptive threshold The client uses the threshold. Its local unlabeled data Filtering and generating pseudo-labels are performed to minimize consistency loss. To update its local model:

[0078]

[0079] in, For client-side local unlabeled datasets A small batch of data sampled from the middle; This is an unlabeled sample in the batch; For the received global model For the sample The predicted probability distribution made by the weakly enhanced view; This is an indicator function; its value is 1 when the condition is met, and 0 otherwise. The loss function; According to The generated pseudo-tags The local model currently being trained on the client. For the same sample The predicted probability distribution is made from the strongly enhanced view.

[0080] The transition from the warm-up phase to the teacher-guided phase is determined by the Feature-Space Separation (FSS) score. After local training during the warm-up phase, the server calculates the FSS score based on its labeled data. This score quantifies the inter-class separation and intra-class compactness of the feature space learned by the model. The formula for calculating the FSS score is as follows:

[0081]

[0082] in, In the first The feature space separation score calculated in each communication round; The server indexes categories based on its tagged data. The calculated prototype is usually the mean of the feature vectors of all samples in that category; Represents the square of the Euclidean distance; For feature extractor (by (as parameters) applied to the sample The resulting feature vector; This indicates all real labels for samples expectations, It is a very small positive number, used to prevent the denominator from being zero;

[0083] To prevent extremely small values ​​where the denominator is zero; when the mean of the FSS score within a preset window period is higher than a threshold And the standard deviation is below the threshold At this point, the system automatically switches to the teacher-guided phase;

[0084] S2-2, Local training in the teacher-guided phase (Phase 2):

[0085] Once the FSS score meets the preset stage transition conditions, the teacher-guided stage begins. The goal is to provide structured guidance to the client using the server's reliable knowledge; the server distributes the model and adaptive thresholds, along with its calculated global prototype set. Client Local training objective function In addition to the existing consistency loss, a prototype consistency loss is added. :

[0086] (5)

[0087] in, The hyperparameter controlling the weights of the prototype loss term; the prototype consistency loss aims to align the feature vectors of local samples with the global prototype corresponding to their pseudo-labels, and is calculated using the following formula:

[0088]

[0089] in: For small batches Chinese counterfeit labels pass threshold The effective subset of samples selected; For client-side local models Feature extractor; For the global prototype set distributed from the server In the middle, with pseudo tags The corresponding category prototype; Represents the square of the Euclidean distance;

[0090] The transition from the teacher-guided phase to the reciprocal learning phase is determined by the Global Client Pseudo-Label Confidence Aggregation (GCPLCA) score. Before each round of local training in the teacher-guided phase, each selected client calculates its model's average maximum confidence on all unlabeled local data and reports this value to the server. The server aggregates the confidence scores of all clients to obtain the GCPLCA score. A transition is achieved when the mean GCPLCA score within a preset window exceeds a threshold. And the standard deviation is below the threshold At that time, the system automatically switches to the reciprocal learning phase;

[0091] S2-3, Local training and feedback in the reciprocal learning phase (Phase 3):

[0092] The goal of the reciprocal learning phase is to break through the "knowledge bottleneck"; client-side Continue using the same objective function as in Phase 2. Local model training is performed. Simultaneously, the client generates and uploads feedback information. Specifically, the client utilizes its mature local model to filter predictions with confidence levels higher than a more stringent threshold. (in, The samples are used to calculate the local category prototype based on the high-confidence samples. After training is complete, the client uploads the updated local model and the calculated local prototype to the server.

[0093] Step S3 involves the server executing different global aggregation tasks based on the current learning stage, specifically including:

[0094] The server performs model aggregation. That is, after receiving all the local models uploaded by the selected clients, it performs a weighted average aggregation of the models to obtain the initial model for the next round of server training.

[0095]

[0096] This represents the total amount of data from all selected clients in this round.

[0097] During the reciprocal learning phase (Phase 3), the server reciprocally updates the global prototype while aggregating the model. The server first aggregates the local prototypes uploaded by all clients to form the "student consensus" prototype. Then, he used his own "teacher" archetype. By weighted fusion with the student consensus prototype, the premomentum global prototype is obtained:

[0098]

[0099] in It is a communication round A decaying adaptive weight is used to balance the importance of teacher knowledge and student feedback. Finally, to ensure smooth and stable prototype updates, a momentum update method is employed to obtain a knowledge-enriched, optimized new global prototype for the next round. :

[0100]

[0101] in This is the momentum coefficient.

[0102] Repeat S1-S3 until the global model reaches the target accuracy or converges.

[0103] Example

[0104] See appendix Figure 1 This is a flowchart of the present invention.

[0105] Consider a typical federated learning approach with a total of 100 clients. In each communication round, 10 clients are randomly selected for training. Each client iterates 5 times per round using the SGD optimizer on its local dataset. (See attached diagram) Figure 2 As shown, this embodiment provides a federated semi-supervised training method based on adaptive and reciprocal prototype learning, including:

[0106] In each communication round At the outset, the server first utilizes its limited number of locally labeled datasets. For the current model Training is performed by minimizing the supervised cross-entropy loss as shown in equation (1). The purpose of this process is to enable the model to fully learn the knowledge from the labeled data, thereby updating the model to a state that can fit the local labeled data on the server, thus obtaining the global model for this round. .

[0107]

[0108] in, From server labeled dataset A small batch of data sampled from the middle. Representation Model Predicting probabilities.

[0109] After training is complete, the server further generates state information to guide client training, along with the global model. Distributed together to the selected client set in this round The status information includes:

[0110] 1) Adaptive threshold To address the cold start problem during the initial training phase, the server calculates a dynamic global confidence threshold. This threshold is based on the global model's performance on the server's labeled dataset. The average prediction confidence level is dynamically calculated and reflects the current "proficiency" of the server model. The calculation formula is as follows:

[0111]

[0112] Global Prototype Set When training enters later stages, the server will use its labeled data. Prototypes for all categories are calculated to form a global prototype set, which is used to guide the feature learning of the client.

[0113] Step S2 involves the client executing different local training tasks based on the current learning stage, specifically including:

[0114] S2-1, Local training during the warm-up phase (Phase 1):

[0115] This stage is the initial training phase, and its core objective is to quickly activate the client's unlabeled data using an adaptive threshold, thus solving the "cold start" problem. (Client) Models distributed by the receiving server and adaptive threshold The client uses the threshold. Its local unlabeled data Filtering and generating pseudo-labels are performed to minimize consistency loss. To update its local model:

[0116]

[0117] in, For client-side local unlabeled datasets A small batch of data sampled from the middle; This is an unlabeled sample in the batch; For the received global model For the sample The predicted probability distribution made by the weakly enhanced view; This is an indicator function; its value is 1 when the condition is met, and 0 otherwise. The loss function; According to The generated pseudo-tags The local model currently being trained on the client. For the same sample The predicted probability distribution is made from the strongly enhanced view.

[0118] The transition from the warm-up phase to the teacher-guided phase is determined by the Feature-Space Separation (FSS) score. After local training during the warm-up phase, the server calculates the FSS score based on its labeled data. This score quantifies the inter-class separation and intra-class compactness of the feature space learned by the model. The formula for calculating the FSS score is as follows:

[0119]

[0120] in, In the first The feature space separation score calculated in each communication round; The server indexes categories based on its tagged data. The calculated prototype is usually the mean of the feature vectors of all samples in that category; Represents the square of the Euclidean distance; For feature extractor (by (as parameters) applied to the sample The resulting feature vector; This indicates all real labels for samples expectations, It is a very small positive number, used to prevent the denominator from being zero;

[0121] To prevent extremely small values ​​where the denominator is zero; when the mean of the FSS score within a preset window period is higher than a threshold And the standard deviation is below the threshold At this point, the system automatically switches to the teacher-guided phase;

[0122] S2-2, Local training in the teacher-guided phase (Phase 2):

[0123] Once the FSS score meets the preset stage transition conditions, the teacher-guided stage begins. The goal is to provide structured guidance to the client using the server's reliable knowledge; the server distributes the model and adaptive thresholds, along with its calculated global prototype set. Client Local training objective function In addition to the existing consistency loss, a prototype consistency loss is added. :

[0124] (5)

[0125] in, The hyperparameter controlling the weights of the prototype loss term; the prototype consistency loss aims to align the feature vectors of local samples with the global prototype corresponding to their pseudo-labels, and is calculated using the following formula:

[0126]

[0127] in: For small batches Chinese counterfeit labels pass threshold The effective subset of samples selected; For client-side local models Feature extractor; For the global prototype set distributed from the server In the middle, with pseudo tags The corresponding category prototype; Represents the square of the Euclidean distance;

[0128] The transition from the teacher-guided phase to the reciprocal learning phase is determined by the Global Client Pseudo-Label Confidence Aggregation (GCPLCA) score. Before each round of local training in the teacher-guided phase, each selected client calculates its model's average maximum confidence on all unlabeled local data and reports this value to the server. The server aggregates the confidence scores of all clients to obtain the GCPLCA score. A transition is achieved when the mean GCPLCA score within a preset window exceeds a threshold. And the standard deviation is below the threshold At that time, the system automatically switches to the reciprocal learning phase;

[0129] S2-3, Local training and feedback in the reciprocal learning phase (Phase 3):

[0130] The goal of the reciprocal learning phase is to break through the "knowledge bottleneck"; client-side Continue using the same objective function as in Phase 2. Local model training is performed. Simultaneously, the client generates and uploads feedback information. Specifically, the client utilizes its mature local model to filter predictions with confidence levels higher than a more stringent threshold. (in, The samples are used to calculate the local category prototype based on the high-confidence samples. After training is complete, the client uploads the updated local model and the calculated local prototype to the server.

[0131] Step S3 involves the server executing different global aggregation tasks based on the current learning stage, specifically including:

[0132] The server performs model aggregation. That is, after receiving all the local models uploaded by the selected clients, it performs a weighted average aggregation of the models to obtain the initial model for the next round of server training.

[0133]

[0134] This represents the total amount of data from all selected clients in this round.

[0135] During the reciprocal learning phase (Phase 3), the server reciprocally updates the global prototype while aggregating the model. The server first aggregates the local prototypes uploaded by all clients to form the "student consensus" prototype. Then, he used his own "teacher" archetype. By weighted fusion with the student consensus prototype, the premomentum global prototype is obtained:

[0136]

[0137] in It is a communication round A decaying adaptive weight is used to balance the importance of teacher knowledge and student feedback. Finally, to ensure smooth and stable prototype updates, a momentum update method is employed to obtain a knowledge-enriched, optimized new global prototype for the next round. :

[0138]

[0139] in This is the momentum coefficient.

[0140] Repeat S1-S3 until the global model reaches the target accuracy or converges.

[0141] Experimental Verification: To verify the effectiveness and universality of this invention, this embodiment selected three widely used public datasets for classification task testing: CIFAR-10, CIFAR-100, and SVHN. The deep learning network model used in the experiment was WideResNet-28x2 (WResNet-28x2).

[0142] In this federated learning configuration, the example simulates a federated system with 100 clients. In each communication round, 10% (i.e., 10 clients) are randomly selected to participate in local training. The local training rounds for both the server and clients are set to 5. The model optimizer uses stochastic gradient descent with momentum (SGD), where momentum is set to 0.9, weight decay is 5e-4, and the initial learning rate is 0.03. The total number of communication rounds is set to 800.

[0143] Regarding data distribution, the experiment considered both uniform (IID) and non-uniform (Non-IID) data distributions. For the Non-IID case, the Dirichlet distribution (Dir( The data for each client is divided, including parameters. Used to control the degree of data heterogeneity. A smaller value indicates a higher degree of heterogeneity. This embodiment selects... Three heterogeneous levels.

[0144] In the context of federated semi-supervised learning, following the scenario of "labels on the server," the number of labeled samples held by the server... The settings are adjusted according to different datasets, specifically: CIFAR-10 was tested. CIFAR-100 tested SVHN tested .

[0145] Table 1 Performance Evaluation of Fed-ARPL

[0146]

[0147] To demonstrate the beneficial effects of the present invention, this embodiment (abbreviated as Fed-ARPL) is compared with a variety of existing federated semi-supervised learning methods, including: (1) SemiFL: a baseline method that uses alternating training and fixed threshold pseudo-labels; (2) FedMatch: a method that introduces client-to-client consistency loss for regularization; (3) (FL)² (abbreviated as FLFL): a method that uses client-specific adaptive thresholds and sharpness-aware regularization; and (4) pFedKnow: a method that combines pre-trained knowledge for personalized modeling.

[0148] Table 1 reports the final test accuracy (%) of the proposed method (Fed-ARPL) and the aforementioned comparative methods on three datasets, with different data distributions and different labeled sample sizes. Each result in the table represents the mean and standard deviation of three independent experiments. As can be seen from the experimental results in Table 1, the proposed Fed-ARPL method achieves optimal performance in the vast majority (22 out of 24 scenarios) of the test scenarios, significantly outperforming all comparative methods. For example, on the CIFAR-100 dataset, Furthermore, the data is highly heterogeneous. In challenging scenarios, the test accuracy of this invention reaches 47.43%, a significant improvement compared to the second-best performing SemiFL method (43.32%). This demonstrates that the adaptive and reciprocal learning framework designed in this invention exhibits superior performance and robustness in complex environments where labeled data is scarce and data distribution is skewed.

[0149] Table 2 presents the results of an ablation experiment used to verify the effectiveness of each component in the three-stage strategy of this invention. This experiment was conducted on the CIFAR-100 dataset. , The process proceeded by gradually adding the core components of this invention, starting with the baseline method. (a) shows the baseline performance; (b) shows the performance with only the "adaptive threshold" mechanism of this invention added to the baseline (corresponding to stage one); (c) shows the performance with "teacher-guided prototype learning" added to (b) (corresponding to stage two); and (d) shows the complete Fed-ARPL method of this invention (corresponding to stage three). As can be seen from the results in Table 2, the final accuracy of the model improved significantly with each additional component. Adding only the adaptive threshold improved performance by 2.13%, demonstrating its effectiveness in solving the "cold start" problem. Adding teacher guidance further improved performance by 3.12%, highlighting the importance of structured guidance for stable training. Finally, adding reciprocal learning improved performance again by 2.19%, confirming the key role of the "student feedback" mechanism in breaking through the "knowledge bottleneck" to achieve a higher performance optimal solution.

[0150]

[0151] Appendix Figure 3 This demonstrates the effectiveness of the present invention in solving the "cold start" problem, specifically comparing the convergence speed of the proposed method Fed-ARPL with the baseline method SemiFL in the early stages of training. The figure includes two scenarios with different challenges: on the CIFAR-10 dataset, where the labeled data is sparse and Non-IID (…). . ) settings (left image); and IID with sufficient annotation data ( The settings are shown in the right figure. It is clear from both sub-figures that, regardless of whether the settings are challenging or stable, the accuracy curve of the proposed method (solid line) is consistently significantly higher than the baseline method (dashed line). For example, in the left figure, the proposed method achieves 60% accuracy after approximately 95 epochs, while the baseline method requires approximately 115 epochs to reach the same performance level, demonstrating a significant acceleration in convergence. This result proves that the early mechanisms of the proposed method (adaptive threshold and teacher guidance) work synergistically to successfully transform the inherent "cold start" phase of the initial training period into a rapid and efficient guided learning period, thereby achieving a leading advantage in various scenarios.

[0152] Appendix Figure 4 This paper demonstrates the effectiveness of the "student feedback" mechanism (FeedBack, i.e., the complete Fed-ARPL) in breaking through the "knowledge bottleneck." The figure compares the training curves of the complete Fed-ARPL method with a variant method that does not include the third stage "reciprocal learning" (NoFeedBack, i.e., permanently remaining at stage two). Experiments were conducted on the CIFAR-10 dataset, Non-IID (… . The tests were conducted under the specified settings. (Above image) and (See the image below) Two scenarios. It's clear from the image that regardless of the amount of labeled data, the curve including the "student feedback" mechanism always lies above the curve without it, indicating superior performance. This is especially true when the amount of labeled data is extremely small (…). In the case of [missing information], the performance gap between the two curves gradually widens as training progresses, which strongly demonstrates that by integrating client knowledge, this invention can effectively break through the performance ceiling caused by limited server data.

[0153] Appendix Figure 5 This demonstrates the direct impact of the adaptive threshold mechanism in this invention on data utilization. The experiment was conducted on the CIFAR-100 dataset Non-IID (… . The figure compares the dynamic processes of the Fed-ARPL method and the baseline method (SemiFL) using a fixed threshold. It is clear from the figure that the adaptive threshold of the present invention (the dark solid line in the figure, corresponding to the left Y-axis) starts from a low value and smoothly increases as the model's capabilities improve, eventually stabilizing around 0.95. In contrast, the fixed threshold of the baseline method (the light dashed line in the figure) remains at a high level of 0.95 throughout. The direct consequence of this dynamic adjustment is reflected in the label acceptance rate (corresponding to the right Y-axis): the acceptance rate of the present invention (the dark solid line in the figure) reaches a significant level of approximately 40% from the very first few rounds, while the acceptance rate of the baseline method (the light dashed line in the figure) is almost zero in the crucial early stages, causing the client data to remain dormant. This strongly demonstrates that the adaptive threshold mechanism of the present invention can effectively solve the learning habituation problem, laying the foundation for rapid model convergence.

[0154] The above description is merely a preferred embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A federated semi-supervised training method based on adaptive and reciprocal prototype learning, characterized in that, The method specifically includes the following steps: S1, Server model training, state generation and distribution; S2, Phased local training and uploading on the client; S3, phased global server aggregation; Specifically, step S1 includes: In each communication round At the outset, the server first utilizes its limited number of locally labeled datasets. For the current model Training is performed, a process designed to minimize supervised loss, thereby updating the model to a state that fits the locally labeled data on the server, resulting in the global model for this round. The aforementioned supervised loss The calculation is as follows: ; in, A locally labeled dataset from the server A small batch of data sampled from the middle. Representation Model For input samples Predicted as category The probability of; After training is complete, the server further generates state information to guide client training, along with the global model. Distributed together to the selected client set in this round The status information includes: 1) Adaptive threshold To address the cold start issue during the initial training phase, the server calculates a dynamic global confidence threshold; this threshold is based on the global model's locally labeled dataset on the server. The average prediction confidence level is dynamically calculated. This represents the expected value; in this scenario, it means calculating the average of all corresponding values ​​for all samples, which reflects the current "proficiency" of the server model; its calculation formula is: ; 2) Global Prototype Set When training enters later stages, the server will use its locally labeled data. Calculate prototypes for all categories to form a global prototype set, which is used to guide the client's feature learning; Step S2 involves the client executing different local training tasks based on its current learning stage (warm-up stage, teacher-guided stage, or reciprocal learning stage), specifically including: S2-1, Local training during the warm-up phase: This stage is the initial training phase, and its goal is to quickly activate the client's unlabeled data using adaptive thresholding, thus solving the cold start problem; client Models distributed by the receiving server and adaptive threshold The client uses the threshold. Its local unlabeled data Filtering and generating pseudo-labels are performed to minimize consistency loss. To update its local model: ; in, For client-side local unlabeled datasets A small batch of data sampled from the middle; This is an unlabeled sample in the batch; For the received global model For the sample The predicted probability distribution made by the weakly enhanced view; This is an indicator function; its value is 1 when the condition is met, and 0 otherwise. The loss function; According to The generated pseudo-tags The local model currently being trained on the client. For the same sample The predicted probability distribution made by the strongly enhanced view; The transition from the warm-up phase to the teacher-guided phase is determined by the Feature Space Separation Score (FSS). After local training during the warm-up phase, the server calculates the FSS score based on its labeled data. This score quantifies the inter-class separation and intra-class compactness of the feature space learned by its model. The formula for calculating the FSS score is: ; in, In the first The feature space separation score calculated in each communication round; The server indexes categories based on its tagged data. The calculated prototype is usually the mean of the feature vectors of all samples in that category; Represents the square of the Euclidean distance; For feature extractor by The parameter is applied to the sample The resulting feature vector; This indicates all real labels for samples expectations, It is a very small positive number, used to prevent the denominator from being zero; To prevent extremely small values ​​where the denominator is zero; when the mean of the FSS score within a preset window period exceeds a pre-set threshold. And the standard deviation is lower than the set threshold. At that time, it will automatically switch to the teacher-guided stage; S2-2, Local training during the teacher-guided phase: Once the FSS score meets the preset stage transition conditions, the teacher-guided stage begins. The goal is to provide structured guidance to the client using the server's reliable knowledge; the server distributes the model and adaptive thresholds, along with its calculated global prototype set. Client Local training objective function In addition to the existing consistency loss, a prototype consistency loss is added. : (5); in, The hyperparameter controlling the weights of the prototype loss term; the prototype consistency loss aims to align the feature vectors of local samples with the global prototype corresponding to their pseudo-labels, and is calculated using the following formula: ; in: For small batches Chinese counterfeit labels pass threshold The effective subset of samples selected; For client-side local models Feature extractor; For the global prototype set distributed from the server In the middle, with pseudo tags The corresponding category prototype; Represents the square of the Euclidean distance; The transition from the teacher-guided phase to the reciprocal learning phase is determined by the Global Client Pseudo-Label Confidence Aggregate (GCPLCA) score. Before each round of local training in the teacher-guided phase, each selected client calculates its model's average maximum confidence on all unlabeled local data and reports this value to the server. The server aggregates the confidence scores of all clients to obtain the GCPLCA score. A transition occurs when the mean GCPLCA score within a preset window exceeds a pre-defined threshold. And the standard deviation is lower than the set threshold. When the time comes, it will automatically switch to the reciprocal learning phase; S2-3, Local training and feedback during the reciprocal learning phase: The goal of the reciprocal learning phase is to break through the "knowledge bottleneck"; client-side Continue using the same objective function as in Phase 2. Local model training is performed; simultaneously, the client generates and uploads feedback information; specifically, the client uses its mature local model to filter out predictions with confidence levels higher than a more stringent threshold. in, And calculate its local category prototype based on high-confidence samples. After training, the client uploads the updated local model and the calculated local prototype to the server. Step S3 involves the server executing different global aggregation tasks based on the current learning stage, specifically including: The server performs model aggregation, which involves receiving all local models uploaded by the selected clients, performing a weighted average aggregation of the models, and obtaining the initial model for the next round of server training. : ; This represents the total amount of data from all selected clients in this round. During the reciprocal learning phase (Phase 3), the server reciprocally updates the global prototype while aggregating the model; the server first aggregates the local prototypes uploaded by all clients to form the "student consensus" prototype. Then, he presented his own "teacher" archetype. By weighted fusion with the student consensus prototype, the premomentum global prototype is obtained: ; in It is a communication round An adaptive weighting mechanism is used to balance the importance of teacher knowledge and student feedback. Finally, to ensure smooth and stable prototype updates, a momentum update method is employed to obtain a knowledge-enriched, optimized version of the new global prototype for the next round. : ; in The momentum coefficient; Repeat steps S1-S3 until the global model reaches the target accuracy or converges.