{"id":"0ca4e3dd-716b-466e-9efa-a0735bde6b1d","arxiv_id":"2507.03295","paper_version":2,"verdict":"CONDITIONAL","confidence":"MODERATE","novelty_score":5.0,"correctness_risk":"medium","formal_verification":"none","parameter_count":5,"one_line_summary":"A diffusion-based generative model with training-time masking and clinical logic constraints achieves state-of-the-art surgical phase recognition on ESD videos and a small gain on cholecystectomy videos.","lead":"This paper trains a diffusion model, an AI that learns by cleaning up random noise, to output entire sequences of surgical phases from endoscopy videos instead of classifying frame by frame. It reports the best accuracy and Jaccard scores on the ESD820 dataset and a small gain on the public Cholec80 benchmark, offering a generative alternative to multi-stage refinement networks in surgical AI.","discovery_kind":"new_application","skeptic_critique":{"model":"deepseek-v4-flash","headline":"CPKC's LTL parser is unsound as stated: Theorem 1's γ→∞ limit is false for the soft-min/max used, Eq. 17 leaves weak-until undefined when the consequent never holds, and Eq. 22 uses an undefined x; the clinical-constraint gain is therefore unverified.","rationale":"The paper's headline contribution is a diffusion-based generator constrained by clinical prior knowledge, and the ESD820 result is the strongest evidence for that claim. The reader identified the CPKC unit—its rules, formulas, and finite smoothing parameter—as the weakest assumption. My read agrees and sharpens it: the issue is not only missing specifications but an internal mathematical error. The soft-min/max defined in Eqs. (13)-(14) does not converge to min/max as γ→∞; for sequences longer than one element it diverges, so Theorem 1 cannot justify the parser. Eq. (17) also makes weak-until undefined exactly in the case the paper's own semantics allow, and Eq. (22) has an undefined x. Since CPKC contributes about a third of the total reported Jaccard improvement over the STFE baseline, the central claim that clinical-logic constraints drive SOTA performance is not established until the parser is specified and re-tested. This does not impugn the authors or the empirical results; the diffusion backbone and masking strategies may still be effective. It means the paper's distinguishing mechanism is currently unverifiable, which is precisely what a conditional verdict requires the authors to remedy. If the authors release the exact formulas, γ, and x, and the corrected ablation reproduces the gain, the objection is settled.","tokens_in":22346,"tokens_out":10205,"duration_ms":137124,"concrete_test":"Recompute min_γ and max_γ on a two-element set as γ→∞; if they diverge rather than approaching the true min/max, Theorem 1 as stated is false. Then obtain the authors' exact rule formulas, the value of γ, and the definition of x, and re-run the Table 7 ablation using a parser whose soft-min/max is evaluated in the correct limit (γ→0) and whose weak-until branch handles never-true consequents. If the +1.07 accuracy / +1.18 Jaccard gain over STFE+Diffusion disappears, the CPKC contribution to the SOTA claim is not supported.","verdict_should_be":"UNCHANGED","load_bearing_attack":"The central SOTA claim on ESD820 depends on CPKC: Table 7 attributes +1.07 accuracy and +1.18 Jaccard to adding CPKC over STFE+Diffusion. But the CPKC unit's theoretical justification is internally inconsistent. (1) Eq. (13)-(14) define min_γ{p}=−γ log Σ e^{−p_i/γ} and claim lim_{γ→∞} min_γ = min. For any sequence of length >1, as γ→∞ this expression diverges to −∞; max_γ diverges to +∞. Thus in the stated limit, an OR node is always positive and an AND node always negative, regardless of the predictions, making Theorem 1 false as written. (2) Eq. (17) defines k as the least integer with f_k(ϕ2,P_t)>0, but weak-until semantics explicitly permit ϕ2 to never hold; for any sequence where the consequent phase never appears, f_t(ϕ1 W ϕ2) is undefined. (3) Eq. (22) writes L_PL = log(1+e^{−x})(f0(ϕ,P_t)) without defining x. The exact LTL formulas for the three clinical rules and the finite γ used in the experiments are not reported, so the parser cannot be reproduced or checked. Consequently, the CPKC ablation gain could be an artifact of an arbitrary smoothing regularizer rather than evidence that clinical-logic constraints improve phase recognition.","agreement_with_reader":"agree"},"referee_report":{"model":"deepseek-v4-flash","summary":"The paper introduces CPKD, a conditional denoising diffusion framework for surgical phase recognition, focused on endoscopic submucosal dissection (ESD). The architecture couples a Swin-Transformer-based spatial-temporal feature extractor with a diffusion decoder that iteratively refines phase sequences, and a Clinical Prior Knowledge-Constraint (CPKC) unit intended to enforce expert-derived phase-ordering rules through a differentiable temporal-logic parser. The method is evaluated on ESD820, Cholec80, and a two-center external dataset, with state-of-the-art claims on ESD820, a reported SOTA-level result on Cholec80 for a variant labeled STFE+Diffusion, and ablation studies for masking strategies, conditioning layers, loss components, inference steps, and CPKC weighting. The central claim is that a diffusion-based generator, constrained with clinical phase logic, outperforms existing discriminative multi-stage refiners.","tokens_in":22657,"tokens_out":8327,"duration_ms":92119,"significance":"If the claims were fully supported, the paper would be a valuable demonstration that a generative diffusion formulation, rather than a multi-stage discriminative refinement cascade, can achieve state-of-the-art surgical phase recognition while providing interpretable clinical constraints. The work has clear strengths: it applies diffusion to a relatively underexplored surgical-video task, provides a fairly extensive ablation on ESD820, reports FPS, includes an external generalization check, and is transparent about some limitations (inference cost, small-dataset Cholec80 behavior, ESD-specific CPKC). However, the CPKC unit is the component whose ablation yields a claimed gain (Table 7), and its theoretical foundation is currently unsound as written; the Cholec80 and external-dataset evidence is also reported in a way that overstates the full method. The empirical study is promising but the manuscript needs substantial technical correction before the central contribution can be judged.","major_comments":[{"comment":"The claimed limit underlying Theorem 1 is incorrect. With min_γ{p}=−γ log Σ_i e^{−p_i/γ}, for any finite set of N>1 values, as γ→∞ one has min_γ{p} = −γ log N + O(1), which diverges to −∞; max_γ diverges to +∞. Hence in the limit used for soundness, an OR node is always positive and an AND node always negative irrespective of the predictions, so Theorem 1 is false as stated and the CPKC regularization is not justified by the given formulas. The standard smooth minimum that converges to the minimum as γ→∞ is −(1/γ) log Σ e^{−γ p_i}; the authors should adopt a correct definition, state the finite γ actually used in training, or prove soundness for the finite-γ evaluator as implemented.","section":"§4.5, Eqs. (13)–(14) and Theorem 1"},{"comment":"The weak-until and since operators are incompletely specified. For φ1 W φ2, the semantics explicitly permit φ2 never to hold (in which case φ1 must hold forever), but Eq. (17) defines the value by a minimum over [t,k] where k is the first index with f_k(φ2,P_t)>0; if no such k exists, the evaluation is undefined. For φ1 S φ2, the stated semantics are a past-time property (\"φ2 has been true and φ1 held since then\"), but Eq. (18) searches for a future k≥t, which is inconsistent with the stated semantics. These operators must be made total and correctly oriented (e.g., by defaulting to an evaluation over the whole remaining sequence for W, and by using k≤t for S).","section":"§4.5, Eqs. (17)–(18)"},{"comment":"Equation (22) defines L_PL = log(1+e^{−x})(f0(ϕ,P_t)) without defining x; the intended loss is presumably a softplus of the satisfaction score f0(ϕ,P_t), but as written it cannot be implemented. Relatedly, the three clinical rules are given only in natural language; the corresponding LTL formulas, the atomic phase assignment (P1–P8), and the finite γ used in the experiments are never reported. Without these, the CPKC ablation in Table 7 cannot be reproduced or checked, and the claim that the +1.07 accuracy / +1.18 Jaccard gain is due to clinical-logic constraints is unverified.","section":"§4.6, Eq. (22) and §4.5 clinical rules"},{"comment":"The Cholec80 table reports \"STFE+Diffusion (Ours)\" and does not include the CPKC component, yet the abstract and Section 5.2.2 claim that CPKD achieves superior or comparable performance on Cholec80. If CPKC is only defined for ESD phase logic, the claim should be restricted to STFE+Diffusion on Cholec80, or the full CPKD should be evaluated with appropriate phase constraints. As presented, the headline claim overstates the evidence.","section":"§5.2.2, Table 3 and Abstract"},{"comment":"The external multi-center validation compares CPKD only against its own internal test-set performance. There is no comparison with any prior method, and no details are provided on how the 95 videos from two centers were selected or annotated. This supports a generalization check but not the paper's comparative claims, and the 0.98% accuracy / 5.47% Jaccard drop is not analyzed statistically.","section":"§5.4, Table 9"},{"comment":"All comparative and ablation claims are based on means and standard deviations, with no significance tests, confidence intervals, or per-video paired analyses. The main CPKC gain (Table 7) is +1.07 accuracy and +1.18 Jaccard on a dataset with per-video std greater than 10; without a test, it is unclear whether this difference is reliable. I request pairwise significance tests or at least confidence intervals for the central claims.","section":"§5.2 and §5.3"}],"minor_comments":[{"comment":"The text says \"as shown in Table 5\" when it should refer to Table 9 for the internal/external comparison.","section":"§5.4"},{"comment":"There are small textual errors: \"phase transition making\" should be \"phase transition masking\" in the contributions list, and \"infection\" in the third clinical rule should presumably be \"incision\".","section":"§1 and §4.5"},{"comment":"Equation (6) states Y_T ∈ [0,1]^{T×C} after adding Gaussian noise to the hard-label ground truth; the later note that sequences are normalized to [-1,1] should come earlier to avoid an apparent inconsistency.","section":"§4.3"},{"comment":"Equation (10) gives a type signature that is difficult to parse; please clarify the domain of f_t and how multi-dimensional predictions are indexed.","section":"§4.5"},{"comment":"The description of the boundary alignment loss in Eq. (21) is unclear: the sentence \"the boundary probabilities in the denoised sequence P_t are computed as the dot product of phase probabilities from neighboring frames in 1−P_s,i · P_s,i+1\" should be rewritten as an explicit formula.","section":"§4.6"},{"comment":"The figure caption says the constraint \"a person cannot Incision before Vessel_treatment\" is formalized as φ=(¬P7 W P5), but P5 is Incision and P7 is Vessel_treatment in the phase numbering; please check that the formula and phase indices match the intended clinical ordering.","section":"Fig. 5 caption"}],"recommendation":"major_revision","confidential_remarks":"The referee's skeptical concerns about the LTL parser are largely valid: the γ→∞ soundness argument is mathematically wrong, the weak-until/since cases are undefined or misoriented, and the loss in Eq. (22) has an undefined variable. These issues sit at the core of the CPKC contribution, so the current formulation cannot be accepted. The empirical study on ESD820 is potentially valuable, and the problems appear fixable: adopt a correct smooth min/max, report the exact formulas and γ, define all LTL cases, clarify that Cholec80 results are for STFE+Diffusion, and add significance testing. I recommend major revision rather than rejection."},"author_rebuttal":null,"desk_editor":{"model":"deepseek-v4-flash","letter":"The paper is worth a look for the empirical work alone: it is the first diffusion-based system for surgical phase recognition, runs at 218 FPS with an 8-step sampler, and reports clear SOTA margins on ESD820, a large new dataset. The ablations are reasonably thorough and the conditional masking idea is a genuine extension, not just packaging. I believe the ESD820 result is real, but you cannot trust the CPKC ablation until the theory is fixed.\n\nThe CPKC unit is load-bearing: Table 7 credits it with about +1.07 accuracy and +1.18 Jaccard. But the stress-test note is correct. Eq. (13)-(14) define min_γ{p} = -γ log Σ e^{-p_i/γ} and then claim the limit as γ→∞ recovers the hard min. For any sequence of length >1, that expression diverges to -∞. The correct temperature limit for soft-min is γ→0, not ∞. So Theorem 1 is false as stated. Also, Eq. (17) leaves k undefined when the consequent never holds—which weak-until explicitly permits—and Eq. (22) uses an x that is never defined. The paper never reports the LTL formulas for the three clinical rules or the finite γ used in experiments, so the regularizer that supposedly produces the gain is neither reproducible nor theoretically justified.\n\nOther soft spots are minor by comparison but worth noting: the full CPKD was not evaluated on Cholec80 (only STFE+Diffusion), the external multi-center dataset has no baseline comparisons, and no code or data are released. The paper also does not cite Diffusion Action Segmentation (ICCV 2023), which is the direct predecessor of this paradigm; that omission should be fixed.\n\nWho is this for? Anyone working on surgical workflow analysis, especially with endoscopic video, and anyone interested in applying diffusion to temporal sequence labeling. The ESD820 dataset is a real contribution, and the conditional masking strategy could be useful beyond this specific task. But the CPKC theory must be corrected and the missing details supplied before the central claim can be taken at face value.\n\nMy recommendation: send it to peer review. It deserves a serious referee. However, the referee should be told to focus on the CPKC math and demand full specification of the rules, the smoothing parameter, and, ideally, code or at least the exact loss implementation. Keep the door open for major revision.","headline":"Strong ESD results and a sensible diffusion formulation, but the CPKC logic unit's math does not check out and the paper needs major revision.","tokens_in":696,"tokens_out":1222,"would_cite":false,"duration_ms":50118,"reading_group":"maybe","serious_thinker":"no","would_accept_peer_review":true},"rs_alignment":null,"lean_confirmation":null,"pith_extraction":{"msc":[],"pacs":[],"model":"deepseek-v4-flash","headline":"The paper claims that treating surgical phase recognition as conditional denoising of phase sequences, constrained by clinical rules written in temporal logic, sets new state-of-the-art results on ESD820 and Cholec80.","keywords":["surgical phase recognition","diffusion model","endoscopic submucosal dissection","clinical prior knowledge","temporal logic","conditional masking","surgical video analysis","Cholec80"],"falsifier":"Re-run the ESD820 experiment with the CPKC logic loss removed while holding all other settings fixed, and with the exact LTL formulas and the value of $\\gamma$ reported: the paper's Table 7 shows Jaccard 81.41 without CPKC and 82.59 with it, so a re-implementation that sees the gap shrink below noise or reverse as $\\gamma$ varies would falsify the claim that clinical constraints, rather than the smoothing schedule, drive the gain. A complementary check is to feed CPKD test videos whose phase order deliberately violates the three rules: if the model still assigns high confidence to impossible transitions, the logic constraint is not actually binding.","tokens_in":22134,"feed_emoji":"🩺","tokens_out":7097,"duration_ms":76505,"temperature":0.7,"pith_summary":"The paper is trying to establish that surgical phase recognition can be reframed as a conditional generative problem: instead of classifying each frame and then smoothing the timeline, a diffusion model starts from pure noise and progressively denoises a full phase sequence, guided by video features. On top of this generative core, the paper adds a conditional masking scheme that forces the model to work with missing, boundary-degraded, or partially hidden phase information, and a Clinical Prior Knowledge Constraint unit that translates rules of ESD workflow order, for example marking must precede injection, into differentiable temporal-logic penalties used only during training. If the central claim is right, iterative refinement in the diffusion sense plus explicit clinical logic beats current multi-stage recognition architectures on ESD820, with new best results across all four metrics, and remains competitive-to-superior on Cholec80 and an external multi-center set. A sympathetic reader would care because the approach offers a generative alternative to discriminative multi-stage models, with a built-in place for procedural knowledge that is hard for black-box classifiers to enforce.","feed_headline":"Diffusion model beats prior best on ESD phase recognition","feed_subtitle":"Clinical rules in temporal logic plus conditional masking lift accuracy and Jaccard on ESD820 and Cholec80.","key_machinery":"The load-bearing object is a denoising diffusion process over one-hot phase sequences, in which a decoder $D_\\varphi$ conditioned on masked spatial-temporal features $F_T$ reconstructs ground-truth phases from Gaussian noise; at inference, eight skipped denoising steps refine a random sequence into the final prediction. Three conditional masks modulate $F_T$ during training: a global all-zero mask that leaves only positional and timestamp cues, a phase-transition mask that blanks features near soft boundaries, and a phase-relation mask that removes entire phase segments so the decoder must infer them from neighbors. The CPKC unit takes three ESD workflow rules written as LTL-style formulas and evaluates them with a differentiable parser built from smooth min and max operators with a smoothing parameter $\\gamma$, yielding a phase-logic loss $L_{PL}$ that is added to cross-entropy, temporal smoothness, and boundary-alignment losses; a soundness theorem guarantees that, in the $\\gamma \\to \\infty$ limit, positive evaluation implies the formula is satisfied.","core_discovery":"On the paper's own terms, the discovery is that a diffusion-based generative model conditioned on spatial-temporal video features can serve as the state of the art for surgical phase recognition, and that injecting clinical prior knowledge through logic constraints materially improves both correctness and coherence. On ESD820, CPKD reports 88.88% accuracy, 89.59% precision, 91.02% recall, and 82.59% Jaccard, exceeding the previous best by 2.53, 3.55, 2.22, and 4.69 percentage points respectively; the same model reaches 94.15% accuracy, 94.12% recall, and 85.61% Jaccard on Cholec80, with precision close to the best comparator. Ablations attribute the gains to the interaction of the three masking strategies, especially relation masking, with the diffusion process, and to the CPKC logic loss, which visibly repairs violations such as injection or ESD appearing after Clips. The paper also reports that CPKD remains competitive on a 95-video two-center external set, with expected degradation from different tools and endoscopist experience.","pith_inferences":["A natural transfer target the paper leaves implicit is other procedure domains with strong phase ordering, such as cataract surgery, laparoscopy, or colonoscopy; the same LTL rule machinery would apply if the rules are rewritten for those workflows.","Because Theorem 1 holds only as $\\gamma \\to \\infty$ and the paper never reports the value of $\\gamma$ or the exact formulas for the three rules, a reproducibility-minded follow-up should ablate CPKC across a range of smoothing schedules; the 1.18-point Jaccard gain, from 81.41 without CPKC to 82.59 with it, is the number such a study would need to reproduce.","The inference-time masking probes suggest the model internalizes position and relation priors strongly enough that masking relation segments at test time even improves results, hinting that an ensemble over different test-time masks could yield a further accuracy boost beyond what the paper reports.","The paper's claim that correcting one logical error fixes cascading effects on neighboring predictions is a testable generative-dynamics hypothesis: intervene on a single denoising step by clamping an erroneous phase, and measure whether downstream frame quality improves as the paper predicts."],"forward_implications":["If the ESD820 results hold, diffusion-based phase-sequence generation is now a competitive alternative to multi-stage TCNs and transformers, with best reported accuracy, precision, recall, and Jaccard on that dataset.","Because CPKC and the masking strategies act only during training, the inference cost is just the eight-step denoising pass, so the logical-consistency gains do not add a runtime penalty.","The CPKC logic regularizer can be applied at any temporal location by changing the start index of the formula evaluation, so the same machinery can enforce constraints on local segments rather than only the whole video.","The transfer to Cholec80 suggests the generative framework is not ESD-specific, and the external multi-center results indicate it carries over to new centers with some expected degradation."],"supporting_citations":[{"why":"Supplies the ESD820 dataset and its eight-phase annotations used for the main benchmark.","marker":"[22]"},{"why":"Supplies the Cholec80 dataset, its phase annotations, and the relaxed evaluation protocol.","marker":"[23]"},{"why":"Provides the multi-stage temporal convolutional baseline that the paper contrasts with its single generative architecture.","marker":"[7]"},{"why":"Provides a Transformer-based phase recognition baseline re-implemented for the Cholec80 comparison.","marker":"[10]"},{"why":"Provides the previous state-of-the-art results on ESD820 and Cholec80 that CPKD surpasses on several metrics.","marker":"[12]"},{"why":"Provides the ASFormer architecture that is re-implemented as the temporal encoder and also serves as a baseline.","marker":"[57]"},{"why":"Provides the denoising diffusion probabilistic model formulation, including the forward noise schedule and reverse update, adopted by the diffusion unit.","marker":"[20]"},{"why":"Provides the skipped-step denoising sampler used for the eight-step inference procedure.","marker":"[21]"},{"why":"Provides the differentiable temporal logic evaluation machinery on which the CPKC parser is built.","marker":"[59]"}],"fun_headline_variants":["Diffusion with clinical priors lifts ESD phase recognition","CPKD diffusion model leads on surgical phase recognition","Clinical logic improves diffusion for phase identification","Diffusion sets new SOTA for endoscopic phase recognition"],"cache_read_input_tokens":3200,"weakest_assumption_plain":"The load-bearing premise is that the three clinical rules elicited from endoscopists are the correct and complete phase-order constraints for ESD, and that the differentiable parser with its finite smoothing parameter enforces them faithfully enough that the training-time logic loss, not just extra tuning, is what improves the model.","fun_headline_variants_meta":{"raw":{"variants":["Diffusion with clinical priors lifts ESD phase recognition","CPKD diffusion model leads on surgical phase recognition","Clinical logic improves diffusion for phase identification","Diffusion sets new SOTA for endoscopic phase recognition"]},"model":"deepseek-v4-flash","effort":"low","cost_usd":0.000235,"raw_usage":{"total_tokens":1537,"prompt_tokens":1021,"completion_tokens":516,"prompt_tokens_details":{"cached_tokens":384},"prompt_cache_hit_tokens":384,"prompt_cache_miss_tokens":637,"completion_tokens_details":{"reasoning_tokens":456}},"tokens_in":637,"tokens_out":516,"duration_ms":5963,"temperature":1.0,"reasoning_tokens":456,"cache_read_input_tokens":384,"cache_creation_input_tokens":0},"cache_creation_input_tokens":0},"created_at":"2026-08-06T20:14:51.731444+00:00","model_set":{"reader":"deepseek-v4-flash"},"falsifier":"Re-run the ESD820 experiment with the CPKC logic loss removed while holding all other settings fixed, and with the exact LTL formulas and the value of $\\gamma$ reported: the paper's Table 7 shows Jaccard 81.41 without CPKC and 82.59 with it, so a re-implementation that sees the gap shrink below noise or reverse as $\\gamma$ varies would falsify the claim that clinical constraints, rather than the smoothing schedule, drive the gain. A complementary check is to feed CPKD test videos whose phase order deliberately violates the three rules: if the model still assigns high confidence to impossible transitions, the logic constraint is not actually binding.","supporting_citations":[{"cited_title":"Renji endoscopic submucosal dissection video data set for early gastric cancer.Scientific Data, 12(1):238, 2025","cited_arxiv_id":null,"evidence_quote":"Supplies the ESD820 dataset and its eight-phase annotations used for the main benchmark."},{"cited_title":"Endonet: a deep architecture for recognition tasks on laparoscopic videos.IEEE transactions on med- ical imaging, 36(1):86–97, 2016","cited_arxiv_id":null,"evidence_quote":"Supplies the Cholec80 dataset, its phase annotations, and the relaxed evaluation protocol."},{"cited_title":"Tecno: Surgi- cal phase recognition with multi-stage temporal convolutional networks","cited_arxiv_id":null,"evidence_quote":"Provides the multi-stage temporal convolutional baseline that the paper contrasts with its single generative architecture."},{"cited_title":"Trans-svnet: Accurate phase recognition from surgical videos via hybrid embedding aggregation transformer","cited_arxiv_id":null,"evidence_quote":"Provides a Transformer-based phase recognition baseline re-implemented for the Cholec80 comparison."},{"cited_title":"SPRMamba: Surgical Phase Recognition for Endoscopic Submucosal Dissection with Mamba","cited_arxiv_id":"2409.12108","evidence_quote":"Provides the previous state-of-the-art results on ESD820 and Cholec80 that CPKD surpasses on several metrics."},{"cited_title":"Don’t pour cereal into coffee: Differentiable temporal logic for temporal action segmentation.Advances in Neural Information Processing Systems, 35:14890–14903, 2022","cited_arxiv_id":null,"evidence_quote":"Provides the differentiable temporal logic evaluation machinery on which the CPKC parser is built."}],"review_version":1}