Hierarchical knowledge distillation-based medical diagnosis model training method and server
By using a hierarchical knowledge distillation method to generate abstract knowledge representation vectors for information exchange, the problem of privacy risks in medical data leakage in federated learning is solved, and the security and reliability of diagnostic models are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-22
- Publication Date
- 2026-03-27
AI Technical Summary
Under the federated learning framework, medical data faces a high risk of privacy breaches, especially since directly uploading model gradient information could be exploited by malicious attackers to infer patient information, leading to privacy data security issues.
A hierarchical knowledge distillation-based approach is adopted. Local multimodal medical data is input into a preset knowledge template through a personalized diagnostic model to generate a soft-label probability distribution. This distribution is then optimized using a knowledge consistency loss function to generate an abstract knowledge representation vector for information exchange. Bayesian fusion is performed by combining diagnostic uncertainty measurement and medical prior distribution to finally generate a privacy-preserving knowledge representation vector for transmission.
This improves the security of patient privacy data from various medical institutions during the training of medical diagnostic models, reduces the damage of noise to the effectiveness of knowledge vectors, and enhances the reliability and privacy protection level of diagnostic models.
Smart Images

Figure CN121745221A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, and particularly relates to a medical diagnosis model training method and server based on hierarchical knowledge distillation. BACKGROUND
[0002] With the acceleration of the digitization process of medical data and the in-depth application of artificial intelligence technology in the medical field, intelligent medical diagnosis systems are developing towards multi-modal data fusion and personalized diagnosis and treatment. Medical institutions have accumulated a large amount of medical data including medical images, electronic medical records, gene sequences and laboratory test results, etc. These data contain rich diagnostic information and provide a basis for building intelligent diagnosis models. However, due to the sensitivity of medical data and the requirement of privacy protection, data between different medical institutions is difficult to share and process directly, forming a data island problem. At the same time, the medical data of different medical institutions differ significantly in modal composition, data quality and data volume, which poses a great challenge to the construction of a unified and effective multi-modal medical diagnosis model.
[0003] In order to realize collaborative learning among multiple institutions, related technologies mainly use a federated learning framework to train medical diagnosis models. In a typical federated learning scheme, the server first initializes a global model and distributes it to each participating medical institution client, each medical institution client trains the global model using local medical data, and uploads the model parameter updates (such as gradient information) obtained by training to the server. The server generates a new global model by aggregating model updates from different clients using an aggregation algorithm, and then distributes the updated global model to each client, and iterates until the model converges.
[0004] However, the direct uploading of model gradients in related technologies still poses a risk of privacy leakage, especially in the medical field, even aggregated gradient information can be used by malicious attackers to infer patient information. SUMMARY
[0005] The present application provides a medical diagnosis model training method and server based on hierarchical knowledge distillation, aiming to improve the security of patient privacy data in the medical diagnosis model training process under the federated learning framework.
[0006] In a first aspect, a medical diagnosis model training method based on hierarchical knowledge distillation is provided, which is applied to a server and a personalized diagnosis model, and the method comprises the following steps: inputting local multi-modal medical data into a preset knowledge template by the personalized diagnosis model to obtain a soft label probability distribution; performing knowledge distillation optimization by the personalized diagnosis model based on a knowledge consistency loss function between the soft label probability distribution and a local real diagnosis label, wherein the knowledge consistency loss function completes knowledge transfer by minimizing the relative entropy between the output probability distribution of the personalized diagnosis model and the soft label probability distribution; performing an inference task on a preset anonymous verification data set by the personalized diagnosis model after the knowledge distillation optimization to generate an abstract knowledge representation vector, wherein the abstract knowledge representation vector is obtained by extracting feature activation values of an intermediate hidden layer of the personalized diagnosis model and performing principal component analysis dimension reduction; and sending the abstract knowledge representation vector to the server by the personalized diagnosis model.
[0007] By adopting the above technical solution, the method of directly exchanging model parameters or gradients in traditional federated learning is abandoned, and the abstract knowledge representation vector obtained through model inference is used as the carrier of information exchange, so that the security of patient privacy data in the medical diagnosis model training process of each medical institution is improved under the federated learning framework.
[0008] In combination with some embodiments of the first aspect, in some embodiments, the step of inputting the local multi-modal medical data into the preset knowledge template by the personalized diagnosis model to obtain the soft label probability distribution specifically comprises the following steps: extracting, by the personalized diagnosis model, an original feature vector of a penultimate layer based on the local multi-modal medical data as a diagnosis feature representation; calculating, by the personalized diagnosis model, a variance distribution of feature activation values based on the diagnosis feature representation, and taking the variance distribution as a diagnosis uncertainty measurement index; inputting, by the personalized diagnosis model, the diagnosis feature representation into the preset knowledge template to obtain an initial output probability distribution of the knowledge template; generating, by the personalized diagnosis model, an uncertainty-aware probability distribution by performing confidence weighting modulation on the initial output probability distribution based on the diagnosis uncertainty measurement index; and performing Bayesian fusion on the probability distribution and a preset standard medical diagnosis prior distribution by the personalized diagnosis model to obtain the soft label probability distribution.
[0009] By adopting the above technical solution, when generating the soft label probability distribution, the method no longer simply relies on the preset knowledge template, but introduces an uncertainty measurement calculated based on the diagnosis feature representation, and performs Bayesian fusion with the standard medical prior distribution. This processing manner enables the generated soft label probability distribution to contain the confidence information of the preset knowledge template on the current diagnosis, and calibrates its distribution with medical prior knowledge, thereby providing a more reliable guidance signal with uncertainty quantification and medical common sense constraint for the local personalized model, reducing the misleading caused by the overconfident prediction of the local model by the preset knowledge template on uncertain or rare cases, and thereby improving the diagnosis reliability of the final personalized model.
[0010] In some embodiments in combination with the first aspect, in some embodiments, the step of knowledge distillation optimization of the personalized diagnosis model based on the knowledge consistency loss function between the soft label probability distribution and the local real diagnosis label, specifically comprises: the personalized diagnosis model calculates the soft label weight of each diagnosis category based on the soft label probability distribution, and the soft label weight reflects the confidence of the global knowledge for each category; the personalized diagnosis model combines the soft label weight with the local real diagnosis label to construct a weighted real label vector, and each element in the weighted real label vector is the product of the real label value of the corresponding category and the corresponding soft label weight; the personalized diagnosis model takes the weighted cross-entropy loss between the current output probability distribution and the weighted real label vector as the main distillation loss; the personalized diagnosis model calculates the loss gradient based on the weighted cross-entropy loss, and adaptively scales the loss gradient in combination with the diagnosis uncertainty measurement index; the personalized diagnosis model updates the personalized diagnosis model parameters by using the adaptively scaled gradient, and completes a round of knowledge distillation optimization.
[0011] By adopting the above technical solutions, in the step of knowledge distillation optimization, instead of using a unified loss function for gradient update, a weighted real label vector is constructed based on the confidence of the soft label, and the loss gradient is adaptively scaled in combination with the diagnosis uncertainty measurement index. This mechanism makes the update process of the model parameters have a clear orientation, can automatically enhance the learning weight of the high-confidence part of the preset knowledge template, and at the same time, weaken the learning intensity of the low-confidence and high-uncertainty part, thereby suppressing the noise interference in the knowledge transfer process and reducing the shock of model training.
[0012] In some embodiments in combination with the first aspect, in some embodiments, after the step of knowledge distillation optimization of the personalized diagnosis model, the step of generating an abstract knowledge representation vector by executing an inference task on a preset anonymous verification dataset, specifically comprises: the personalized diagnosis model performs forward inference on each sample in the preset anonymous verification dataset after the step of knowledge distillation optimization; the personalized diagnosis model extracts the feature activation values of each hidden layer in the inference process to form a multi-layer feature activation matrix; the personalized diagnosis model performs feature importance sorting on the multi-layer feature activation matrix by layer, and selects the top preset number of features with the highest activation intensity in each layer as a key feature subset; the personalized diagnosis model concatenates the key feature subsets of each layer across layers to form a high-dimensional comprehensive feature vector; the personalized diagnosis model performs principal component analysis dimension reduction processing on the high-dimensional comprehensive feature vector, and extracts the principal components with a cumulative contribution rate reaching a preset threshold as an abstract knowledge representation vector; the personalized diagnosis model assigns a semantic label to each dimension of the abstract knowledge representation vector based on the clustering analysis result of the abstract knowledge representation vector on the verification dataset, and the semantic label identifies the corresponding medical feature type of the corresponding dimension.
[0013] By adopting the technical solution, the traditional method of extracting features from a single network layer as knowledge representation is abandoned, and instead, key feature activation values are extracted from multiple hidden layers, and cross-layer splicing and dimension reduction are performed, and semantic labels are assigned to the dimensions of the reduced vectors. This method enables the generated abstract knowledge representation vector to more comprehensively summarize the complete reasoning logic of the model from low-level details to high-level semantics, converting a pure numerical vector into structured knowledge with medical interpretability, thereby improving the information density and depth of the exchanged knowledge between federated nodes, enabling subsequent global knowledge aggregation to be based on richer and deeper collective wisdom, thereby improving the quality of the global knowledge template.
[0014] In combination with some embodiments of the first aspect, in some embodiments, after the step of assigning semantic labels to each dimension of the vector based on the clustering analysis result of the abstract knowledge representation vector on the validation data set by the personalized diagnostic model, the method further comprises: the personalized diagnostic model calculates the privacy sensitivity score of each dimension of the abstract knowledge representation vector corresponding to the medical feature type based on the semantic labels; the personalized diagnostic model assigns a personalized noise intensity parameter to each dimension of the abstract knowledge representation vector based on the privacy sensitivity score and a preset privacy budget; the personalized diagnostic model generates a dimension-aligned Laplace noise vector based on the noise intensity parameter, each element of the Laplace noise vector being sampled from a Laplace distribution corresponding to the element's dimension; the personalized diagnostic model element-wise adds the abstract knowledge representation vector and the Laplace noise vector to generate a privacy-protected knowledge representation vector; when the signal-to-noise ratio between the privacy-protected knowledge representation vector and the abstract knowledge representation vector is greater than a preset threshold, the personalized diagnostic model encapsulates the privacy-protected knowledge representation vector together with the corresponding semantic label information as a knowledge upload data packet and sends it to the server.
[0015] By adopting the technical solution, the privacy sensitivity of each dimension of the vector is evaluated based on the semantic labels of the dimensions, and a personalized noise intensity is assigned accordingly. This refined privacy budget allocation strategy can apply stronger noise protection to dimensions carrying more sensitive information, while applying weaker noise to dimensions carrying general knowledge to preserve their information value, thereby reducing the damage to the effectiveness of the knowledge vector under the premise of meeting the same level of privacy protection.
[0016] In some embodiments in combination with the first aspect, after the step of sending the abstract knowledge representation vector to the server by the personalized diagnosis model, the method further comprises: constructing, by the server, a multi-dimensional Gaussian mixture model as a knowledge probability distribution model based on the historical aggregated abstract knowledge representation vectors of the medical institution clients, the multi-dimensional Gaussian mixture model learning the latent distribution structure of the knowledge vectors through an expectation maximization algorithm; calculating, by the server, a knowledge novelty score as the negative log-likelihood value of the newly received abstract knowledge representation vector of each medical institution client under the knowledge probability distribution model; calculating, by the server, a performance score based on the classification accuracy of the abstract knowledge representation vector on a preset anonymous verification dataset; weighting and fusing, by the server, the knowledge novelty score and the performance score based on a preset novelty weight coefficient to obtain a comprehensive evaluation score; assigning, by the server, a dynamic fusion weight to the abstract knowledge representation vector of each medical institution based on the comprehensive evaluation score, and generating a target knowledge center vector through weighted aggregation; inputting, by the server, the target knowledge center vector into a preset knowledge generator network to obtain pseudo-feature data semantically consistent with the target knowledge center vector; and obtaining, by the server, a knowledge template with updated parameter weights through supervised training based on the pseudo-feature data.
[0017] By adopting the above technical solutions, when aggregating the knowledge of each client, the server no longer relies only on the performance of the model on the verification set, but introduces a knowledge novelty score based on a Gaussian mixture model and constructs a knowledge generator network. This mechanism enables the server to not only evaluate the correctness of the knowledge, but also evaluate its uniqueness, thereby encouraging and exploring rare but valuable knowledge from different clients. At the same time, generating pseudo-feature data semantically consistent with the target knowledge to train the global model enables the abstract knowledge vector to also be used to update the complex network parameters.
[0018] In some embodiments in combination with the first aspect, the step of inputting, by the server, the target knowledge center vector into a preset knowledge generator network to obtain pseudo-feature data semantically consistent with the target knowledge center vector specifically comprises: constructing, by the server, a knowledge generator network comprising an encoder, a latent space mapper, and a decoder, the latent space mapper being used to map the target knowledge center vector to a high-dimensional feature latent space; encoding, by the server, historical real medical feature data into latent representations and performing similarity matching with the target knowledge center vector in the latent space through the encoder; determining, by the server, a knowledge anchor point coordinate in the latent space based on the similarity matching result, the knowledge anchor point coordinate representing a feature pattern capable of generating the target knowledge center vector; generating, by the server, diversified latent vector sampling points through Gaussian distribution sampling within a preset range of the knowledge anchor point coordinate; and decoding, by the server, the latent vector sampling points into multi-modal pseudo-feature data through the decoder.
[0019] By employing the aforementioned technical solution, pseudo-feature data is obtained by locating knowledge anchor points in the latent space that match the target knowledge center vector, and then performing Gaussian sampling around these anchor points. This method ensures that the generated pseudo-feature data is semantically highly aligned with the aggregated collective intelligence. Simultaneously, by introducing diversity that conforms to the distribution patterns of real data through sampling, the generated pseudo-feature data possesses both the core essence of the target knowledge and simulates the complex characteristics of real medical data, thus providing higher-quality training samples for knowledge template training.
[0020] In a second aspect, embodiments of this application provide a server comprising: one or more processors and a memory; the memory is coupled to the one or more processors and is used to store computer program code, the computer program code including computer instructions, wherein the one or more processors invoke the computer instructions to cause the server to perform the method described in the first aspect and any possible implementation thereof.
[0021] Thirdly, embodiments of this application provide a computer program product containing instructions that, when the computer program product is run on a server, cause the server to perform the method described in the first aspect and any possible implementation thereof.
[0022] Fourthly, embodiments of this application provide a computer-readable storage medium including instructions that, when executed on a server, cause the server to perform the method described in the first aspect and any possible implementation thereof.
[0023] Understandably, the server provided in the second aspect, the computer program product provided in the third aspect, and the computer storage medium provided in the fourth aspect are all used to execute the methods provided in the embodiments of this application. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods, and will not be repeated here.
[0024] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages: 1. Because personalized diagnostic models abandon the practice of directly exchanging model parameters or gradients in traditional federated learning, they use abstract knowledge representation vectors obtained through model inference as the carrier of information exchange, thereby improving the security of patient privacy data of various medical institutions during the training process of medical diagnostic models under the federated learning framework.
[0025] 2. Because the personalized diagnostic model no longer simply relies on a pre-defined knowledge template when generating the soft-label probability distribution, but instead introduces an uncertainty measure based on diagnostic feature representation and fuses it with a standard medical prior distribution using Bayesian methods, the generated soft-label probability distribution can include the confidence information of the pre-defined knowledge template for the current diagnosis. Furthermore, it calibrates the distribution with medical prior knowledge, thus providing the local personalized model with a more reliable guiding signal constrained by uncertainty quantification and medical common sense. This reduces the misleading effect of the local model being misled by overconfident predictions from the pre-defined knowledge template in uncertain or rare cases, thereby improving the diagnostic reliability of the final personalized model.
[0026] 3. Because personalized diagnostic models assess privacy sensitivity based on semantic labels of each dimension of a vector and allocate personalized noise intensity accordingly, this refined privacy budget allocation strategy can apply stronger noise protection to dimensions carrying more sensitive information, while applying weaker noise to dimensions carrying general knowledge to preserve their information value. This reduces the damage of noise to the effectiveness of knowledge vectors while maintaining the same level of privacy protection. Attached Figure Description
[0027] Figure 1 This is a flowchart illustrating a medical diagnostic model training method based on hierarchical knowledge distillation, as described in an embodiment of this application.
[0028] Figure 2 This is another flowchart illustrating a medical diagnostic model training method based on hierarchical knowledge distillation in an embodiment of this application.
[0029] Figure 3 This is a schematic diagram of the physical device structure of a server in an embodiment of this application. Detailed Implementation
[0030] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to and includes any or all possible combinations of one or more of the listed items.
[0031] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.
[0032] This application provides a medical diagnostic model training method and server based on hierarchical knowledge distillation, aiming to improve the security of patient privacy data of various medical institutions during the training process of medical diagnostic models under the federated learning framework.
[0033] Please see Figure 1 This is a flowchart illustrating a medical diagnostic model training method based on hierarchical knowledge distillation in an embodiment of this application.
[0034] S101. The personalized diagnostic model inputs local multimodal medical data into a preset knowledge template to obtain a soft label probability distribution.
[0035] The personalized diagnostic model is deployed locally on each healthcare institution's client side based on a federated learning framework. It directly interacts with the institution's data and not only learns general medical knowledge but also optimizes itself according to the unique distribution and characteristics of local data to adapt to the specific needs of the institution's patient population, such as specific ethnicities, regional diseases, or imaging styles produced by specific medical devices. The federated learning framework is a distributed machine learning technique that includes a global knowledge extractor located on a server and personalized diagnostic models on each healthcare institution's client side. The core function of the global knowledge extractor is not to directly perform diagnosis but to learn and integrate abstract knowledge uploaded from all participants (personalized diagnostic models) to form a universal, cross-institutional general medical knowledge base, existing in the form of knowledge templates. Local multimodal medical data refers to patient data stored within each healthcare institution's client side, containing information from multiple sources. This may include both structured and unstructured data such as computed tomography (CT) images, magnetic resonance imaging (MRI) images, text descriptions in electronic medical records (EMR), and blood test results. The pre-defined knowledge template refers to a model instance carrying general medical knowledge, which is aggregated and updated by the server's global knowledge extractor in the previous iteration and distributed to each client. Essentially, it's a snapshot of the global knowledge extractor at a specific moment and can be viewed as a teacher model. The soft-label probability distribution refers to the unhardened (i.e., not maxed out) complete probability vector generated by the output layer of the personalized diagnosis model when local multimodal medical data is input into the pre-defined knowledge template. Each element in this vector represents the model's confidence that the sample belongs to the corresponding category.
[0036] Specifically, once a training iteration begins, each medical institution's client has two models: its own personalized diagnostic model (student model) and a knowledge template downloaded from the server (teacher model). For each local multimodal medical data sample, the client executes two parallel forward propagation processes. The first process is routine diagnostic task training: the data is input into the personalized diagnostic model, which performs a series of complex calculations and ultimately outputs a specific diagnostic result (e.g., a probability of 0.95 for a lung nodule). This result is used to compare with the true label of the sample to guide the personalized diagnostic model's own learning. The second process involves simultaneously inputting the same medical data into the knowledge template. Because the knowledge template incorporates the common knowledge of all participating institutions, its view of this data—the output soft label probability distribution (e.g., a probability of 0.85 for a lung nodule, 0.10 for inflammation, and 0.05 for others)—is considered a more generalized expert opinion. This soft-label probability distribution contains the teacher model's knowledge of the ambiguity and correlation between different diagnostic categories; for example, it might consider a certain image feature to be somewhat like a nodule and somewhat like inflammation.
[0037] S102. The personalized diagnostic model is optimized by knowledge distillation based on the knowledge consistency loss function between the soft label probability distribution and the local real diagnostic labels.
[0038] In this context, local real-world diagnostic labels refer to definitive diagnostic conclusions given by medical experts based on local medical data, such as benign tumors, malignant tumors, or specific disease stages. This is the ultimate goal that the model needs to learn in supervised learning. The knowledge consistency loss function measures the similarity or consistency between the probability distributions output by two models (in this case, the personalized diagnostic model and the knowledge template). Knowledge distillation optimization refers to a training process in which one model (the student model, i.e., the personalized diagnostic model) learns not only from real-world data labels but also by imitating the output of another model (the teacher model, i.e., the knowledge template), thereby distilling the knowledge contained in the teacher model.
[0039] Specifically, in this step, the personalized diagnostic model calculates a total loss function to guide its parameter updates (i.e., backpropagation and gradient descent). This total loss function typically consists of two weighted parts: the first is a standard supervised learning loss, such as cross-entropy loss, used to calculate the difference between the personalized diagnostic model's predictions and the local true diagnostic labels, driving the model to learn hard knowledge from the local data. The second part is the knowledge consistency loss function used in this step. This function quantifies the gap between student and teacher insights by calculating the relative entropy (KL divergence) between the probability distribution output by the personalized diagnostic model and the soft label probability distribution output by the knowledge template. By adding this term to the total loss function and minimizing it, it's equivalent to adding a constraint during training: not only is the personalized diagnostic model required to make the correct diagnosis, but its diagnostic thought process (i.e., the probability distribution) must also mimic the knowledge template as closely as possible. In this way, the cross-institutional and more generalized general knowledge contained in the knowledge template, such as which diseases are easily confused on images and the potential associations between different symptoms, is transferred and injected into the personalized diagnostic model, achieving knowledge distillation.
[0040] S103. After knowledge distillation optimization, the personalized diagnostic model performs inference tasks on a preset anonymous verification dataset to generate abstract knowledge representation vectors.
[0041] The pre-defined anonymized verification dataset refers to a de-identified public or private dataset that is independent of any medical institution's local private data. It serves as a standard test for all participants, fairly evaluating the generalization ability of each personalized diagnostic model's learned knowledge without exposing any party's private data. The inference task refers to the process where the personalized diagnostic model performs forward propagation computation to generate predictions without updating any parameters or learning. The abstract knowledge representation vector is a digital expression that summarizes and represents the model's core knowledge capabilities. It is not the model's complete parameters, but rather the model's response to the aforementioned standard test.
[0042] Specifically, in S102, the personalized diagnostic models of each medical institution's clients have been optimized using local data and guidance from the previous generation of knowledge templates. Now, the server needs a way to measure the extent and quality of this optimization. To do this, the server broadcasts the same pre-set anonymized validation dataset to all clients. Upon receiving the instruction, each client loads its newly trained personalized diagnostic model and makes a prediction for every sample in this validation dataset. Then, the client concatenates all these predictions in a fixed order to form a single, long vector. This vector is the abstract knowledge representation vector.
[0043] S104. The personalized diagnostic model sends the abstract knowledge representation vector to the server.
[0044] Specifically, the personalized diagnostic model sends the abstract knowledge representation vector of S103 to the server. Traditional federated learning transmits gradients, which are directly related to the batch of training data and model weights, containing a large amount of information and relatively high reversibility, thus posing privacy risks. This invention transmits an abstract knowledge representation vector, which is not directly derived from the processing results of local sensitive patient data. The vector generation process involves multiple abstractions and information loss, significantly increasing the difficulty of reverse inference. This vector comes from the activation values of the hidden layers of the personalized diagnostic model, which is itself the result of highly nonlinear transformation and feature extraction of the original input data, thus deviating from the pixel-level or text-level information of the original data. Furthermore, this vector is generated on a pre-defined, anonymous validation set, not on a local, private, sensitive training set. This means that the information received by the server reflects the generalization ability of the local model on a common task, rather than its specific performance on specific patient data. This severs the direct link between the uploaded information and the local patient data. The vector undergoes PCA dimensionality reduction; Principal Component Analysis (PCA) is a lossy compression method. It retains the principal components with the largest variance in the data while discarding minor components. This process is irreversible (it is impossible to perfectly restore the original activation value from the principal component), which further erases detailed information and plays a role similar to information confusion and desensitization.
[0045] In some embodiments, after the personalized diagnostic model sends the abstract knowledge representation vector to the server, the server, possessing the real labels of a pre-defined anonymous validation dataset, can compare the answer sheets (i.e., abstract knowledge representation vectors) uploaded by each client's personalized diagnostic model with the standard answers, thereby calculating a performance score for each client's personalized diagnostic model. For example, if client A's personalized diagnostic model achieves 95% accuracy on the validation set, while client B's only achieves 80%, then client A's personalized diagnostic model performs better. Next, the server calculates the fusion weights for each client's personalized diagnostic model based on these performance scores. For example, the performance scores are normalized (e.g., using the Softmax function) so that the sum of all client weights is 1. This results in client A, with better performance, receiving a much higher weight than client B. Then, the server calculates the weighted average of the knowledge vectors uploaded by all clients, obtaining an aggregated knowledge vector that incorporates the strengths of all clients. Finally, a pre-defined knowledge template (as a student) is trained on the pre-defined anonymous validation set, its goal no longer being to match the real labels, but rather to minimize the difference between its output and the aggregated knowledge vector (e.g., using KL divergence as the loss function). Through this process, the performance-weighted collective wisdom of all clients is distilled and solidified into a new generation of knowledge templates.
[0046] In the above embodiments, the personalized diagnostic model abandons the practice of directly exchanging model parameters or gradients in traditional federated learning. Instead, it uses abstract knowledge representation vectors obtained through model inference as the carrier of information exchange, thereby improving the security of patient privacy data of various medical institutions during the training process of medical diagnostic models under the federated learning framework.
[0047] However, on the client side, the quality of knowledge distillation is highly dependent on the quality of the soft labels output by the global knowledge template. A standard teacher model may be overconfident and struggle to express its uncertainty when facing difficult or rare cases. If personalized models absorb these labels indiscriminately, it may lead to low learning efficiency or even misguidance. On the server side, the above embodiments allocate fusion weights based on client performance, which may inadvertently suppress the contributions of clients with rare but highly diagnostically valuable cases, as their models may not excel in general metrics. This can cause the global model to become mediocre and miss opportunities to learn peripheral knowledge. This application further proposes the following more refined and intelligent embodiments.
[0048] Please see Figure 2 This is another flowchart illustrating a medical diagnostic model training method based on hierarchical knowledge distillation in an embodiment of this application.
[0049] S201. The personalized diagnostic model extracts the original feature vector of the penultimate layer from local multimodal medical data as the diagnostic feature representation.
[0050] The penultimate layer refers to the layer in the deep learning model before the classification layer that outputs the final prediction result. It is usually a fully connected layer, and its output is considered to be a highly condensed feature obtained after multiple layers of data abstraction. The original feature vector refers to the direct output value of this penultimate layer without any subsequent processing (such as activation functions or normalization), and it contains rich semantic information.
[0051] Specifically, this step is the feature extraction stage before the personalized diagnostic model performs knowledge distillation locally. The personalized diagnostic model performs a standard forward propagation, extracting and abstracting features level by level as local multimodal medical data flows through each layer of the model. This step chooses to extract the output of the second-to-last layer because the feature vector of this layer has both high semantic generalization and retains more original information than the final output probability distribution, without losing details due to compression by functions such as Softmax. This vector can be seen as the essence of the personalized diagnostic model's understanding of the input data, serving as a unified diagnostic feature representation.
[0052] S202. The personalized diagnostic model calculates the variance distribution of feature activation values based on diagnostic feature representation and uses the variance distribution as a measure of diagnostic uncertainty.
[0053] Here, the variance distribution of feature activation values refers to the discreteness of the activation levels of each dimension in the diagnostic feature representation vector extracted from S202. The diagnostic uncertainty metric is a quantified numerical value used to represent the degree of certainty or confidence level of the personalized diagnostic model regarding the current diagnostic result. In this invention, this metric is directly derived from or generated based on the variance distribution of feature activation values.
[0054] Specifically, this step aims to endow personalized diagnostic models with a self-awareness capability, that is, to determine whether they are confused about the current input medical data. The basic principle is that when a model can make a highly certain judgment about an input sample, its internal diagnostic feature representation often exhibits a low-variance, concentrated activation pattern; that is, a few key feature dimensions are significantly activated, while other dimensions are suppressed. Conversely, if the input sample is ambiguous, atypical, or of a type the model has not fully learned, the personalized diagnostic model will feel uncertain. In this case, the activation values of its diagnostic feature representation will be more scattered, lacking a clear focus, thus leading to higher variance. Therefore, by calculating this variance, a measure of diagnostic uncertainty can be obtained.
[0055] S203. The personalized diagnostic model inputs the diagnostic feature representation into the preset knowledge template to obtain the initial output probability distribution of the knowledge template.
[0056] Specifically, the diagnostic feature representation extracted from the personalized diagnostic model is used as input to the pre-defined knowledge template. This approach has two advantages: First, it unifies the language used by the teacher and student models to process information, allowing knowledge transfer to occur in a higher-order semantic space rather than the original pixel or text space, which improves knowledge alignment and transfer efficiency. Second, it reuses the feature extraction capabilities of the local model, reducing redundant computation. After receiving this feature vector, the knowledge template outputs an initial probability distribution through its own diagnostic head (usually one or two fully connected layers plus a softmax layer). This distribution represents the interpretation of the feature from a global perspective.
[0057] S204. The personalized diagnostic model modulates the initial output probability distribution with confidence weighting based on the diagnostic uncertainty metric, generating a probability distribution for uncertainty perception.
[0058] Specifically, if the personalized diagnostic model is highly uncertain about the current sample (i.e., the uncertainty index calculated by S202 is high), then directly using the potentially overconfident initial probability distribution output by the knowledge template to guide the student model would be inaccurate. This step uses a modulation function to soften this initial probability distribution using the uncertainty index. The higher the uncertainty, the greater the softening, resulting in a decrease in the probability value of the largest class in the probability distribution, while the probability values of other classes increase accordingly.
[0059] In some embodiments, confidence-weighted modulation can be implemented in several ways: Optionally, a modulation function f(u) can be designed, where u is an uncertainty metric, and the value of f(u) decreases as u increases (e.g., f(u) = exp(-β*u), where β is a hyperparameter). Then, the initial output probability distribution P_initial of the knowledge template is linearly combined with a uniform distribution U: P_modulated = f(u)*P_initial + (1-f(u))*U. When the uncertainty u is high, f(u) approaches 0, and the modulated distribution P_modulated tends to be a uniform distribution U. Optionally, the uncertainty metric u can also be transformed into a temperature parameter T = g(u), where g(u) is an increasing function as u increases (e.g., g(u) = 1 + α*u). Then, the logits vector before the knowledge template output layer is divided by this dynamic temperature T, and then Softmax is performed to obtain the modulated probability distribution. The higher the uncertainty, the higher the temperature T, and the smoother the resulting probability distribution.
[0060] S205. The personalized diagnostic model performs Bayesian fusion of the probability distribution with the preset standard medical diagnostic prior distribution to obtain the soft-label probability distribution.
[0061] Specifically, by introducing authoritative medical knowledge from external sources, the probability distribution generated by the personalized diagnostic model is calibrated and constrained to prevent predictions that violate common medical sense. For example, in certain populations or under specific conditions, the incidence of certain diseases is extremely low, and this information can be reflected in the prior distribution. This step treats the probability distribution of uncertainty perception generated in step S204 as the likelihood and the preset medical prior distribution as the prior, fusing the two using Bayes' theorem. The final soft-label probability distribution after fusion not only includes patterns learned from the data (from knowledge templates) and considers the model's own confidence level, but also conforms to generally accepted medical principles.
[0062] S206. The personalized diagnostic model calculates the soft label weight for each diagnostic category based on the soft label probability distribution. The soft label weight reflects the confidence of global knowledge in each category.
[0063] Specifically, the soft-label probability distribution is a vector, where each dimension corresponds to a diagnostic category, and the value of each dimension represents the probability of that category. This probability value itself can be directly considered as the soft-label weight for that category. For example, if the soft-label distribution is {pneumonia: 0.6, lung nodules: 0.3, normal: 0.1}, then the soft-label weight for pneumonia is 0.6, for lung nodules it is 0.3, and for normal it is 0.1. These weights imply the bias of the teacher model, meaning it considers pneumonia the most likely diagnosis, while lung nodules also have a certain probability, and normal is less likely.
[0064] S207. The personalized diagnostic model combines soft label weights with local real diagnostic labels to construct a weighted real label vector.
[0065] Specifically, traditional knowledge distillation typically uses two separate loss terms: a cross-entropy loss for learning hard labels and a KL divergence for mimicking soft labels. This step combines these two. A weighted true label vector is generated by combining the local true diagnostic labels (e.g., [0, 1, 0]) with the soft label weights calculated by S206 (e.g., {w1, w2, w3}). A simple way to combine them is that the weight at the position where the true label is 1 is determined by the soft label weight, while the weights at other positions are either retained or proportionally allocated. For example, the final weighted label vector could be [α*w1, w2, α*w3], where the weight of the true class w2 is retained, while the weights of the other incorrect classes w1 and w3 are scaled by a small coefficient α. This new label vector tells the personalized diagnostic model: "The correct answer is class 2, you should focus on learning it, and its confidence in global knowledge is w2. At the same time, you should also pay a little attention to classes 1 and 3, because global knowledge considers them to have a slight probability." S208, the personalized diagnostic model uses the weighted cross-entropy loss between the current output probability distribution and the weighted true label vector as the main distillation loss.
[0066] Specifically, after step S207, a loss function is needed to measure the difference between the current output of the personalized diagnostic model and the weighted true label vector. This step uses weighted cross-entropy loss to achieve this goal. Unlike standard cross-entropy loss, weighted cross-entropy loss multiplies the log-likelihood loss for each category by a corresponding weight. In this invention, this weight can be directly derived from the weighted true label vector itself. By minimizing this weighted cross-entropy loss, the personalized diagnostic model is guided to approximate a complex target that includes both true answers and teacher knowledge biases, thereby achieving efficient knowledge transfer. This loss function becomes the main driving force for updating the parameters of the personalized diagnostic model.
[0067] S209. The personalized diagnostic model calculates the loss gradient based on weighted cross-entropy loss and adaptively scales the loss gradient by combining a diagnostic uncertainty metric.
[0068] Specifically, after calculating the loss gradient, the traditional approach is to directly use this gradient to update the personalized diagnostic model. However, this step introduces an additional modulation step: utilizing the diagnostic uncertainty metric calculated in step S202. The core idea is that if the personalized diagnostic model is highly uncertain about the current sample (high uncertainty metric), it indicates that the current sample may be a difficult or noisy sample, and the calculated gradient may be unstable or misleading. Therefore, the magnitude of this gradient should be reduced (i.e., scaling) to allow the model to learn more cautiously with a smaller step size. Conversely, if the personalized diagnostic model is highly certain about the current sample (low uncertainty metric), it indicates that it is a high-quality sample familiar to the model, and its gradient is reliable. In this case, the learning step size can be maintained or even slightly increased. This adaptive scaling mechanism allows the personalized diagnostic model to dynamically adjust its learning rate when facing different samples, improving the stability and efficiency of training.
[0069] S210. The personalized diagnostic model uses the adaptively scaled gradient to backpropagate and update the parameters of the personalized diagnostic model, completing a single round of knowledge distillation optimization.
[0070] Specifically, after acquiring the intelligently scaled gradients, the personalized diagnostic model invokes the optimizer (such as Adam, SGD, etc.) within its deep learning framework to perform parameter updates. The optimizer receives this scaled gradient and, based on its own algorithm (e.g., Adam also considers the first and second moments of the gradient), calculates the specific update values applied to each model parameter. Once this update process is complete, the parameters of the personalized diagnostic model are optimized, not only more closely fitting the local true labels but also adaptively incorporating wisdom from pre-defined knowledge templates. After completing this round of optimization on all local training data, the personalized diagnostic model is ready to move to the next stage: generating and uploading the knowledge it has learned.
[0071] S211. After knowledge distillation optimization, the personalized diagnostic model performs forward reasoning on each sample in the preset anonymous verification dataset.
[0072] Specifically, after completing a single round of knowledge distillation optimization locally (step S210), the personalized diagnostic model initiates preparations for knowledge upload. The personalized diagnostic model performs forward inference on each sample in the preset anonymous verification dataset.
[0073] S212. The personalized diagnostic model extracts the feature activation values of each hidden layer during the inference process to form a multi-layer feature activation matrix.
[0074] Specifically, during the inference process, the personalized diagnostic model not only aims to obtain the final prediction, but also records the feature activation values generated in each hidden layer as the data flows through the model, and organizes these activation values from different layers and different samples into a multi-layer feature activation matrix.
[0075] S213. The personalized diagnostic model sorts the feature importance of the multi-layer feature activation matrix by layer and selects the top preset number of features with the highest activation intensity in each layer as the key feature subset.
[0076] Specifically, in order to filter out the most important information from a massive number of activation values, the personalized diagnostic model sorts the feature importance of each layer of the multi-layer feature activation matrix, for example, based on the average strength or variance of the activation values, and then selects the top preset number of features with the highest activation strength in each layer as the key feature subset.
[0077] S214. The personalized diagnostic model concatenates key feature subsets from each layer across layers to form a high-dimensional comprehensive feature vector.
[0078] Specifically, the personalized diagnostic model will select key feature subsets from layers of different depths (shallow, medium and deep) and splice them across layers to form a high-dimensional comprehensive feature vector that contains both low-level details and high-level semantics.
[0079] S215. The personalized diagnostic model uses principal component analysis to reduce the dimensionality of high-dimensional comprehensive feature vectors and extracts principal components with cumulative contribution rates reaching a preset threshold as abstract knowledge representation vectors.
[0080] Specifically, although this high-dimensional vector is rich in information, it is too high in dimensionality and has redundancy. Therefore, the personalized diagnostic model uses dimensionality reduction techniques such as principal component analysis (PCA) to process it, retaining only the main components that can explain most of the variance of the data (i.e., the cumulative contribution rate reaches a preset threshold, such as 95%), thus obtaining a compact, low-dimensional abstract knowledge representation vector.
[0081] S216. The personalized diagnostic model assigns semantic labels to each dimension of the abstract knowledge representation vector based on the clustering analysis results of the abstract knowledge representation vector on the validation dataset.
[0082] Specifically, to give this abstract numerical vector medical significance, the personalized diagnostic model performs cluster analysis (such as K-Means) on it, and combines the analysis of the clustering results (such as observing which types of validation samples cluster together) to assign a semantic label to each dimension of the abstract knowledge representation vector, such as texture feature dimension, lesion contour feature dimension, etc., so that this vector is transformed from a purely mathematical entity into an interpretable knowledge carrier.
[0083] S217. The personalized diagnostic model calculates the privacy sensitivity score of each dimension of the abstract knowledge representation vector corresponding to the medical feature type based on semantic tags.
[0084] S218. The personalized diagnostic model assigns personalized noise intensity parameters to each dimension of the abstract knowledge representation vector based on privacy sensitivity scores and preset privacy budgets.
[0085] S219, Personalized diagnostic model generates dimension-aligned Laplacian noise vectors based on noise intensity parameters.
[0086] S220, the personalized diagnostic model adds the abstract knowledge representation vector to the Laplace noise vector element by element to generate a privacy-preserving knowledge representation vector.
[0087] S221. When the signal-to-noise ratio between the privacy-preserving knowledge representation vector and the abstract knowledge representation vector is greater than a preset threshold, the personalized diagnostic model encapsulates the privacy-preserving knowledge representation vector along with the corresponding semantic label information into a knowledge upload data packet and sends it to the server.
[0088] Specifically, after generating the abstract knowledge representation vector with semantic labels in steps S217-S221, the personalized diagnostic model does not add noise in a one-size-fits-all manner. Instead, it first uses the semantic labels to calculate a privacy sensitivity score for each dimension. For example, the dimension related to the patient's age group will receive a higher sensitivity score than the dimension related to lesion texture. Next, based on the total privacy budget issued by the server and these personalized sensitivity scores, the personalized diagnostic model calculates a customized noise intensity parameter for each dimension; the higher the sensitivity of the dimension, the greater the noise intensity is assigned. Then, the personalized diagnostic model generates a Laplace noise vector with the same dimensions as the representation vector, but each element is sampled from a Laplace distribution of different scales specified for the corresponding dimension. After adding this noise vector element-wise to the original representation vector, the personalized diagnostic model performs a quality check, calculating the signal-to-noise ratio (SNR) of the noisy vector. Only when the SNR is higher than a preset threshold, ensuring that the effective information of the knowledge is not completely submerged by noise, is the noisy privacy-preserving knowledge representation vector considered qualified. Finally, the qualified vector, along with its corresponding semantic tag information, is packaged into a data packet and uploaded to the server's global knowledge extractor via a secure channel.
[0089] In some embodiments, the server-side global knowledge extractor maintains a knowledge probability distribution model for all historical knowledge. When the abstract knowledge representation vectors uploaded by the personalized diagnostic models of each client arrive in a new round, the server first calculates the negative log-likelihood value of each vector using the knowledge probability distribution model. The higher this value, the less the vector conforms to the distribution of historical knowledge, i.e., the higher its novelty, thus obtaining a knowledge novelty score. Then, the server weighted and fused the novelty score and the performance score of S104 to obtain a comprehensive evaluation score. This comprehensive score is used as a dynamic fusion weight to weight and aggregate the abstract knowledge representation vectors of all personalized diagnostic models to form a target knowledge center vector, which represents the most valuable knowledge direction in this round. Next, the server does not directly use this center vector to modify the parameters of the global model, but instead inputs it into a preset knowledge generator network. This network contains an encoder-decoder structure, which, guided by the target knowledge center vector, finds the corresponding knowledge anchor point in the latent space, samples around it, and finally decodes and generates a large amount of diverse multimodal pseudo-feature data that is consistent with the semantics of the target knowledge. Finally, the server uses these high-quality pseudo-feature data as training samples and trains its internal global knowledge extractor using standard supervised learning methods to obtain updated knowledge templates.
[0090] In the above embodiments, on the client side, to address the issue of limited knowledge quality due to overconfidence in knowledge template output, this embodiment introduces an uncertainty-aware knowledge distillation mechanism. This mechanism first calculates the uncertainty of the current diagnosis by quantifying the variance of the model's feature activation values, and then uses this as a basis to perform confidence-weighted modulation on the output soft labels, further integrating medical prior knowledge for calibration, thereby generating higher-quality teacher knowledge. Simultaneously, to further enhance the security of patient privacy data from various medical institutions during the training of the medical diagnostic model, this embodiment proposes a semantic-based privacy protection strategy. This strategy performs cluster analysis on each dimension of the abstract knowledge representation vector and assigns it medical semantic labels, then calculates the privacy sensitivity of each dimension, ultimately applying personalized noise of different intensities to information with different sensitivities, maximizing knowledge usability while ensuring privacy security. On the server side, to address the issue of one-sided knowledge value assessment, this embodiment constructs a comprehensive value assessment system based on novelty and performance. Instead of relying solely on client performance, it introduces a knowledge novelty score to reward clients that provide rare and unique knowledge, enabling the global model to learn from a broader range of dimensions. Furthermore, this embodiment introduces a generative model update paradigm. Instead of directly modifying model parameters using aggregated vectors, the server uses them as knowledge targets to drive a dedicated knowledge generator network to obtain pseudo-feature data carrying collective intelligence. This pseudo-data is then used for supervised training of the global knowledge template. Through the aforementioned collaborative optimization on both the client and server sides, this embodiment improves the robustness, accuracy, and security of the federated learning framework.
[0091] The above describes a medical diagnostic model training method based on hierarchical knowledge distillation in the embodiments of this application. The exemplary server 300 provided in the embodiments of this application is described below.
[0092] Figure 3This is a schematic diagram of an exemplary hardware structure of a server 300 provided in an embodiment of this application. In some embodiments, the server 300 is a computer device. The computer device includes a processor, a memory, and a network interface connected via a system bus. The processor of the computer device provides computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database of the computer device is used to store data. The network interface of the computer device is used to communicate with other external terminals or servers via a network connection. In some embodiments, the network interface can be a wired network interface; in some embodiments, the network interface can also be a wireless network interface. When the computer program is executed by the processor, it implements a medical diagnostic model training method based on hierarchical knowledge distillation according to an embodiment of this application.
[0093] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0094] In some embodiments of this application, a computer-readable storage medium is also provided, including instructions that, when executed on the server 300, cause the server 300 to execute a medical diagnostic model training method based on hierarchical knowledge distillation according to an embodiment of this application.
[0095] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
[0096] As used in the above embodiments, depending on the context, the term "when..." can be interpreted as meaning "if...", "after...", "in response to determining...", or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if (the stated condition or event) is interpreted as meaning "if determining...", "in response to determining...", "when (the stated condition or event) is detected", or "in response to detecting (the stated condition or event)".
[0097] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive), etc.
[0098] 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. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A method for training a medical diagnostic model based on hierarchical knowledge distillation, characterized in that, Applied to servers and personalized diagnostic models, the method includes: The personalized diagnostic model inputs local multimodal medical data into a preset knowledge template to obtain a soft label probability distribution; The personalized diagnostic model performs knowledge distillation optimization based on the knowledge consistency loss function between the soft label probability distribution and the local real diagnostic label. The knowledge consistency loss function completes knowledge transfer by minimizing the relative entropy between the output probability distribution of the personalized diagnostic model and the soft label probability distribution. After being optimized by knowledge distillation, the personalized diagnostic model performs an inference task on a preset anonymous verification dataset to generate an abstract knowledge representation vector. The abstract knowledge representation vector is obtained by extracting the feature activation values of the intermediate hidden layer of the personalized diagnostic model and performing principal component analysis for dimensionality reduction. The personalized diagnostic model sends the abstract knowledge representation vector to the server.
2. The method according to claim 1, characterized in that, The personalized diagnostic model inputs local multimodal medical data into a preset knowledge template to obtain the soft-label probability distribution, specifically including: The personalized diagnostic model extracts the original feature vector of the penultimate layer from the local multimodal medical data as the diagnostic feature representation; The personalized diagnostic model calculates the variance distribution of feature activation values based on the diagnostic feature representation, and uses the variance distribution as a measure of diagnostic uncertainty. The personalized diagnostic model inputs the diagnostic feature representation into the preset knowledge template to obtain the initial output probability distribution of the knowledge template; The personalized diagnostic model modulates the initial output probability distribution with confidence weighting based on the diagnostic uncertainty metric to generate a probability distribution with uncertainty perception. The personalized diagnostic model performs Bayesian fusion of the probability distribution with the preset standard medical diagnostic prior distribution to obtain the soft-label probability distribution.
3. The method according to claim 2, characterized in that, The personalized diagnostic model performs knowledge distillation optimization based on the knowledge consistency loss function between the soft label probability distribution and the local real diagnostic labels, specifically including: The personalized diagnostic model calculates the soft label weight for each diagnostic category based on the soft label probability distribution, and the soft label weight reflects the confidence of global knowledge for each category; The personalized diagnostic model combines the soft label weights with the local real diagnostic labels to construct a weighted real label vector, where each element of the weighted real label vector is the product of the real label value of the corresponding category and the corresponding soft label weight. The personalized diagnostic model uses the weighted cross-entropy loss between the current output probability distribution and the weighted true label vector as the main distillation loss. The personalized diagnostic model calculates the loss gradient based on the weighted cross-entropy loss and adaptively scales the loss gradient in conjunction with the diagnostic uncertainty metric. The personalized diagnostic model uses the adaptively scaled gradient to backpropagate and update the parameters of the personalized diagnostic model, completing a single round of knowledge distillation optimization.
4. The method according to claim 1, characterized in that, The personalized diagnostic model, after knowledge distillation optimization, performs an inference task on a pre-set anonymous verification dataset to generate abstract knowledge representation vectors. The specific steps include: After being optimized by knowledge distillation, the personalized diagnostic model performs forward reasoning on each sample in the preset anonymous verification dataset. The personalized diagnostic model extracts the feature activation values of each hidden layer during the inference process, forming a multi-layer feature activation matrix. The personalized diagnostic model sorts the feature importance of the multi-layer feature activation matrix by layer and selects the top preset number of features with the highest activation intensity in each layer as the key feature subset. The personalized diagnostic model concatenates the key feature subsets of each layer across layers to form a high-dimensional comprehensive feature vector. The personalized diagnostic model performs dimensionality reduction on the high-dimensional comprehensive feature vector through principal component analysis, and extracts the principal components whose cumulative contribution rate reaches a preset threshold as the abstract knowledge representation vector. The personalized diagnostic model assigns a semantic label to each dimension of the abstract knowledge representation vector based on the clustering analysis results of the abstract knowledge representation vector on the validation dataset. The semantic label identifies the medical feature type corresponding to the respective dimension.
5. The method according to claim 4, characterized in that, After the step of assigning semantic labels to each dimension of the abstract knowledge representation vector based on the clustering analysis results of the abstract knowledge representation vector on the validation dataset by the personalized diagnostic model, the method further includes: The personalized diagnostic model calculates the privacy sensitivity score of each dimension of the abstract knowledge representation vector corresponding to the medical feature type based on the semantic tags; The personalized diagnostic model assigns personalized noise intensity parameters to each dimension of the abstract knowledge representation vector based on the privacy sensitivity score and a preset privacy budget. The personalized diagnostic model generates a dimension-aligned Laplace noise vector based on the noise intensity parameter, wherein each element of the Laplace noise vector is sampled from the Laplace distribution of the corresponding dimension of the element; The personalized diagnostic model adds the abstract knowledge representation vector to the Laplace noise vector element by element to generate a privacy-preserving knowledge representation vector. When the signal-to-noise ratio between the privacy-preserving knowledge representation vector and the abstract knowledge representation vector is greater than a preset threshold, the personalized diagnostic model encapsulates the privacy-preserving knowledge representation vector along with the corresponding semantic tag information into a knowledge upload data packet and sends it to the server.
6. The method according to claim 1, characterized in that, After the step of the personalized diagnostic model sending the abstract knowledge representation vector to the server, the method further includes: The server constructs a multidimensional Gaussian mixture model as a knowledge probability distribution model based on the abstract knowledge representation vectors of each medical institution's clients aggregated in history. The multidimensional Gaussian mixture model learns the latent distribution structure of the knowledge vectors through the expectation-maximization algorithm. The server uses the negative log-likelihood value of the abstract knowledge representation vector of each newly received medical institution client under the knowledge probability distribution model as the knowledge novelty score. The server calculates a performance score based on the classification accuracy of the abstract knowledge representation vector on the preset anonymous verification dataset. The server weights and fuses the knowledge novelty score and the performance score based on a preset novelty weight coefficient to obtain a comprehensive evaluation score; The server assigns dynamic fusion weights to the abstract knowledge representation vectors of each medical institution based on the comprehensive evaluation score, and generates a target knowledge center vector through weighted aggregation. The server inputs the target knowledge center vector into a preset knowledge generator network to obtain pseudo-feature data that is semantically consistent with the target knowledge center vector. The server performs supervised training based on the pseudo-feature data to obtain the knowledge template with updated parameter weights.
7. The method according to claim 6, characterized in that, The step of the server inputting the target knowledge center vector into a preset knowledge generator network to obtain pseudo-feature data that is semantically consistent with the target knowledge center vector specifically includes: The server constructs a knowledge generator network comprising an encoder, a latent space mapper, and a decoder. The latent space mapper is used to map the target knowledge center vector to a high-dimensional feature latent space. The server encodes historical real medical feature data into latent representations using the encoder, and performs similarity matching with the target knowledge center vector in the latent space. The server determines the coordinates of knowledge anchor points in the latent space based on the similarity matching results, and the coordinates of the knowledge anchor points represent the feature patterns that can generate the target knowledge center vector. The server performs Gaussian distribution sampling within the preset range of the knowledge anchor point coordinates to generate diverse potential vector sampling points. The server decodes the latent vector sampling points into multimodal pseudo-feature data using the decoder.
8. A server, characterized in that, The server includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code including computer instructions, and the one or more processors call the computer instructions to cause the server to perform the method as described in any one of claims 1-7.
9. A computer program product containing instructions, characterized in that, When the computer program product is run on the server, the server performs the method as described in any one of claims 1-7.
10. A computer-readable storage medium comprising instructions, characterized in that, When the instructions are executed on the server, the server causes the server to perform the method as described in any one of claims 1-7.