TL;DR
This paper introduces a web-based, modular workflow that synchronizes eye tracking, EEG, and user interaction data to study naturalistic online reading in real time. By dynamically mapping gaze coordinates directly to browser text elements (words and sentences), the system can process neural and behavioral data immediately after a reading task to select specific text passages for targeted participant feedback within the same lab session.
What Problem Does This Paper Address?
Psychologists and human-computer interaction (HCI) researchers have long sought to understand cognitive states—like confusion, emotional engagement, or cognitive bias—during reading. Historically, this required highly controlled, artificial lab settings (e.g., presenting text one word or one isolated sentence at a time).
When users read naturally on the web, they skip words, look back at previous lines, and skim. Tracking this "naturalistic reading" requires co-registering eye tracking (to know exactly what word is being looked at) and EEG (to capture brain activity). However, combining these modalities in a flexible, web-native environment is incredibly difficult. Existing setups are typically rigid, proprietary, or fail to bridge the gap between raw gaze coordinates and the actual text structure (the browser's Document Object Model, or DOM). Furthermore, researchers often rely on retrospective self-reports covering the entire task, which are highly susceptible to memory bias.
Methods
The authors developed an extensible, three-phase workflow implemented as a web application:
- Pre-Experiment: Handles initial questionnaires, EEG impedance checks, and a 5-point eye-tracker calibration.
- LSL Recording (The Core Task): Participants freely browse and read web content. All data streams—raw gaze data, pupil diameter, EEG signals, and mouse/keyboard interactions—are streamed and synchronized using the Lab Streaming Layer (LSL) protocol, creating a unified XDF data file.
- Post-Experiment: The system immediately processes the task data to select a subset of sentences for the participant to review, rate, or label.
The Technical Pipeline
To connect brain and behavior to specific words, the pipeline integrates several open-source tools:
- EyeLiveMetrics: A browser plug-in that maps raw gaze coordinates to specific HTML text elements in real time, calculating fixation and saccade metrics.
- MNE-Python & ICLabel: Used immediately post-task to filter raw EEG data and automatically remove artifacts (like blinks or muscle movements) via Independent Component Analysis (ICA).
- Fixation-Triggered Segmentation: The pipeline extracts word fixation onsets from the eye-tracking data and uses them as timestamps to segment the continuous EEG data into precise epochs.
- elfen: A Python package that automatically extracts linguistic features from the read text.
Datasets
Because this paper introduces an experimental framework rather than a machine learning model, it does not introduce a standardized benchmark dataset. However, to evaluate the workflow, the authors curated a news corpus consisting of 192,685 German-language articles published between April 2024 and April 2025, which served as the reading material for their selective exposure case study.
Key Insights and Ideas
- Closing the Experimental Loop: The major "aha moment" of this architecture is its ability to compute metrics immediately after a task session to alter the final phase of the same lab session. Instead of asking a participant "How did you feel about the article?", the system isolates the top 10 sentences that triggered the longest fixation durations or the highest theta-band power increases and asks, "What did you think about this specific sentence?"
- Controlling for the Uncontrolled: In naturalistic reading, researchers cannot control what the user chooses to read. By integrating automated linguistic annotation (
elfen) directly into the pipeline, the framework allows researchers to post-hoc control for stimulus heterogeneity (e.g., word length, word frequency, syntactic complexity) when analyzing physiological responses.
Key Results
- High Mapping Accuracy: The
EyeLiveMetricscomponent used for fixation detection and word-level mapping was validated against Tobii Pro Lab ground truth, achieving strong Pearson correlations of $\le 0.96$ across all fixation metrics. - Feasible Implementation: In their selective exposure use case (evaluating how readers process politically congruent vs. incongruent news regarding climate change and migration), the system successfully filtered down thousands of read sentences to a manageable maximum of 60 targeted sentences per participant for post-task validation based on fixation length and EEG theta-power modulations.
Limitations and Future Work
- Sensitivity to Environmental Noise: Factors like varying eye-tracking hardware, sampling frequencies, calibration drift, display resolutions, and dynamic web layouts remain potential sources of noise. If the gaze-to-word assignment is slightly off, the error propagates directly into the EEG epoching.
- Mobile EEG Constraints: The current artifact correction relies heavily on ICA, which the authors note is less reliable for low-density, mobile EEG setups often favored in ecological or field studies compared to high-density laboratory systems.
- Future Directions: The authors plan to systematically study how different typographic and structural text layouts impact gaze-to-word mapping accuracy. They also suggest integrating eye-openness signals directly from the eye tracker to improve EEG artifact rejection algorithms.
Summary updated