Uncertainty-aware retinal layer segmentation in OCT through probabilistic signed distance functions

Authors: mohammd mohaiminul islam
bart  liefers
caroline  klaver
clara i sánchez
Venue: MIDL_io_2024_Conference
Published: 2024-01-31 12:20:58

Abstract: In this paper, we present a new approach for uncertainty-aware retinal layer segmentation in Optical Coherence Tomography (OCT) scans using probabilistic signed distance functions (SDF). Traditional pixel-wise and regression-based methods primarily encounter difficulties in precise segmentation and lack of geometrical grounding respectively. To address these shortcomings, our methodology refines the segmentation by predicting a signed distance function (SDF) that effectively parameterizes the retinal layer shape via level set. We further enhance the framework by integrating probabilistic modeling, applying Gaussian distributions to encapsulate the uncertainty in the shape parameterization. This ensures a robust representation of the retinal layer morphology even in the presence of ambiguous input, imaging noise, and unreliable segmentations. Both quantitative and qualitative evaluations demonstrate superior performance when compared to other methods. Additionally, we conducted experiments on artificially distorted datasets with various noise types—shadowing, blinking, speckle, and motion—common in OCT scans to showcase the effectiveness of our uncertainty estimation. Our findings demonstrate the possibility of obtaining reliable segmentation of retinal layers, as well as an initial step towards the characterization of layer integrity, a key biomarker for disease progression. Our code is available at \url{https://github.com/niazoys/RLS_PSDF}.

Main paper: 
 introduction: 
 In recent years, deep learning methods have demonstrated remarkable success in automating the delineation and segmentation of retinal layers in Optical Coherence Tomography (OCT) scans. The task of retinal layer segmentation is primarily tackled via pixel-wise classification, an approach extensively explored in recent works (Li et al., 2020; Liu et al., d(x,y) 2024; Kugelman et al., 2022; Sousa et al., 2021; Lou et al., 2020; Chen et al., 2019; Kugelman et al., 2018; Santos et al., 2019) . This technique, however, is known to have challenges in precisely delineating the small structures and nuanced contours when employing crossentropy or dice loss (Abraham and Khan, 2019) . The issue is further exacerbated when the layer targeted for segmentation is exceptionally thin, often reduced to a one-pixel width line for layer boundaries or as a consequence of disease manifestation, resulting in inaccurate (Lin et al., 2023) , and disconnected boundaries (see Fig. 6 ) (Lan et al., 2020; Sousa et al., 2021) .The alternative is to switch to a regression-based approach, predicting layer coordinates per vertical scan (A-scan) line, which addresses the problem of disconnected layer boundaries. Notably, deep learning models that take a two-dimensional B-scan as input and directly output a coordinate for each A-scan (Liefers et al., 2019; Ngo et al., 2019) , and models that directly predict the height of each layer, ensuring a correct layer ordering (Morelle et al., 2023) , have been proposed. However, the regression-based approach lacks mechanistic interpretability as the predictions are not in one-to-one correspondence from input to output, i.e. it reduces all pixel information in a vertical column to a single coordinate, making the relationship between input and anticipated boundary ambiguous. Due to this reduction, the geometric grounding of the predictions is challenged, limiting the neural network's ability to exploit geometric priors and regularities.We present a new level set approach that overcomes both the challenges of thin layer segmentation and the lack of geometric grounding. Our approach involves predicting an SDF that parametrizes the layer boundary via a level set. The predicted SDF promotes an enhanced spatial congruence between the input and output via a one-to-one pixel correspondence, thereby delivering more robust supervisory signals for the learning algorithm. Additionally, our approach is amenable to probabilistic modeling through a Gaussian likelihood assumption.The SDF has seen application in broader medical image segmentation contexts (Xue et al., 2020; Raju et al., 2022; Bogensperger et al., 2023) , but their utility in retinal layer segmentation remains unexplored. On the other hand, the literature on aleatoric uncertainty estimation via Gaussian likelihood in medical image segmentation is extensive (Abdar et al., 2021; Gawlikowski et al., 2021) . Although (Dong et al., 2018) introduced a probabilistic framework for SDF using a Normal-Beta mixture distribution, their approach does not extend to the uncertainty in segmentation or shape inference challenges. To the best of our knowledge, this research represents the initial effort to employ SDF to address the challenge of segmenting thin retinal layer boundaries and incorporate Gaussian uncertainty in SDF for segmentation tasks.Following are the key contributions of this work:• We present a redefined approach to thin layer boundary segmentation with SDF.• We extend Gaussian modeling for aleatoric uncertainty estimation in our framework.• We show that the proposed uncertainty estimation can offer a means to flag unreliable segmentation, particularly under compromised layer visibility or integrity. 
method: 
 Consider an OCT B-scan, or image, I : X × Y → R that assigns to each coordinate x, y an intensity value I(x, y), with x ∈ X the horizontal coordinate and y ∈ Y the vertical coordinate. Let a x ∈ I denote a single A-scan at horizontal location x as a x : Y → R, and it is defined a x (y) := I(x, y). The ground truth of a retinal layer can be parametrized as a function y gt : X → Y that assigns to every a-scan a corresponding vertical y coordinate. The y location in single A-scan a x may then be denoted as y gt x := y gt (x). With this notation in place, we present three methods for retinal layer segmentation: pixel-wise, regression, and signed distance function (SDF) approach.Pixel-wise approach: A neural network f predicts a segmentation function s : X × Y → [0, 1] that returns a probability for the layer to each position. Specifically, a network with parameters θ generates s = f segm [I; θ], such that ideally s(x, y gt x ) = 1 at the location of the layer, and zero otherwise. Typically, the pixel-wise segmentation predictions are parametrized with Bernoulli distributions, giving a probability for object presence and uncertainty that is directly reflected by the entropy (i.e., -s log(s) -(1 -s) log(1 -s)) of the distribution. Notably, this approach can only express uncertainty in the presence of the structure, but not its shape.Regression approach (REGR & pREGR): A neural network f regr predicts a regression function y regr : X → Y that parametrizes the layer similarly as done in the ground truth, generating y regr = f regr [I; θ] such that ∀ x : y regr x ≈ y gtx . Such a model will be referred to with label REGR. To incorporate uncertainty in the predicted location we let the neural network parametrize a predictive distributionEQUATIONwhich we model as a Gaussian distribution with mean µ(x) = f regr µ [I; θ](x) and variance σ(x) = f regr σ [I; θ](x). Such a probabilistic approach will be referred to with pREGR. Signed distance function approach (SDF ): A neural network f sdf predicts a signed distance function d : X × Y → R with the property that it satisfies the Eikonal constraint, that is ∀ x,y : ∥ ∂ ∂y d(x, y)∥ = 1, and d(x, y gt x ) = 0, such that d can be interpreted as a distance to the layer. The Eikonal constraint ensures that d linearly increases when moving away from the boundary. Note that in our method the Eikonal constraint is enforced by explicit construction of the ground truth to train the model. Then from a predicted SDF d, the actual location of the layer is obtained by solvingEQUATIONi.e., by finding the zero-level set of d, where the level set of a function d is defined as the set of coordinates S l for which it equals the given level l. In our setting, this means thatS l := {(x, y) ∈ X × Y | d(x, y) = l} .Since we can define the SDF per A-scan as d x we can also define the per-A-scan level set as S l x := {y ∈ Y | d x (y) = l} . Due to the laminar structure of the retina, and the Eikonal constraint, we can assume that the per-A-scan zero level set consists of only a single element, which we denote with y sdf (x) and which is the unique solution of (2). We thus have S 0x = {y sdf (x)}. In contrast to the regression method which explicitly (directly) parametrizes a layer through a contour function y regr : X → Y, the signed distance function approach implicitly parametrizes y sdf : X → Y as the zero level set of d. We label the latter method with SDF.Probabilistic SDF-based regression (pSDF ): We model uncertainty on the location of the layer by letting the neural network predict the expected distance µ(x, y) = f sdf µ [I; θ](x, y) as well as an uncertainty for that prediction σ(x, y) = f sdf σ [I; θ](x, y), to parametrize a predictive distribution for the SDF d viap(d(x, y) | I, θ) = N (µ(x, y), σ(x, y) 2 ) .(3)The uncertainty in the predicted SDF value is directly related to uncertainty in the actual contour location. Namely, if the SDF is normally distributed as above, then the uncertainty σ(x, y) on the SDF value translates to uncertainty on the vertical location viaEQUATIONwhere y sdf (x) is the solution of (2) at x. This result follows from the fact that by the Eikonal constraint, we have d(x, y + σ) = d(x, y) + σ, see Fig. 1 . We label this probabilistic SDF-based regression approach with pSDF.Optimization objective: With these probabilistic models in place, we take as optimization objective the likelihood of the ground truth under the probabilistic models. For the SDF approach, we construct the ground-truth d gt (x, y) following the process detailed in A.1. The negative log-likelihood (NLL) for it at a given pixel (x, y) is obtained byEQUATIONwhich under i.i.d. assumption leads to the overall loss (summed over all pixels):EQUATION)The NLL becomes a least squares loss if σ = 1, which we use for REGR and SDF.  
experimental setup: 
 Datasets. We utilized the public dataset (internal ) from (Farsiu et al., 2014) , comprising 384 OCT volumes from AMD and control participants, with three manually annotated retinal layers: the inner limiting membrane (ILM), the retinal pigment epithelium (RPE), and Bruch's membrane (BM). OCT volumes were acquired using Bioptigen SD-OCT scanners, covering a 6.7 mm×6.7 mm area centered on the fovea, producing volumetric scans of 1, 000 × 512 × 100 dimensions. Additionally, we also utilize an external validation dataset (external ), a data set of 458 B-scans from 159 unique participants from the Rotterdam Study (Hofman et al., 2007) . This set was acquired using a Topcon system, obtaining 512 × 885 pixels or 512 × 650 pixels and covering a 6x6mm area centered on the macula.Training and Inference. The internal dataset was divided into distinct sets for training (179 AMD, 71 normal), validation (10 AMD, 10 normal), and testing (80 AMD, 34 Experimental Validation. To validate the effectiveness of our proposed approach, we evaluate the layer segmentation performance of REGR/pREGR and SDF/pSDF on both internal and external test sets using the Mean Absolute Error (MAE) in pixels. We compare our methods against previous studies (Sousa et al., 2021; Lou et al., 2020; Chen et al., 2019; Kugelman et al., 2018; Santos et al., 2019; Morelle et al., 2023) , on the internal dataset. Additionally, in our framework, the estimation of uncertainty is geared towards gauging aleatoric uncertainty, focusing predominantly on the integrity and visibility of the segmented retinal layers. To validate this, we compute the correlation of the calculated uncertainty with layer integrity and visibility. We expect a higher value of uncertainty in regions where the layer integrity is compromised or visibility is poor. To this end, we measure the average variance for each A-scan in randomly selected regions before and after being synthetically corrupted with noise such as shadow, blinking, speckle, and motion, naturally occurring in OCT scans due to various factors including disease progression and imaging noise. More about the noisy sample generation is detailed in A.5. 
layer segmentation: 
 The segmentation performance of different methods are detailed in Table 1 . Our method, both in its probabilistic (pSDF ) and non-probabilistic (SDF ) forms, significantly boosted the performance over REGR/pREGR method, as evidenced by the improvement of the averaged MAE -approximately 2.38x for the internal and 2.4x for the external test set in the probabilistic version, and similar improvements in the non-probabilistic one. Moreover, the lower standard deviation suggests improved segmentation precision and consistency across B-scans. We also note that the introduction of uncertainty estimation leads to slightly better segmentation performance. This improvement can be attributed to how uncertainty prediction modulates the residual loss in Eq. 5. Effectively functioning as a data-adaptive regression modifier, it allows the network to adjust the impact of residuals (Kendall and Gal, 2017a) . This is particularly beneficial for reducing the influence of erroneous labels, a common challenge in segmentation tasks, and, consequently, making the model more robust to noisy data.Fig. 10 of the appendix shows a comparison of our method with previous studies, surpassing their reported performance. It is important to note, however, that these studies employed different training and test data partitions, and direct comparisons are not possible. Additionally, we present a comparative analysis featuring a pixel-wise segmentation method, as detailed in appendix B.1, alongside our approach.Finally, Fig. 3 presents a series of five distinct examples. It is evident that the SDF/pSDF approach enhances segmentation precision, particularly in the presence of AMD-related abnormalities. As shown in the first two rows of Fig. 3 , intricate structural deformation (such as drusen) were more accurately captured by SDF/pSDF. The third row demonstrates our method's proficiency in handling cases where the retinal layers are closely packed, showcasing enhanced delineation in such challenging scenarios. Furthermore, the last rows present cases of Retinal Pigment Epithelial Detachment (PED), a pathological condition that appears as domed elevations of the RPE layer (Todorich et al., 2012) , posing significant segmentation challenges. Our approach handles such cases well compared to REGR/pREGR, demonstrating its robustness and improved accuracy.The quantitative results of our experiment with artificially distorted B-scans are shown in Fig. 4 (a). These findings highlight that our approach consistently registers high un- 2). These results suggest that the quantified uncertainty in our model transcends mere segmentation confidence, potentially flagging pathological alterations tied to layer integrity. It can be particularly valuable for diseases affecting structural integrity, such as retinitis pigmentosa (RP) and geographic atrophy (GA), which especially cause disruption of the ellipsoid zone and thinning or attenuation of the retinal pigment epithelium, respectively. This uncertainty measurement can effectively highlight areas where the retinal structure is compromised, offering deep insights into disease progression. 
conclusion: 
 In this paper, we concentrate on advancing retinal layer segmentation in OCT B-scans by focusing on two main aspects: improved segmentation of thin layers and enhanced uncertainty quantification. We introduce an SDF-based approach to achieve better layer shape representation, addressing the shortcomings of previous approaches and leading to improved segmentation. This representation also inherently leads to a more accurate estimation of the uncertainty concerning the layer shape, offering a deeper understanding of layer integrity and visibility in pathological and noisy conditions. EQUATION)where level is the SDF level that defines the boundary (typically zero) and s const is a predefined value. This masking operation serves to highlight the regions in the B-scan where the retinal layer boundary is likely to be located. Then the boundary is extracted by applying a weighted averaging scheme to the pixel indices, using W . For each column x (corresponding to each A-scan), the boundary coordinate y sdf x is computed as:EQUATION)where y runs over all pixel indices in the column. This essentially, transforms the implicit SDF representation into explicit coordinates, pinpointing the retinal layer boundaries. 
 
 Appendix: For the REGR approach, we modify the ResUnet++ architecture to regress the retinal layer boundary coordinates, producing an output of 3 × 512 for 512 × 512 input B-scans as shown in fig. 5(a) . This is primarily done by a non-expanding decoder for one of the spatial dimensions as explained by (Liefers et al., 2019) . We use a significantly smaller model of 70 million parameters, in contrast to the 187 million parameters in (Liefers et al., 2019) yet experiments with their proposed architecture yield comparable results. In the SDF approach we adhere closely to the original ResUnet++ configuration except, for outputting three signed distance functions that mirror the input's spatial dimensions. For the uncertainty-aware variants, pREGR and pSDF, a new prediction head is integrated to predict the mean and variance for each column and pixel location, as shown in 5(b) & 5(d) respectively. Despite the architectural variations in REGR/pREGR and SDF/pSDF, we try to keep the models as close as possible to facilitate a fair comparison between methods.In alignment with our methodology, we optimize the Negative Likelihood (NLL) across all models, both probabilistic and deterministic. For the REGR approach, the NLL manifests simply as mean squared error (MSE) under the assumption of a Gaussian distribution with fixed variance. For SDF however, we slightly deviate since empirical observations indicate that an L1 loss results in superior segmentation fidelity compared to an L2 loss. Additionally, to increase the concentration capacity of the network on details near the surface (Park et al., 2019) , we introduce a 'clamp' function, restricting the error within a specified range: The function clamp(x, δ) := min(δ, max(-δ, x)) introduces the parameter δ to control the distance from the surface over which we expect to maintain a metric SDF.EQUATIONIn the probabilistic counterpart, we optimized as it's shown in 5. Again for pSDF, we adapt to its clamped version as following:EQUATIONHere the chosen δ values are typically between 28-30. We empirically find a larger clamp value results in less precise segmentation bounderies whereas a smaller value leads to a generalization problem resulting in overall reduced performance, especially on the external dataset.Here we explain in detail how we generate the noisy sample with different types of noise and what some analogous naturally occurring phenomena in OCT to these noises. Shadow artifact. Shadowing can naturally occur due to blockages or opacities in ocular media, often caused by cataracts or hemorrhages, leading to darkened or obscured regions in the scans (Duker et al., 2021) .To add the shadow artifact within a specific B-scan, we adhere to the procedure outlined by (de Vente et al., 2023) . For any given B-scan, each constituent A-scan a x undergoes an individualized modification process. Here, x spans the totality of A-scans, collectively numbered as X . The transformation of each A-scan a x is governed by the shadow function S, defined as S(a x ) = a x • (1 -s(x)), where the term s(x) is derived from a Gaussian probability density function:s(x) = 1 σ √ 2π e -1 2 ( x-µ σ ) 2. Parameters µ and σ are randomly determined within the bounds [0, X ] and X 4 , 3X 4 respectively. Blinking artifact: Blinking artifacts are analogous to motion artifacts caused by patient movement or blinking during the scan, resulting in discontinuities or stripes in the B-scan (Chhablani et al., 2014) .To introduce artificial blinking artifacts into B-scans, we commence with a B-scan where all pixel intensities are set to zero. Subsequently, we superimpose additive Gaussian noise onto this B-scan. The mean of the Gaussian distribution was set to the median pixel value observed across the entire OCT scan, while the standard deviation was matched to the standard deviation inherent to the OCT scan itself.Speckle artifact: Speckle is an inherent property of OCT imaging, arising from the coherent nature of the light source and the interference of backscattered light, manifesting as granular noise that can mask underlying retinal structures (Curatolo et al., 2013) .To replicate the characteristic granularity of speckle noise in B-scans, a binary modification of pixel intensities is employed. A probability p, uniformly selected from the interval [0.4, 0.6], determines the binary state of each pixel. Accordingly, pixels are stochastically assigned either the maximum or minimum intensity values present in the B-scan, thereby producing the sharp, speckled contrasts characteristic of speckle noise.Motion artifact: Similar to blinking, motion noise in OCT can be attributed to micromovements of the patient or the eye during scanning, leading to blurring or smearing of the B-scan (Chhablani et al., 2014) .To simulate motion artifacts in B-scans, we implement a localized pixel displacement. For each horizontal cross-section of the B-scan, a random shift is applied, with the shift magnitude uniformly drawn from the interval [-∆ max , ∆ max ], where ∆ max denotes the maximum allowed pixel shift. This shifting process introduces a realistic representation of motion blur, akin to the motion artifacts. by simply applying softmax to each A-scan (per column of the 2D image) and taking the coordinate with the highest probability. This ensures a single coordinate for each layer per A-scan. This allows us to compute the mean absolute error to compare with other approaches. However, this approach is also not stable in terms of prediction as it shows oscillating behavior shown in Fig. 7 . Tab. 2 outlines the performance of this approach, which performed nearly ≈7x and ≈10x worse than our proposed method on internal and external datasets respectively.We compare our uncertainty estimation with more widely used approaches such as Monte Carlo Dropout (MCDO) (Kendall and Gal, 2017b) and Deep Ensemble (Lakshminarayanan et al., 2017) . We again use the same experimental setup as our proposed approach. Addi-tionally, to estimate the performance we consider 5 ensemble members trained from scratch for deep ensemble, and we sample 15 times for each input image for MCDO. We make the following observations when we compare to our method. Segmentation Performance. The segmentation performance of the Deep Ensemble aligns closely with that of our method, as detailed in Tab. 2. Conversely, the Monte Carlo Dropout (MCDO) approach experienced a minor decline in performance across both internal and external datasets. Better Uncertainty. To compare the uncertainty with our approach, we measure the average variance for each A-scan in randomly selected regions before and after being synthetically corrupted with noise patterns as explained in section 3. The results can be found in Fig. 9 (a-b ). We note here that both MCDO and Deep ensemble remain very sensitive to shadow and blinking noise but insensitive to other types of noise, leading to overall unbalanced uncertainty estimation. In contrast, our method produces more balanced uncertainty across the board as shown in Fig. 9 (c ). Further qualitative evaluation also reveals that both MCDO and Deep ensemble often produce erroneous uncertainty estimates (Fig. 8 ). For example, in cases where the layers are well visible, high uncertainties can be produced by these approaches. Furthermore, the extent of regions in which higher uncertainty is expected due to certain pathologies or imaging artifacts is often underestimated or overestimated.Computational Cost In our approach, we deploy an ensemble of five members, each requiring independent training. This necessitates executing five forward passes during in-Figure 10 : Layer segmentation performance comparison with other studies, measured with mean absolute error (MAE) in pixels. FCN-GS (Kugelman et al., 2018 ), CapsNet (Santos et al., 2019) , DeepForest (Chen et al., 2019) , Wave (Lou et al., 2020 ), DexiNed (Sousa et al., 2021) , REGR (Liefers et al., 2019) , OCRegression (Morelle et al., 2023) ference, quintupling the computational demand for both the training and inference phases. Additionally, the requirement to store the weights of five distinct models increases the memory footprint. Also, the MCDO technique predominantly inflates the computational cost during inference, which in our implementation, increases fifteenfold as we perform fifteen sampling operations for each input image.  


Decision: The paper proposes a method for retinal layer segmentation in Optical Coherence Tomography (OCT) scans using probabilistic Signed Distance Functions (SDF) predicted by a ResUNet++ model. While the approach shows promise and demonstrates performance improvements over baseline methods, reviewers raise concerns about the novelty of the method, the clarity of certain visualizations, and the depth of comparison with existing methods.

The paper presents a well-structured and promising approach for retinal layer segmentation in OCT scans. To strengthen the findings, reviewers recommend a more comprehensive comparison with existing segmentation methods, clearer visualization of uncertainty estimates, and a more thorough literature review to demonstrate the novelty and effectiveness of the proposed method. The authors have addressed many of the concerns.

Reviews: review: paper_summary: paper_summary: This paper proposes using probabilistic SDF to perform retinal layer segmentation in OCT.
The main idea is to predict the mean and standard deviation of the pixelwise SDF using a ResUNet++.
Evaluations are mostly done against regression models that directly predict the a layer coordinate per vertical scan (A-scan), using two different datasets.
main_review: main_review: Thank you to the authors for carefully addressing the comments.
Although the main section hasn't changed significantly, many of the comments have been addressed through additional contents in the appendix. The quality of the original submission was also good enough for a higher rating given the clarifications.
strength_weakness: strength_weakness: The model could have been easily compared against segmentation methods, but it is only compared against regression methods.
The idea of using SDF instead of segmentation is not entirely novel. Here is one example (but there should be many more): Xue, Yuan, et al. "Shape-aware organ segmentation by predicting signed distance maps." Proceedings of the AAAI Conference on Artificial Intelligence. Vol. 34. No. 07. 2020.
The uncertainty estimate  visualization in Fig. 4b is unclear. This makes it hard for us to acknowledge its usefulness.
The claim that "a neural network predicts a SDF with the property that it satisfies the Eikonal constraint" is unsubstantiated. Based on the implementation descriptions, it sounds like it was just a straightforward neural network prediction without any constraints on the predicted output. It seems speak more to the way that the SDF training data were generated.
questions: questions: Was the SDF model compared against segmentation models? How do the results compare?
What is Fig. 4b trying to show? Specifically, what is the meaning of the dotted line?
How is the Eikonal constraint satisfied from the ResUnet++ prediction?
paper_summary: paper_summary: This paper proposes a method for segmenting the several layers of optical coherence tomography scans. The heart of the proposed method is a signed distance function with uncertainty. The method is trained and validated on two different publicly available datasets and the results are shown to outperform simpler methods.
main_review: main_review: The response to my questions is sufficient. However, in the light of the uncertainty about the novelty, my final rating remains the same. I have nothing more to add....................................
strength_weakness: strength_weakness: It seems that a comparison with the proposed representation is missing with Dong et al., "PSDF Fusion: Probabilistic Signed Distance Function for On-the-fly 3D Data Fusion and Scene Reconstruction", ECCV 2018. In particular, this article's equation (3) with Dong's equation (1) seem very similar. I also find the notation of \Phi_\mu and \Phi_\sigma too subtle for easy reading. Also, the color of the curves plotted on top of the images in Figure 3 and similar is very difficult to see, which makes it difficult to appreciate the comparison.
questions: questions: Please compare with Dong et al., please update the notation for mean and sigma networks, please update Figure 3, etc.
paper_summary: paper_summary: This paper refines the segmentation by predicting a SDF that effectively parameterizes the retinal layer shape via level set. They extended Gaussian modeling for aleatoric uncertainty estimation in their framework. In general, the motivation is sufficient, and the methods are clearly defined, but the comparison with existing methods and literature review is insufficient.
main_review: main_review: Thanks for the author's reply, benefited a lot.
Based on the author's reply, I have no updated comments and maintain the original score.
Based on the author's reply, I have no updated comments and maintain the original score.
strength_weakness: strength_weakness: 1. The comparative methods are all existing regression methods. Have other uncertainty estimation methods [1-3] and alternative foundational frameworks [4-5] not been considered?

2. The authors claim to have addressed the challenges of thin layer segmentation and the lack of geometric grounding. However, there is no presentation or demonstration of these two challenges.

[1] MCdropout: What uncertainties do we need in bayesian deep learning for computer vision?
[2] ensemble: Simple and scalable predictive uncertainty Estimation using deep ensembles.
[3] Evidential-based method: Reliable joint segmentation of retinal edema lesions in oct images
[4] nnUnet: a self-configuring method for deep learning-based biomedical image segmentation
[5] Transformer-based: An image is worth 16x16 words: Transformers for image recognition at scale
questions: questions: 1. This draft uses regression for segmentation, as indicated in Equation 6. Has the consideration of common segmentation loss functions, such as Dice loss, been taken into account as supplementary options?
2. The comparative methods are all existing regression methods. Have other uncertainty estimation methods [1-3] and the substitution of different foundational frameworks [4-5] been considered?
3. The authors claim to have addressed the challenges of thin layer segmentation and the lack of geometric grounding. Can these two challenges be illustrated with example images?
[1] MCdropout: What uncertainties do we need in bayesian deep learning for computer vision?
[2] ensemble: Simple and scalable predictive uncertainty Estimation using deep ensembles.
[3] Evidential-based method: Reliable joint segmentation of retinal edema lesions in oct images
[4] nnUnet: a self-configuring method for deep learning-based biomedical image segmentation
[5] Transformer-based: An image is worth 16x16 words: Transformers for image recognition at scale

Comments: title: Response to reviewer (nGsx)
Response to reviewer (2R9g)
Response to reviewer (R8tK)
Rebuttal Summary
comment: We would like to thank the reviewer (nGsx) for providing detailed feedback. We have implemented several modifications in response. We are confident that these changes have improved the clarity and coherence of our work. In the following sections, we address each of the points raised by the reviewer,


- **"Has the consideration of common segmentation loss functions, such as Dice loss, been taken into account as supplementary options?"**
  
  We have experimented with both cross-entropy loss and Dice loss. In our experiment, we found that training was unstable with the Dice loss, but we were able to train a model with a cross-entropy loss. However, this approach leads us to the problem of disconnected layer boundaries (please see newly added Fig.6), as some of the pixels that belong to the layer boundaries are classified as background pixels. The problem of disconnected lines can be alleviated by applying softmax to each A-scan (each column of the 2D image) and taking the coordinate with the highest probability. This ensures a single coordinate for each layer per A-scan. But this is also unstable as it produces oscillation in the predicted line (please see newly added Fig.7). As for the performance compared to our approach pixel-wise approach performs approximately 7x and 10x worse on *internal* and *external* datasets. 

  In response to your feedback, we have added section B.1 in the Appendix detailing the pixel-wise segmentation approach.

- **"Have other uncertainty estimation methods been considered?"**
  
  In response to your feedback, we have included experimentation (B.2 of the Appendix) on how the Monte Carlo Dropout and Deep ensemble stack against our method. We note the following findings: (1) Segmentation performance of the Deep ensemble is on par with our method (please see Tab.02) whereas MCDO showed a slight performance drop, (2) Both MCDO and Deep ensemble remain very sensitive to certain types of noise (e.g. shadow, blinking) at the same time insensitive to other types of noise (please see Fig.9). Leading to overall unreliable uncertainty estimation (3) Carefully qualitative evaluation also reveals that both MCDO and deep ensemble often produces erroneous uncertainty (please see Fig.8) in challenging cases even though the layer features are detectable.

  In conclusion, we found neither approach brings advantages in terms of segmentation and uncertainty whereas both Deep ensemble and MCDO result in 5x-15x (either inference or both training and inference) increases in computational requirements.

- **"The comparative methods are all existing regression methods. Have other substitutions of different foundational frameworks been considered?"**
  
  As mentioned in one of the previous issues, we have added a comparison with a pixel-wise segmentation trained with cross-entropy loss to provide more context to our approach and found it to be performed approximately 7x and 10x worse on *internal* and *external* datasets (please see tab.2).  

  As for other types of architecture, this has not been considered since the principles presented in the paper are agnostic to the particular type of architecture used and should easily extend to other variants of networks.

- **"The authors claim to have addressed the challenges of thin-layer segmentation and the lack of geometric grounding. Can these two challenges be illustrated with example images?"**

  The challenge of thin-layer segmentation in the context of the traditional approach (pixel-wise with dice/cross-entropy) can be seen in Fig.6 (newly added), as it highlights the difficulty of training a model in the presence of small/thin structure due to sparsity of robust supervisory signal. A possible solution is to use a regression model to predict a coordinate for each A-scan (columns in 2D image), i.e., we obtain a 1D curve from a 2D image. This has the disadvantage that somehow a conversion between different data structures (from 2D data to a 1D curve) needs to take place, and this comes at the cost of losing correspondence between predicted coordinates and the actual image coordinates. In other words, we lose the grounding of the output with respect to the input as now there is no way of telling how localized image features correspond to the coordinate predictions. It complicates relating inaccuracies/failures to specific input image features. This problem of a lack of correspondence is not faced with pixel-wise segmentation, however, as noted earlier, pixel-wise segmentation suffers from other issues.

  Both of these challenges are addressed by our approach in the following way: (1) during training the distance GNLL in combination with SDF provides a dense and robust supervisory signal to train the model, and (2) we reacquire the one-to-one pixel correspondence in a fully convolutional architecture (UNet type), assigning an SDF value and uncertainty to each pixel.
We would like to thank the reviewer (2R9g) for providing detailed feedback. We have implemented several modifications in response. We are confident that these changes have improved the clarity and coherence of our work. In the following sections, we address each of the points raised by the reviewer,


- **"Please compare with Dong et al.,"**
  
 The referenced work addresses the challenge of reconstructing a true Signed Distance Function (SDF) from noisy measurements, considering two types of noise: inaccuracies in SDF measurements and the distinction between inliers (part of the shape) and outliers (noise). Their approach includes modeling the SDF measurement inaccuracies with a Normal distribution and employing a Beta distribution for outlier modeling leading to a mixture model. While we share the application of a probabilistic framework to SDF (utilizing a normal distribution for the mean SDF and its standard deviation), our contexts differ significantly. The author focuses on fitting an SDF to noisy observations of an SDF, whereas our aim is to deduce an SDF directly from image data. I.e., our method is an inference problem (deduces an SDF from image data), whereas their method is a reconstruction/denoising problem (filters out noise from an observed SDF). Consequently, a practical comparison is not possible, however, in light of the above discussion, we have added the study of Dong et al. to our related work section (which is embedded within the Introduction) and thank the reviewer for bringing it to our attention.

- **"please update the notation for mean and sigma networks, please update Figure 3, etc."**
  
 We have updated the notation for the neural networks from $\Phi$ to $f$ for ease of reading however we would still like to keep the sub and superscripts to maintain the consistency between the notation of the neural network across all the approaches (REGR,pREGR, SDF, and pSDF).

We have also updated Fig.3 along with all the other figures for better visuals.
We would like to thank the reviewer (R8tK) for providing detailed feedback. We have implemented several modifications in response. We are confident that these changes have improved the clarity and coherence of our work. In the following sections, we address each of the points raised by the reviewer,


- **"The idea of using SDF instead of segmentation is not entirely novel."**

  We recognize the reviewer's observation regarding the application of Signed Distance Functions (SDF) in segmentation tasks, a point we have acknowledged by citing relevant prior work in the introduction of our paper. However, we wish to highlight two critical distinctions that underscore the novelty and contribution of our work: (1) utilization of the signed distance function (SDF) approach to tackle thin structure segmentation (in this case one-pixel width retinal layer boundary) has not been shown in the literature. (2) Although other works have introduced a probabilistic framework for SDF, their approach did not extend to the uncertainty in segmentation or shape inference challenges. Our work advances the application of probabilistic SDF to measure uncertainties in such a scenario (e.g., segmentation/shape inference).

  
    These points now have been elucidated more clearly at the conclusion of the introduction section.
  
- **"Was the SDF model compared against segmentation models? How do the results compare?"**

  The SDF model was compared with a pixel-wise segmentation model trained with cross-entropy loss. However, this approach leads to the problem of disconnected layer boundaries (please see newly added Fig.6), as some of the pixels that belong to the layer boundaries are classified as background pixels. The problem of disconnected lines can be alleviated by applying softmax to each A-scan (each column of the 2D image) and taking the coordinate with the highest probability. This ensures a single coordinate for each layer per A-scan. But this is also unstable as it produces oscillation in the predicted line (please see newly added Fig.7). As for the performance compared to our approach pixel-wise approach performs approximately 7x and 10x worse on *internal* and *external* datasets. 

  In response to your feedback, we have added section B.1 in the Appendix detailing the pixel-wise segmentation approach.

- **"What is Fig. 4b trying to show? Specifically, what is the meaning of the dotted line?"**

  Fig. 4b in our paper aims to illustrate the uncertainty (+1 or -1 standard deviation) for each A-scan with the dotted line. i.e., the measure reflects how much the predicted coordinate can deviate from the predicted mean in the vertical direction. 
  
  However, we acknowledge that it is not explicitly mentioned in the current draft so we clarified this in the caption of Fig. 4b.
  
- **"How is the Eikonal constraint satisfied from the ResUnet++ prediction?"**

  In our setup, the Eikonal constraint is learned from the ground truth, which is constructed to satisfy this property. Note that this is because we use Danielsson's algorithm for converting binary masks of layer boundary into signed distances which computes the Euclidean distance from each pixel to the nearest object boundary, satisfying the Eikonal equation by maintaining a gradient magnitude of one in proximity to boundaries. 

  To improve the clarity, we have added further details about satisfying the Eikonal constraint in Appendix A.1.

- **"Figure 1 seems to be describing the idea of SDF and isosurface extraction. A more useful diagram may have been a schematic of how the probabilistic SDF model was implemented (2D image - ResUnet++ - pixel-wise prediction of mean & std of SDF) vs. regression or other methods."**

  In response to your feedback, we have included a schematic (newly added Fig.5) for all four methods (REGR, pREGR, SDF, pSDF) in the appendix.
We extend our sincere gratitude to the reviewers for providing detailed feedback on our manuscript. Following the insights and suggestions offered, we have made enhancements to our manuscript, refining both the presentation and the empirical substantiation of our work. Notably, we have clarified the novelty of our approach towards the end of the introduction, ensuring our contributions are well highlighted. The updated manuscript now includes detailed experimentation with a pixel-wise segmentation model, offering a comparative analysis that showcases the superiority of our method. This analysis is further expanded with experiments comparing our approach against Monte Carlo Dropout and Deep Ensemble methods, illustrating the effectiveness of our measure of uncertainty. We have also elaborated on satisfying the Eikonal constraint. Additionally, inclusion of Fig. 5-7 (along with analysis) now offers more insight into the challenges addressed by our method and the learning pipeline used in our approach. 

We believe that the improvements considerably enhance the clarity and coherence of our work, effectively addressing all concerns raised by the reviewers.