Smartphone EEG for Attention Drift Prediction

Smartphone EEG for Attention Drift Prediction

ISEF Category: Computational Biology and Bioinformatics

Ready to Turn This Idea Into a Real Project?

This guide was put together with the help of AI research tools to give you a solid starting point. But a competitive science fair project lives in the details: refining your research question, fine-tuning your variables, analyzing your data, and presenting your findings like a seasoned scientist.

For next steps tailored to your interests, skill level, and timeline, work one-on-one with a MehtA+ mentor. Learn more about MehtA+ Science & Engineering Research Mentorship →

Subcategory: Computational Neuroscience  ·  Difficulty: Advanced  ·  Setup: Home Setup  ·  Time: Full Year

The Hook

Your brain does not stay locked on homework as neatly as your planner says it should. Tiny shifts in EEG signals can act like a warning light before you start drifting off task. If you can predict that shift even a few seconds early, you have a strong project with real data and real machine learning. That makes this a rare mix of neuroscience, coding, and everyday life.

What Is It?

This project studies attention drift, which means the moment your focus starts sliding away from the task in front of you. EEG, or electroencephalography, measures electrical activity from the scalp. Think of it like listening to a crowd from outside a stadium. You cannot hear every voice, but you can still pick up patterns in the noise.

You are not trying to read thoughts. You are trying to detect patterns that often show up when attention changes. A transformer classifier is a machine learning model that looks at sequences of data and learns which patterns come before an off-task moment. In this project, the input is EEG data from a low-cost headset, and the output is a prediction of whether your attention will drift soon.

Why This Is a Good Topic

This is a strong science fair topic because you can measure it, model it, and test it with real users or repeated sessions. You can change the task type, the length of the work session, the time of day, or the feature set you feed into the model. That gives you clean comparisons and a clear chance to show whether your method works better than chance. It also connects to a real problem, since students, drivers, and workers all need better attention monitoring.

Research Questions

  • How does task difficulty affect the ability of an EEG model to predict attention drift five seconds ahead??
  • What is the effect of using raw EEG features versus band power features on classifier accuracy??
  • Does adding recent response history improve prediction of off-task moments??
  • To what extent do session time and fatigue change attention drift patterns??
  • Which EEG channels carry the most useful signal for predicting off-task behavior??
  • How does a transformer classifier compare with logistic regression or random forest on the same EEG data??

Basic Materials

  • Muse headset or OpenBCI Ganglion EEG device.
  • Smartphone or laptop for data collection.
  • Quiet homework-style task, such as reading, math practice, or coding puzzles.
  • Timer or task log sheet for labeling on-task and off-task moments.
  • Laptop with a Python environment.
  • Digital spreadsheet for tracking session metadata.
  • Headphones, if your task includes audio prompts.
  • Stable chair and desk setup to keep motion artifacts low.

Advanced Materials

  • Muse headset or OpenBCI Ganglion EEG device.
  • Computer with enough memory for model training.
  • Python packages for EEG preprocessing and machine learning.
  • External keyboard or response button for task labeling.
  • EEG cap or additional electrodes, if your setup supports them.
  • Synchronization tool for aligning task events with EEG timestamps.
  • High-quality microphone or screen recorder for coding attention labels.
  • Optional second device for cross-checking reaction time or eye behavior.

Software & Tools

  • Python: Processes EEG data, trains models, and compares prediction methods.
  • MNE-Python: Cleans, filters, and visualizes EEG signals.
  • scikit-learn: Builds baseline classifiers and evaluates model performance.
  • PyTorch: Trains a transformer model on time-series EEG data.
  • ImageJ: Not used here, so skip it and focus on data analysis tools for signals.

Experiment Steps

  1. Define what counts as attention drift, and choose a labeling rule you can apply consistently across sessions.
  2. Select the EEG features, the time window length, and the prediction horizon you will test first.
  3. Plan a baseline model before you build the transformer, so you can prove the new model adds value.
  4. Design a clean data-collection schedule with repeated sessions, consistent tasks, and matching control conditions.
  5. Decide how you will separate training data from test data by person or by session to avoid leakage.
  6. Set your evaluation metrics before training, including accuracy, F1 score, and early-warning timing.

Common Pitfalls

  • Labeling attention drift after the fact from memory, which makes your ground truth inconsistent.
  • Mixing data from the same session into both training and test sets, which inflates accuracy.
  • Forgetting that movement, blinking, and jaw clenching can overpower weak EEG signals.
  • Using too few sessions or too few off-task events, which leaves the model starved for examples.
  • Comparing the transformer only against chance, which hides whether a simpler model does nearly as well.

What Makes This Competitive

A strong version of this project does more than train a model. It tests whether the model generalizes across different people, different homework tasks, or different days. It also compares the transformer to simpler baselines and reports why one method wins or fails. If you add careful labeling, clean preprocessing, and honest validation, your project starts to look like real computational neuroscience.

Project Variations

  • Test whether the same model predicts attention drift during reading, math, or coding tasks.
  • Compare a transformer with an LSTM, random forest, or logistic regression on the same EEG dataset.
  • Replace single-person data with a small group study to see how well a general model transfers across students.

Learn More

  • NIH PubMed: Search for review articles on EEG-based attention, cognitive fatigue, and machine learning classification.
  • MNE-Python documentation: Learn EEG preprocessing, filtering, and visualization workflows for time-series brain data.
  • MIT OpenCourseWare, Introduction to Machine Learning: Use it to review model evaluation, feature selection, and overfitting concepts.
  • NCBI Bookshelf: Find free neuroscience and signal processing textbook chapters for background on EEG and attention.
  • IEEE Xplore and PubMed: Search for papers on attention decoding, mental fatigue, and transformer models for EEG.

For next steps tailored to your interests, skill level, and timeline, work one-on-one with a MehtA+ mentor. Learn more about MehtA+ Science & Engineering Research Mentorship →

To discover more projects, visit the MehtA+ Science Fair Hub →

Shopping Cart