{"id":"ad6d04c9-dbb5-4a2b-a184-805176d50753","arxiv_id":"2607.21377","paper_version":1,"verdict":"CONDITIONAL","confidence":"MODERATE","novelty_score":6.0,"correctness_risk":"medium","formal_verification":"none","parameter_count":0,"one_line_summary":"A QEL temporal-logic model-checking engine with new 2DFC/FCFC indexes makes interval-based sleep cohort queries explicit and fast on large PSG repositories.","lead":"This paper builds a database engine that lets sleep researchers write cohort criteria as formal temporal-logic formulas and executes them over thousands of annotated sleep recordings, adding new index structures that make queries fast. It applies this to a public pediatric sleep dataset and shows sub-second to under-45-second query times.","discovery_kind":"new_method","skeptic_critique":{"model":"deepseek-v4-flash","headline":"Soundness of the dense-to-finite reduction rests on Theorem 1, deferred to an under-review same-group paper, and on an unproved correspondence between QE cell representatives and the integer-segment-ID enumeration; the central equivalence is asserted, not established.","rationale":"I read the paper as an engineering contribution whose central claim is that a QEL/BEST model-checking engine plus two new indexes makes formal temporal cohort discovery practical at repository scale. Three things must hold for that claim: sound reduction from dense-time semantics to the finite endpoint computation (Theorem 1 plus implementation correspondence); exactness of the index algorithms (Propositions 1-2); and reproducible experiments. I checked the easier parts first. Proposition 2's proof sketch is correct; the 2DFC complexity analysis is consistent with standard fractional-cascading results (build is O(n) only because the input lists are pre-sorted; the O(log n + m + k) query bound with per-label additive cost is honestly stated); the QE outline for Theorem 1 is standard. So I do not believe the theorem is false. The genuine soft spot is exactly the reader's weakest assumption: the reduction's soundness as instantiated is not established within this paper. The proof is deferred to a same-group under-review reference; the theorem's constructive F (one representative per cell, including open-cell interiors) is never connected to the integer-segment-ID encoding; and for the Before-variant templates the cell boundaries are affine surfaces (q+x = endpoint) rather than points, so completeness of the endpoint enumeration is non-obvious. The paper itself flags the nested-formula limitation in its Limitations section. I also noted a smaller internal inconsistency: the abstract claims FCFC 'reduced RAM query time by 80-98%' while Figure 5a shows several queries where FCFC was slower (negative time-saved), and the build-time comparisons lack error bars and released code; these are subordinate to the soundness question. None of this demonstrates the central claim is wrong — it identifies the condition that must be verified to treat the claim as settled. The reader's CONDITIONAL verdict at moderate confidence is appropriate, and my stress-test does not move it, so UNCHANGED. My proposed dyadic-refinement differential test would settle the soundness concern directly by comparing the engine against the exact dense-time semantics.","tokens_in":19978,"tokens_out":18517,"duration_ms":177808,"concrete_test":"Differential test: implement Definition 4 exactly (exact rational arithmetic, no endpoint encoding) as a reference, and evaluate the Section 3.5 templates — including Before variants 1-4 with their unbounded ∃q∃x∃y — on small adversarial BESTs (coinciding endpoints, half-open boundaries, tight windows) using iterative dyadic refinement of the rational timeline until query answers stabilize; compare the reference cohort memberships and witness counts against the engine's integer-segment-ID answers on identical inputs. If they coincide across the adversarial suite, the reduction is sound in practice; any divergence pinpoints the cell or boundary class the enumeration misses.","verdict_should_be":"UNCHANGED","load_bearing_attack":"The central claim — that QEL/BEST model checking supplies correct, machine-computable cohort semantics — requires that answers computed over finite endpoint arrays coincide with satisfaction in the dense-time semantics of Definition 4. Section 3.4 discharges this with Theorem 1, then sends the reader to 'Zhang et al. (2026)', a same-group paper under review; the proof is not in this manuscript, so the correctness hinge is external. In good faith, the theorem is probably true: the sketch (quantifier elimination in dense ordered divisible abelian groups, with atomic interval tests expanded to linear inequalities whose constants are interval endpoints) is standard. The actual risk is narrower: the theorem's constructive finite set F must contain one representative of every cell of an affine decomposition — including interior points of open cells — while the implementation 'encod[es] endpoint representatives as integer segment identifiers' and asserts this reduction is 'a semantic consequence of QEL.' No argument shows that the segment-ID enumeration is a complete transversal of the cells induced by the Before-variant templates' affine boundaries (q+x = endpoint, q+x+y = endpoint), where variable combinations rather than single endpoints define boundaries. The paper's own Limitations section concedes that fully general nested QEL formulas need recursive application of the theorem beyond the evaluated templates, so the implementation's scope is narrower than the theorem's statement. Consequently the equivalence between QEL satisfaction and index-based answers — and the clinical counts in Table 3 (e.g., 254 subjects) — is asserted rather than established. Secondary, internally checkable issues: the abstract's blanket 'FCFC reduced RAM query time by 80-98%' is contradicted by Figure 5a, which shows several queries with negative time-saved; and no artifact or error bars support the headline build-time comparisons. Neither is fatal; the reduction soundness is load-bearing.","agreement_with_reader":"agree"},"referee_report":{"model":"deepseek-v4-flash","summary":"The paper proposes a logic-based temporal cohort discovery engine for sleep-study interval annotations. Each recording is modeled as a Biomedical Event Structure Temporal Model (BEST), a finite map from event labels to non-overlapping rational interval ensembles; cohort criteria are expressed as Rational Ensemble Logic (QEL) formulas and evaluated by model checking over a dense rational timeline. To make model checking scalable, the authors introduce two index structures: 2DFC, which builds two fractional-cascading structures over per-label start/end lists to answer interval-overlap range queries in near-logarithmic time, and FCFC, which uses a global boundary index with per-label successor arrays for dual-event temporal pattern matching. Experiments on synthetic data up to 90 million intervals and on the Cleveland Children's Sleep and Health Study (515 subjects, 202,587 intervals, 23 labels) report, e.g., 2DFC build time 3,655 s versus 11,549 s (RTFC) and 23,902 s (2DRT) at 90M intervals, and sub-second native-scale queries with cohort queries under 45 s at 1,000× scale. The central correctness claim is that dense-time QEL satisfaction reduces, via a finite evidence set, to evaluation over the implementation's finite endpoint/segment arrays.","tokens_in":20266,"tokens_out":8199,"duration_ms":85286,"significance":"If the semantic reduction and the index correctness are fully established, this is a valuable contribution to biomedical informatics: it offers a formal, human-readable, machine-executable language for temporal phenotypes, and it provides concrete indexing techniques that exploit the sorted, non-overlapping structure of normalized sleep annotations. The empirical evaluation is substantial, the complexity analysis is explicit, and the real-world NSRR deployment is a useful benchmark. However, the main correctness hinge — the finite-evidence theorem connecting dense-time QEL to the endpoint-array engine — is cited to an under-review companion paper rather than proved here, and the claimed segment-ID reduction is asserted rather than demonstrated. The indexing algorithms are also incompletely specified. The paper therefore shows promise but does not yet fully substantiate its central formal claims.","major_comments":[{"comment":"The finite rational evidence set is the sole formal bridge from dense-time QEL semantics (Definition 4) to the finite arrays used by the engine, but the theorem is stated as 'See Zhang et al. (2026)', an under-review same-group paper. The proof sketch (quantifier elimination in dense ordered divisible abelian groups) is standard for the first-order theory, yet the manuscript contains no theorem statement precise enough to check that the constructive set F_ε,q,φ is actually computable from interval endpoints and formula constants, nor a proof of the claimed equivalence for the QEL fragment used by the templates. Because every cohort answer depends on this theorem, this is load-bearing. The manuscript should either include a self-contained proof, or restrict all correctness claims to the evaluated template fragment and prove the finite-evidence property for that fragment directly.","section":"§3.4, Theorem 1"},{"comment":"The paper asserts that 'endpoint representatives are encoded as integer segment identifiers' and that the reduction from dense rational time to endpoint arrays is 'a semantic consequence of QEL, not merely an optimization.' No argument is given that the segment-ID enumeration is a complete transversal of the affine cells induced by the relevant constraints. In particular, the Before-variant templates contain quantified variables q, x, y with boundaries such as q+x = endpoint and q+x+y = endpoint, where mixed sums, not individual endpoints, define cells. A per-coordinate segment enumeration is not automatically a complete transversal of these multidimensional cells. Please provide an explicit description of F for each template and a proof that the implementation's integer-segment identifiers cover every cell (including lower-dimensional faces) needed for satisfiability.","section":"§3.4, 'semantic consequence' paragraph"},{"comment":"Algorithm 2's Query1DFC pseudocode has a concrete out-of-bounds defect: in lines 19–20, when i = |FC|-1, the code accesses FC[i+1] (both for the length and for the fallback comparison), which does not exist. Moreover, Proposition 1, which asserts that Algorithm 2 returns exactly the overlapping intervals, is not proved, and the semantics of the index values returned by Query1DFC (lower bound? upper bound? inclusive?) is not defined precisely. The candidate loop then checks only L[i][j].start ≤ y', so its correctness rests entirely on the unstated meaning of Query1DFC(FC_y, x'). Since 2DFC is a primary contribution, the pseudocode should be corrected and accompanied by a correctness invariant/proof for Algorithm 2, or the proposition should be scoped to a precisely specified, correct algorithm.","section":"§3.6.2, Algorithm 2 and Proposition 1"},{"comment":"The query-answer semantics defines [[φ_q]]_D = {ε | (ε,q) ⊨ φ} with q an external observation point. The dual-event templates, however, write formulas such as ∃q∃x∃y ( ... )_q, internally quantifying q, which changes the meaning: the query then asks for existence of an observation point in the timeline, not satisfaction at a fixed reference point. This conflation of the reference point with a bound variable is not derivable from Definition 4 as stated. Please clarify whether q is a parameter or a bound variable in these templates; if the latter, extend the language/answer-set definition accordingly and re-express the templates in that formal notation.","section":"§3.3 and §3.5, templates"}],"minor_comments":[{"comment":"The sentence 'This work is a part of the Symbolic Biomedicine program championed by the corresponding author' is programmatic and should be moved to an acknowledgment or removed from the abstract/conclusion.","section":"Abstract/Conclusion"},{"comment":"The y-axis labels 'tel_query_time', 'benchmark_query_time', and 'tel_time_saved' are unclear; 'tel' should be expanded or replaced (e.g., 'FCFC query time').","section":"Figure 5"},{"comment":"The 1,000× scaling is described as 'synthetically scaled datasets containing ... 1,000 times as many subjects.' It would be helpful to state explicitly that this replication preserves each subject's interval distribution, so the scaling isolates volume effects rather than distributional changes.","section":"Section 4.2"},{"comment":"The formula in Example 1 has ambiguous subscripts: (□5(CA∨OA) ∧ N3 ∧ ¬SPO2_DESAT)_600 is not clear about which conjuncts are evaluated at offset 600. Use explicit parenthesization or separate displacement notation.","section":"Section 3.5, Example 1"},{"comment":"Since Theorem 1 and Definition 2/3/4 are credited to 'Zhang et al. (2026)', which is under review, readers cannot verify these definitions from the cited source. Consider providing the full definitions/proofs in an appendix or citing a stable/available version.","section":"References"}],"recommendation":"major_revision","confidential_remarks":"Editorial note: the paper frequently cites the corresponding author's own 'Symbolic Biomedicine' program and two under-review companion papers, one of which carries the main formal proof burden. This is acceptable practice, but the current submission is not self-contained on its central correctness claim. If the companion QEL paper is available to the reviewers, that would make the assessment easier; otherwise I recommend requiring the authors to include the proof of the finite-evidence theorem for the template fragment and to fix the Algorithm 2 pseudocode before acceptance."},"author_rebuttal":null,"desk_editor":{"model":"deepseek-v4-flash","letter":"Punchline: this is a systems paper, not a breakthrough. The new content is the 2DFC and FCFC index structures for QEL model checking over interval ensembles, plus a substantial NSRR/CCSHS evaluation. The index designs are plausible; the correctness propositions for the algorithms look right for sorted, non-overlapping lists; and the empirical work is real.\n\nThe load-bearing soft spot is Theorem 1 in Section 3.4. The finite-evidence theorem is cited to an under-review same-group paper, with no proof here. The stress-test note is on target: the implementation encodes endpoint representatives as integer segment IDs and asserts this is a complete transversal of the cells induced by the affine boundaries, but no argument shows that for variable combinations like q+x = endpoint or q+x+y = endpoint. The paper's own Limitations section concedes that fully general nested QEL formulas need recursive applications of the theorem beyond the evaluated templates, so the implemented scope is narrower than the theorem's statement. That means the equivalence between QEL satisfaction over dense time and the index-based answers—and the clinical counts like 254 subjects—is asserted rather than established. This is exactly where a referee should press.\n\nOther, smaller issues: the abstract's '80-98% FCFC time reduction' is contradicted by Figure 5a, which shows negative time-saved for several queries; no code or artifact is provided; and performance numbers have no error bars or hardware details. These are moderate reproducibility gaps, not fatal ones.\n\nBottom line: this deserves a serious referee, not a desk rejection. My own verdict would be conditional—the engineering is credible, but the formal semantics needs a careful check of Theorem 1 and its applicability to the segment encoding before the central equivalence can be trusted.","headline":"Solid engineering paper with a real index contribution, but the formal soundness hinge is a theorem deferred to an under-review same-group paper—so the semantic claims are asserted, not established.","tokens_in":20881,"tokens_out":3145,"would_cite":false,"duration_ms":31955,"reading_group":"maybe","serious_thinker":"yes","would_accept_peer_review":true},"rs_alignment":null,"lean_confirmation":null,"pith_extraction":{"msc":["68P15","68P20","68Q60","03B70"],"pacs":[],"model":"deepseek-v4-flash","headline":"Formal temporal logic can make sleep cohort discovery explicit, reproducible, and fast enough for large repositories.","keywords":["Rational Ensemble Logic","temporal cohort discovery","model checking","interval ensembles","fractional cascading","sleep phenotyping","polysomnogram annotations","interval indexing"],"falsifier":"Take a small BEST and a QEL formula with nested quantifier alternation (for example, ∃x ∀y with y bounded by an affine function of x), brute-force all rational assignments in a bounded region, and compare against the endpoint-segment model checker; any satisfying assignment the checker misses would falsify the claimed sound reduction. A simpler check: inspect the companion proof for the missing theorem and test a formula whose window boundary is not an interval endpoint.","tokens_in":19850,"feed_emoji":"😴","tokens_out":6107,"duration_ms":62547,"temperature":0.7,"pith_summary":"The paper tries to establish that temporal cohort discovery over interval-annotated sleep data can be a formal model-checking task, not a collection of custom scripts. It defines a dense-time logic (Rational Ensemble Logic, QEL), a data model (Biomedical Event Structure Temporal Models, BESTs) that maps event labels to non-overlapping rational intervals, and two indexing schemes (2DFC, FCFC) that make the logic practical. If right, a sleep researcher could write inclusion criteria as explicit, reusable formulas and get exact, fast answers — sub-second on a real 515-subject pediatric cohort and under 45 seconds even when the cohort is scaled 1,000-fold. The payoff is reproducibility: two investigators with the same QEL formula necessarily retrieve the same cohort.","feed_headline":"Sleep cohort queries run in under 45 seconds at 1,000x scale","feed_subtitle":"Formal QEL logic plus two indexes replaces ad hoc scripts for defining sleep phenotypes.","key_machinery":"The engine is QEL model checking over BEST models, accelerated by two fractional-cascading indexes. QEL is a dense-time logic whose satisfaction relation is defined over rational intervals; a formula at observation point q asks whether a subject's annotation intervals satisfy the temporal pattern. 2DFC turns interval-overlap existence queries into 2D range queries with linear space and build time; FCFC precomputes, for every global interval boundary and every event label, the first interval that starts at-or-after and the first interval that ends after that boundary, giving constant-time target-event lookup for dual-event pattern matching.","core_discovery":"The central claim is that a polysomnogram can be represented as a BEST — a finite mapping from event labels to sorted, non-overlapping rational interval ensembles — and that cohort inclusion criteria written as QEL formulas (with displacement, bounded existence/universality, Boolean composition, and rational quantification) are decided exactly by model checking at an observation point. The paper's finite-evidence theorem asserts that, because QEL translates into the first-order theory of dense ordered divisible abelian groups, satisfying assignments decompose into finitely many cells; checking one rational representative per cell (in practice, endpoint representatives) is complete. On top of","pith_inferences":["Beyond the paper: if the finite-evidence theorem extends to nested quantifier alternation (which the paper lists as a limitation), the same QEL/BEST engine would generalize to ECG, EEG, and continuous glucose interval data with no algorithmic change.","Beyond the paper: the measured 2DFC-versus-RTFC crossover at ~210 event types suggests an adaptive dispatcher that chooses 2DFC for label-rich datasets and RTFC for pure interval-volume workloads.","Beyond the paper: the Before-template with tunable delay windows could be used directly as a screening instrument for apnea-desaturation latency distributions, turning the paper's Example 1 into a population phenotyping tool."],"forward_implications":["Cohort definitions expressed as QEL formulas are reusable, human-readable, and machine-executable, so identical clinical criteria produce identical cohorts across sites.","The three query templates (single-event retrieval, dual-event pattern matching, event extraction) cover the majority of AASM-style temporal criteria, including duration thresholds, bounded delay, co-occurrence, stage restrictions, and absence windows.","2DFC's linear build time and space make index refresh practical for repositories that continuously ingest or correct annotations.","FCFC's anchor-rare-event strategy gives interactive latencies for co-occurrence and before/after phenotype queries even at 1,000× scale for cohort selection.","The engine can express signal-level definitions of events directly from physiological signals, not just pre-scored labels, reducing inter-scorer variability."],"fun_headline_variants":["Sleep cohort queries: sub-second at native, under 45s at 1000x","Logic-based engine handles 1000x sleep data in under 45s","Index build time cut 3x for 90M sleep intervals via logic engine","Formal logic replaces ad hoc scripts for sleep cohort search","Sub-second sleep cohort queries with logic-based temporal engine"],"cache_read_input_tokens":2304,"weakest_assumption_plain":"The load-bearing premise is the finite-evidence theorem — that dense-time QEL satisfaction can be decided by finitely many endpoint-segment checks — whose proof is cited to a companion under-review paper rather than included here.","fun_headline_variants_meta":{"raw":{"variants":["Sleep cohort queries: sub-second at native, under 45s at 1000x","Logic-based engine handles 1000x sleep data in under 45s","Index build time cut 3x for 90M sleep intervals via logic engine","Formal logic replaces ad hoc scripts for sleep cohort search","Sub-second sleep cohort queries with logic-based temporal engine"]},"model":"deepseek-v4-flash","effort":"low","cost_usd":0.000866,"raw_usage":{"total_tokens":3626,"prompt_tokens":813,"completion_tokens":2813,"prompt_tokens_details":{"cached_tokens":256},"prompt_cache_hit_tokens":256,"prompt_cache_miss_tokens":557,"completion_tokens_details":{"reasoning_tokens":2717}},"tokens_in":557,"tokens_out":2813,"duration_ms":19866,"temperature":1.0,"reasoning_tokens":2717,"cache_read_input_tokens":256,"cache_creation_input_tokens":0},"cache_creation_input_tokens":0},"created_at":"2026-08-01T07:36:10.444317+00:00","model_set":{"reader":"deepseek-v4-flash"},"falsifier":"Take a small BEST and a QEL formula with nested quantifier alternation (for example, ∃x ∀y with y bounded by an affine function of x), brute-force all rational assignments in a bounded region, and compare against the endpoint-segment model checker; any satisfying assignment the checker misses would falsify the claimed sound reduction. A simpler check: inspect the companion proof for the missing theorem and test a formula whose window boundary is not an interval endpoint.","supporting_citations":[],"review_version":1}