{"id":"88c257ae-2e9b-4e38-af7a-1993b2352f77","arxiv_id":"2504.12556","paper_version":2,"verdict":"CONDITIONAL","confidence":"MODERATE","novelty_score":5.0,"correctness_risk":"medium","formal_verification":"none","parameter_count":5,"one_line_summary":"Enforcing an elliptical contour field constraint inside SAM's decoder improves segmentation of elliptical objects such as optic cups, pupils, and cell nuclei.","lead":"This paper adds an elliptical shape constraint to the Segment Anything Model (SAM) by replacing its final decoding step with an unrolled mathematical optimization. On four medical and pupil image datasets, the modified SAM (SAM-ESP) improves segmentation accuracy over fine-tuned SAM by small but consistent margins.","discovery_kind":"new_method","skeptic_critique":{"model":"deepseek-v4-flash","headline":"Ellipticity of SAM-ESP outputs is asserted, not established: the network uses 100 unrolled iterations while the paper's own Algorithm 1 needs ~500 to make a region elliptical (Fig. 2), and no shape-fidelity metric is reported.","rationale":"The reader's weakest assumption correctly points to the moment-based T re-estimation and the lack of convergence guarantees for the nonconvex alternation. My concern sharpens this: the central claim is not merely that the alternation converges, but that the final network output is elliptical. The paper provides no direct evidence for this, and its own Figure 2 suggests 500 iterations may be needed for the shape prior to take effect, while SAM-ESP deploys only 100. I also note that the proof of Proposition 1 in Appendix A is logically invalid: from two vectors being parallel to grad u, it does not follow that the two curves coincide; this further weakens the theoretical guarantee, although the proposition itself appears true under additional regularity. The absence of a shape-fidelity metric is the decisive gap, and a concrete measurement of constraint residuals and fitted-ellipse overlap would settle whether the headline claim is supported. Because the empirical Dice improvements are plausible and the requested evidence is readily obtainable, the appropriate disposition remains conditional rather than rejection or acceptance.","tokens_in":18662,"tokens_out":8382,"duration_ms":94111,"concrete_test":"Re-run SAM-ESP on the four test sets (REFUGE, ACDC, CASIA.v4, DTU/Herlev). For each predicted probability map u, fit an ellipse Lambda from the second-moment formulas (Eq. 22) and compute (i) the mean orthogonality residual R = mean_x |grad u(x) . T_Lambda(x)| / (||grad u(x)|| ||T_Lambda(x)||) over boundary pixels, and (ii) the Dice between the thresholded u and the filled fitted-ellipse mask. Report these numbers for SAM-fine, SAM-post, SAM-Sloss, and SAM-ESP. If SAM-ESP's residual is not near zero and its ellipse-Dice is not close to one (or not clearly better than SAM-fine's), then the central 'ensuring elliptical outputs' claim is not supported, regardless of the Dice gains in Table 3.","verdict_should_be":"UNCHANGED","load_bearing_attack":"The central claim (Abstract; Section 4.1) is that the ESP module ensures the segmentation output of SAM consists of elliptical regions. That guarantee requires the unrolled Algorithm 1 to converge to a function satisfying <grad u, T_Lambda> = 0 for the fitted ellipse parameters. Three concrete problems make this the weakest link. First, the deployed SAM-ESP uses T = 100 unrolled iterations (Section 6.1), while the standalone variational algorithm in Section 5.1 and Figure 2 needs about 500 iterations merely to turn a simple non-elliptical synthetic region into an ellipse; the ablation in Section 6.9 explores only T = 75 to 150. Second, convergence is unproven: the q-subproblem (Eq. 19) is an unprojected gradient ascent on a functional that is linear in q, and the T-subproblem is replaced by second-moment fitting (Eq. 22) rather than by the actual minimizer of E(u^{t+1}, q^{t+1}, T). Thus no finite iterate, including u^{100}, is shown to satisfy the orthogonality constraint. Third, the reported metrics in Table 3 (Dice, BD, BDSD) measure overlap and boundary distance to the ground truth, not deviation from an ellipse. The residual <grad u, T> or the distance from a predicted mask to its own fitted ellipse is never computed. The abstract's 'ensuring' is therefore a claim about a mathematical constraint that the paper neither proves for the finite truncation nor measures empirically.","agreement_with_reader":"partial"},"referee_report":{"model":"deepseek-v4-flash","summary":"This paper proposes SAM-ESP, a modification of the Segment Anything Model (SAM) in which the final decoding step is replaced by an unrolled variational algorithm that constrains the segmentation gradient to be orthogonal to the tangent field of a parameterized ellipse. The authors derive alternating subproblems for a dual variable, a softmax segmentation, and an ellipse parameter update based on second moments, and integrate the resulting iterative scheme as ESP modules into SAM. Experiments on four datasets (optic cup in REFUGE, cardiac MRI in ACDC, pupil in CASIA.v4, and cell nuclei in DTU/Herlev) and two external retinal datasets report modest improvements in Dice and boundary metrics over fine-tuned SAM and competing shape-prior baselines.","tokens_in":19020,"tokens_out":7097,"duration_ms":69643,"significance":"The proposed direction—unrolling a variational ellipse-prior model into a foundation model's decoder—is timely, and the closed-form updates make the module efficient and differentiable. If the elliptical constraint were rigorously enforced and the improvements were statistically robust, this would be a useful recipe for injecting shape priors into SAM-like models. However, the paper's central guarantee that outputs 'consist of elliptical regions' is not established: Proposition 1's proof is invalid, the deployed 100-iteration truncation is not shown to satisfy the constraint, and no shape-fidelity metric is reported. The improvements in Tables 3–6 are consistent but small, and the adaptively fitted ellipse makes the 'prior' partially data-driven. The paper does not ship machine-checked proofs or code, and the mathematical proof that underpins the method is logically flawed; nonetheless, the experimental results indicate a potentially useful soft regularizer, which justifies revision rather than rejection.","major_comments":[{"comment":"The converse direction of the proof of Proposition 1 is logically invalid. From the fact that the tangent of the contour and the ellipse tangent field are both orthogonal to the gradient, the authors conclude that (φ(t),ψ(t)) 'is not an ellipse', even though (φ,ψ) is by construction the parametrization of an ellipse. A correct argument should show that the contour is an integral curve of the vector field T_Λ and therefore a level set of the ellipse equation. Because Proposition 1 is the mathematical foundation of the constraint, this must be fixed before the claim is credible.","section":"Appendix A, proof of Proposition 1"},{"comment":"The claim that SAM-ESP 'ensures' elliptical outputs is not supported by the evidence. Figure 2 shows the standalone variational algorithm requiring about 500 iterations to morph a non-elliptical region into an ellipse, but the deployed model uses 100 unrolled iterations (Section 6.1) and the ablation only explores T = 75 to 150 (Section 6.9). The paper never reports a measure of ellipticity, such as the residual norm of ⟨∇u,T⟩ or the deviation of the predicted mask from its own fitted ellipse. Without such evidence, the finite-truncation output cannot be claimed to be elliptical.","section":"Sections 5.1, 6.1, 6.9"},{"comment":"The 'prior' is partly circular: the tangent field T is recomputed from the current segmentation mask via second-moment fitting (Eq. 22), so the constraint encourages the mask to match an ellipse derived from itself. In addition, the paper provides no convergence analysis for the alternating scheme over (q,u,T), which is nonconvex because of the T update, and no sensitivity analysis for the fixed hyperparameters (λ=ε=τ_q=1, T=100). This limits the strength of the claim that the method is a principled variational prior rather than iterative ellipse filtering.","section":"Sections 3.2, 4.1, and Eq. (22)"}],"minor_comments":[{"comment":"There is a typo: 'upscale opteration' should be 'upscale operation'.","section":"Section 2.4"},{"comment":"The inner product notation ⟨q, T·∇ui⟩ should explicitly indicate integration over Ω, and the sign convention for the dual variable should be stated consistently across the derivation.","section":"Eqs. (16)–(20)"},{"comment":"The binary entropy ⟨u, ln u⟩ + ⟨1-u, ln(1-u)⟩ differs from the multi-class entropy in Eq. (15); the relationship between the two formulations should be clarified.","section":"Eq. (23)"},{"comment":"The text states that '100 ESP modules are deployed' while Figure 1 and Algorithm 1 suggest a single unrolled module with 100 iterations; please make the terminology consistent.","section":"Section 6.1 and Figure 1"},{"comment":"The inference time of SAM-ESP is roughly twice that of SAM-fine (about 150–180 ms versus 80 ms), and this trade-off is not discussed in the main text.","section":"Table 2"},{"comment":"The reference for the CASIA.v4 dataset is given as 'B. I. Test. Casia iris database v4.', which is not a proper bibliographic entry; please cite the actual dataset reference.","section":"References"},{"comment":"The proposition assumes C1 contours, but binary segmentation functions are generally only Lipschitz; the regularity assumption should be stated and justified.","section":"Proposition 1 and Section 3.1"}],"recommendation":"major_revision","confidential_remarks":"The central claim of the paper is currently overstated relative to the evidence. I recommend that the authors either weaken the claim to 'softly regularizes toward elliptical shapes' or provide a rigorous convergence and shape-fidelity analysis. The invalid proof of Proposition 1 should be corrected; the proposition itself appears true, but the presented argument is not. The experimental gains, while consistent, are small, so the paper's contribution hinges on the mathematical and empirical validation of the elliptical guarantee."},"author_rebuttal":null,"desk_editor":{"model":"deepseek-v4-flash","letter":"Colleague,\n\nThe usable core of this paper is the ESP module: a parameterized elliptical contour field turned into an unrolled variational decoder for SAM. That is genuinely new relative to the earlier active-contour and graph-cut ellipse priors, and it builds directly on Chen et al.'s contour flow framework, which the authors acknowledge. The experiments are the real strength. Across REFUGE, ACDC, CASIA.v4, and DTU/Herlev, SAM-ESP consistently beats fine-tuned SAM and the shape-loss variants on Dice and boundary metrics. The gains are small—roughly 0.25 to 1.45 Dice points—but they hold across four internal datasets, two external datasets, and a U-Net++ appendix. The salt-and-pepper robustness result is credible and worth taking seriously.\n\nThe soft spots are real, and one of them is load-bearing for the abstract's central claim.\n\nFirst, the proof of Proposition 1 in Appendix A is not valid. From <grad u, T_Lambda> = 0, the argument says any level curve has tangent parallel to T and concludes the contour is an ellipse. Parallel tangents to a fixed vector field do not imply the contour is a member of the ellipse family; you need an integrability or unique-integral-curve argument, and the proof does not supply one. The proposition may be true, but this paper does not show it.\n\nSecond, the phrase \"ensuring that the segmentation output consists of elliptical regions\" is not supported by any measurement. The deployed network unrolls 100 iterations, while the standalone algorithm in Figure 2 needs about 500 iterations to make a simple synthetic region elliptical, and the ablation only explores 75 to 150. No metric reports the distance of the output mask to its own fitted ellipse, or the residual <grad u, T>. So \"ensuring\" is asserted, not verified.\n\nThird, the prior is self-referential: Eq. 22 estimates the ellipse parameters from the current soft mask, so the constraint is effectively an iterative ellipse-fitting regularizer rather than an external geometric prior. That is a legitimate mechanism, but the word \"prior\" oversells it. I would reframe it as an unrolled elliptic-shape regularizer.\n\nMinor issues: there is no convergence guarantee for the nonconvex alternation, and all hyperparameters are fixed with no sensitivity analysis. Given the consistent experimental results, I do not treat these as fatal.\n\nWho is this for? People working on shape priors for deep segmentation, and on SAM adaptation for optic cup, pupil, and cell nucleus tasks. It deserves a serious referee. My recommendation: send it to review, but require a fixed or qualified Proposition 1, a quantitative shape-fidelity metric, an explicit ellipse-fitting baseline, and ideally code release. The idea and experiments are worth engaging, not desk-rejecting.","headline":"A useful unrolled elliptical regularizer for SAM with consistent but modest gains, overclaimed as a guaranteed elliptical-output prior and undermined by an invalid proof of its key proposition.","tokens_in":19519,"tokens_out":3246,"would_cite":true,"duration_ms":36233,"reading_group":"maybe","serious_thinker":"yes","would_accept_peer_review":true},"rs_alignment":null,"lean_confirmation":null,"pith_extraction":{"msc":[],"pacs":[],"model":"deepseek-v4-flash","headline":"A variational ellipse prior, unrolled inside SAM, makes its segmentation outputs elliptical and beats fine-tuned SAM.","keywords":["Image segmentation","Elliptical shape","Soft threshold dynamics","Duality","Segment Anything Model","Contour field","Shape prior"],"falsifier":"Run SAM-ESP on a test set whose ground-truth masks are elliptical but whose images contain strong non-elliptical distractors or heavy occlusion, so that SAM's initial features mislocate the object's center; if Dice falls below that of fine-tuned SAM while the loss and iteration count are held fixed, the claim that the moment-based ellipse re-estimation reliably guides segmentation fails. A more direct check of the 'outputs are elliptical regions' assertion is to measure the intersection-over-union of each predicted mask with its own best-fit ellipse and test whether SAM-ESP outputs reach the near-perfect overlap the variational constraint should enforce.","tokens_in":18476,"feed_emoji":"🩺","tokens_out":5588,"duration_ms":56820,"temperature":0.7,"pith_summary":"The paper claims that a segmentation network can be made to output elliptical regions by replacing the final decoding step of the Segment Anything Model with an unrolled variational solver that enforces a contour-field constraint. The constraint requires the gradient of the soft segmentation to be orthogonal to the tangent field of a parametrized ellipse, which forces every contour line of the output to be a concentric ellipse. Solving this variational problem with a dual algorithm yields a closed-form softmax update, and the ellipse parameters are re-estimated from the second moments of the current segmentation. Unrolling this solver as 100 network modules inside SAM gives SAM-ESP, which the paper reports outperforms fine-tuned SAM on the REFUGE, ACDC, CASIA.v4, and DTU/Herlev datasets and on two external datasets. The significance is that a mathematically derivable shape prior can be folded directly into a generalist segmentation model rather than being applied only through post-processing or loss modifications.","feed_headline":"SAM with a built-in ellipse prior beats fine-tuning on four datasets","feed_subtitle":"Replacing SAM's final decoding step with unrolled variational iterations yields smoother, more accurate segmentation.","key_machinery":"The load-bearing object is the parametrized elliptical contour field $T_\\Lambda(x,y)$, the tangent vector field of a family of concentric, co-oriented ellipses. Proposition 1 establishes that $\\langle\\nabla u, T_\\Lambda\\rangle = 0$ everywhere is equivalent to all contours of $u$ being ellipses from that family, turning the shape prior into a convex-set constraint. The solution mechanism is a primal-dual alternating scheme: gradient ascent on the dual variable $q$, a strictly convex softmax update for $u$ (derived via the DC algorithm with a soft-threshold-dynamics regularization term), and a second-moment computation of the ellipse center, axes, and rotation that updates $T_\\Lambda$. This mechanism carries the argument because the orthogonality constraint is what guarantees ellipticity, and the unrolled primal-dual iterations are what allow the constraint to be trained with backpropagation.","core_discovery":"The central claim is that SAM's final Heaviside decoding step can be replaced by a variational problem whose feasible set is defined by the orthogonality condition $\\langle\\nabla u, T_\\Lambda\\rangle = 0$, where $T_\\Lambda$ is the tangent vector field of a parametrized ellipse with parameters $\\Lambda=(x_0,y_0,a,b,\\theta)$. Proposition 1 in the paper states that all contours of $u$ are concentric, co-oriented ellipses if and only if this condition holds everywhere. The proposed solver alternates a dual ascent step for the Lagrange multiplier $q$, a softmax closed-form update for the segmentation $u$, and a second-moment re-estimation of the ellipse parameters from the current soft segmentation. Unrolled over 100 iterations, this becomes the ESP module that replaces SAM's final decoding operator, ensuring the network output consists of elliptical regions. The paper reports that SAM-ESP achieves higher Dice, lower boundary distance, and lower boundary-distance standard deviation than fine-tuned SAM on the four in-distribution datasets and on two external generalization datasets, and that it retains higher accuracy under salt-and-pepper noise.","pith_inferences":["Beyond the paper: the same unrolled-dual construction could be reused for other parametric shape families, such as circles, superellipses, or star shapes, by swapping the tangent field and re-deriving the moment formulas.","Beyond the paper: because the ellipse parameters are re-estimated at every iteration from the current soft mask, the prior is self-adjusting at inference time, so a testable extension is whether the method degrades gracefully when the target object is a deformed or partially occluded ellipse.","Beyond the paper: the paper fine-tunes the entire image encoder; a lighter protocol that freezes SAM's encoder and trains only the ESP decoder remains untested and would clarify how much of the gain comes from the shape constraint versus from full fine-tuning.","Beyond the paper: the reported gains are uneven across datasets, so the benefit likely scales with how strongly the objects satisfy the ellipse prior; applying the method to a convex but non-elliptical object class (e.g., organ shapes with rounded corners) would probe the limits of the prior."],"forward_implications":["SAM-ESP's outputs are structurally constrained to be elliptical regions, a hard guarantee that vanilla SAM, fine-tuned SAM, or shape-loss training do not provide.","On the four datasets, SAM-ESP outperforms fine-tuned SAM on Dice, boundary distance, and boundary-distance standard deviation, with the largest Dice gain on DTU/Herlev (96.45 vs 95.54).","On external datasets RIM-ONE DL and BinRushed, SAM-ESP generalizes better than fine-tuned SAM, while the shape-loss variant degrades generalization.","Under salt-and-pepper noise, SAM-ESP retains a Dice of 93.75 on DTU/Herlev versus 89.97 for fine-tuned SAM, indicating the constraint also acts as a noise regularizer.","The ESP module is not tied to SAM: experiments with Unet++ on CASIA.v4 show reduced boundary errors for pupil and iris segmentation, suggesting the module can be grafted onto other backbones."],"supporting_citations":[{"why":"Supplies the Segment Anything Model, whose encoder-decoder structure is decomposed into four sub-problems and whose final decoder is replaced by the ESP module.","marker":"Kirillov et al., 2023"},{"why":"Introduces the contour flow orthogonality constraint that the paper adapts to enforce elliptical contours.","marker":"Chen et al., 2025"},{"why":"Provides the soft threshold dynamics regularization and the DC/softmax solution scheme that the variational model builds upon.","marker":"Liu et al., 2022"},{"why":"Supplies the second-moment formulas used to estimate ellipse parameters from the current soft segmentation.","marker":"Leung et al., 2004"},{"why":"Provides the convexity-prior level-set method used as a comparison in the natural image experiment of Section 5.","marker":"Yan et al., 2020"},{"why":"Provides a learnable ophthalmology SAM baseline whose performance the paper compares against on REFUGE and ACDC.","marker":"Qiu et al., 2023"}],"fun_headline_variants":["SAM with ellipse prior: variational refinement beats fine-tuning","Ellipse-constrained SAM: better segmentation without fine-tuning","SAM's ellipse decoder: unrolled variational step boosts accuracy","Ellipse prior in SAM: contour field math improves segmentation"],"cache_read_input_tokens":3200,"weakest_assumption_plain":"The method depends on the second moments of the current soft segmentation being a trustworthy estimate of the true object's ellipse; if the initial SAM features are poor or the object deviates from an ellipse, the re-estimated tangent field points the constraint toward the wrong shape.","fun_headline_variants_meta":{"raw":{"variants":["SAM with ellipse prior: variational refinement beats fine-tuning","Ellipse-constrained SAM: better segmentation without fine-tuning","SAM's ellipse decoder: unrolled variational step boosts accuracy","Ellipse prior in SAM: contour field math improves segmentation"]},"model":"deepseek-v4-flash","effort":"low","cost_usd":0.00066,"raw_usage":{"total_tokens":3010,"prompt_tokens":927,"completion_tokens":2083,"prompt_tokens_details":{"cached_tokens":384},"prompt_cache_hit_tokens":384,"prompt_cache_miss_tokens":543,"completion_tokens_details":{"reasoning_tokens":2017}},"tokens_in":543,"tokens_out":2083,"duration_ms":16750,"temperature":1.0,"reasoning_tokens":2017,"cache_read_input_tokens":384,"cache_creation_input_tokens":0},"cache_creation_input_tokens":0},"created_at":"2026-08-16T12:29:24.178718+00:00","model_set":{"reader":"deepseek-v4-flash"},"falsifier":"Run SAM-ESP on a test set whose ground-truth masks are elliptical but whose images contain strong non-elliptical distractors or heavy occlusion, so that SAM's initial features mislocate the object's center; if Dice falls below that of fine-tuned SAM while the loss and iteration count are held fixed, the claim that the moment-based ellipse re-estimation reliably guides segmentation fails. A more direct check of the 'outputs are elliptical regions' assertion is to measure the intersection-over-union of each predicted mask with its own best-fit ellipse and test whether SAM-ESP outputs reach the near-perfect overlap the variational constraint should enforce.","supporting_citations":[{"cited_title":"Segment anything","cited_arxiv_id":null,"evidence_quote":"Supplies the Segment Anything Model, whose encoder-decoder structure is decomposed into four sub-problems and whose final decoder is replaced by the ESP module."},{"cited_title":"Contour flow constraint: Preserving global shape similarity for deep learning based image segmentation, 2025","cited_arxiv_id":null,"evidence_quote":"Introduces the contour flow orthogonality constraint that the paper adapts to enforce elliptical contours."},{"cited_title":"Deep convolutional neural networks with spatial regularization, volume and star-shape priors for image segmentation","cited_arxiv_id":null,"evidence_quote":"Provides the soft threshold dynamics regularization and the DC/softmax solution scheme that the variational model builds upon."},{"cited_title":"Lip image segmentation using fuzzy clustering incorporating an elliptic shape function","cited_arxiv_id":null,"evidence_quote":"Supplies the second-moment formulas used to estimate ellipse parameters from the current soft segmentation."},{"cited_title":"Convexity shape prior for level set - based image segmentation method","cited_arxiv_id":null,"evidence_quote":"Provides the convexity-prior level-set method used as a comparison in the natural image experiment of Section 5."}],"review_version":1}