Condition adapter-based cross-central-domain adaptive reasoning method and system, storage medium and electronic equipment

By introducing a conditional adapter into the deep neural network model, the domain offset problem during cross-center deployment is solved, achieving cross-domain performance improvement and flexible model adaptation, thus meeting the compliance requirements of medical AI systems.

CN121436087APending Publication Date: 2026-01-30PROTEINT (TIANJIN) BIOTECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511483617.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-17
Publication Date
2026-01-30

AI Technical Summary

Technical Problem

In medical image analysis and pathology identification tasks, the performance of deep neural network models degrades due to domain offset when deployed across centers. Existing solutions are costly, complex, and difficult to converge, and lack adaptive mechanisms that support version management and security control.

Method used

A cross-center adaptive inference method based on conditional adapters is adopted. By constructing a conditional adapter module for each target medical center, the adapter parameters are trained using unlabeled or small-label data while freezing the backbone model parameters, the model behavior is dynamically adjusted, and the adapter is selected for feature calibration through the routing module.

Benefits of technology

It achieves improved cross-domain performance without retraining the backbone model, supports flexible deployment and online adaptation, meets the compliance requirements of medical AI systems, and ensures model stability and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121436087A_ABST
    Figure CN121436087A_ABST
Patent Text Reader

Abstract

The invention provides a cross-central-domain adaptive reasoning method and system based on a condition adapter, a storage medium and electronic equipment, and the method comprises the steps: constructing a lightweight condition adapter module for each medical center on the basis of a shared trunk model of pre-training and freezing parameters; training adapter parameters on the premise that a backbone network is not updated by using non-label data or a small amount of label data of a target domain; in the reasoning stage, a matched adapter is selected from an adapter library according to a source identifier or a feature fingerprint of input data and is embedded into a trunk model, so that dynamic calibration of intermediate features is realized. The method supports that the trunk model is unchanged, only the deployment mode of the adapter is updated, parameter increment is small, reasoning is flexible, change tracing and rollback can be achieved through a version control mechanism, and the method is suitable for safe and controllable deployment of multi-center AI systems such as medical image analysis and pathological recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the application of artificial intelligence technology in medical data analysis, and particularly to an adaptive model reasoning method for cross-medical center scenarios. It further relates to a cross-center adaptive reasoning method, system, storage medium, and electronic device based on condition adapters. Background Technology

[0002] In tasks such as medical image analysis and pathological identification, deep neural network models are typically trained at one center (source domain) and then deployed to other hospitals or equipment (target domain). Due to factors such as imaging equipment models, scanning protocols, and differences in patient populations, the statistical distribution of data from different centers differs, a phenomenon known as "domain shift." Domain Shift This leads to a decrease in model performance.

[0003] Existing solutions include full model fine-tuning and domain alignment methods. The former requires a large amount of labeled data and retraining the backbone network, which is costly and violates data privacy principles; the latter, such as adversarial training, MMD Alignment and other methods have complex structures, are difficult to converge, and may still involve trunk updates.

[0004] Furthermore, medical AI systems require that model changes be traceable, rollbackable, and controllable. Frequent retraining of the backbone model is detrimental to regulatory compliance. Therefore, there is an urgent need for a lightweight, secure, and backbone-retraining-free cross-domain adaptive inference mechanism. Summary of the Invention

[0005] Technical Solution: This invention aims to address the technical problems in existing technologies, such as decreased prediction accuracy due to domain offset when medical AI models are deployed across different centers; low efficiency due to reliance on labeled data or the need to retrain the backbone model in traditional transfer learning methods; lack of secure and controllable adaptive mechanisms supporting version management and audit trails; and inability to dynamically adjust model behavior based on the source of input data during the inference phase. Specifically, this invention proposes a cross-center domain adaptive inference method based on conditional adapters. The method's specific steps include: providing a pre-trained and frozen shared backbone model; A conditional adapter module is constructed for each target medical center, and the conditional adapter parameters are trained using unlabeled or a small amount of labeled data from that center, while the backbone model is frozen, in order to minimize the feature distribution difference between it and the source domain. Store the condition adapter parameters and their identification information corresponding to each target center in the adapter library; During the model inference phase, based on the domain information of the data to be processed, a matching condition adapter is selected from the adapter library through the routing module; The selected conditional adapter is integrated into a predetermined network layer of the shared backbone model to transform intermediate features and output a prediction result adapted to the target domain.

[0006] As an improvement, the shared backbone model is a convolutional neural network, Vision Transformer, or U-Net structure; the conditional adapter is inserted between residual blocks of the network, before the attention module, or after the fully connected layer to adjust feature channels or attention weights.

[0007] As an improvement, the condition adapter module is implemented using parameter fine-tuning technology, including one or a combination of low-rank adaptation (LoRA), prefix tuning, bottleneck adapter, or only bias term tuning.

[0008] As an improvement, the condition adapter module receives two inputs: one is intermediate features from the shared backbone network. , d One is the dimension of the input features, and the other is the condition vector generated by the routing module. k The dimension of the condition vector; internally, the adapter uses a small fully connected network to... c Mapped to scaling factor γ and offset β Perform an affine transformation on the input features: h′= γ (c)⊙h+ β (c) Output adapted features h′ The adapter uses a bottleneck structure, first reducing the dimensionality to 16 Regeneration or LoRA The low-rank matrix form makes the number of parameters much smaller than that of the main model.

[0009] As an improvement, the specific method for selecting an adapter based on the domain information of the data to be processed includes: (1) when the input data contains a clear source identifier, directly retrieve the corresponding adapter from the adapter library based on the identifier; (2) when there is no clear identifier, calculate the feature fingerprint of the input data and perform similarity matching with the feature template of the known domain in the adapter library to select the optimal adapter; wherein the clear identifier includes field information in the input data that can directly indicate the source center, such as the 'Institution Name' or device number field in the DICOM metadata; the optimal adapter is defined as the adapter whose feature template has the highest similarity to the feature fingerprint of the input data, using cosine similarity or KL The divergence minimization index is used as the selection criterion.

[0010] As an improvement, it also includes the step of updating the target domain condition adapter online during the inference phase. The steps are as follows: (1) Utilize the unlabeled data that flows into the target domain in real time to optimize only the parameters of the corresponding adapter; (2) The optimization objectives include minimizing the difference in feature distribution between the source domain and the target domain, while maintaining the consistency of the source domain prediction; (3) Save the updated adapter version to the adapter library and record the version change log.

[0011] As a specific embodiment of the present invention, the present invention also provides a cross-center domain adaptive inference system based on condition adapters, including a backbone model module, a condition adapter library module, a routing module, a version control and auditing module, and an interface module; wherein the backbone model module is a pre-trained neural network with deployed frozen parameters; The condition adapter library module is connected to the backbone model module, centrally stores the parameters of each central adapter, and supports adding, deleting, querying and modifying. The routing module, connected to the conditional adapter library module, is used to select the matching adapter based on the domain information of the input data, thus performing intelligent selection. The version control and auditing module is connected to the main model module, the condition adapter library module, and the routing module, respectively. It is used to record the update, usage, and rollback operations of the adapters and supports model change traceability. The interface module connects to the backbone model module and the routing module. It receives input data and passes it to the routing module for domain identification and adapter selection, then outputs the results inferred by the backbone model module. The interface module provides... DICOM Receive and REST API An interface is provided to enable standardized input and output for medical imaging systems.

[0012] As an improvement, the routing module includes a metadata parsing unit and a feature comparison unit. The metadata parsing unit includes hospital name, equipment model, and scanning protocol, which are used to extract structured information from the input data and quickly determine the predicted domain source. The feature comparison unit includes intensity histogram and texture descriptor, which are used to extract statistical features of the input sample and perform similarity calculation with templates in the adapter library to determine the best matching adapter. The version control and auditing module includes a security log database and a version management interface metadata parsing unit. The security log database is used to record the loading, updating, usage, and rollback events of each adapter. The version management interface is used to interact with the system deployment end to realize rapid switching of model versions and audit traceability.

[0013] As another specific embodiment of the present invention, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, causes the processor to perform the steps of the cross-centrality adaptive inference method as described in any of the preceding claims.

[0014] As another specific embodiment of the present invention, the present invention also provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and when the program is executed by the processor, it implements the method described in any of the above-mentioned embodiments.

[0015] Beneficial Effects: The technical solution proposed in this invention is an adaptive model inference method for cross-medical center scenarios. Specifically, by introducing a conditional adapter mechanism, dynamic feature calibration of medical data from different sources is achieved while keeping the backbone model parameters frozen, belonging to the technical field of deep learning and medical information fusion.

[0016] Meanwhile, it has the following advantages compared with existing technologies: cross-domain performance improvement can be achieved by adding only a few parameters, with high parameter efficiency; the backbone model is frozen throughout the process to ensure model stability; it supports on-demand loading of adapters for flexible deployment; it can fine-tune adapters online with unsupervised data to adapt to new environments; and the version control mechanism meets the compliance requirements of medical AI systems. Attached Figure Description

[0017] Figure 1 This diagram illustrates the differences in data distribution among different medical centers, serving to explain the phenomenon of domain offset.

[0018] Figure 2 This is a schematic diagram of the structure of the condition adapter module of the present invention.

[0019] Figure 3 This is a schematic diagram of the overall framework of the training phase of this invention.

[0020] Figure 4 This is a schematic diagram of the workflow during the reasoning stage of this invention.

[0021] Figure 5 This is a schematic diagram of the overall architecture of the system of the present invention. Detailed Implementation

[0022] The technical solutions in the embodiments of the present invention will be clearly and completely described below, so that those skilled in the art can better understand the advantages and features of the present invention, thereby making a clearer definition of the scope of protection of the present invention. The embodiments described in this invention are only some embodiments of the present invention, not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0023] This invention provides a cross-center adaptive inference method based on conditional adapters. The core of this method is: on the basis of a pre-trained shared backbone model, a lightweight conditional adapter module is configured for each medical center; during the inference phase, the corresponding adapter is selected according to the source information of the input data and embedded into the backbone network to calibrate intermediate features, thereby achieving rapid adaptation to the target domain.

[0024] Furthermore, the method freezes the backbone model parameters during the training phase and trains the adapter parameters independently for each center, minimizing the feature distribution difference between the target domain and the source domain using unlabeled target domain data.

[0025] Furthermore, the system has a conditional adapter library that stores adapter parameters and their metadata corresponding to multiple centers; and selects the matching adapter based on the center identifier or feature fingerprint of the input data through the routing module.

[0026] Furthermore, the system includes a version control and auditing module to record adapter update logs and support rollback operations.

[0027] See Figure 1 As shown, this illustrates the difference in data distribution between the source and target domains in the feature space. The horizontal and vertical axes represent the directions of the two principal components after dimensionality reduction using PCA. The blue clusters on the left represent the feature distribution of chest X-ray images from the source domain (e.g., a hospital in Beijing), while the orange triangles on the right represent the data distribution from the target domain (e.g., a hospital in Chengdu). There is a significant shift in both position and shape between the two, constituting a typical domain shift problem.

[0028] See Figure 2 As shown, the condition adapter module of the present invention receives two inputs: one is intermediate features from the backbone network. Secondly, it is the condition vector generated by the routing module. The adapter internally uses a small, fully connected network to... c Mapped to scaling factor γ and offset β Perform an affine transformation on the input features: h′= γ (c)⊙h+ β (c) Output the adapted feature h′.

[0029] Preferably, the adapter can employ a bottleneck structure, such as first reducing the dimensionality to 16 dimensions and then restoring it, or... LoRA Its low-rank matrix form makes its number of parameters much smaller than that of the main model.

[0030] See Figure 3 As shown, during the training phase, the source domain data and target domain data Input the shared backbone model separately Feature extraction, source domain path connection classification head Calculate cross-entropy loss The target domain path is not included in the supervised loss, but it is fed into the alignment loss module along with the source domain features. Examples include Maximum Mean Difference (MMD) or Adversarial Discriminator.

[0031] Furthermore, each branch connects to a dedicated condition adapter. , During training, only the adapter parameters are updated, while the backbone model parameters remain frozen.

[0032] See Figure 4 As shown, during the inference phase, the data to be processed... After being input into the system, the routing module parses its... DICOM in, DICOM (Digital Imaging and Communications in Medicine) It is a medical digital imaging and communication standard used to regulate the storage and transmission formats of medical images.

[0033] Metadata Institution Name The field, or extracting image intensity histogram and texture features as "feature fingerprints," is compared with the similarity of each central template in the adapter library. Cosine similarity is preferred, and the best-matching adapter is selected. The adapter is dynamically injected into the backbone model, calibrating features in real time during inference and outputting the final prediction result. .

[0034] This invention also provides a cross-centrality adaptive inference system based on condition adapters. The system can be deployed on a local server or edge device and supports integration with hospital PACS and HIS systems. See details... Figure 5 As shown, it includes multiple modules: a backbone model module for performing basic feature extraction and inference; a conditional adapter library module for storing adapter parameters corresponding to multiple medical centers; a routing module for selecting the matching adapter based on the domain information of the input data; a version control and auditing module for recording adapter updates, usage, and rollback operations, supporting model change traceability; and an interface module for receiving input data and outputting inference results.

[0035] Furthermore, the routing module includes a metadata parsing unit and a feature comparison unit. The metadata parsing unit includes hospital name, equipment model, and scanning protocol, used to extract structured information from the input data and quickly determine the possible domain source. The feature comparison unit includes intensity histogram and texture descriptor, used to extract statistical features of the input sample and perform similarity calculation with templates in the adapter library to determine the best matching adapter. The version control and auditing module includes a security log database and a version management interface metadata parsing unit. The security log database is used to record the loading, updating, usage, and rollback events of each adapter. The version management interface is used to interact with the system deployment end to realize rapid switching of model versions and audit traceability.

[0036] The technical solution of the present invention will be further introduced and explained below through two specific embodiments.

[0037] Example 1: Deployment of a pneumonia detection model across hospitals

[0038] use ResNet -50 is the main structure, and a bottleneck structure adapter (parameter amount <0.8%) is inserted between the 3rd and 4th residual blocks.

[0039] The system automatically loads its dedicated adapter. AUC The performance was improved to 0.897. After collecting feedback data from 200 cases, only the adapter parameters were fine-tuned, and further performance improvements were found. All changes were recorded in the audit log.

[0040] See Figures 2 to 4 As shown, in actual deployment, this embodiment achieves a dynamic inference process for cross-center image data by loading adapters from different medical centers. System logs show that the routing module can accurately identify the source of input data and switch the corresponding adapter, and the inference result is output within 0.2 seconds, verifying the feasibility and real-time performance of the present invention.

[0041] Example 2: Brain Tumor MRI Segmentation System Using 3D U-Net As the backbone, adapters are inserted into each stage of the encoder. For newly connected hospitals without explicit metadata, the system... GLCM Texture feature matching selects the closest historical adapter and initiates a brief online learning process to complete the initial adaptation.

[0042] In this embodiment, the system can automatically complete feature matching and adapter loading when accessing new hospital data, see... Figure 3 and Figure 4 As shown, the online update process is stable and fast. Experimental results show that the adapter selected through feature matching improves the Dice coefficient by approximately 4.2% compared to the original model, verifying the feasibility and engineering feasibility of the proposed method for effective cross-domain migration and automatic adaptation under label-free conditions.

[0043] It should be noted that those skilled in the art will know that the adapter form, insertion position, and alignment loss type in the above embodiments can all be replaced, as long as they realize the core idea of ​​"trunk freezing + conditional adaptation", they all fall within the protection scope of this invention.

[0044] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the appended claims.

Claims

1. A cross-center domain adaptive inference method based on conditional adapter, characterized in that, The specific steps of the method include: providing a pre-trained and parameter-frozen shared backbone model; For each target medical center, a conditional adapter module is constructed, and the conditional adapter parameters are trained with the center's unlabeled or small amount of labeled data to minimize the feature distribution difference between the source domain and the target domain under the premise of freezing the backbone model; The corresponding conditional adapter parameters of each target center and their identification information are stored in the adapter library; In the model inference stage, according to the domain information of the data to be processed, including metadata or feature fingerprints, the input data is identified and matched by the routing module, and the conditional adapter corresponding to the domain is selected from the adapter library; The selected conditional adapter is integrated into the predetermined network layer of the shared backbone model to transform the intermediate features and output the prediction results suitable for the target domain.

2. The cross-center domain adaptive reasoning method based on conditional adapter according to claim 1, characterized in that, The shared backbone model is a convolutional neural network, Vision Transformer Or U-Net structure; the condition adapter is inserted between the residual blocks of the network, before the attention module or after the fully connected layer, for adjusting the feature channels or attention weights. 3.The cross-center domain adaptive inference method based on conditional adapter according to claim 1, wherein, The condition adapter module is implemented using a parameter fine-tuning technique including one or a combination of low-rank adaptation LoRA , prefix regulation Prefix Tuning , bottleneck adapter, or only adjusting the bias term.

4. The cross-center domain adaptive reasoning method based on conditional adapter according to claim 1 or 3, characterized in that, The condition adapter module receives two inputs: one is the intermediate feature from the shared backbone network , d is the dimension of the input feature, and the other is the condition vector generated by the routing module, k is the dimension of the condition vector; inside the adapter, a small fully connected network is used to map c to scaling factors γ and offsets β , to perform an affine transformation on the input feature: h' = h + h' γ (c) h' = h + h' β (c) Output adapted features h′ The adapter adopts a bottleneck structure, and is reduced to 16 dimensionality before being restored or LoRA in the form of a low-rank matrix, so that the number of parameters is much smaller than that of the backbone model.

5. The cross-center domain adaptive reasoning method based on conditional adapter according to claim 1, wherein, According to the domain information of the data to be processed, the specific method of selecting the adapter comprises: (1) when the input data contains an explicit source identifier, the corresponding adapter is directly retrieved from the adapter library according to the identifier; (2) when the explicit identifier is lacking, the characteristic fingerprint of the input data is calculated, and similarity matching is performed with the characteristic templates of known domains in the adapter library to select the optimal adapter; wherein the explicit identifier includes field information in the input data that can directly indicate the source center, the optimal adapter is defined as the adapter whose characteristic template has the highest similarity with the characteristic fingerprint of the input data, and cosine similarity or Euclidean distance is used. KL The divergence minimization index is used as the selection criterion.

6. The cross-center domain adaptive reasoning method based on conditional adapter according to claim 1, wherein, It also includes the step of online updating the target domain conditional adapter in the inference stage, which is specifically: (1) using the real-time inflow of unlabeled data in the target domain to optimize only the corresponding adapter parameters; (2) optimization target includes minimizing the feature distribution difference between the source domain and the target domain, while maintaining the source domain prediction consistency; (3) save the updated adapter version to the adapter library, and record the version change log.

7. A cross-center domain adaptive inference system based on conditional adapters, characterized in that, It includes a backbone model module, a conditional adapter library module, a routing module, a version control and audit module, and an interface module; the backbone model module is a pre-trained neural network with frozen parameters; The conditional adapter library module is connected with the backbone model module, and centrally stores the adapter parameters of each center, supporting addition, deletion, query and modification; The routing module is connected with the conditional adapter library module, and is used for selecting the matching adapter according to the domain information of the input data for intelligent selection; The version control and audit module is connected with the backbone model module, the conditional adapter library module and the routing module respectively, and is used for recording the update, use and rollback operation of the adapter, supporting model change tracing; The interface module is connected with the backbone model module and the routing module, and is used for receiving input data and transmitting the input data to the routing module for domain identification and adapter selection, and outputting the result obtained through reasoning of the backbone model module; the interface module provides DICOM receiving and REST API interfaces to realize the standardized input and output of the medical image system.

8. The cross-center domain adaptive reasoning system based on conditional adapters of claim 7, wherein, The routing module includes a metadata analysis unit and a feature comparison unit, the metadata analysis unit includes hospital name, device model and scanning protocol, which is used to extract structured information from input data to quickly determine the domain source of prediction; the feature comparison unit includes intensity histogram and texture descriptor, which is used to extract statistical features of input samples and calculate similarity with templates in the adapter library to determine the most matching adapter; The version control and audit module includes a security log database and a version management interface metadata analysis unit, the security log database is used to record the loading, updating, using and rolling back events of each adapter; the version management interface is used to interact with the system deployment end to realize quick switching and audit tracing of model version.

9. A computer-readable storage medium having a computer program stored thereon, when the program is executed by a processor, causing the processor to perform the steps of the cross-center domain self-adaptive inference method according to any one of claims 1 to 6.

10. An electronic device comprising a processor and a memory, said memory having stored therein a computer program which, when executed by the processor, implements the method of any one of claims 1 to 6.