EVIDENCE LIBRARY

Do Caffeine and Modafinil Protect Working Memory Differently After 36 Hours Awake? A 14-Person EEG Study

In 14 men, modafinil and caffeine produced different two-back accuracy and P2/LPC EEG patterns after 36 hours awake, but reaction time was not significantly changed; no blood levels or driving were measured.

Answer: In a randomized, double-blind, two-session crossover experiment involving 14 healthy men, object working-memory accuracy increased from 89.800% to 94.115% during the modafinil session after 36 hours of total sleep deprivation, while accuracy changed from 92.569% to 89.831% during the caffeine session. The drug-by-sleep-state interaction was statistically significant (p = 0.026). Neither drug condition produced a statistically significant change in reaction time. Scalp electroencephalography (EEG) further showed that caffeine was associated with an increased early P2 response and reduced late positive complex (LPC) amplitude, whereas the corresponding within-session modafinil changes were not significant. These are small-sample, group-level behavioral and electrical findings. They are not direct measurements of blood-drug concentration, proof of an individual’s alertness, or validated indicators of safe driving.

The primary experiment is Shao and colleagues (2026), Caffeine and modafinil counteract sleep deprivation through distinct neurocognitive pathways: an ERP study of object working memory, published in Frontiers in Human Neuroscience. The complete original Methods, Results, numerical tables, electrophysiological figures, and Discussion support the distinctions below. Read the original primary research, DOI 10.3389/fnhum.2026.1832731.

1. What was actually tested?

The investigators were interested in a practical but narrow question: under a prolonged laboratory wakefulness protocol, would caffeine and modafinil yield different patterns of object working-memory performance and event-related brain potentials? This was not a comprehensive occupational fitness examination, a toxicological validation study, or a driving simulator experiment. The behavioral task was a computerized visual two-back matching task. The physiological endpoints were voltage deflections measured at frontal scalp electrodes during repeated stimulus processing.

Participants saw geometric figures and indicated whether each new figure matched the one presented two positions earlier. Such performance requires holding a short sequence in mind, updating it, detecting a match, and selecting a response. It is one component of cognition; successful performance does not guarantee intact lane tracking, hazard perception, divided attention, judgment, or continuous vigilance during a real-world shift.

Importantly, the study observed outcomes after both sleep loss and administration of one active stimulant. It did not include a third sleep-deprived, drug-free placebo session. Therefore, one cannot directly quantify how much either drug prevented deterioration relative to untreated sleep deprivation in these same participants. Comparing post-deprivation scores with a rested predose baseline answers a different question from comparing an active treatment with a sleep-deprived placebo.

2. How many independent people participated?

The independent biological sample consisted of 14 healthy adult men, 20–27 years old, whose mean age was 23.5 years. Each individual completed two experimental sessions, one assigned to caffeine and the other to modafinil. The three-week interval between sessions served as the planned washout and recovery period, while the treatment order was randomized and balanced. Thus, the study did not randomize 28 different people; it collected repeated observations from 14 people.

Eligibility was unusually restrictive. Participants were right-handed, had normal or corrected vision, reported no relevant sleep, psychiatric, or physical disorder, and were screened for above-average cognitive test results. Regular users of caffeine, nicotine, alcohol, and tea were excluded, and psychoactive-product avoidance before each session was required. These features reduce some variability but limit extrapolation to habitual coffee consumers, women, older adults, shift workers with comorbid conditions, and people taking other medications.

Within a session, 122 visual-task trials were presented, and multiple stimulus-locked EEG epochs were analyzed. The authors initially considered 6,344 EEG trials across conditions and ultimately retained 6,103 after artifact processing and exclusions. The number of electrical epochs does not enlarge the independent human sample. Treating thousands of EEG observations as thousands of independent drug-exposed adults would substantially exaggerate evidentiary strength.

3. What substances, routes, and doses were administered?

Each treatment session involved an oral cumulative dose of 400 mg of the assigned substance, delivered as two 200 mg capsules four hours apart. The caffeine condition involved caffeine, and the other condition involved modafinil; these were separate sessions, not a simultaneous caffeine-plus-modafinil combination. Both compounds were formulated into visually matching gelatin capsules in an effort to preserve blinding.

The total 400 mg amount was the administered mass of the designated substance, not a measured systemic concentration. A dose in milligrams cannot be substituted for a concentration in nanograms per milliliter or for an individual’s exposure at a later forensic collection time. The paper does not provide paired venous whole-blood, serum, or plasma levels that would support such an inference.

The dosing protocol is a particular high-exposure research regimen, not a prescription recommendation, an occupational dosing standard, or a demonstration that two chemically different stimulants are equally potent at equal milligram doses. Caffeine is a methylxanthine, whereas modafinil is a chemically different wakefulness-promoting medication. Sharing a cumulative mass does not make their potency, pharmacokinetics, or adverse-effect profiles interchangeable.

4. What happened during the 36-hour laboratory sleep-loss protocol?

Participants entered the laboratory on the first evening and slept overnight under monitoring. On the following morning, the investigators collected a rested baseline working-memory and EEG measurement, then imposed 36 hours of supervised total sleep deprivation. Participants could engage in quiet activities but were instructed to avoid sleep, strenuous activity, and unassigned stimulants. On the final day, assigned capsules were given at 14:00 and 18:00, and the post-deprivation task/EEG assessment occurred at approximately 20:00.

Because each treatment session contained a distinct rested baseline before the first capsule, baseline scores were not necessarily identical across the two visits. Such differences matter when interpreting a main effect of the nominal drug-session label. The authors themselves cautioned that the significant P3 main effect might reflect pre-existing between-session baseline differences, not a true pharmacological effect.

Laboratory supervision provides better control over scheduled wakefulness than retrospective estimates of how long a person stayed awake. It still does not measure every component of operational fatigue, circadian adaptation, microsleep vulnerability, habitual sleep debt, stress, or real-task motivation. The measured endpoint was a short approximately five-minute cognitive task, not 36 hours of continuous occupational performance.

5. Why does the lack of a sleep-deprived placebo control matter?

Forensic interpretation depends on the comparison actually made. A caffeine session and a modafinil session permit comparison of how outcomes changed across each active-drug condition. A drug-free, equally sleep-deprived control would be needed to estimate the unmedicated trajectory under this same protocol. Without it, the phrase “protected against sleep deprivation” remains a mechanistic interpretation rather than a directly measured drug-versus-no-drug treatment effect.

Suppose an individual’s accuracy is 90% before staying awake and 94% after taking a compound while sleep-deprived. That observation does not prove that the compound prevented a drop that would otherwise have occurred. Practice, variation between visits, selective engagement, the measurement properties of the test, and other time-related effects remain relevant. Randomized crossover assignment helps with treatment-order bias but does not conjure an untreated sleep-loss control that was never run.

Likewise, failure to find a within-session change under caffeine is not proof that caffeine preserved every aspect of normal cognition. A nonsignificant difference is compatible with multiple possible effect sizes, particularly in 14 volunteers. The proper conclusion is that the measured pre-versus-post difference was not statistically established in this sample.

6. How was object working memory scored?

In each trial, a shape appeared after a fixation cue; the participant indicated whether it matched the shape shown two positions previously. Targets and nontargets were presented in approximately equal proportions. Training continued until participants exceeded 80% accuracy in practice, which makes them an experienced and selected sample for this narrow task.

The primary behavioral measures were percentage correct and reaction time in milliseconds. Accuracy concerns whether the task response was right; reaction time concerns how quickly a response was made. They need not move in the same direction. Faster responding with more mistakes could be undesirable, while maintaining accuracy despite some slowing may reflect an alternative strategy. A study cannot replace this multidimensional assessment with a single undifferentiated label of “impaired” or “unimpaired.”

Statistical analysis used repeated-measures comparisons with drug-session label and sleep state as factors, followed by corrected comparisons as specified by the authors. In this design, a significant interaction addresses whether baseline-to-sleep-loss change differed between sessions; it is not automatically a direct postdose therapeutic superiority test under every conceivable operational condition.

7. What did the directly observed behavioral outcomes show?

The first evidence table preserves the four reported condition-level means and standard deviations. A single participant contributed to more than one row because this was a crossover experiment. Values are descriptive group statistics, not biological analyte concentrations.

Evidence table 1. Original human object working-memory outcomes; 14 participants completing repeated sessions.
Active-drug session Testing state Reaction time, mean ± SD (ms) Accuracy, mean ± SD (%)
Modafinil, oral 400 mg total Rested baseline, before dosing 514.010 ± 76.081 89.800 ± 6.376
Modafinil, oral 400 mg total 36 h awake, after dosing 480.437 ± 85.645 94.115 ± 2.979
Caffeine, oral 400 mg total Rested baseline, before dosing 499.505 ± 99.204 92.569 ± 3.527
Caffeine, oral 400 mg total 36 h awake, after dosing 481.981 ± 81.192 89.831 ± 11.049

The accuracy analysis yielded a significant drug-session-by-sleep-state interaction, F(1,13) = 6.356, p = 0.026. Within the modafinil session, post-deprivation accuracy was higher than the same session’s predose rested baseline (p = 0.009). Within the caffeine session, the corresponding comparison was not significant (p = 0.313). Neither the main effect of the sleep-state factor (p = 0.621) nor the main effect of the drug-session label (p = 0.611) was significant.

These findings support a differential pattern of within-participant accuracy change. They do not prove that every participant improved, that caffeine caused an accuracy deficit in all users, or that the study measured changes in real-driving accuracy. Differences between group means should not be converted into individual prediction rules without external validation.

8. Did either compound significantly improve reaction speed?

No statistically significant main effect or interaction was demonstrated for reaction time. The analysis reported sleep-state p = 0.103, treatment-session p = 0.642, and drug-by-sleep-state interaction p = 0.572. The numeric mean time decreased from approximately 514 to 480 ms during the modafinil visit and from approximately 500 to 482 ms during the caffeine visit. Those numerical changes are real descriptive differences but should not be converted into claims of proven speed enhancement.

The source Discussion uses language that may suggest improved modafinil reaction time. The inferential analysis does not support a statistically significant reaction-time effect. When reporting the study to a court, an expert reviewer, or the public, the actual analysis and its null findings must control the conclusion. A descriptive direction cannot supersede the authors’ own nonsignificant test.

Reaction time in a short two-back object task is also not the same variable as brake reaction time, sustained vigilance failures, crossing a centerline, missing a pedestrian, or making a safe decision under ambiguous conditions. None of those events was observed here.

9. What are event-related potentials—and what are they not?

An event-related potential (ERP) is an averaged change in scalp electrical voltage associated with the presentation of a stimulus. The study recorded EEG using a 32-channel system, processed the signal to reduce artifacts, and averaged selected responses at frontal electrodes F3, Fz, and F4. The investigators analyzed an early positive P2, negative N2, positive P3, and later positive complex (LPC), each in a defined poststimulus time window.

The P2 was quantified around 100–200 ms; N2, 200–300 ms; P3, 300–450 ms; and LPC, 450–800 ms. Amplitudes were expressed in microvolts (µV). These are measured electrical signals after preprocessing. They are not liquid-phase mass spectrometric concentrations, direct synaptic catecholamine levels, anatomical brain-tissue measurements, or measurements of how much caffeine or modafinil reached an individual’s brain.

ERP components are often associated in the literature with stimulus evaluation and stages of attention, but their physiological meanings are not exclusive or person-specific. Calling a frontal P2 “early perception” and the LPC “later maintenance” is an interpretive framework, not a calibrated biochemical assay. A statistically different group-average scalp potential cannot identify whether a particular driver was capable of avoiding a collision.

10. What happened to the early P2 response?

The P2 amplitude changed differently between the two assigned drug sessions: drug-by-sleep-state interaction F(1,13) = 5.579, p = 0.034. During the caffeine session, mean frontal P2 increased from 2.733 to 3.806 µV after prolonged wakefulness and drug exposure; the authors’ within-session comparison was significant (p = 0.004). The modafinil session changed from 3.567 to 3.722 µV, but the within-session comparison was not significant (p = 0.747).

A difference-score follow-up similarly favored a larger caffeine-session increase relative to the modafinil session, paired p = 0.034. That finding is consistent with a distinction in the measured early electrical response. It is not evidence that an EEG trace quantifies caffeine intake, demonstrates a particular plasma concentration, or allows an examiner to determine that one substance was definitely taken by an unknown individual.

One should also avoid the reverse error: since the modafinil P2 change was nonsignificant, it does not follow that modafinil has no effect on early attention in all populations. The test here involved a specific task, frontal recording sites, a narrow age range, repeated 400 mg exposures, and only 14 volunteers.

11. What happened to the late positive complex?

The later LPC exhibited another interaction, F(1,13) = 5.606, p = 0.034. Caffeine-session LPC mean amplitude fell from +0.422 µV at predose baseline to −0.490 µV after 36 hours awake and caffeine administration. The within-session comparison was significant (p = 0.047). During the modafinil session, LPC changed from +0.494 to +0.444 µV, a nonsignificant difference (p = 0.878).

The difference-score comparison also identified a larger LPC reduction under caffeine than under modafinil (p = 0.034). These voltage values describe a scalp-recorded ERP averaged across selected correct trials. They do not establish that a participant had objectively exhausted a measurable “pool” of brain resources, nor do they constitute direct evidence of a cellular pathway in that person’s prefrontal cortex.

The direction matters: P2 increased and LPC decreased during the caffeine visit. Collapsing both into a generic assertion that caffeine increased all brain responses would contradict the source data. It is defensible to discuss one increased early electrical component alongside one diminished late component; it is not defensible to claim that both amplitudes increased.

12. Which EEG comparisons were genuinely nonsignificant?

For N2, the drug-by-sleep-state interaction was p = 0.879; the main sleep-state effect was p = 0.148 and the nominal drug-session main effect was p = 0.119. For P3, the interaction was p = 0.664 and the sleep-state main effect was p = 0.171. Neither set of results supports an acute, sleep-dependent differential drug effect on these two ERP amplitudes.

The P3 main effect associated with the drug-session label was statistically significant (p = 0.007). Yet the investigators emphasized that baseline P3 was recorded before any capsule was given and that the interaction was nonsignificant. This is important evidence against casually labeling that main effect a modafinil-induced biological change. A session-wide numerical difference, already present at baseline, cannot simply be attributed to a medication administered later.

The additional change-score tests were likewise nonsignificant for N2 (p = 0.879) and P3 (p = 0.664). Null outcomes have substantive interpretive value, especially when an article is being used to support a broad claim that one stimulant consistently restores every measurable cognitive or electrophysiological function.

13. Numerical ERP evidence from the actual source tables

The second evidence table combines the authors’ descriptive measurements with the central interaction tests. Changes describe two points within each randomized session, rather than a participant-level drug-concentration relationship. Reported standard deviations are provided where available in the original table.

Evidence table 2. Original frontal ERP amplitudes and interaction results, measured in µV.
Endpoint Modafinil predose → post-TSD (mean ± SD) Caffeine predose → post-TSD (mean ± SD) Drug × sleep interaction
P2, 100–200 ms 3.567 ± 1.914 → 3.722 ± 2.023 2.733 ± 1.822 → 3.806 ± 1.568 p = 0.034
N2, 200–300 ms −3.205 ± 2.903 → −2.670 ± 2.710 −3.738 ± 2.810 → −3.278 ± 1.753 p = 0.879 (not significant)
P3, 300–450 ms 1.918 ± 3.093 → 1.509 ± 2.574 0.849 ± 2.610 → 0.202 ± 2.746 p = 0.664 (not significant)
LPC, 450–800 ms 0.494 ± 1.895 → 0.444 ± 1.452 0.422 ± 1.655 → −0.490 ± 1.214 p = 0.034

Where the interactions were significant, their presence does not by itself identify the exact cellular or receptor-level mechanism. Neither exposure was chemically quantified in venous blood, and the neuroelectric components did not undergo diagnostic validation against forensic reference standards or actual occupational hazards. This is controlled experimental psychophysiology, not a clinical decision rule.

14. Were actual drug concentrations measured in blood, plasma, or serum?

No quantitative biological caffeine or modafinil exposure measurement is reported. The known variables were the administered oral substances and doses, laboratory timing, recorded cognitive performance, and scalp electrical responses. The study did not provide liquid chromatography–mass spectrometry measurements of either parent compound in venous whole blood, physically separated plasma, or serum. Nor did it present quantitative drug or metabolite concentrations in urine, oral fluid, hair, vitreous, breath, or brain tissue.

This absence has a direct forensic consequence: no numeric relationship between measured drug concentration and task accuracy, reaction time, P2 amplitude, or LPC amplitude can be inferred from this experiment. A figure plotting scalp microvolts cannot stand in for a validated concentration-time curve. There is no measured area under a plasma concentration-time curve, subject-specific time-to-peak concentration, or quantified exposure-response slope in this dataset.

Biological matrices cannot be treated as interchangeable. Whole blood, plasma, serum, and other toxicological matrices differ in preparation, chemical partitioning, and interpretive purpose. Even a future assay of plasma would not, without appropriate evidence, establish an equivalent legal whole-blood number. This experiment contains neither kind of quantitative drug measurement.

15. Does scalp EEG establish a specific drug identity or impairment threshold?

No. The investigators already knew which capsules were administered by protocol; the EEG was used to compare effects, not to identify an unknown chemical in an evidentiary specimen. Similar electrophysiological patterns may arise from differing causes, including variations in sleep state, attention, baseline neural activity, tasks, processing choices, or individual physiology. A P2 or LPC value cannot establish that caffeine rather than modafinil was ingested by an unobserved person.

Forensic drug identification requires an appropriate collection protocol, chain of custody, analyte-specific instrumentation, and a defensible interpretation of the actual specimen. Confirmatory analytical testing answers an altogether different question from recording task-related scalp potentials. The two forms of evidence can complement one another in a properly designed study, but neither substitutes for the other.

The same caution applies to the word “impairment.” A statistically meaningful change in average accuracy or EEG amplitude in a narrow task does not yield a legal impairment threshold, a probability of causing a traffic event, or a binary classification of a specific person’s competence. This experiment contains no receiver-operating-characteristic validation, individual diagnostic cutoff, independent forensic driving endpoint, or case-specific causation analysis.

16. Why is this different from therapeutic drug monitoring?

Therapeutic drug monitoring, when appropriate, concerns drug or metabolite concentrations measured in a defined specimen and interpreted with the clinical context, timing, analytical method, and known variability. Here the researchers administered two substances but did not measure those concentrations. The measured outcomes were behavioral percentages, millisecond response times, and microvolt scalp potentials, not pharmacokinetic quantities.

A patient prescribed modafinil, a pilot using a legally authorized fatigue countermeasure, and an individual undergoing forensic evaluation raise different questions. This 14-man laboratory experiment cannot establish how much medication any such person had in circulation, whether dosing followed a lawful medical regimen, or whether a result is consistent with a claimed ingestion timeline. Therapeutic monitoring and toxicological interpretation require specimen-specific evidence that is absent from the present report.

Even the protocol’s apparently precise timing does not allow back-extrapolation from an EEG amplitude to blood levels. No validated conversion factor exists in this study from a 36-hour post-deprivation accuracy score or frontal ERP to milligrams ingested, nanograms per milliliter, or time since last intake.

17. What limitations matter most in forensic evaluation?

The first limitation is the independent sample size of 14. Randomized treatment order and repeated measurements can increase efficiency but do not remove sampling uncertainty or justify extrapolation to all drivers, age groups, or clinical populations. All participants were male, young, cognitively high-performing, screened against regular stimulant use, and supervised in a controlled setting.

Second, there was no sleep-deprived placebo-only session and no no-sleep-loss active-drug comparator following matched drug administration. The factorial analysis compared conditions within the two active sessions, with baseline recorded before dosing. Thus, mechanistic labels such as “generalized arousal” or “targeted executive control” should be presented as hypotheses interpreting a small experimental dataset, not chemical measurement of receptors or proof of protection from all effects of sleep deprivation.

Third, the two 400 mg regimens are not equal-potency comparators. Fourth, the study used a single brief, practiced two-back task rather than sustained real-world vigilance, braking, error detection during prolonged shift work, or an objective road test. Fifth, frontal scalp ERP averages are statistical estimates sensitive to preprocessing and source selection. Sixth, many potentially relevant endpoints—actual blood concentrations, individual drug sensitivity, pharmacokinetics, unsafe driving, and injury—were not measured.

Finally, interpretation should faithfully separate positive interactions from nonsignificant main effects and measured quantities from proposed neural mechanisms. An expert conclusion must preserve both sides of the evidence, especially when the study is being used in litigation to suggest that a drug reliably prevents fatigue-related harm.

18. Seven questions about caffeine, modafinil, fatigue, and forensic evidence

1. Did the researchers prove that modafinil prevents all impairment after 36 hours without sleep?

No. The accuracy score increased within the modafinil session and differed in its change pattern from caffeine, but the study lacked a sleep-deprived placebo-only session, employed one short working-memory task, and did not assess comprehensive operational fitness. The result cannot be generalized into a guarantee of safety or unimpaired driving.

2. Did caffeine significantly worsen working-memory accuracy?

The group’s mean accuracy fell from 92.569% to 89.831% during the caffeine session, but that within-session comparison was not statistically significant (p = 0.313). Describing a proven caffeine-caused accuracy deficit would go beyond the reported evidence; nonsignificance also does not prove two states equivalent.

3. Were participants given caffeine and modafinil together?

No. Each participant attended one caffeine session and a separate modafinil session, with a three-week washout between sessions. In each, the cumulative assigned oral dose was 400 mg in two 200 mg administrations. The trial does not evaluate combined-drug pharmacodynamics or interactions.

4. Did reaction time improve significantly after either intervention?

No statistically significant reaction-time main effects or drug-by-sleep-state interaction were demonstrated. Although group means were numerically shorter after deprivation in both visits, the reaction-time interaction was p = 0.572 and the sleep-state main effect was p = 0.103.

5. What did caffeine do to P2 and LPC electrical signals?

Within the caffeine session, the frontal P2 amplitude increased (p = 0.004), while the later LPC amplitude decreased (p = 0.047). Both components showed drug-by-sleep-state interactions of p = 0.034. These are microvolt brain-electrical results, not chemical concentrations or direct quantification of cognitive “resources.”

6. Can an EEG P2 or LPC measurement reveal a person’s modafinil or caffeine blood level?

No such relationship was demonstrated. The researchers did not assay drug concentrations in human whole blood, plasma, or serum. Without quantified specimens, a concentration-response calibration, and independent validation, a scalp potential cannot be used to estimate a drug level or ingestion time.

7. Can this paper establish whether a fatigued driver caused a crash?

No. The sample comprised 14 healthy laboratory volunteers performing a visual two-back task. No actual road driving, crash, witness event, individual legal impairment standard, or injury causation was measured. Case causation would require independent facts and methods tailored to the specific event.

19. Source-specific bottom line

The defensible inference is limited but valuable: under two controlled stimulant sessions in 14 men, after prolonged wakefulness, working-memory accuracy followed a different within-session pattern under modafinil than caffeine, while reaction-time comparisons remained nonsignificant. Frontal scalp P2 and LPC showed distinct session-by-sleep interactions; N2 and P3 interactions did not. The experiment provides physiological research context but neither measures biological stimulant concentrations nor validates individualized safety, impairment, or accident attribution.

Original primary citation: Shao Y, Xu L, An X, Zhang J, Xie H, Gong J, Duan H, Huang Y (2026). Caffeine and modafinil counteract sleep deprivation through distinct neurocognitive pathways: an ERP study of object working memory. Frontiers in Human Neuroscience 20:1832731. Primary DOI 10.3389/fnhum.2026.1832731.