Test period adaptive medical image segmentation calibration method based on inverse diffusion trajectory divergence aggregation

By employing the inverse diffusion trajectory divergence aggregation method, a dual denoising network is used to generate calibration prompts on the same inverse diffusion trajectory. This solves the problems of accuracy decline and overconfidence in medical image segmentation models under distributed offset scenarios, achieving adaptive calibration and efficient confidence calibration, and is suitable for cross-center and artifact interference scenarios.

CN122115995APending Publication Date: 2026-05-29FUDAN UNIVERSITY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
FUDAN UNIVERSITY
Filing Date
2026-04-13
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing medical image segmentation models are prone to accuracy decline and overconfidence in distributed offset scenarios. Furthermore, existing calibration methods rely on target domain labels or have high deployment complexity, making it difficult to achieve adaptive calibration in practical deployments.

Method used

A method based on inverse diffusion trajectory divergence aggregation is adopted. Calibration prompts are generated on the same inverse diffusion trajectory through dual denoising networks. Stable global shape priors are preserved by using a capacity-limited reference network, and pixel-level temperature maps are generated to calibrate the segmentation results, avoiding additional resampling.

Benefits of technology

Without relying on target domain labeled data, the practicality of medical image segmentation models in cross-center, cross-device, and artifact interference scenarios is improved, providing more reliable confidence references, facilitating manual review and risk warnings, and reducing inference overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122115995A_ABST
    Figure CN122115995A_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of medical image processing, and specifically relates to a test period adaptive medical image segmentation calibration method based on reverse diffusion trajectory divergence aggregation. The method comprises the following steps: obtaining a medical image to be segmented, constructing a high-capacity first denoising network and a capacity-limited second denoising network; outputting the intermediate prediction probability distribution of the two networks respectively based on the same intermediate diffusion state at the same reverse diffusion time step; calculating the pixel-level divergence value between the two intermediate prediction probability distributions at multiple reverse diffusion time steps, and aggregating along the time dimension to obtain an aggregated divergence map; generating a pixel-level temperature map according to the aggregated divergence map, and scaling the final unnormalized classification features output by the first denoising network to obtain a calibrated segmentation probability result. The present application also comprises a corresponding calibration device, an electronic device and a computer readable storage medium. The present application realizes test period adaptive calibration in the distribution offset scene without target domain labels and additional repeated sampling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of medical image processing technology, specifically relating to a test-period adaptive medical image segmentation and calibration method based on inverse diffusion trajectory divergence aggregation for distributed offset scenarios. Background Technology

[0002] With the widespread application of deep neural networks in medical image segmentation, models can automatically segment organs, lesions, and tissue structures, thus providing support for assisted diagnosis, treatment planning, and efficacy evaluation. However, most existing models only achieve high performance on the training domain or approximately identically distributed data. When the target images come from different centers, different devices, different imaging protocols, or are affected by motion artifacts, noise, and acquisition interference, the models are prone to performance degradation due to distribution shift.

[0003] Under the aforementioned distributional offset conditions, existing segmentation models, in addition to decreased accuracy, also exhibit significant overconfidence. That is, even if the model produces incorrect segmentation results in local regions, it may still output a high confidence level. This mismatch between confidence and actual accuracy reduces the interpretability and usability of automated segmentation results, hindering risk assessment and manual review in clinical settings.

[0004] Existing post-processing calibration methods, such as temperature scaling[3], combined calibration methods[4], local temperature scaling[5], and improved post-processing calibration methods for OOD MRI segmentation[6], typically rely on a labeled validation set that is distributed in the same way as the target domain to fit the calibration parameters. When the labeled data of the target domain is difficult to obtain in advance, the above methods are difficult to achieve adaptive calibration in the actual deployment stage. On the other hand, some reliability assessment methods based on diffusion models, such as CalDiff[8], require explicit reliability estimation components or additional analysis steps, resulting in high deployment complexity.

[0005] Therefore, a technical solution is needed that can directly generate input-related calibration prompts during a single inverse diffusion inference process without relying on target domain labels, and perform test-period adaptive calibration of the segmentation model output. Summary of the Invention

[0006] The purpose of this invention is to provide a test-period adaptive medical image segmentation and calibration method based on inverse diffusion trajectory divergence aggregation, in order to solve the problems of existing technologies relying on target domain labels, difficulty in adaptive calibration, and high inference overhead in distributed offset scenarios.

[0007] The test-period adaptive medical image segmentation and calibration method based on inverse diffusion trajectory divergence aggregation provided by this invention includes the following specific steps:

[0008] (1) Obtain the medical image to be segmented and construct a first denoising network and a second denoising network; wherein the model capacity of the second denoising network is smaller than that of the first denoising network;

[0009] (2) At the same back-diffusion time step, the medical image to be segmented and the intermediate diffusion state corresponding to that time step are respectively input into the first denoising network and the second denoising network to obtain the first intermediate prediction probability distribution and the second intermediate prediction probability distribution of that time step. Here, the back-diffusion time step refers to a certain iteration in the back-diffusion process from the high-noise category state to the target segmentation probability state; the intermediate diffusion state refers to the category probability state corresponding to that iteration. This represents the probability distribution of each pixel belonging to different categories in the current denoising stage.

[0010] (3) Calculate the pixel-level divergence value between the two intermediate prediction probability distributions at multiple inverse diffusion time steps to obtain multiple single-step divergence maps;

[0011] (4) Aggregate multiple single-step branching graphs along the time dimension to obtain an aggregated branching graph;

[0012] (5) Generate a pixel-level temperature map based on the aggregation and divergence map, and use the pixel-level temperature map to scale the final unnormalized classification features output by the first denoising network to obtain the calibrated segmentation probability results.

[0013] Furthermore:

[0014] In step (1), the first denoising network can be a medical image segmentation network based on a diffusion probability model, such as a MedSegDiff-type diffusion segmentation network [1]; its denoising backbone can be a SwinUNETR structure [2]. The second denoising network adopts a reference denoising network that is of the same origin as the first denoising network but has limited capacity. The capacity limitation of the second denoising network can be achieved by reducing at least one of the following methods: reducing the number of network layers, the number of feature channels, the number of parameters, or the number of training iterations, thereby being more inclined to preserve stable global shape priors.

[0015] In step (2), the reverse diffusion process preferably adopts a deterministic update strategy and completes the divergence extraction and temporal aggregation on a single reverse diffusion trajectory, without the need for additional resampling of the same input image.

[0016] In step (3), the pixel-level divergence value can be obtained based on the probability distance metric between two intermediate prediction probability distributions. The probability distance metric includes Jensen-Shannon divergence, Kullback-Leibler divergence, absolute error, or mean square error, among which Jensen-Shannon divergence can be preferred.

[0017] In step (4), the aggregated divergence map can be obtained by averaging, weighted averaging, or cumulative normalization of pixel-level divergence values ​​over multiple reverse diffusion time steps.

[0018] In step (5), the pixel-level temperature map can be generated by a nonlinear mapping function with upper and lower limits, and applied to the unnormalized classification features output in the last step of the first denoising network.

[0019] The present invention also provides calibration devices, electronic devices, and computer-readable storage media corresponding to the above methods.

[0020] The calibration device includes a network construction module, a two-path backdiffusion module, a branching calculation module, a time aggregation module, and a calibration module, which are respectively used to perform the corresponding steps in the method.

[0021] The electronic device includes at least one processor and a memory connected to the processor; the memory stores a computer program, which, when executed, is used to implement the above-described method.

[0022] The computer-readable storage medium stores a computer program that, when run on a computer, is used to implement the above-described method.

[0023] Compared with existing technologies, this invention has at least the following advantages: First, by utilizing the divergence information of a dual denoising network on the same antidiffusion trajectory to construct calibration prompts, calibration parameters related to the input can be generated during the testing phase without relying on target domain labeled data, improving the practicality of the method in cross-center, cross-device, and artifact interference scenarios; Second, by preserving a relatively stable global shape prior through a capacity-constrained reference network, the aggregated divergence map can more effectively reflect abnormal regions, thereby performing more targeted confidence calibration on high-risk regions in space; Third, by embedding divergence extraction, temporal aggregation, and temperature map generation into a single antidiffusion inference trajectory, no additional resampling is required, reducing additional inference overhead; Fourth, the output calibrated segmentation probability map can provide a more reliable confidence reference for automatic segmentation results, facilitating subsequent manual review, risk warnings, and downstream quantitative analysis. Attached Figure Description

[0024] Figure 1 This is a schematic diagram of the overall process of the method of the present invention. (a) represents the dual reverse diffusion mechanism, (b) represents the temporal aggregation module, and (c) represents the pixel-level temperature scaling module. Indicates the input image. Indicates category noise, represents the Jensen-Shannon divergence value; the master diffusion model represents the high-capacity diffusion partitioning model, and the reference diffusion model represents the low-capacity reference model.

[0025] Figure 2 This diagram illustrates the robustness and divergence-accuracy correlation of a capacity-constrained reference network under domain offset conditions. (a) shows the topological integrity of the small-capacity reference model under local, cross-center, and different artifact conditions; (b) shows the correlation between the agreement score and segmentation accuracy under motion artifact conditions; and (c) shows a comparison of Pearson correlation coefficients under different OOD conditions and cross-vendor scenarios.

[0026] Figure 3 This is a schematic diagram illustrating the calibration effect of the present invention in motion artifact scenarios. (a) shows the annotation, baseline prediction, reference prediction, and bifurcation plot; (b) shows the reliability plots of different methods. Figure 3 (c) shows the confidence histograms for different methods, (d) shows the segmentation error map, and (e) shows the input image with motion artifacts and annotations. Detailed Implementation

[0027] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. It should be understood that the following embodiments are used to explain the present invention, and not to limit the scope of protection of the present invention. Unless otherwise specified, the network structure, loss function, optimizer and hardware platform used in the present invention can all adopt common implementation methods in the art.

[0028] Example 1: Overall Method Flow. (e.g.) Figure 1 As shown, this embodiment describes a medical image segmentation and calibration task in a distributed offset scenario. The entire method includes three interconnected processing stages, namely... Figure 1 (a) shows the dual reverse diffusion mechanism. Figure 1 (b) shows the timing aggregation module and Figure 1 (c) shows the pixel-level temperature scaling module. The input is the medical image to be segmented, and the output is the calibrated segmentation probability map.

[0029] exist Figure 1 In the stage shown in (a), the input image With category noise Simultaneously, both the main diffusion model and the reference diffusion model are fed into the input. The main diffusion model refers to the high-capacity first denoising network used to generate the final segmentation result; the reference diffusion model refers to the second denoising network with the same input as the main diffusion model but limited capacity, whose main function is to provide a more stable structural prior. Both models receive the same intermediate state and the same input image at the same inverse diffusion time step and output the predicted probability distribution for the corresponding time step. To avoid the additional overhead of random sampling, this embodiment adopts a deterministic inverse diffusion update strategy. A set of cumulative diffusion coefficients is preset for the noise schedule. The original class distribution estimate of the first denoising network under the current time step output conditions is then given by the inverse diffusion update formula as follows:

[0030] (1)

[0031] In formula (1), This represents the current intermediate diffusion state corresponding to the t-th reverse diffusion time step. This indicates the updated state of the previous time step. This represents the probability distribution of target segmentation. This indicates the input of a medical image. This indicates that the first denoising network is under the condition and The following are the prediction results for the target segmentation probability distribution. and Let represent the cumulative diffusion coefficients at step t and step (t-1), respectively. This represents the model parameters of the first denoising network.

[0032] The second denoising network uses the same input conditions and the same time steps, but its model capacity is limited, and it is used to output a relatively stable reference prediction.

[0033] At each time step, the divergence value is calculated at each pixel location using the intermediate prediction results from the two networks. Figure 1 (a) This represents the Jensen-Shannon divergence value calculated from the predictions of the two networks at that time step, and its expression is as follows:

[0034] (2)

[0035] In formula (2), Indicates the pixel position in the image. This represents the divergence value at pixel position v at the t-th inverse diffusion time step. This represents the intermediate predicted probability distribution of the first denoising network at pixel location v. This represents the intermediate predicted probability distribution of the second denoising network at pixel location v. Indicates the Jensen-Shannon divergence. This represents the model parameters of the second denoising network.

[0036] To ensure numerical stability, the predicted probabilities can be truncated and renormalized before calculation. By performing the above bifurcation calculation over multiple time steps, a single-step bifurcation diagram sequence covering the entire backdiffusion process can be obtained.

[0037] Example 2: Time-series aggregation and pixel-level temperature map generation. For example... Figure 1As shown in (b), since the divergence value at a single time step may fluctuate due to local disturbances, this embodiment aggregates the divergence diagram along the time dimension. The aggregated divergence diagram is calculated using the following formula:

[0038] (3)

[0039] In formula (3), This represents the aggregation divergence value at pixel position v. This represents the divergence value at pixel position v at the t-th inverse diffusion time step. This represents the total number of steps in the reverse diffusion. Figure 1 (b) The temporal aggregation module outputs an aggregated divergence map to represent the cumulative divergence of each pixel location throughout the entire backdiffusion trajectory. In other implementations, a weighted average or sliding cumulative method can also be used. If a pixel consistently exhibits high divergence over multiple time steps, it indicates that the pixel is more likely to belong to a high-risk segmentation region.

[0040] like Figure 1 As shown in (c), after obtaining the aggregated bifurcation map, a pixel-level temperature map can be generated using a nonlinear mapping function with upper and lower bound constraints. The calculation formula is as follows:

[0041] (4)

[0042] In formula (4), This represents the temperature value at pixel location v. This represents the aggregation divergence value at pixel position v. and These represent the lower and upper limits of the temperature chart, respectively. This represents the center parameter of the nonlinear mapping curve. The slope parameter represents the nonlinear mapping curve. This represents the Sigmoid function.

[0043] Furthermore, Figure 1 The pixel-level temperature scaling operation in (c) can represent the calibrated segmentation probability map as follows:

[0044] (5)

[0045] In formula (5), This represents the final unnormalized classification feature output by the first denoising network at pixel location v. This represents the temperature value at pixel location v. This represents the calibrated segmentation probability distribution after temperature scaling. This represents the normalization function. Compared to a global single scalar temperature, this invention generates a spatial temperature map that is correlated with the input, enabling different levels of calibration to be applied to different risk areas.

[0046] Example 3: Construction of a capacity-constrained reference network. Both the first and second denoising networks use temporal conditional diffusion segmentation backbones. The first denoising network can use a high-capacity SwinUNETR structure [2], with the basic feature dimension set to 48, and a layer configuration of deeper intermediate layers and shallower remaining layers. The second denoising network still uses the same structure, but the basic feature dimension can be reduced to 24, and each layer can be adjusted to a shallower configuration. At the same time, the number of training iterations can be appropriately shortened to form a capacity-constrained reference network. The above capacity constraint is used to make the reference network more biased towards a stable global shape prior under domain offset conditions.

[0047] In one cardiac MRI segmentation embodiment, the total number of diffusion steps can be set to 50, with 5 steps of deterministic sampling used during the inference phase. The first denoising network can be trained for 50,000 iterations, and the second denoising network can be stopped early at 25,000 iterations to reduce overfitting to high-frequency perturbations. It should be understood that the above values ​​are merely examples and can be adjusted based on data scale, hardware resources, and target scenarios in actual deployments.

[0048] Example 4: Result Verification and Effect Analysis. To verify the effectiveness of the method of the present invention, this example quantitatively evaluates the calibration effect in both local domain artifact perturbation scenarios and cross-vendor and cross-domain scenarios. The evaluation indicators are expected calibration error (ECE), static calibration error (SCE), and adaptive calibration error (ACE). All three indicators satisfy the condition that the smaller the value, the better the calibration performance.

[0049] Table 1 shows the average calibration results of this method under artifact perturbation scenarios in this domain.

[0050] .

[0051] As shown in Table 1, under the artifact perturbation scenario in this domain, the average ECE, SCE, and ACE of our proposed method are 2.96%, 2.68%, and 3.43%, respectively, all of which are superior to the uncalibrated method and existing methods such as TS, ETS, LTS, and CalibNet. Specifically, compared to CalibNet, the second-best method in terms of average ECE, our method further reduces ECE by 1.43 percentage points; compared to LTS, the second-best method in terms of average ACE, our method further reduces ECE by 4.80 percentage points, indicating that our invention can significantly reduce overconfidence under various artifact conditions.

[0052] Table 2 shows the average calibration results of this method in cross-vendor and cross-domain scenarios.

[0053] .

[0054] As shown in Table 2, in cross-vendor and cross-domain scenarios, the average ECE, SCE, and ACE of this method are 4.28%, 3.14%, and 4.72%, respectively, which are better than all the comparison methods. Compared with the next best method LTS in cross-domain scenarios, this method further reduces the average ECE, SCE, and ACE by 1.15, 0.56, and 0.90 percentage points, respectively, indicating that the present invention can maintain more stable calibration results under different devices, different acquisition protocols, and different centers.

[0055] Combination Figure 2 It is evident that the small-capacity reference network maintains high topological integrity under local, cross-center, and various artifact conditions, and the agreement score of this method exhibits a higher Pearson correlation with the segmentation accuracy, indicating that the divergence aggregation based on the inverse diffusion trajectory can provide a stable and effective calibration indication signal. Combined with... Figure 3 As can be seen, in the motion artifact case, the reliability curve after calibration by this method is closer to the ideal diagonal, and the confidence histogram matches the actual pixel accuracy better, indicating that the present invention can effectively suppress high-confidence erroneous predictions.

[0056] Example 5: Implementation of the Apparatus and Device. The method of the present invention can be deployed in a medical imaging workstation, a hospital server, a cloud inference platform, or an edge computing device. The corresponding apparatus includes: a network construction module for establishing a first denoising network and a second denoising network; a dual-path inverse diffusion module for driving the two networks to synchronously output intermediate prediction probability distributions at the same inverse diffusion time step; a bifurcation calculation module for calculating pixel-level bifurcation values; a temporal aggregation module for obtaining an aggregated bifurcation map along the inverse diffusion time dimension; and a calibration module for generating a pixel-level temperature map and outputting the calibrated segmentation probability results.

[0057] The calibrated segmentation probability map output by this invention can be directly used for subsequent thresholding segmentation, visualization, manual review reminders, quantitative structural measurements, or risk area labeling. For cross-center MRI data, data affected by artifacts, and other medical images with domain shifts, this invention can provide adaptive calibration capabilities without relying on target domain labels.

[0058] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit the present invention. All equivalent substitutions, improvements, and modifications made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

[0059] References

[0060] [1] Wu J, Fu R, Fang H, et al. MedSegDiff: Medical Image Segmentationwith Diffusion Probabilistic Model. MIDL, 2024.

[0061] [2] Hatamizadeh A, Nath V, Tang Y, et al. SwinUNETR: SwinTransformers for Semantic Segmentation of Brain Tumors in MRI Images. MICCAIBrainlesion Workshop, 2022.

[0062] [3] Guo C, Pleiss G, Sun Y, et al. On Calibration of Modern NeuralNetworks. ICML, 2017.

[0063] [4] Zhang J, Kailkhura B, Han T Y J. Mix-n-Match: Ensemble andCompositional Methods for Uncertainty Calibration in Deep Learning. ICML,2020.

[0064] [5] Ding Z, Han X, Liu P, et al. Local Temperature Scaling forProbability Calibration. ICCV, 2021.

[0065] [6] Ouyang C, Wang S, Chen C, et al. Improved Post-hoc ProbabilityCalibration for Out-of-domain MRI Segmentation. arXiv:2208.02870, 2022.

[0066] [7] Mehrtash A, Wells W M, Tempany C M, et al. Confidence Calibrationand Predictive Uncertainty Estimation for Deep Medical Image Segmentation.IEEE TMI, 2020.

[0067] [8] Wang X, Yang M, Tosun S, et al. CalDiff: calibrating uncertaintyand accessing reliability of diffusion models for trustworthy lesionsegmentation. IEEE JBHI, 2025。

Claims

1. A test-period adaptive medical image segmentation calibration method based on inverse diffusion trajectory divergence aggregation, characterized in that, The specific steps are as follows: (1) Obtain the medical image to be segmented and construct a first denoising network and a second denoising network; wherein the model capacity of the second denoising network is smaller than that of the first denoising network; (2) At the same inverse diffusion time step, the medical image to be segmented and the current intermediate diffusion state are simultaneously input into the first denoising network and the second denoising network to obtain the first intermediate prediction probability distribution and the second intermediate prediction probability distribution of the corresponding time step, respectively; wherein, the inverse diffusion time step refers to a certain iteration in the inverse diffusion process from the high noise category state to the target segmentation probability state; the intermediate diffusion state refers to the category probability state corresponding to this iteration, which represents the probability distribution of each pixel belonging to different categories in the current denoising stage; (3) Calculate the pixel-level divergence value between the two intermediate prediction probability distributions at multiple inverse diffusion time steps to obtain multiple single-step divergence maps; (4) Aggregate multiple single-step divergence maps along the time dimension to obtain an aggregated divergence map; (5) Generate a pixel-level temperature map based on the aggregated divergence map, and use the pixel-level temperature map to scale the final unnormalized classification features output by the first denoising network to obtain the calibrated segmentation probability result.

2. The calibration method according to claim 1, characterized in that, In step (1), the first denoising network adopts a high-capacity diffusion segmentation denoising network, and the second denoising network adopts a capacity-limited reference denoising network. The capacity limitation of the second denoising network is achieved by reducing at least one of the following methods: reducing the number of network layers, the number of feature channels, the number of parameters, or the number of training iterations, thereby being more inclined to preserve stable global shape priors.

3. The calibration method according to claim 1, characterized in that, The reverse diffusion process described in step (2) adopts a deterministic update strategy and completes the divergence extraction and temporal aggregation on a single reverse diffusion trajectory, without the need for additional resampling of the same input image.

4. The calibration method according to claim 1, characterized in that, The pixel-level divergence value in step (3) is obtained based on the probability distance metric between two intermediate prediction probability distributions. The probability distance metric can be any one of Jensen-Shannon divergence, Kullback-Leibler divergence, absolute error, or mean square error.

5. The calibration method according to claim 1, characterized in that, The aggregation divergence map described in step (4) is obtained by averaging, weighted averaging, or cumulative normalization of pixel-level divergence values ​​over multiple inverse diffusion time steps.

6. The calibration method according to claim 1, characterized in that, The pixel-level temperature map in step (5) is generated by a nonlinear mapping function with upper and lower limits, and is applied to the unnormalized classification features output in the last step of the first denoising network.

7. A test-period adaptive medical image segmentation calibration device based on inverse diffusion trajectory divergence aggregation, characterized in that, The method for performing the calibration method according to any one of claims 1-6 includes a network construction module, a dual-path backdiffusion module, a branching calculation module, a time aggregation module, and a calibration module, wherein the above modules are respectively used to perform the corresponding steps in the method.

8. An electronic device, characterized in that, An instrument for performing the calibration method according to any one of claims 1-6 includes at least one processor and a memory connected to the processor; the memory stores a computer program, which, when executed, is used to implement the calibration method.

9. A computer-readable storage medium, characterized in that, The device contains a computer program that, when run on a computer, implements the calibration method according to any one of claims 1-6.