Introduction

The ability to focus attention while ignoring distractions benefits nearly every cognitive ability, including learning and memory (Awh et al., 2008; Madore et al., 2020), perception (Shomstein et al., 2019; Sun et al., 2018), and categorization (Deng & Sloutsky, 2016). Performance in each domain, however, is compromised by an inconvenient property of attention—it fluctuates over time, leading to periodic attentional lapses (Esterman & Rothlein, 2019; Mackworth, 1948). These lapses may simply reflect hard limits on cognitive abilities, like having to take a breather in a race. An intriguing alternative, however, is that lapses have unexpected benefits. One possible benefit is that they broaden the focus of our minds to support learning of that which is peripheral to the task at hand (see Amer et al., 2016; Decker & Duncan, 2020; Thompson-Schill et al., 2009 for related arguments). Unfortunately, most sustained attention studies do not measure learning, let alone for content that is not strictly goal-relevant, leaving us to wonder whether there may be some benefit to this otherwise limiting aspect of human cognition. The present investigation therefore leverages recent methodological advances (e.g., deBettencourt et al., 2019; Esterman et al., 2012) to track fluctuations in sustained attention on a moment-by-moment basis and then relate these attentional states to the learning and use of information that is not strictly relevant.

Existing theories of sustained attention make different predictions about how attentional fluctuations could influence learning of distracting information. On the one hand, overload (or depletion) theories propose that sustaining attention consumes the pool of cognitive resources shared across domains (Schooler et al., 2011; Smallwood, 2010; Smallwood & Schooler, 2006). Accordingly, they predict that attentional lapses, which mark the depletion of resources, should co-occur with the decline and expression of learning for both goal-relevant and goal-irrelevant information. On the other hand, “underload theories” (Esterman et al., 2012; Fortenbaugh et al., 2017; Thomson et al., 2015) raise the possibility that attentional lapses promote learning of goal-irrelevant content. They posit that what appears to be a lapse in attention is often a diversion of attentional resources when the task at hand becomes too monotonous (Manly et al., 1999; Smallwood & Schooler, 2006). Across different versions of underload theories, attention is proposed to move to internally-generated thoughts (mind wandering: Ariga & Lleras, 2011; Robertson et al., 1997; Schooler et al., 2011; Smallwood & Schooler, 2006), nowhere (i.e., a mindless state: Fortenbaugh et al., 2017), or (critically) outward toward non-target content (Lavie et al., 2004; Mittner et al., 2016). Thus, lapses in attention could shift processing resources from information that is strictly relevant to that which is less relevant to one’s current goals.

Consistent with overload hypotheses, attentional lapses are associated with impairments in goal-relevant memory (DeBettencourt et al., 2018; Decker et al., 2020; Decker & Duncan, 2020). Furthermore, neural processing of goal-irrelevant stimuli decreases during attentional lapses compared to periods of focused attention (Esterman et al., 2014). While this work raises the possibility that lapses decrease learning of target and non-target content, memory for non-target content was not assessed in this study leaving the implications for learning unknown. However, related research investigating individual differences in cognitive control—a precursor to being able to sustain attention—finds that age groups known to have lower cognitive control tend to learn more about distractors, such as older adults (Amer & Hasher, 2014; Biss et al., 2018; Campbell et al., 2010; Campbell et al., 2012; Kim et al., 2007; Rowe et al., 2006; Schmitz et al., 2010; Weeks et al., 2016) and children (Deng & Sloutsky, 2016; Plebanek & Sloutsky, 2017). Further, younger adults show improved distractor learning during off-peak times of day when they have low cognitive control (Ngo et al., 2018). And in a final key example, a correlated flanker paradigm was used to show that younger adults with high trait impulsivity—a trait associated with low control (Cools et al., 2007; Logan et al., 1997)—were better at learning the relationships between flankers (which they were instructed to ignore) and goal-relevant targets than those with low impulsivity (Landau et al., 2012).

Thus, a substantial body of evidence suggests that traits associated with poorer control of attention confer benefits for learning information beyond what is strictly relevant. However, how distractor learning relates to individual differences in sustained attention per se, rather than associated traits, remains to be determined. Further, jointly mapping the temporal dynamics of distractor learning to sustained attention within a person will get us closer to understanding the unexpected benefits of attentional lapses by determining if attentional lapses boost learning about information that lies beyond our narrow goals.

The current project seeks to address these ideas by leveraging recent methodological developments that make it possible to track trial-by-trial fluctuations in attention—within individuals (DeBettencourt et al., 2018; deBettencourt et al., 2019; Riley et al., 2017)—and relate them to learning about seemingly goal-irrelevant content. To this end, we asked young adults (n = 53) to complete a variant of the correlated flanker paradigm (Carlson & Flowers, 1996; Landau et al., 2012; Miller, 1987) (Fig. 1A), in which they categorized a central target (letter or number) while ignoring a pair of flanking distractor symbols, which, unbeknownst to participants, shared a probabilistic relationship with targets. We then measured learning for the target–flanker pairings and attentional fluctuations over time to examine the relationship between distractor learning and attention within participants. We hypothesized that within individuals, evidence of learning would be strongest during lapses in sustained attention. Complimenting these primary within-subject analyses, we predict that across individuals, poorer sustained attention would correlate with greater evidence of learning about the target–flanker pairings.

Fig. 1
figure 1

A Task Schematic. Participants were instructed to indicate whether the central target was a letter or a number while ignoring peripheral flankers. Targets shared a hidden probabilistic relationship with the flankers, such that the @ and * flanking symbols were more likely to be paired with a particular target category (letters or numbers, counterbalanced). The # symbol was never predictive and equally likely to flank both target categories. B Reaction time by trial type. Reaction time was faster on consistent than neutral and inconsistent trials (ps < .01), and slower on inconsistent than neutral trials (p = .04), suggesting that participants learned target–flanker correlations. Means and within-subject error bars are plotted based on the method described by Morey (2008). See Supplementary Figure 1 for participant level means

Methods

Participants

Participants were 53 undergraduate students at the University of Toronto who received course credit for participation. All participants provided written informed consent in accordance with the University of Toronto’s Research Ethics Board prior to completing the study. Participants were eligible if they had normal or corrected-to-normal vision and did not suffer from a neurological or psychiatric disorder.

The data reported here was initially collected to replicate the flanker effect in adults. Prior to data collection, we conducted a power analysis for detecting flanker effects using the pwr package (v1.3-0; Champely, 2020)-based effect sizes reported in prior literature showing large differences in reaction time (RT) between trial types (Cohen's d effect sizes > .80 inCarlson & Flowers, 1996 ; Landau et al., 2012 ; Miller, 1987). Our power analysis showed that at least 34 participants were needed to achieve at least 80% power for a medium flanker effect size (Cohen’s d = .5). Since reported effect sizes are prone to overestimation (Curran-Everett, 2017), we also chose (a priori) to increase our sample to at least 50 participants. In total, 53 undergraduates participated in the study (32 female, 8 male, 13 did not disclose sex; mean age = 19.09 years). Though we did not conduct an a priori power analysis for individual differences analyses, a post hoc sensitivity analysis revealed that our sample size is sufficient for detecting effects as large as r = 0.37 (or d = 0.79) in a two-tailed test, or r = 0.33 (d = 0.72) in a one-tailed test with 80% power.

Procedure

We adapted a correlated flanker task that has been used to measure learning in prior studies (Carlson & Flowers, 1996; Landau et al., 2012; Miller, 1987). Our task was completed on an Apple iMac computer (OS X 10.11.6) with a 21.5-inch monitor (resolution of 1920 × 1080 pixels). On each trial, participants viewed a central target in the center of the computer screen that was either a letter (ranging from A to H) or a number (ranging from 2 to 9). The central target was always flanked by a pair of identical distractor symbols (@, *, or #; Fig. 1A). All stimuli were shown in size 120 font and participants sat approximately 24 inches from the monitor producing a visual angle of approximately 4 degrees. Participants were asked to categorize the central target as either a letter or number as quickly and accurately as possible, while ignoring the flanking distractors. Unbeknownst to participants, targets and flankers shared a probabilistic relationship. One flanker was more likely to appear with a letter target, another was more likely to appear with a number target, and one was equally likely to appear with letter and number targets. Based on the frequency with which each flanking symbol appeared with each target class, trials were considered as one of three types: (1) target–flanker pairings that occurred frequently (66.66% of trials; n = 256) were considered consistent; (2) those that occurred infrequently were considered inconsistent (8.33% of trials; n = 32); (3) trials with flankers that were equally likely to be paired with letters and numbers (# symbol) were considered neutral (25% of trials; n = 96). Targets and flankers remained on the screen until the participant responded (leading to variable interstimulus intervals between trials) and participants received feedback on accuracy for 0.5 seconds before the next trial, with no interstimulus interval separating flanker and feedback trials. Stimuli were presented in PsychoPy (version 1.85: Peirce, 2007).

Participants completed 384 trials across six blocks of 64 trials. Within each block, target stimuli (eight letters and eight numbers) were repeated four times in a random sequence generated for each participant. Participants were offered brief breaks between blocks. The mapping of target classes (letters or numbers) to response keys (the keys “f” or “j”) and the mapping of flankers (@ or *) to targets (letters or numbers) were counterbalanced across participants. Prior to beginning the task, all participants completed a practice block of 10 trials.

Upon completing the experiment, participants were asked if they noticed any patterns between the stimuli. Participants responded by pressing either “yes” or “no” on the screen, and then were asked to describe the pattern.

Data preprocessing

Data preprocessing and statistical analyses were performed in R version 3.6.3 (R Core Team, 2019). Prior to fitting models, we excluded raw RTs that were longer than 3 seconds to eliminate the possibility that outlying trials biased results (on average, <1% of trials; ~ 1 trial per participant). We also removed linear drift in RTs related to time-dependent effects (e.g., fatigue, practice) by fitting a linear regression model predicting RT from trial number, separately for each block and participant. We then extracted the within-subject mean-centered residuals and added each participant’s mean RT across the task to each residualized RT value. These residualized values were used in place of raw RTs in all analyses.

Indexing individual differences in learning of the target–flanker relationships

To index individual differences in learning, we calculated a flanker score for each participant that reflected how much slower, on average, a participant responded on correct inconsistent than correct consistent trials (mean RT on inconsistent minus mean RT on consistent trials). Participants who had faster responses on consistent relative to inconsistent trials therefore had higher flanker scores and were considered better learners. See Supplementary Analysis 2 showing that flanker scores were unreliable when assessed using a split-trial reliability analysis.

Indexing fluctuations in sustained attention

We drew from prior work showing that trial-by-trial changes in RT deviance (Esterman et al., 2014) and speed (DeBettencourt et al., 2018) covary with fluctuations in attention and task performance. To principally determine which index of RT to use, we tested whether a moving mean of RT speed or deviance covaried with trial-by-trial accuracy. We fit two logistic mixed-effects regression models in which accuracy served as the dependent variable, and the three-trial moving mean (N-1, N-2, N-3) of either preceding RT speed or deviance served as predictors and random slopes in separate models. This data-driven approach showed that a moving mean of RT speed (b = 2.25, SE = 0.48, z = 4.71, p < .001), but not deviance (b = 0.31, SE = 0.40, z = 0.76, p = .447) correlated with task performance, such that faster RTs preceded errors. This same pattern was observed when restricting the analysis to trials that required a higher degree of cognitive control—when participants had to switch response options after seeing two of the same target class in a row (e.g., two successive letters and then a number; RT speed: b = 3.78, SE = 0.97, z = 3.88, p < .001; RT deviance: b = −0.70, SE = 0.64, z = −1.08, p = .281). Thus, we used a moving mean of RT speed to inform our primary metric of attention, but report results from analyses that use RT deviance in the supplement for completeness (Supplementary Analysis 4–6). Of note, using preceding RTs to determine attentional state on each trial allowed us to use this attention metric to predict learning on the concurrent trial, as is described below, while avoiding concerns over circularity, as separate trials informed measures of trial-by-trial attention and learning.

Based on prior work (Esterman et al., 2012; Klatt et al., 2019; Rosenberg et al., 2013), we indexed within-participant fluctuations in attention by first linearly interpolating RTs that could bias our measure of attentional lapses. We interpolated RTs that were more than 3 seconds (which could reflect breaks rather than attentional lapses) by averaging across the four surrounding trials (two before, two after). Since participants were allowed to take breaks between blocks, interpolation was done within each block. In the case that observations from the four surrounding trials were missing, the window size was automatically increased until there were at least two non-missing values. Following previous work (DeBettencourt et al., 2018), we calculated a three-trial moving mean of RTs for each participant within each block (a moving time course) such that each value in the moving time course reflected the mean RT in the three previous trials (mean of N-1, N-2, N-3). In the case that there were missing values preceding a trial, the window size was reduced to one or two trials (as in the second and third trial of each block).

To assess how learning varied as a function of attention, we needed to determine which trials reflected good versus poor attentional states. We therefore drew from an existing approach (Esterman et al., 2014) that assigns out of the zone and in the zone labels (reflecting lapsing and good attention) to each trial. Since RT speed was our primary metric of attention, out-of-the-zone labels were assigned to trials during which the moving mean of RT was faster than a particular threshold. We determined the threshold in several steps: we (1) computed the mean absolute RT deviance for each trial (the absolute value of the difference between a trial’s RT and a participant’s mean RT), (2) smoothed these values using a three-trial moving average (N-1, N-2, N-3), and (3) extracted the median value of each participant’s smoothed deviance. The mean of these median values across participants was used as a threshold for assigning zone states: out-of-the-zone labels were assigned to trials on which the moving time course of RT speed was faster than a participant’s mean moving time course, and more deviant than the group threshold. Using this approach, particularly fast trials were labeled out of the zone (Fig. 2C). We note that our approach differs from that reported in Esterman et al., (Esterman et al., 2014), which assumes all individuals spend half their time out of the zone (and therefore eliminates the possibility of individual differences analyses). In contrast, our approach assumes that individuals differ in their tendency to experience lapses—which has repeatedly been found in empirical work (Killingsworth & Gilbert, 2010; McVay et al., 2009; Seli et al., 2018; Stanley et al., 2022; Unsworth et al., 2009; Unsworth et al., 2014; Unsworth & Robison, 2016, 2018, 2020; Wamsley & Summer, 2020). This approach therefore allows us to address theoretically important questions about how lapse rates relate to learning across participants. Moreover, our group threshold has been informed by the average RT deviance across the sample, allowing us to compare individuals using the same unbiased criteria.

Fig. 2
figure 2

A Distribution of flanker scores (mean RT on inconsistent minus mean RT on consistent trials) for each participant. B Distribution of attentional lapse rates (percentage of particularly fast RTs on neutral trials labeled out of the zone) for each participant. For panels A and B, mean and standard errors bars are marked in black, and the arrows mark the participant whose data is represented in panel C. C Within-subject smoothed RT for a representative participant, with periods of particularly fast RTs labeled out of the zone in orange and periods of slower trial RTs labeled in the zone in blue. Smoothing was performed by computing a three-trial moving mean of preceding RTs across the task. Gray lines depict non-smoothed RT across the task. D Between-subject correlation of flanker scores and attentional lapse rates. Across participants, those who had higher attentional lapse rates (i.e., a greater proportion of particularly fast RTs on neutral trials) showed more evidence of learning the target–flanker contingencies (p < 0.001). Gray shading depicts 95% confidence intervals

Indexing individual differences in attentional lapse rates

Because learning could influence participants’ RT distributions on consistent and inconsistent trials (e.g., making particularly fast responses on consistent trials), we used RT on neutral trials only to index individual differences in attention. By excluding RTs on consistent and inconsistent trials from our measure of attention, we were able to fully separate our measure of attention from that of learning (which relied on RTs on consistent and inconsistent trials). To measure attentional lapse rates for each participant, we calculated how far each neutral trial deviated from a participant’s own mean RT on neutral trials (i.e., the mean absolute deviance), and then extracted the median of these deviances for each participant. The mean of these values across participants was used as a group threshold for assigning in- and out-of-the-zone labels to each neutral trial. Note that unlike the above analyses, this measure of attentional state was determined based on the current trial’s RT (not the average of the preceding RTs), since we wanted our measure of attentional state to be derived only from RTs on neutral trials. To determine attentional states on neutral trials, RTs that were faster than a participant’s mean RT on neutral trials and more deviant than the threshold were labeled out of the zone and other neutral trials were labeled in the zone. Sustained attention (“attentional lapse rate”) reflected the proportion of neutral trials participants spent out of the zone.

For completeness, we also calculated a secondary measure of attentional lapse rate using all trials across the task. To ensure continuity with the within-subject measure of attentional fluctuations, the same in- and out-of-the-zone labels derived from our primary measure of attentional fluctuations were used to calculate lapse rates (described above under the heading Operationalizing fluctuations in sustained attention). As in the calculation for neutral trial lapse rates, this secondary measure of lapse rate reflected the proportion of out-of-the-zone trials across the task.

Statistical analyses

Prior to fitting models, all continuous predictors were mean centered within participants. Two-tailed tests were used in all analyses, and p-values < 0.05 were considered statistically significant. The lmerTest package (Per et al., 2017) was used to obtain p-values for linear models using Satterthwaite's degrees of freedom method (Satterthwaite et al., 2012). Only correct trials were included in models described below in which RT was the dependent variable.

Testing whether individuals learned the target–flanker correlations

To determine trial type differences in RT and accuracy (consistent, neutral, inconsistent), we fit a general linear mixed-effects regression model and a logistic mixed-effects regression model using the lme4 package (version 1.1-23; see Supplementary Analysis 1 showing a better fit of the learning than null model). RT and accuracy were dependent variables in separate models. Because accuracy is a binary outcome (1 = accurate, 0 = inaccurate) it was modeled using a logistic regression model, and the resulting beta values are log odds ratios. Since trial type was nested within participants, we included trial type as a fixed and random effect in the model predicting accuracy, allowing us to model a random slope for trial type and a random intercept for each participant. Of note, we were unable to estimate random slopes for the trial type variable in models examining learning that used RT as a dependent variable because of singularities in the random effect estimation. We therefore only fit random intercepts for participants in models predicting RT.

Examining learning over the course of the task

We were particularly interested in characterizing both how learning shifted across the task, and at which point individuals displayed significant evidence of learning. We therefore divided the task into thirds and examined whether evidence of learning increased across task thirds, and whether there was significant evidence for learning within each third. Dividing the task into thirds allowed us to ascertain at which point in the task individuals tended to display evidence of learning while also ensuring enough inconsistent trials within each bin (at least 10). The division of the task into thirds aligns nicely with the structure of the task that included six blocks in total, therefore allowing for two blocks per task third. We used RT as our primary metric of learning since high accuracy was expected regardless of trial type. We first fit a linear mixed-effects regression model predicting RT, with trial type, task third, and their interaction as predictors. We then fit three linear mixed-effects models separately for each task third to examine trial type differences in RT. RT served as the dependent variable and trial type as the independent variable.

Investigating whether attentional lapses relate to learning

Between-subject analyses

We correlated flanker scores with attentional lapse rates. See Supplementary Analysis 2 showing that the relationship between flanker scores and lapse rates replicates in separate subsamples of the data (odd and even trials). Since flanker scores were not normally distributed, we fit Spearman correlations. For all analyses, we first report the results from the full sample of participants and then report results after restricting analyses to participants who show evidence of learning within the last two thirds of the task (“learners,” i.e., flanker scores above zero). Of note, we speculate that the negative flanker scores likely reflect a null effect of learning at the participant level with the addition of measurement error. In other words, participants with negative values likely have not learned the contingencies.

We also performed analyses to test how attention and learning were related in time; that is, whether higher attentional lapse rates early in the task predicted greater learning of the target–flanker relationships later. Thus, we correlated the percent of trials out of the zone in the first third of the task with flanker scores (inconsistent minus consistent trial RT) calculated only from the last two thirds of the task. We used our measure of lapse rate that incorporated all trials for these analyses to ensure sufficient power for estimating lapse rates in the first third of the task. Partial Spearman correlations were used to examine the relationship between early lapses and later learning after controlling for (1) flanker scores derived from data within the first third of the task and (2) the percent of trials out of the zone in the last two thirds of the task.

Within-subject analyses

We fit a linear mixed-effects model to determine whether attentional lapses increased evidence of learning of the target–flanker contingencies. Response time served as the dependent variable, and trial type, attentional state (effect coded: in the zone = −1, out of the zone = 1), and their interaction served as predictors. We modeled random intercepts for each participant to account for the random effect of participant on RT, and random slopes for attentional state.

Results

Participants learned the target–flanker correlations

As expected, participants displayed evidence of learning: RT was faster on consistent than inconsistent trials (b = −0.02, SE = 0.006, t(19385) = −4.10, p < .001; mean RT on consistent = 0.563 seconds; inconsistent = 0.589 seconds) and neutral trials (b = −0.01, SE = 0.004, t(19385) = −2.90, p = .004; mean RT on neutral = 0.574 seconds), and faster on neutral than inconsistent trials (b= −0.01, SE = 0.006, t(19385) = −2.07, p = .038; Fig. 1B and Figure S1). Moreover, accuracy was higher on consistent than inconsistent trials (b = 0.51, SE = 0.15, z = 3.36, p < .001; mean accuracy on consistent = 96%; inconsistent = 94%) and neutral trials (b = 0.38, SE = 0.10, z = 3.89, p < .001; mean accuracy on neutral = 95%;); however, accuracy did not differ on neutral and inconsistent trials (b = 0.13, SE = 0.16, z = 0.81, p = .418; Figure S2). These results suggest that participants learned the target–flanker correlations despite being instructed to ignore the flanking content while categorizing the central target. Given this clear expression of learning and following previous work (Carlson & Flowers, 1996; Landau et al., 2012), subsequent analyses focus on differences between consistent and inconsistent trials.

We next explored how evidence of learning unfolded as the task progressed. While RT differences between consistent and inconsistent trials did not differ between the first and middle (b = 0.02, SE = 0.01, t(19379) = 1.34, p = .180) or middle and last third (b = −0.007, SE = 0.01, t(19379) = −0.49, p = .621), RT differences were marginally larger in the last than the first third of the task (b = −0.03, SE = 0.01, t(19379) = −1.83, p = .067). Examining the data separately for each task third revealed that RT differences between consistent and inconsistent trials were absent in the first third of the task (b = 0.01, SE = 0.01, t(6459) = 1.20, p = .231), but by the middle and last third, RTs were slower on inconsistent than consistent trials (middle: b = 0.02, SE = 0.009, t(6438) = 2.12, p = .034; last: b = 0.04, SE = 0.01, t(6381) = 3.85, p < .001). Thus, learning unfolded gradually over time and participants did not display clear evidence of learning until the second third of the task.

Individual differences in attention predict learning

We calculated a flanker score for each participant that reflected how much slower RT was, on average, on correct inconsistent than correct consistent trials (Fig. 2A). We also calculated an attentional lapse rate for each participant using only neutral trials (our primary metric of lapse rates; Fig. 2B; see methods). Consistent with our hypothesis, higher attentional lapse rates on these neutral trials correlated with larger flanker scores (Spearman rs = 0.44, 95% CI[0.182, 0.644], p < 0.001; Fig. 2D). This same relationship was observed when using lapse rates derived from all trials (consistent, neutral, and inconsistent; rs = 0.40, 95% CI[0.132, 0.610], p = 0.003); Figure S3 and when restricting analyses to learners only (i.e., those with flanker scores above zero in the last two thirds of the task; N = 38; using lapse rates on neutral trials: rs = 0.41, 95% CI[0.089, 0.652], p = 0.01; using lapse rates across all trials of the task: rs = 0.37, 95% CI[0.047, 0.625], p = 0.02; Figures S4–5). Furthermore, these relationships held when controlling for median RT (Supplementary Analysis 3) and were robust when using different operationalizations of sustained attention (e.g., RT deviance; Supplementary Analysis 45). Thus, those who spent more time out of the zone show greater learning of the target–flanker relationships.

But why might attentional lapses increase people’s learning of the target–flanker correlations? Perhaps periods of poor attention may be well suited to learning uninstructed contingencies or incorporating extraneous (but potentially informative) cues into decisions. To assess the learning mechanism, we investigated how attention and learning related in time. We reasoned that if attentional lapses facilitate learning, lapses early in the task—before the expression of learning is observed—would be most predictive of later learning outcomes, even after accounting for early learning and later lapse lapses. We therefore looked at how lapse rates in the first third of the task related to learning expressed in the last two thirds after controlling for early learning and later attentional lapse rates (Fig. 3A). Consistent with our prediction, lapse rates in the first third of the task positively correlated with flanker scores calculated from data within the last two thirds of the task (rs = 0.47, 95% CI[0.21, 0.66], p < 0.001). This relationship held after adjusting for the percent of trials spent out of the zone during these later phases (rs = 0.34, 95% CI[0.065, 0.56], p = 0.01; Fig. 3B), and after adjusting for flanker scores calculated from trials within the initial third of the task (rs = 0.45, 95% CI[0.19, 0.65], p < 0.001; Fig. 3C), meeting the requirements of Granger causality. Moreover, these relationships were observed when restricting analyses to only learners (Supplementary Analysis 8). These temporal relationships strongly suggest that early lapses precede the learning of target–flanker contingencies—learning that is expressed in later blocks.

Fig. 3
figure 3

A Analysis schematic relating early attentional lapses to later learning. B, C The percent of trials participants spent out of the zone (i.e., periods of particularly fast RTs) in the first third of the task correlated with flanker scores in the last two thirds of the task after adjusting for the percent of trials out of the zone in the last two thirds of the task (B; p = 0.01), and flanker scores in the first third of the task (C; p < 0.001). Gray shading in B and C depict 95% confidence intervals. D RT differences on consistent and inconsistent trials, for trials labeled in versus out of the zone. Participants showed greater evidence of learning the target–flanker contingencies—reflected in larger RT differences between trial types—during out-of-the-zone than in-the-zone states (i.e., during periods in which the preceding RTs were particularly fast; p = 0.009). Means and within-subject error bars are plotted based on the method described by Morey (2008)

Within-subject fluctuations in attention shape processing of target–flanker relationships

Last, we investigated whether attentional fluctuations influenced the likelihood that an individual displayed learning for the target–flanker correlations. Remarkably, RT differences on consistent and inconsistent trials were greater when individuals were out of the zone than in the zone (b = 0.03, SE = 0.01, t(19077) = 2.59, p = .009; Fig. 3D). This relationship was also observed when using a deviance-based operationalization of attention (Supplementary Analysis 5) and when restricting analyses to learners (Supplementary Analysis 7). Critically, this relationship was not simply due to learning and attentional lapse rates increasing across the task: RT differences between inconsistent and consistent trials persisted when controlling for trial number (b = 0.03, SE = 0.01, t(19076) = 2.61, p = .009). These findings suggest that people are more likely to express learning by incorporating peripheral information into decisions during attentional lapses.

Most participants were not explicitly aware of the target–flanker relationships

To understand whether learning occurred because participants became explicitly aware of the target–flanker relationships, we examined responses on a post-experiment questionnaire that probed for explicit awareness. While 14 of the 53 participants reported noticing a pattern, only five correctly indicated that there was a relationship between targets and flankers. Thus, most participants were unaware (at least explicitly) of the target–flanker contingencies. Importantly, excluding these five participants did not change the pattern of results (Supplementary Analysis 9).

Discussion

We uncovered an underappreciated benefit of attentional lapses: they can help us learn and use contingencies that lie beyond our narrow goals. People who learned the most about target–flanker pairings were in a reduced attentional state—that is, “out of the zone”—more often than those who learned less. This finding held true regardless of the different ways we operationalized sustained attention (using RT speed or deviance). What is more, people who ultimately displayed the greatest learning of the uninstructed contingencies spent more time in a poor attentional state early in the task, suggesting lapses may be instrumental in the initial acquisition of learning. Finally, we show that—even within individuals—attentional lapses heighten learning of the flanking contingencies, directly implicating attention in a way that cannot be achieved by comparing groups or individuals. Together, these results suggest that attentional lapses boost learning of seemingly irrelevant information.

Our finding of better learning during attentional lapses adds a mechanistic explanation to previous work showing populations with reduced attentional control—aging adults (Campbell et al., 2012), children (Deng & Sloutsky, 2016), and young adults with high impulsivity (Landau et al., 2012)—show better learning of goal-irrelevant information. While these compelling demonstrations suggest that reduced cognitive control enhances learning of distractors, this prior work relies on pre-existing group differences that may covary with other traits that influence learning. Our focus on sustained attention therefore adds precision by specifically narrowing in on sustained attention and relating it to the learning of information that is seemingly goal-irrelevant.

These findings provide evidence for underload theories of attention, which propose that resources are not entirely depleted during an attentional lapse, but rather are redeployed elsewhere (Ariga & Lleras, 2011; Manly et al., 1999; Robertson et al., 1997; Smallwood & Schooler, 2006). In particular, we show that resources may be directed towards other information in our environments.

It is important to note that the distractors in our study are special. While they are not required to perform the instructed task—that is, determine whether the central graphic is a letter or a number—they are related to the central graphic by definition. Moreover, when the distractors are consistent, they speed responses. Thus, these are distractors in the sense that participants were told to ignore them. It is possible that when one is out of the zone, attentional resources are only applied to distractors that are indirectly task relevant. Thus, lapses might broaden our narrow focus specifically in ways that benefit behavior. Relatedly, it is worth considering whether purely irrelevant stimuli are ecologically valid. Natural environments contain information that is probabilistically relevant or only relevant in the future. Importantly, our study is a step toward understanding the relationship between attentional lapses and the learning of distractors that are extraneous but indirectly related to the task, but future work is needed to understand the boundaries of this effect and precisely what irrelevant or peripheral information is “prioritized” in more complex environments.

At first blush, our findings appear to be at odds with work showing greater neural sensitivity to goal-irrelevant stimuli during focused attention (Esterman et al., 2014). However, this prior study differed from ours in important ways. First, there was no behavioral index of how well the distracting images were learned; their processing was inferred from greater repetition suppression of the BOLD signal in canonical scene processing networks. Interestingly, stronger repetition suppression can be associated with worse learning (Wagner et al., 2000). It is therefore possible that participants learned more about the distracting scenes during poor attentional states since repetition suppression was reduced when participants were out of the zone. It is also noteworthy that the distractors used (Esterman et al., 2014) were not correlated with the central targets as ours were. It could be that when distractors are indirectly related to the task, they become more difficult to inhibit when out of the zone, leading to learning, as we observed.

Critically, the relationships between targets and flankers in this study were probabilistic and learned incrementally over time. Previous work shows that incremental probabilistic learning is mediated by striatal circuits (Myers et al., 2003; Poldrack et al., 2001; Shohamy et al., 2009) and is broadly referred to as procedural learning (Gabrieli, 1998; Kalra et al., 2019). It could be that being out of the zone benefits incremental learning of distractors, but not declarative or episodic learning, which is mediated by the hippocampus (Schacter & Tulving, 1994). Suggestive of this possibility, the procedural, but not the episodic memory system learns well under dual-task conditions (Foerde et al., 2006; Foerde et al., 2007) when attentional resources are spread thin. It could therefore be that poor attention benefits procedural learning specifically. Understanding possible differences in the impact of attentional fluctuations on different learning systems will ultimately inform questions about how these systems interact (Duncan et al., 2019), which may differ on a moment-to-moment basis.

Finally, while our results were robust to several control analyses and different operationalizations of sustained attention, further research is needed to bolster our conclusions. We see a need for high-powered studies to directly replicate this work, particularly the individual difference analyses, as well as extensions to better understand how attentional lapses relate to learning of different types of distractors.

Future work notwithstanding, the present findings suggest that a reconceptualization of attentional lapses is due, with a new emphasis on the associated benefits, rather than only the costs. Deviations from an “optimal” attentional state may not be purely harmful insofar as learning is concerned, as other information does appear to be processed during these “suboptimal” states. Moreover, this processing may not just be focused on the “internal” meanderings of our minds but also surveying our “external” worlds for learning opportunities that lie beyond the task at hand. As a result, perhaps attentional lapses should not be considered failures per se, but rather, opportunities to expand what we take away from our experiences.