PHASE 04 Β· COGNITIVE & CARDIAC DYNAMICS
In-Depth Research Case Study OpenNeuro ds006848 Β· N=30 Β· 5,959 Trials 1000 Hz Continuous ECG

Question-Level Cardiac Dynamics During Working Memory

How your heart slows down when you focus, why people whose hearts fail to slow down make 8% more mistakes under time pressure, and a transparent audit of 5,959 memory tests across 30 people.

Testing Volume
30 People / 5,959 Questions
Signal Quality
1000 Hz Hospital-Grade ECG
Mental Task
Short-Term Memory (Sternberg)
Integrity Audit
Verified / 6 Self-Corrections
−1.93 bpm
Heart Slows During Focus
Average heart rate slows from 80.8 to 78.8 bpm while holding items in mind
+0.782 bpm
Rebound Under Rush
When rushed to answer quickly, the heart immediately speeds back up
−8.32%
Mistake Surge Under Rush
People whose hearts didn't slow down suffered an 8.3% drop in accuracy when rushed
+16.17 ms
Heart Jitter on Mistakes
Beat-to-beat variability became noticeably unsteady on incorrect answers

Why Question-by-Question Heart Tracking Matters

Most health studies average your heart rate over 5 or 10-minute blocks. But a 5-minute average completely wipes out what happens during a single thought: what happens in the 2 seconds when you look at a question, the 5 seconds when you hold it in your mind, and the exact moment you answer.

Using high-speed heart recordings across 30 people answering nearly 6,000 memory questions, this investigation answered two simple questions:

The Two Core Questions: 1. Does your heart automatically slow down when you concentrate on holding a thought? And 2. If your body fails to make this adjustment, do you make more mistakes when rushed for time?

Continuous Preprocessing & Event Alignment Pipeline

To eliminate filter edge-transients that inevitably distort short epochs, all signal conditioning was executed on the continuous, unsegmented session-level recording prior to trial extraction:

Figure 6: Validated End-to-End Processing & Verification Chain Python Β· MNE Β· NeuroKit2
Raw Continuous ECG 1000 Hz Lead I/II Recording Noise Cleaning Filter 0.5–40 Hz Session-Wide Filter Heartbeat Peak Detection Finds True Beats & Removes Noise Clean Beat-to-Beat Data Saved Clean RR Intervals (.npz) Align Heartbeats to Memory Questions Rest [-5..0s] Β· Reading [0..5s] Β· Remembering [5..15s] Β· Answering [15..20s] Compute Heart Rate (BPM) & Compare to Resting Baseline Statistical Testing & Verification Checks Linear Mixed Models (LMM) Β· Group Splits Β· Beat Variability (HRV) Audited Short Windows to Guarantee Findings Are Real
Signal Processing Integrity: ECG is filtered and heartbeats are detected across the entire continuous session first. Only after heart rate is cleanly computed are the signals sliced into question phases, strictly preventing edge errors and math distortions.

Question-Level Cardiac Trajectory (5,959 Trials)

Across all 30 participants and 5,959 trials, working-memory processing was accompanied by a reproducible phase-dependent change in heart rate, with the greatest average slowing during maintenance and subsequent recovery during recall:

Figure 1: Evoked Cardiac Trajectory Across Working-Memory Phases N=30 Β· 5,959 Attempts Β· Grand Mean
BASELINE (-5 to 0s) ENCODING (0 to 5s) MAINTENANCE (5 to 15s) RECALL (15 to 20s) 81.0 bpm 80.0 bpm 79.0 bpm 78.0 bpm Baseline Ref (80.84 bpm) 80.84 bpm 79.56 bpm (-1.16) 78.75 bpm (-1.93 max dip) 79.19 bpm (-1.62) -5.0 s 0.0 s 5.0 s 15.0 s 20.0 s
Average Heart Pattern Across All Trials: Instantaneous heart rate drops progressively from 80.84 bpm down to 78.75 bpm while holding items in memory (a drop of −1.93 bpm), and then speeds back up toward baseline when answering (79.19 bpm).
Careful Scientific Note: This reveals a clear, repeatable bodily response: your heart naturally slows down while holding information in mind, and speeds back up when you answer.

When Does the Heart Speed Up? Paced vs Rushed Tasks

When items were presented slowly (1 second per item), people stayed relaxed and their heart rate stayed calm. But when items were flashed rapidly (0.2 seconds per item), the heart surged back up (+0.78 bpm) to mobilize mental energy under speed pressure:

Task Speed How Items Were Shown Heart Speed-Up at Recall Statistical Difference P-Value What It Means
Slow (Paced) 1.0 s per item −0.009 bpm Baseline reference — Calm pacing; no surge needed
Fast (Rapid Rush) 0.2 s per item +0.782 bpm t = 3.171 p = 0.00358 Significant Surge
Simultaneous All items at once +1.101 bpm t = 4.289 p = 0.00017 Strongest Surge
Fast + delay Rapid + extra breathing room −0.127 bpm t = −0.482 p = 0.6335 Surge gone; extra time helped them relax
Statistical Check: I audited the statistical model to make sure we compared recall directly against the holding phase, proving this surge was a genuine physical reaction to speed pressure.

Two Types of People: Decelerators vs Accelerators

To see if this heart dip actually matters for test scores, I split the 30 participants into two groups: 22 people whose hearts slowed down normally, and 8 people whose hearts barely dipped or even sped up:

Figure 2: Distribution of Maintenance Ξ”HR Across All 30 Participants Operational Cutoff: τ = −1.30 bpm
0.0 bpm Operational Cutoff: −1.30 bpm 22 Decelerators (ΔHR ≤ −1.30 bpm) 8 Attenuated / Accelerators (ΔHR > −1.30 bpm)
Cutoff Clarification: The −1.30 bpm threshold represents the upper quartile of the empirical maintenance distribution. It is strictly an operational cutoff and NOT a biological threshold.
Response Phenotype Cohort Size Mean Maintenance ΔHR Overall Accuracy 95% Confidence Interval Statistical Comparison
Decelerators N = 22 −2.38 bpm 0.7012 (70.1%) [0.640, 0.755] Difference: +0.0498 (d = 0.358)
t-test: p = 0.4468
Permutation (10k): p = 0.3854
Attenuated / Accelerators N = 8 −0.49 bpm 0.6514 (65.1%) [0.540, 0.749]

Validated Finding: No clear overall working-memory performance difference was detected between the two response phenotypes. (Do not call this proof of cognitive equivalence; statistical power is naturally constrained by N=8).

Cognitive Vulnerability Under Rapid Presentation

While general accuracy was equivalent, exposing participants to high temporal pacing revealed a selective vulnerability in the attenuated cohort:

Figure 3: Recall Accuracy Under Time Pressure by Cardiac Phenotype Mixed-Effects Interaction: β = −0.0762, p = 0.0084
80% 70% 60% 50% Slow (1.0 s) Simultaneous Fast + Delay Fast (0.2 s Rapid) 56.9% 48.5% −8.32% gap (p=0.0084) Decelerators (N=22) Accelerators (N=8)
Speed-Pressure Interaction: Linear mixed-effects modeling confirmed that the attenuated group suffered a selective accuracy impairment under rapid pacing (β = −0.0762, p = 0.0084). This effect remained invariant after baseline heart-rate adjustment (β = −0.0760, p = 0.0082).
Sample Size Rigor: The attenuated group contains only 8 participants. Sensitivity analyses confirm that wide confidence intervals accompany small between-subject samples. This finding reflects an observational vulnerability under speed pressure, not a proven causal mechanism.

Short-Window HRV Analysis in Working Memory

To examine whether the 8 attenuated responders suffered from resting autonomic dysregulation or low vagal tone, short-window HRV metrics were extracted during the 10-second maintenance delay for successful vs failed trials:

Figure 4: Failure vs. Success Short-Window Autonomic Dispersion N=8 Attenuated Cohort Β· FDR Adjusted
HRV Metric Success Mean Failure Mean Failure − Success Diff Wilcoxon Test BH-FDR p-value Forensic Audit Verdict
PoincarΓ© SD2 66.18 ms 82.35 ms +16.17 ms W = 0, p = 0.0078 p = 0.0469 Validated (100% concordance)
Total SDNN 53.82 ms 69.25 ms +15.43 ms W = 1, p = 0.0156 p = 0.0469 Validated (7 of 8 subjects)
Cardiac Vagal Index (CVI) 4.366 4.518 +0.152 W = 1, p = 0.0156 p = 0.0469 Validated (7 of 8 subjects)
RMSSD (Vagal Index) 62.45 ms 81.66 ms +19.21 ms W = 3, p = 0.0391 p = 0.0586 Downgraded to Fragile (Fails FDR)
SampEn (Sample Entropy) 0.98 0.95 −0.035 p = 0.3125 — Retracted (23.5% infinite / invalid)
DFA-α1 (Fractal) 0.88 0.85 −0.033 p = 0.0391 p = 0.0586 Retracted (Negative exponent artifact)
Validated HRV Takeaway: Failed working-memory trials were associated with greater short-term RR-interval variability, particularly in SD2 and SDNN. (Avoid causal claims such as "failure causes autonomic instability").

Figure 5: Physiological Heterogeneity Among the 8 Attenuated Responders

The 8 attenuated responders did not form a single homogeneous phenotype. They exhibited vast inter-individual physiological divergence:

Subject ID Classification Mean ΔHRmaint Accuracy RMSSD SDNN pNN50 CSI CVI
sub-005 Attenuated Decelerator −0.79 bpm 0.154 81.3 ms 55.0 ms 68.0% 0.86 4.63
sub-009 Attenuated Decelerator −0.95 bpm 0.354 74.3 ms 63.8 ms 19.3% 1.62 4.44
sub-011 True Accelerator +0.75 bpm 0.739 103.7 ms 80.1 ms 59.6% 1.19 4.93
sub-017 Attenuated Decelerator −0.85 bpm 0.440 28.5 ms 29.8 ms 3.8% 2.16 3.82
sub-021 Attenuated Decelerator −0.14 bpm 0.874 82.4 ms 65.0 ms 38.4% 1.24 4.56
sub-023 Attenuated Decelerator −1.24 bpm 0.817 103.9 ms 78.6 ms 7.0% 1.78 3.97
sub-032 Attenuated Decelerator −1.07 bpm 0.257 84.6 ms 70.9 ms 31.6% 1.50 4.58
sub-035 True Accelerator +0.75 bpm 0.642 58.6 ms 56.6 ms 24.2% 1.77 4.45
HRV Does Not Explain the Cardiac Phenotype: Accelerators and Decelerators exhibited identical resting and maintenance HRV distributions (RMSSD: 77.16 vs 75.11 ms, p = 0.3932; pNN50: 31.49% vs 31.58%, p = 0.9086). The failure to decelerate during maintenance is not an intrinsic deficit in resting vagal tone.

Data Verification: What I Caught, Corrected, and Rejected

Scientific integrity means checking your own analysis for hidden errors and traps. A rigorous self-audit identified six critical methodological issues that had to be addressed:

CORRECTION 01

Regression Reference-Level Misinterpretation

Original: Significant Condition × Recall interaction interpreted relative to Maintenance.
Correction: Model was specified relative to Baseline. Computed direct Recall − Maintenance paired contrast (+0.782 bpm, p = 0.00358).
CORRECTION 02

Data-Derived Phenotype Cutoff

Original: −1.30 bpm framed as a general physiological threshold.
Correction: Explicitly redefined as an empirical, data-derived operational cutoff (~73rd percentile), not a universal biological marker.
CORRECTION 03

Short-Window SampEn Degeneracy

Original: Reported SampEn decrease during failure (−0.035, p = 0.31).
Correction: Retracted. In 10-second windows (9–15 beats), zero template matches produced 23.5% infinite (∞) values.
CORRECTION 04

DFA-α1 Negative Exponents

Original: Significant fractal scaling reduction (p = 0.0391).
Correction: Retracted. Sourced from contaminated short windows; cannot estimate fractal power laws on 15 beats; produced impossible negative exponents.
CORRECTION 05

Trial-Level Pseudoreplication (CVI)

Original: Monotonic graded CVI increase (Success → Partial → Fail).
Correction: Simpson's paradox artifact from trial pooling. At participant level, Success and Partial are identical (4.366 vs 4.355).
CORRECTION 06

Multiple-Testing Correction (RMSSD)

Original: RMSSD failure effect reported as statistically significant (p = 0.0391).
Correction: Downgraded to fragile. Benjamini-Hochberg FDR p = 0.0586 (not significant); failed in 6 of 8 leave-one-out tests.

Code Architecture & Repository Layout

The complete pipeline is modular, fully deterministic, and structured for end-to-end auditability:

FocusFlow-main/ β”œβ”€β”€ README.md # Repository overview and execution guide β”œβ”€β”€ requirements.txt # Locked dependency environment (MNE, NeuroKit2, Pingouin) β”œβ”€β”€ pipeline/ β”‚ β”œβ”€β”€ build_question_physiology_pipeline.py # Continuous 1000 Hz ECG cleaning, R-peak cache, trial slicing β”‚ β”œβ”€β”€ run_question_cardiac_analysis.py # Trajectory modeling, time-on-task, condition contrasts β”‚ β”œβ”€β”€ phenotype_cognitive_analysis.py # Phenotype classification, LMMs, speed-pressure interaction β”‚ β”œβ”€β”€ run_accelerator_hrv_deep_analysis.py # Short-window HRV extraction, Wilcoxon & FDR testing β”‚ └── hrv_wm_pipeline.py # Trial-level feature assembly and validation engine β”œβ”€β”€ data/ β”‚ β”œβ”€β”€ rpeaks_cache/ # Cached continuous R-peak arrays (.npz per subject) β”‚ β”œβ”€β”€ question_level_dataset.csv # Cleaned question-level physiological dataset β”‚ └── question_phase_dataset.csv # Phase-segmented beat-to-beat metrics β”œβ”€β”€ tables/ β”‚ β”œβ”€β”€ table1_cardiac_trajectory_audited.csv # Verified grand-mean and participant trajectories β”‚ β”œβ”€β”€ table2_condition_contrasts_audited.csv # Direct Recall-vs-Maintenance contrasts β”‚ β”œβ”€β”€ table4_graded_performance_hrv.csv # Success vs Failure HRV distributions β”‚ └── table8_extreme_accelerators.csv # Individual profiles of the 8 attenuated responders └── audit/ β”œβ”€β”€ forensic_audit_hrv_report.md # Independent adversarial HRV audit trail └── forensic_audit_cardiac_report.md # Independent adversarial cardiac analysis audit trail

Methodological Limitations & Preregistered Follow-Up

Acknowledged Study Limitations:
  • Small Attenuated Subgroup (N=8): Between-subject comparisons have wider confidence intervals; replication is mandatory.
  • Data-Derived Cutoff: The −1.30 bpm boundary was empirically derived (~73rd percentile) and is not a biological constant.
  • Observational Association: The present design demonstrates that cardiac deceleration correlates with memory, not that it causes it.
  • Absence of Synchronous Respiration: Respiratory rate and tidal depth modulate instantaneous HR; pneumography is required to exclude respiratory confounds.
  • Short-Window Constraints: 10-second windows cannot support spectral (LF/HF) or nonlinear (SampEn, DFA) HRV metrics.

Prospective Preregistered Follow-Up Protocol

To transition these findings from observational hypotheses to confirmed mechanisms:

Experimental Parameter Current Study (ds006848) Preregistered Follow-Up Protocol
Sample Size N = 30 (8 Attenuated) N ≥ 80 (Target ≥ 20 Attenuated Responders)
Respiratory Monitoring Unmeasured Continuous pneumography (chest belt) + capnography
Hypothesis Registration Post-hoc / Exploratory OSF Preregistration of −1.30 bpm cutoff & Fast condition interaction
Maintenance Delays Fixed 10 s Parametric delays (10 s, 20 s, 30 s) for spectral HRV validation

Translational Application: From Laboratory ECG to Real-Time Wearables

The signal-processing principles established in this 1000 Hz cognitive psychophysiology audit directly inform our real-time wearable sensing architecture, Novara. By translating continuous Pan-Tompkins R-peak detection and dynamic HRV algorithms into embedded firmware and streaming WebSocket architectures, we enable real-time detection of cognitive load, stress responses, and recovery states directly from live physiological hardware.

Live Hardware Acquisition & Real-Time Analytics (COM3) Novara / MaternalGuard Telemetry Β· Active ECG + PPG Streams
Live Telemetry Proof: Real-time dual-signal acquisition running over serial COM3. Demonstrates continuous ECG R-peak tracking (Heart Rhythm, 85 bpm, SQI 83%), synchronous photoplethysmography pulse contour (Blood Flow), instant RR interval (706 ms), rhythm variation (76.5 ms), and dynamic autonomic recovery classification.
Back to Projects Explore Research Journey