# Review of "Counting light sleep and wake together improves reader agreement on which nights have the most N2 interruptions"

**Recommendation: major revisions.**

The reader-agreement half of the paper is sound and reproduces exactly. The breathing half draws the wrong lesson from its own data. The paper says the hypopnea contrast between N1-only and mixed returns is a reason to keep the path labels. The study's own files show that the contrast comes almost entirely from which stage *starts* the interruption, and that the 60-second window is biased against bouts that start with wake. The headline rank gain also rests mainly on the dataset that produced the lead. Both problems can be fixed with the existing data and some rewriting.

## What I reran

- `analysis/readers.py` on the cached Dreem and ISRUC files, run in a scratch copy. The output matches `results/readers.txt` line for line: 740 matches out of 2,613 ISRUC calls, 548 with the same label, 172 of 192 disagreements pure versus mixed, 92 of those with no label difference inside the overlap, expected discordance 402 with a mixed share of 0.88 (0.95 in Dreem). Table 1 reproduces exactly.
- `analysis/paper_tables.py` on the saved `mgh_bouts.csv.gz`. Table 2 reproduces (+4.8, 2.0 to 7.5, for hypopnea; +1.6 for obstructive apnea), as does the N1-first check (2.1, −4.1 to 8.1, 180 nights).
- I did not rebuild `mgh_bouts.csv.gz` from the raw WFDB files. The code in `events.py` and `common.py` does what the Methods say.

## Main issues

### 1. The hypopnea contrast is about the first epoch of the bout, not about mixing, and the window is biased against wake-first bouts

About 74% of mixed bouts start with wake (5,572 of 7,509). All N1-only bouts start with N1. The window runs from 30 s before to 30 s after the departure from N2, so for a wake-first bout its second half falls in scored wake. Respiratory events are normally not scored during wake. The saved per-bout indicators show what this does (MGH, all bouts, % of windows with a hypopnea ending):

| Bout type | Whole window | 30 s before | 30 s after | Stable-N2 control |
|---|---:|---:|---:|---:|
| N1-only | 23.7 | 16.6 | 10.8 | — |
| Mixed, N1 first | 21.9 | 15.2 | 10.1 | — |
| Mixed, wake first | 12.0 | 10.0 | **2.5** | — |
| Wake-only | 15.8 | 12.8 | 4.3 | — |

Relative to local controls, averaged over nights: N1-only +3.0, mixed N1-first +0.9, mixed wake-first −3.9 points. When the bout starts with N1, mixed and N1-only bouts look about the same. In `paper_tables.py`'s N1-first restriction, the raw N1-only minus mixed difference *at the interruption* is −0.1 points (hypopnea) and the reported 2.1 comes entirely from a difference in background (−2.2). So Table 2 mostly shows that interruptions starting with wake are less often preceded or followed by a scored hypopnea ending, and part of that is a scoring rule rather than physiology.

The paper mentions the N1-first check, but only as "the data do not resolve how much the later stages add." The data in fact point fairly clearly to the first stage, and the paper should say so. That changes the practical advice in "What the recheck says". The defensible conclusion is that the first stage after N2 (wake or N1) tracks the timing of breathing events, and that the full path label adds little once the first stage is known. Please also use a window that does not penalize wake-first bouts (for example, the 30 s before departure only, which `hyp_before` already gives you), or at least state the scoring-rule problem plainly.

### 2. A relevant number is left out of the breathing section

The section opens with "Mixed returns included interruptions that coincided with obstructed breathing" and reports the obstructive-apnea excess for mixed bouts (+1.4). `results/contrasts.txt` also shows that mixed bouts have *fewer* hypopnea endings than their N2 controls (13.8% vs 16.9%, −3.1 points, CI −4.1 to −2.1). That result is the same wake-first window effect as in issue 1. Readers need it to judge the section, so report it.

### 3. The rank-agreement gain is mostly from the discovery data

The lead that started this study already contained the ISRUC rank correlations (0.52 / 0.28 / 0.72) and the Dreem scan. The paper says so in Methods ("motivated the analysis; the rank comparisons are descriptive"), which is honest, but the title and opening sentence still present the rank gain as the finding. On the evidence:

- ISRUC: the gain of pooled over N1-only is 0.20 (0.01 to 0.40), which only just excludes zero, in the dataset that suggested the hypothesis. The gain over the sum of the two pure counts includes zero.
- Dreem: the gain of pooled over N1-only is −0.07 to 0.40, which includes zero. Pooled does beat wake-only and the pure sum clearly.
- Mixed-only does as well as or better than the pooled count in both datasets (0.76 vs 0.67 in Dreem). So "counting light sleep and wake together" is really "including mixed bouts".

The new evidence in this study is the within-overlap decomposition: in about half of pure-versus-mixed disagreements, the readers scored every shared epoch the same. That result holds in both datasets and is the paper's strongest point. I suggest the title and first paragraph lead with it ("readers who disagree on the path usually agree on the interruption and differ on where it ends"), with the rank result as its consequence, stated at the strength above.

### 4. Report the N1 thinning control alongside the wake one

`readers.txt` shows that a random subset of each ISRUC reader's pooled calls, the same size as their N1-only count, gives a rank correlation of 0.66. The observed N1-only value is 0.52. The paper reports only the wake version (0.29 vs 0.28) and concludes that wake-only does poorly because it is rare. The N1 result says something different and more interesting: N1-only ranks nights *worse* than a random subset of the same size, so its low agreement is not just a matter of small counts. That supports the boundary interpretation, and it belongs in the paper.

## Clarity

The paper is mostly readable for someone outside the subfield. Figure 1 does a good job. Fixes:

- The sentence "In 92 of those 172, they agreed on every epoch they both included" needs a gloss. In Figure 1 the readers do disagree on one epoch (N1 vs N2); it falls outside one reader's bout. Say "every epoch inside both readers' interruptions."
- Explain early why only 57% of calls match. Readers disagree about whether many interruptions exist at all, and that matters as much as the path question.
- The Dublin sleepiness section is small (24 patients), its adjusted estimate includes zero, and the claim does not need it. Shorten it to two sentences, or keep it only to note that the wake-only direction (4.9 vs 2.1) matches the original validation cohort.
- "Pooling concealed a difference in the timing of hypopneas" should be rewritten after issue 1.

## record.json

- `type: reproduction` and `verdict` (`numbers: no / our-limits`, `conclusion: unclear`) are fair. No original numbers were recomputed, and the note says so. It would be clearer to say in the paper's first paragraph that the original cohort results were not, and could not be, recalculated. At present this appears only near the end.
- The `summary` and the last finding about hypopnea timing need to change to match issue 1. "Keeping the component labels preserved information about hypopnea timing" should become something like "the first stage after N2, not the full path, tracked hypopnea timing."
- `so_what` is clear and does not mislead. "A more consistent picture" is fair, given the stated limits.

## Single most important change

Rework the breathing section around the first stage after N2. Use a window that does not count against bouts starting with wake, report the mixed-versus-control hypopnea deficit, and drop the "retain path labels" advice unless it survives once the first stage is controlled for. With that change and a title that leads with the boundary-placement result, this would be a sound and useful short paper.
