Metric-guided Image Reconstruction Bounds via Conformal Prediction
Matt Y Cheung Tucker J Netherton Laurence E Court Ashok Veeraraghavan Guha Balakrishnan




Metric-guided Image Reconstruction Bounds via Conformal Prediction








Cheung et al.



Department of Electrical and Computer Engineering, Rice University 

{mattyc, guha, vashok}@rice.edu Department of Radiation Physics, The University of Texas MD Anderson Cancer Center  

{TJNetherton, LECourt}@mdanderson.org

Metric-guided Image Reconstruction Bounds via Conformal Prediction
    Matt Y. Cheung1 Tucker J. Netherton2 Laurence E. Court2 Ashok Veeraraghavan1 Guha Balakrishnan1
    Received 28 February 2024 / Accepted 23 April 2024
===================================================================================================







Recent advancements in machine learning have led to novel imaging systems and algorithms that address ill-posed problems. 
Assessing their trustworthiness and understanding how to deploy them safely at test time remains an important and open problem.
We propose a method that leverages conformal prediction to retrieve upper/lower bounds and statistical inliers/outliers of reconstructions based on the prediction intervals of downstream metrics.
We apply our method to sparse-view CT for downstream radiotherapy planning and show 1) that metric-guided bounds have valid coverage for downstream metrics while conventional pixel-wise bounds do not and 2) anatomical differences of upper/lower bounds between metric-guided and pixel-wise methods.
Our work paves the way for more meaningful reconstruction bounds.
Code available at <https://github.com/matthewyccheung/conformal-metric>.















§ INTRODUCTION



Recent advancements in machine learning have led to novel imaging systems and algorithms that address ill-posed problems.
Traditionally, image reconstruction evaluation relies on common image quality metrics such as PSNR, SSIM, FID, and Dice scores of segmentations on reconstructed images. 
While these metrics provide a heuristic to gauge the overall model uncertainty in reconstruction during evaluation, they do not provide uncertainties and guarantees at test time, and do not link reconstruction quality to uncertainties in downstream applications.



Conformal prediction (CP) provides distribution-free, valid, and calibrated prediction intervals at test time <cit.>.
The idea is to use residuals from a calibration dataset to infer uncertainty in future test datasets <cit.>.
For regression tasks, this uncertainty is given as a prediction interval <cit.>.
The application of CP to image reconstruction has been relatively limited.
This is a difficult problem because quantiles in higher dimensional data are M-quantiles, meaning they have infinite solutions and only have unique solutions when a direction is specified <cit.>.
How do we pick such a direction?

The conventional (pixel-wise) method is to pick the direction where all pixels are independent <cit.>. 

The upper and lower bounds of the estimated image can be calibrated based on pixel intensity <cit.>.
While these pixel-wise prediction intervals are easy to interpret, they do not consider spatial correlations and may lead to large interval lengths <cit.>. 

The upper and lower bounds can also be calibrated in the direction of principal components <cit.>.
While using principal components considers spatial correlations, it does not capture meaningful and practical uncertainty for downstream processes and is prohibitively costly to compute for large images.
Furthermore, both methods provide upper and lower bounds not sampled from the learned manifold, yielding implausible images.
A reasonable answer is to calibrate the upper and lower bounds in the direction of semantic features
<cit.>.
However, this method requires training a generative model with disentangled latent spaces.



We argue that bounds should be computed in the direction of downstream metrics for more reliable downstream performance.
We propose “Metric-guided Image Reconstruction Bounds” that leverages CP to form valid prediction intervals of reconstructions in the direction of downstream metrics and retrieve reconstructions 1) closest to the upper and lower bounds, 2) contained in the bounds (statistical inliers) and 3) outside the bounds (statistical outliers).
Our method takes spatial correlations into account and produces plausible reconstructions from the learned manifold.
We show that our method provides valid coverage for downstream tasks while the conventional pixel-wise method does not and the upper/lower bounds between methods are anatomically different.



We demonstrate our method on sparse-view computed tomography (sv-CT) and downstream radiotherapy planning.

Reconstruction is highly accurate for CT machines and uses sophisticated detectors and algorithms to obtain sub-millimeter spatial resolution. 
CT downtime significantly impacts the availability of radiotherapy planning in low-resource settings <cit.>.
A low-cost device with cone-beam geometry could be manufactured and used to increase access to radiotherapy planning and other therapeutic use cases.


Individualized radiotherapy plans are made from CT scans and specify localized doses to a target treatment volume (i.e. breast, prostate).

We use downstream clinical application metrics from radiotherapy planning to retrieve reconstructions.



§ METHOD



We consider a 3-D reconstruction setting for a downstream application with a chosen downstream metric.[While we concentrate on imaging, our method can be applied to any multidimensional setting.]
The measurement and reconstruction algorithms are assumed to be probabilistic.
We follow the split conformal prediction procedure <cit.> by using n_p patients for the calibration dataset and 1 test patient n_p+1 with unknown ground truth volume and metric as the test dataset.
For each patient i in the calibration dataset, we reconstruct a set of volumes V̂^i={V̂_j^i}_j=1^n_r of size n_r.

Each patient's reconstructed volumes are used to attain a set of estimated metrics Ŷ^i = {Ŷ_j^i}_j=1^n_r.
Each patient's ground truth volume is used to attain a ground truth metric Y^i.
For the test patient, we reconstruct a set of volumes V̂^n_p+1={V̂_j^n_p+1}_j=1^n_r and estimate metrics Ŷ^n_p+1 = {Ŷ_j^n_p+1}_j=1^n_r.[We do not have ground truth volume V^n_p+1 and metric Y^n_p+1 at test time.]
Assuming (Ŷ^i, Y^i) for i=1,...,n_p+1 are exchangeable, we leverage Conformalized Quantile Regression (CQR) <cit.> to find the prediction interval C(Ŷ^n_p+1) satisfying the conformal coverage guarantee <cit.>:

    ℙ[Y^n_p+1∈ C(Ŷ^n_p+1)]≥ 1-α

where α is a user-specified miscoverage rate. 
We attain C(Ŷ^n_p+1) by adjusting the upper and lower bounds of Ŷ^n_p+1 with an offset q that is computed from the calibration dataset to satisfy (<ref>):

    C(Ŷ^n_p+1)=[Q_α/2(Ŷ^n_p+1)-q, Q_1-α/2(Ŷ^n_p+1)+q]

where Q_α(.) is the function that estimates the αth quantile.[While we use symmetric adjustments in this work, asymmetric bounds can also be used. See <cit.> for more details.]
Finally, we retrieve the volumes 1) closest to the upper and lower bounds of the prediction intervals [V̂_LB^n_p+1,V̂_UB^n_p+1] based on the L_1 norm, 2) contained within the prediction intervals (inliers), and 3) outside the prediction intervals (outliers). We provide an overview in Fig. <ref> and pseudo-code in Algorithm <ref>.








Similar to prior work <cit.>, we use sample quantiles instead of regression quantiles.
Our method can be interpreted as a discrete version of CQR that finds marginal prediction intervals for downstream metrics given a patient.
Our method is different to prior work in pixel-wise <cit.> that produce prediction intervals per reconstruction.
Instead, we provide prediction sets directly from a set of patient reconstructions where each patient has different reconstruction volume sizes.
We compare our method with conventional pixel-wise bounds.




§ EXPERIMENTS


Radiotherapy Planning: 
We use the Radiation Planning Assistant (RPA, FDA 510(k) cleared), a web-based tool for radiotherapy planning. <cit.>.
RPA automates treatment planning on CT images and provides dose and plan reports for clinics in low-and-middle-income countries <cit.>. 
Dose statistics specify what percentage of organ volume receives a particular dose.
Structural statistics are from organ segmentation and specify metrics such as organ volume and Hausdorff distance <cit.>.
We use a dose prescription of 25 fractions in 50Gy (2.00Gy/fraction) for supraclavicular (SCV) and tangential field irradiation. 
The RPA automatically segments organs at risk and then applies a single-isocenter technique with matched tangential and SCV fields to treat the chest wall and SCV region. 

Dataset: 
We use a de-identified CT dataset of 20 patients retrospectively treated with radiotherapy at The University of Texas MD Anderson Cancer Center. 
All CT images were of patients who had received surgical mastectomy to the right side of the body, and radiotherapy to the post-mastectomy chest wall and/or axillary lymph nodes. 
This research was conducted using an approved institutional review board protocol.
Each ground truth CT is of size (512× 512 × Number of slices).
For each patient, we generate 10 digitally reconstructed radiographs (DRR) from the ground truth CT scan using the TIGRE toolbox <cit.>.
The DRRs simulate image acquisition from a cone-beam geometry.
We simulate physical randomness (beam angle variability and sensor noise) by generating DRRs with 3% noise and 50 random projections between 0 and 360 degrees.
The number of projections was increased from 2 to 50 until organ boundaries were perceptually discernible in the reconstruction by the RPA. 
Because this work aims to showcase the feasibility of CP for image reconstruction, we assume that such a low-cost sv-CT device will be created in future work that gives acceptable reconstruction image quality. 
We use a self-supervised model, Neural Attenuation Fields (NAF), for reconstruction <cit.>.

Each reconstruction is uncropped and contains the full scan.
We use the default parameter setting in NAF <cit.> and introduce computational randomness through random initializations of NAF <cit.>.
Ultimately, we construct a dataset of 20 patients with 10 reconstructions each.
To construct the conventional pixel-wise upper and lower bounds, we take each pixel's upper and lower quantiles.





 §.§ Validation

We validate our method by computing coverage (Table <ref>), which is defined as the fraction of patients with ground truth metrics within the bounds.
For metric-guided bounds, we use leave-one-out cross-validation on 20 patients and report the average coverage for metrics volume of ipsilateral lung that received 20Gy (Right Lung V_20), maxmimum dose to the heart (Heart D_0), and dose that 35% volume of the ipsilateral lung receives (Right Lung D_35).
For conventional pixel-wise bounds, we compute the coverage of all patients.
We use the finite sample correction (1-α)_adj = ⌈(n_p+1)(1-α)⌉/n_p <cit.> for target coverage of [(1-α)_adj]%.
Our results show that metric-guided bounds give valid coverages for downstream tasks while conventional pixel-wise bounds do not.





 §.§ Upper and lower bound retrieval


We retrieve metric-guided and pixel-wise upper and lower bounds for a target coverage of 90% for maximum dose to the heart (Fig. <ref>).
To verify the retrieved images are representative of the bounds at test time, we compute retrieval error defined as: 

    ε_B = Ŷ_B^n_p+1-B^n_p+1/UB^n_p+1 - LB^n_p+1× 100%
 where B denotes the calibrated bound and can be upper bound UB or lower bound LB, and Ŷ_B^n_p+1 = _Ŷ_j^n_p+1|Ŷ_j^n_p+1-B^n_p+1| are the estimated metrics closest to the calibrated bounds. 
We find that pixel-wise upper and lower bounds are perceptually similar and only differ in their intensity, while metric-guided bounds differ in the spatial distribution of pixel intensities.
This indicates that metric-guided bounds take spatial correlations into account.
As a consequence, the pixel-wise differences for metric-guided bounds can be both positive and negative.
This indicates that single pixels do not carry sufficient information to explain the variations in dose.
We find that the segmentations of the heart are also perceptually different.
Pixel-wise upper bounds tend to have larger volumes than lower bounds, while this rule does not hold for metric-guided bounds.



Furthermore, this result suggests that pixel-wise and metric-guided methods may disagree on inliers and outliers.

Metric-guided inlier reconstructions may have pixels considered as pixel-wise outliers and metric-guided outlier reconstructions may have pixels considered as pixel-wise inliers.



 §.§ Anatomical Differences


Using organ segmentations from RPA, we determine whether there is a statistically significant difference in upper bound volume across methods and lower bound volume across methods using paired t-tests.
We use the dose metrics in Table <ref>.
We find statistically significant differences (p<0.05) for upper and lower bounds across methods except for the upper bound reconstructions for Heart D_0 (p=7.2e-2) (Fig. <ref>).
This suggests that the upper and lower bounds across methods are anatomically different.





§ CONCLUSION

We propose a method that leverages conformal prediction to retrieve upper/lower bounds and statistical inliers/outliers of reconstructions based on the prediction intervals of downstream metrics.
We apply our method to sv-CT for downstream radiotherapy planning and show 1) metric-guided bounds have valid coverage for downstream metrics unlike conventional pixel-wise bounds and 2) statistically significant anatomical differences of upper/lower bounds between metric-guided and pixel-wise methods.



§ DISCUSSION

There are several areas for further investigation:

Factors affecting retrieval error.  
Retrieval error may depend on number of samples, the diversity of samples, and the accuracy of the model.

The prediction intervals and retrieval errors may also be very large if the model is highly biased.
Asymmetric bounds could help identify this bias <cit.>.
Furthermore, we assume the downstream processes to be deterministic.
This is an appropriate assumption for the maximum dose to the heart, but may not be for other parameters.
Opportunities lie in decoupling uncertainty from physical, reconstruction algorithm, and downstream algorithm randomness <cit.>.

Evaluating Safety and Equity. 
We can perform patient-specific safety evaluations and identify inequities across patients.
For a dose prescription of 50Gy (2Gy/fraction), a safe maximum dose to the heart is <5Gy and the volume of the ipsilateral lung getting 20Gy is <35%.
If the upper bound of the prediction interval is greater than these thresholds, it may indicate that the reconstruction is unsuitable for planning.

Patients or measurement conditions with high uncertainty can be used for downstream interpretation <cit.> and action <cit.>.
They may correspond to specific clinical scenarios, such as inadequately filled lungs or large distance from heart to chest wall.

Opportunities lie in applying causal methods <cit.> to identify factors causes of high uncertainty.

Test time evaluation metrics for reconstruction.  
While we show inliers and outliers for one metric, our method can be extended to multiple metrics <cit.> where we find reconstructions with all estimated metrics in the prediction intervals containing the ground truth metrics with confidence.

Opportunities lie in assessing reconstructions with multiple critical metrics.

Other applications. 
Opportunities lie in extending our method to other medical imaging applications <cit.> and critical scenarios. 
Additionally, although not demonstrated in our work, our method does not necessitate reconstruction samples to be of identical size or dimensions, as calibration is conducted based on a scalar downstream metric.






  §.§.§ 
 The authors would also like to acknowledge support from a fellowship from the Gulf Coast Consortia on the NLM Training Program in Biomedical Informatics and Data Science T15LM007093. The authors would also like to thank the RPA team (Joy Zhang, Raphael Douglas) for their support. Tucker Netherton would like to acknowledge the support of the NIH LRP award.










splncs04























