Effects of pupil size as manipulated through ipRGC activation on visual processing

The size of the eyes ’ pupils determines how much light enters the eye and also how well this light is focused. Through this route, pupil size shapes the earliest stages of visual processing. Yet causal effects of pupil size on vision are poorly understood and rarely studied. Here we introduce a new way to manipulate pupil size, which relies on activation of intrinsically photosensitive retinal ganglion cells (ipRGCs) to induce sustained pupil constriction. We report the effects of both experimentally induced and spontaneous changes in pupil size on visual processing as measured through EEG. We compare these to the effects of stimulus intensity and covert visual attention, because previous studies have shown that these factors all have comparable effects on some common measures of early visual processing, such as detection performance and steady-state visual evoked potentials; yet it is still unclear whether these are superficial similarities, or rather whether they reflect similar underlying processes. Using a mix of neural-network decoding, ERP analyses, and time-frequency analyses, we find that induced pupil size, spontaneous pupil size, stimulus intensity, and covert visual attention all affect EEG responses, mainly over occipital and parietal electrodes, but — crucially — that they do so in qualitatively different ways. Induced and spontaneous pupil-size changes mainly modulate activity patterns (but not overall power or intertrial coherence) in the high-frequency beta range; this may reflect an effect of pupil size on oculomotor activity and/ or visual processing. In addition, spontaneous (but not induced) pupil size tends to correlate positively with intertrial coherence in the alpha band; this may reflect a non-causal relationship, mediated by arousal. Taken together, our findings suggest that pupil size has qualitatively different effects on visual processing from stimulus intensity and covert visual attention. This shows that pupil size as manipulated through ipRGC activation strongly affects visual processing, and provides concrete starting points for further study of this important yet understudied earliest stage of visual processing.

Visual perception starts as soon as light passes through the eye's pupil, before it has even reached the retina.By actively controlling the size of the pupil, the visual system controls how much light enters the eye (which increases with increased pupil size), as well as how sharply this light is focused on the retina (which decreases with increased pupil size).In this way, pupil size shapes visual perception already at the earliest stage (Mathôt, 2020;Vilotijević and Mathôt, 2023a).Yet remarkably little is known about how pupil size shapes perception-what exactly is different about vision with large pupils as compared to vision with small pupils?Here we use a new technique to manipulate pupil size, which relies on differential activation of a specific class of photoreceptors (intrinsically photosensitive retinal ganglion cells; ipRGCs) that are involved in sustained pupil constriction; using this technique, the current study is among the first to investigate effects of pupil size, albeit through an indirect manipulation, on visual processing as measured through electroencephalography (EEG; also see Bieniek et al., 2013;Bombeke et al., 2016;Suzuki et al., 2019).
Causal effects of pupil size on behavior have already been established in the 1950s, in a series of studies in which pupil size was manipulated experimentally (Campbell, 1957;Campbell and Gregory, 1960;Woodhouse, 1975).For example, in a landmark study, Campbell and Gregory (1960) used eye drops to maximally dilate the pupil, and then placed an artificial pupil (a device with a gap of adjustable size) in front of the eye.Next, for a range of artificial pupil sizes, they established the lowest intensity at which participants were still able to make out the details of stimuli of various sizes, a task that relies both on visual sensitivity (the ability to detect the presence of a stimulus) and acuity (the ability to make out the details of a stimulus).Crucially, the authors found that small stimuli were best perceived with small pupils, whereas large stimuli were best perceived with large pupils.Phrased differently, they found that visual acuity is highest for small pupils, which provide sharper focus, whereas visual sensitivity is highest for large pupils, which provide increased light influx.This general pattern has since received strong support from fundamental vision science (Eberhardt et al., 2022;Liang and Williams, 1997;Mathôt and Ivanov, 2019), as well as from research on ergonomics of display design (Piepenbrock et al., 2014) and ophthalmology (Alfonso et al., 2007).
Causal effects of pupil size on EEG measures have only been investigated in a handful1 of studies (Bieniek et al., 2013;Bombeke et al., 2016;Suzuki et al., 2019).The most compelling example to date is perhaps a study by Suzuki et al. (2019), who recorded steady state visual evoked potentials (SSVEPs) triggered by rhythmically flashing dots; they manipulated pupil size indirectly by presenting these dots either on top of a control stimulus or a "glare stimulus", which is an optical brightness illusion that triggers pupil constriction (Laeng and Endestad, 2012).SSVEPs correspond to rhythmic EEG activity at the frequency of the triggering stimulus, with higher oscillatory power indicating stronger visual responses (Müller et al., 1998).Crucially, the authors found that larger pupils were associated with stronger SSVEPs.
The studies reviewed above suggest that the size of the pupil influences the strength of incoming visual stimuli.Superficially then, the effect of increased pupil size seems similar to the effect of increased stimulus intensity as well as the effect of covert visual attention: at the behavioral level, these two factors also increase the detectability of stimuli (Carrasco et al., 2000); and at the neural level, these two factors also increase SSVEP amplitude (Andersen et al., 2012).This simple observation inspired us to directly compare the effects of pupil size to the effects of stimulus intensity and covert visual attention on visual processing, as a crucial first step towards understanding the role of pupil size in visual processing.
We used a spatial cueing paradigm in which we manipulated covert visual attention by presenting the target either at a cued (attended) or uncued (unattended) location.We manipulated stimulus intensity by having the target be either bright or dim.And we manipulated pupil size using a novel technique from our lab that relies on isoluminant red and blue inducers, while avoiding any spatial or temporal overlap between the inducers and the other stimuli (as described in more detail under Pupil-size induction procedure); for reference, this technique induces substantial differences in pupil size (about 20 % surface area) that are far larger than the effects of arousal or mental effort, yet smaller than the effect of direct exposure to light.We consider this induction procedure to be a fairly pure manipulation of pupil size; however, it is still an indirect manipulation that operates through differential activation of ipRGCs, a class of photoreceptors involved in sustained pupil constriction, and as such this procedure may also affect other aspects of visual cognition (we return to this point in the General discussion).We further included spontaneous fluctuations in pupil size as a pseudomanipulation to allow for better comparison to previous studies that looked at correlations between spontaneous pupil-size fluctuations and EEG measures (e.g., Hong et al. 2014;Murphy et al. 2011;Podvalny et al. 2021;Thigpen et al. 2018;Waschke et al. 2019;Pilipenko and Samaha 2023; for related non-human animal studies, see Franke et al. 2022;Joshi et al. 2016).
We will focus on EEG activity after target presentation, as opposed to pre-target or baseline activity, and on main effects of induced pupil size, spontaneous pupil size, stimulus intensity, and covert attention, as opposed to interactions between these factors.Our data set, which is publicly available and well-documented for re-use (see Open-practices statement), allows for many more analyses; however, because there is limited previous research to build on, we believe that this clear focus will better allow us to draw conclusions and to formulate concrete hypotheses for further investigations.

Participants
Thirty participants (26 females; M age = 20.73)were included in the experiment, which was approved by the local ethics board of the University of Groningen, Netherlands (approval code: PSY-2122-S-0341).All participants had normal or corrected-to-normal vision, were righthanded, and had no history of neurological disorders.Participants received course credit and provided written informed consent.One additional participant was tested but excluded due to a technical recording error.Two additional participants were tested but excluded because they did not show a pupil-size-induction effect (see Pupil-size induction procedure).These three participants were replaced to reach our predetermined sample size of thirty participants.In the absence of an a-priori expected effect size, our sample size was based on the rule of thumb provided by Brysbaert and Stevens (2018) to have at least observations per condition; in our design, we had 5760 observations per condition when considering main effects.
The experiment was conducted on a desktop computer with a 27″ flatscreen monitor with a refresh rate of 60 Hz and a resolution of × 1080 pixels.The right eye was recorded at 1000 Hz using an EyeLink 1000 (SR Research).EEG data was recorded at 1000 Hz using a TMSI REFA 32 system with 26 channels placed according to the standard 10-20 system with OpenViBE data acquisition software (Renard et al., 2010).Two additional channels were placed on the left and right mastoids for offline re-referencing.Two additional channels were placed above and below the left eye; the difference between these channels was determined offline to serve as a vertical EOG channel.Two additional channels were placed on the left and right temples; their difference served as a horizontal EOG channel (see also Data preprocessing).

Pupil-size induction procedure
We manipulated pupil size by presenting red and blue inducers before each trial, where we expected pupils to be larger after sustained exposure to red inducers as compared to blue inducers.Crucially, this pupil-size difference should not result from differences in luminance between red and blue inducers, which would affect the initial pupil response to a brief light stimulus (< 2 s), but rather from differential activation of intrinsically photosensitive retinal ganglion cells (ipRGCs), which affects the long-term pupil response to a sustained light stimulus (> 10 s; Gamlin et al. 2007;Mathôt 2018).Therefore, we obtained equiluminant intensities of red and blue for each participant separately during a luminance-calibration phase at the start of the experiment (see also Kinzuka et al. 2022;Vilotijević and Mathôt 2023b;Wardhani et al. 2022).The aim of this calibration phase was to find intensities of red and blue that would result in an equally strong initial pupil constriction and thus be equiluminant in this specific sense.
During luminance calibration, participants looked passively at a central fixation cross while they were exposed to peripheral red or blue stimuli that were presented for 1000 ms followed by 2000 ms of a dark (0.10 cd/m 2 ) screen; the center (r = 8.36 • ) of the display remained dark at all times (Fig. 1a).Red and blue stimuli were presented in alternation.The intensity of the blue stimulus was fixed (9.84 cd/m 2 ).The intensity of the red stimulus was adjusted online based on the strength of pupil constriction in response to the red or blue stimulus; specifically, on each trial, the strength of pupil constriction was calculated as the difference between the maximum and minimum pupil size between 900 and 1800 ms after the onset of the stimulus.If pupil constriction was weaker in response to a red stimulus than in response to the preceding blue stimulus, or stronger in response to a blue stimulus than in response to the preceding red stimulus, then the intensity of the red stimulus was increased by 1 %; otherwise, the intensity of the red stimulus was decreased.
The final participant-specific red (adjusted) and blue (fixed) intensities were used for the inducer stimuli during the experiment (Fig. 1b).Specifically, the first trial of each block of 96 trials started with a red or blue inducer that was presented for 20 s, which is long enough to trigger a substantial difference in the sustained pupil response such that pupils are larger after red inducers than after blue inducers (Mathôt, 2018;Wardhani et al., 2022).Subsequent trials in the same block started with a 'top-up inducer' of the same color that was presented for 1.5 s plus the duration of the drift-correction procedure.Such a brief presentation time is by itself not sufficient to trigger a difference in pupil size between red and blue inducers; however, we found in pilot studies (data not included) in which we tried various induction procedures on ourselves that a brief top-up inducer is able to partly reinstate the effect of a previously presented long inducer.We relied on this effect to reduce the overall duration of the experiment.
Each participant completed two practice blocks of 10 trials and four non-practice blocks of 96 trials, during which the inducer color was kept constant.The block order was either red-blue-red-blue or blue-red-bluered, counterbalanced across participants.

Experimental procedure
Following the inducer, each trial started with a dark (0.10 cd/m 2 ) display consisting of a central fixation dot and two circular placeholders (r = 1.49• ), one on the left and one on the right side of the display (eccentricity = 5.02 • ), presented for 1000 ms (Fig. 1c).Except for the target (see below), stimuli were low intensity (0.66 cd/m 2 ).Next, a cue was presented for 500 ms; the cue was identical to the fixation cross, except that either the left or right arm disappeared, indicating that the target was most likely (75 %) to appear at the side of the remaining arm.Next, the fixation cross re-appeared for 500 ms, after which the target was presented for 100 ms while the cue remained on the display; the target was a small dark dot that appeared slightly above or below the vertical midline of the screen, inside a bright (83.58 cd/m 2 ) or dim (7.96 cd/m 2 ) filled circle that appeared at the location of one of the placeholders.Next, the fixation cross and placeholders re-appeared until the participant responded or until a timeout of 2000 ms occurred.The participant's task was to report whether the target dot appeared above or below the midline by pressing the 'm' or 'n' key as fast and accurately as possible.Participants were instructed to keep their eyes fixated on the central fixation cross throughout the trial.
Throughout the experiment, a continuous 2-up-1-down staircase ensured that performance for valid trials remained around 66 % by making the target appear closer to (more difficult) or further away from (easier) the midline.Initial staircase values were set to a medium level of difficulty (0.5), and converged to a participant-specific difficulty level during the practice phase.The staircase was run independently for red and blue blocks to ensure that task difficulty did not differ between red and blue blocks.
The experimental design consisted of three experimental factors: induced pupil size (large, small; varied between blocks), stimulus intensity (bright, dim; varied within blocks), and covert visual attention (attended, unattended; varied within blocks).We also treated spontaneous pupil size (large, small) as a pseudo-experimental factor.This factor encoded whether the mean pupil size during the presentation of the first fixation display of each trial was larger or smaller than the perparticipant, per-inducer-color median pupil size; in other words, this factor encoded spontaneous fluctuations in pupil size in a way that was uncorrelated with induced changes in pupil size.Together, these factors form a 2 (induced pupil size) × 2 (spontaneous pupil size) × 2 (stimulus intensity) × 2 (covert visual attention) within-subject design.

Data preprocessing
EEG preprocessing-EEG data was preprocessed fully automatically.Unless otherwise specified, we used the default parameters as described on the documentation of the referenced functions.1) Data was re-referenced to the mastoid channels.2) Muscle artifacts, which are characterized by bursts of high-frequency activity (110-140 Hz), were marked as bad using the MNE function for annotating muscle activity (see mne.preprocessing.annotate_muscle_zscore)with a zthreshold of 5. 3) Data was downsampled to 250 Hz for computational efficiency.4) A vertical EOG channel was created by subtracting the electrodes above and below the left eye, and a horizontal EOG channel was created by subtracting the electrodes on the left and right temples.5) Data was filtered using a 0.1 -40 Hz bandpass filter.6) The RANSAC algorithm (see autoreject.Ransac) determined bad channels based only on data segments corresponding to trials; in brief, this algorithm assumes that a channel is bad if its data is typically poorly predicted by interpolation from neighboring channels (Bigdely-Shamlo et al., 2015).Overall, 2.6 % of channels were marked as bad.7) The influence of blinks and eye movements was reduced by first running an independent component analysis (ICA) on a 1 Hz highpass filtered copy of the data, then identifying those ICA components that correlated highly with the EOG channels, and finally removing these components from the data (see mne.preprocessing.ICA).Overall, 7.2 % of ICA components were removed.8) Channels that were marked as bad in step 6 were interpolated (see mne.io.Raw.interpolate_bads).9) Epochs containing saccadic eye movements larger than 3.0 • as identified by the eye tracker were marked as bad and excluded from analysis.Overall, 14.7 % of epochs were marked as bad based on the presence of saccadic eye movements and/ or muscle activity (as described above).
Additional preprocessing for EEG decoding-For the decoding analyses, we followed the recommendations from Schirrmeister et al. (2017) and the associated braindecode documentation. 3 Specifically, a 4 -30 Hz bandpass filter was applied to reduce artifacts, and data was transformed using exponential moving standardization (see braindecode.preprocessing.exponential_moving_standardize).Data was augmented using cropped decoding with a window of 800 ms (within a 850 ms epoch) and a window stride of 4 ms; that is, overlapping 800 ms windows were cut from each epoch (0 -800 ms, 4 -804 ms, etc.) and these windows were used as separate pieces of training data.Cropped decoding is a way to artificially increase the amount of training data ("data augmentation"), which is common practice in training of neural networks.When conditions did not have an equal number of trials, trials were randomly sampled with replacement from the least frequent condition until the number of trials was equal for all conditions during training (but not for testing, which does not require balanced data).

Additional preprocessing for ERP and time-frequency analy-
ses-For the ERP and time-frequency analyses, the Autoreject algorithm (see autoreject.Autoreject) was applied to the remaining data to detect and interpolate epochs and channels that had not been identified in the previous preprocessing steps.ERPs were baseline corrected relative to a 100 ms pre-target interval.Importantly, we did not apply baseline correction for the time-frequency analyses.This choice was The experiment consisted of two red-inducer (large pupils) blocks and two blue-inducer (small pupils) blocks.The first inducer of each block was longer (20 s) than subsequent inducers (1.5 s).(c) During each trial, participants reported whether a small dot (the target) was slightly above or below the midline.Target intensity and cue validity were manipulated.
based on the fact that induced pupil size was constant within blocks (see Fig. 2b), and could thus affect frequency power and inter-trial coherence already before target onset; because of this, baseline correction could make pre-target (baseline) differences between large and small induced pupils appear as post-target (evoked) differences, which could lead to incorrect interpretations.
Pupil-size preprocessing-For the pupil-size analyses, we followed the recommendations from Mathôt and Vilotijević (2022).1) Missing or invalid data was interpolated using cubic-spline interpolation if possible, using linear interpolation if cubic-spline interpolation was not possible (when the segment of missing data was too close to the start or end of a trial), and removed if interpolation was impossible altogether (when data was missing from the start and/ or until the end of a trial) or if the period of missing data was longer than 500 ms and thus unlikely to reflect a blink (see datamatrix.series.blinkreconstruct).2) Pupil size was converted from arbitrary units as recorded by the EyeLink to millimeters of diameter.3) Epochs for which baseline pupil size (the average of the 50 ms before target onset) was missing due to recording artifacts or deviated more than 2 SD from the mean baseline pupil size of that participant were excluded from analysis.Overall, 17.2 % of trials were marked as bad based on this criterion, roughly equally divided across most factors, with the exception that trials with spontaneously large pupils (22.6 %) were more often marked as bad than trials with spontaneously small pupils were (11.9 %); this likely reflects that participants were more likely to move (and thus distort the recording) when they were in a state of increased arousal.
Reporting of statistical analyses-We will report a large number of statistical analyses, many of which are fully or partly exploratory, and none of which were pre-registered.We will therefore emphasize general patterns over significance of individual effects.When reporting statistical analyses, we will refer to p < .05 as 'significant effects' (i.e., using an alpha level of 0.05).We will focus on main effects.

Red and blue inducers successfully manipulated sustained pupil size
Pupils were larger in red-inducer blocks as compared to blue-inducer blocks (see Fig. 2a); that is, even though the strength of the initial pupil constriction to both inducer colors had been matched by our luminancecalibration procedure (see Supplementary results), sustained pupil size differed systematically.This was true for all participants that were included in the analysis. 4The inducer effect was stable across blocks (see Fig. 2b), suggesting that the brief top-up inducers that preceded each trial were sufficient to reinstate the effect of the 20 s inducer that preceded each block.Since we had selected participants based on whether or not they showed this effect no statistics were performed on this result.

EEG: decoding
As a first step, we used neural-network decoding to investigate whether and how the ERP signal around target onset was affected by our four factors: induced pupil size, spontaneous pupil size, stimulus intensity, and covert visual attention.We focused on the signal from 100 ms before until 750 ms after target onset (see also Data preprocessing).All decoding analyses were done using the 'shallow' neural network from the braindecode toolkit using the network's default parameters (Schirrmeister et al., 2017).This is a four-layer network that first performs a temporal filter for each channel separately, followed by a spatial filter that combines information across channels, thus allowing the network to identify both temporal and spatial regularities in the signal.We chose this 'shallow' network over the toolkit's ten-layer 'deep' network to reduce training time.To assess the generalizability of the decoding, we used four-fold cross-validation for each participant separately.
In a series of analyses, we tested for each factor: a) whether it could be decoded at all; b) which electrodes contributed most to decoding; and c) which frequencies contributed most.Since neural network-based decoding requires fairly long epochs as input, as opposed to single samples as is common for other EEG-decoding techniques (see e.g., Grootswagers et al. 2017 for an overview), we did not attempt to test which time points within this window contributed most.Finally, we tested d) whether any pair of factors are similar by training on one factor and then decoding on another (cross-decoding).
All factors can be reliably decoded (Fig. 3)-We first performed overall decoding of all 16 combinations of factors.A confusion matrix revealed that all factors were reliably decoded (visible as the red cells along the diagonal in Fig. 3a).We subsequently decoded each factor separately and determined the area under the curve (AUC) of the receiving operating characteristic (ROC) curve as a measure of decoding performance that is also suitable for unbalanced data (in our design covert visual attention was unbalanced because there were more valid than invalid trials); to calculate the AUC we used the activation of the output node in the network corresponding to the correct option as a continuous measure of the probability of selecting the correct option.This analysis revealed that individual factors were decoded far above chance level (0.5 AUC): induced pupil size (0.76 AUC, t = 9.30, p < .001),spontaneous pupil size (0.62 AUC, t = 9.85, p < .001),target intensity (0.63 AUC, t = 7.87, p < .001),and covert visual attention (0.66 AUC, t = 7.00, p < .001).
Because pupil-size inducers were varied between blocks, decoding of induced pupil size was confounded by proximity in time: two trials with the same inducer color were on average closer to each other in time than two trials with different inducer colors were.The Supplementary Results contain several control analyses showing that induced pupil size can be reliably decoded also in decoding schemes in which time is no longer a confounding factor.
Occipital and parietal channels carry most information for all factors (Fig. 4)-To identify which electrodes contributed most to decoding (i.e., were most strongly affected by our factors), we conducted an ICA-based perturbation analysis for each participant and factor separately; this analysis is documented in detail in the analysis source code (see Open-practices statement), but in brief, we determined how much decoding performance dropped after removing a single independent component from the signal for both training and testing.The rationale behind this procedure is that by removing independent components rather than electrodes from the signal, this ICA-based perturbation analysis is less hindered by high correlations between neighboring electrodes.We then assigned a 'contribution score' to each electrode by multiplying this drop in decoding accuracy by the (absolute) loading of the electrode onto the excluded independent component, and dividing the result by the original decoding accuracy.We repeated this procedure for each of the 26 independent components, each time increasing the contribution scores for the electrodes.In the end, electrodes that carried most information thus accumulated the highest contribution scores.(The analysis source code contains a sanitycheck analysis showing that applying this ICA-based perturbation analysis to a dummy factor that is randomly assigned to trials indeed results in a flat scalp topography.) We subsequently conducted a repeated measures ANOVA using the contribution score as the dependent variable, and factor and electrode as independent variables; to qualify the results, we relied on visual inspection of scalp topographies and follow-up simple effects analyses (Fig. 4).We found a main effect of electrode (F(25, 725) = 2.93, p < .001),reflecting that occipital and parietal electrodes contributed most 4 As described under Participants, two additional participants were tested and replaced because they did not show this effect.It is currently unclear whether this reflects measurement noise or systematic individual differences in the extent to which people are affected by red and blue inducers.However, overall the effect is highly systematic.
S. Mathôt et al. to decoding overall, with CP1 and CP2 having the highest contribution scores.We did not find a reliable main effect of factor (F(3, 87) = 1.93, p = .131),reflecting that, on average, removing independent components from the signal impaired decoding of each factor about equally.However, we did find a weak but reliable electrode × factor interaction (F (75, 2175) = 1.52, p = .003),reflecting that there was some difference between the four factors in how much specific electrodes contributed to decoding.
We qualified the interaction with follow-up simple effects analyses.This revealed effects of channel on induced pupil size (F(25, 725) = 12.75, p = .001),spontaneous pupil size (F(25, 725) = 1.62, p = .030),and stimulus intensity (F(25, 725) = 3.67, p < .001);however, there was no reliable effect of channel on covert visual attention (F(25, 725) = 1.37, p = .106).Overall, there was a general and qualitatively similar reliance of the decoder on occipital and parietal electrodes for all factors, with the possible exception of covert visual attention, but how pronounced this reliance was varied between factors.
Induced and spontaneous differences in pupil size mainly affect beta; stimulus intensity mainly affects alpha; covert visual attention mainly affects theta (Fig. 5)-To identify which frequencies carried most information, we conducted a frequency-based perturbation analysis for each participant and factor separately; this analysis was  similar to the ICA-based perturbation analysis, except that we now assigned a contribution score to specific frequencies, based on how much decoding performance was impaired after silencing these frequencies using a notch filter.We used a notch-filter that increased exponentially in 15 steps from 4 (lower theta) to 30 (upper beta) Hz, using a filter width that similarly increased exponentially from 1 to 7.5 Hz.This frequency range was determined by the bandpass filter that was applied during preprocessing for decoding (see Data preprocessing).(The analysis source code contains a sanity-check analysis showing that applying this frequency-based perturbation analysis to a dummy factor that is randomly assigned to trials indeed results in a flat distribution where no frequency contributes more than others.) Two important caveats to guide the interpretation of these results: 1) If silencing a specific frequency strongly impairs decoding, this can reflect several things, including overall power or intertrial-coherence differences as in a traditional time-frequency analysis (David et al., 2006), but also modulation of specific ERPs that are most pronounced in this frequency range; for example, an effect on the P3 component, which spans a relatively long time window, might express itself as a reliance on low frequencies, whereas an effect on the N1 component, which spans a shorter time window, might express itself as a reliance on high frequencies.2) The decoding-contribution value is a relative within-factor measure, such that differences between frequencies for a given factor are meaningful, but differences between factors for a given frequency are not meaningful.
We subsequently conducted a repeated measures ANOVA using the contribution score as a dependent variable, and factor and frequency as independent variables; to qualify the results, we relied on visual inspection (Fig. 5) and simple-effect analyses.We found a main effect of frequency (F(14, 406) = 6.15, p < .001),reflecting that some frequencies were more important than others for decoding overall.We did not find a reliable main effect of factor (F(3, 87) = 2.49, p = .066),reflecting that there was no notable difference in how much decoding of the four factors was disrupted overall in the analysis (as for the ICA-perturbation analysis).Crucially, we found a factor × frequency interaction (F(42, 1218) = 8.84, p < .001),reflecting that there was a difference between the four factors in which frequencies were most important for decoding.
We qualified the interaction with follow-up simple effects analyses.This revealed effects of frequency on induced pupil size (F(14, 406) = 12.75, p < .001),which was mainly reliant on beta frequencies with a peak around 22 Hz; on spontaneous pupil size (F(14, 406) = 3.75, p < .001),which was also mainly reliant on beta frequencies with a peak Fig. 5. Contribution of frequency bands to decoding of: induced differences in baseline pupil size (red), spontaneous differences in baseline pupil size (purple), stimulus intensity (gray), and covert visual attention (green).The x-axis indicates frequencies.The y-axis indicates contribution scores, which reflect how much decoding accuracy decreased after notch-filtering specific frequencies.Error bands indicate within-subject standard errors.Lines have been smoothed using cubicspline smoothing.
Cross-decoding reveals qualitatively different effects of all factors-We conducted a cross-decoding analysis by training the neural network to decode one factor (e.g., induced pupil size), using the same training procedure as before, and then using this pre-trained neural network to decode another factor (e.g., stimulus intensity).For each combination of factors, we conducted this analysis in both directions (e. g., training on induced pupil size and testing on stimulus intensity, and then the other way around) and took the average accuracy as our measure of cross-decoding accuracy, where deviations from chance in either direction would indicate cross-decoding.We subsequently conducted a one-sample t-test against chance level (0.5 AUC) for each combination of factors.This did not reveal reliable cross-decoding for any combination of factors or in any direction5 (all p > .16).
Summary of decoding results-We found that induced changes in pupil size, spontaneous changes in pupil size, stimulus intensity, and covert visual attention could all be reliably decoded from the EEG signal following target onset.In terms of scalp topography, occipital and parietal electrodes contributed most to decoding for all factors.In terms of frequencies, beta frequencies contributed most to decoding of induced and, to a lesser extent, spontaneous changes in pupil size; alpha frequencies contributed most to decoding of stimulus intensity; and theta frequencies contributed most to decoding of covert visual attention.There was no cross-decoding between any combination of factors, suggesting that all factors had qualitatively different effects on the EEG signal following target onset.

EEG: lateralized ERPs
In the previous section, we focused on decoding analyses, which are a powerful tool to detect whether information is present, and (if it is) in which electrodes and frequencies the information is most prominent.However, decoding results can be difficult to interpret and relate to previous EEG studies, many of which have used more traditional analyses.Therefore, we also conducted ERP and (further down) timefrequency analyses in order to further characterize the effects of pupil size on visual processing.
For the ERP analyses, we focused on lateralized (non-midline) parietal electrodes (P3, P4, P7, P8, CP1, and CP2), because our decoding analysis had revealed parietal electrodes, especially CP1 and CP2, as being strongly affected by our factors.We decided to exclude occipital electrodes from this analysis because these are characterized by qualitatively different waveforms than the parietal electrodes.However, analyses of different electrode groups can be found in the analysis source code.In addition, we focused on lateralized ERPs, that is, the difference between electrodes that were contra-and ipsilateral to the target (contra -ipsi), since we had an unbalanced display in which the target was presented only on one side of the display.We analyzed the signal from 100 ms before to 500 ms after target onset; this is a slightly shorter epoch than we had used for the decoding analysis, a choice that was based on the assumption that ERP effects were most likely to arise early in time, and on the need to use a restricted time window in order to maximize statistical sensitivity.
Because we used single-trial linear mixed-effects analyses (which are time-consuming) as the basis for the test, a unified cluster-based permutation test with all factors and their interactions as fixed effects and a maximum random-effects structure would have been prohibitively computationally intensive; we therefore conducted four separate tests, one for each factor as fixed effect.By-participant random intercepts and slopes were included.Clusters were identified using a p < .05criterion, and the absolute sum of z-scores was used as test statistic.We used windows of 16 ms and ran 1000 iterations for each test.Note that the timing of significant clusters provides only a very rough indicator of when effects arise (Sassenhagen and Draschkow, 2019).Induced differences in pupil size affect ERPs (Fig. 6a)-ERPs were slightly less lateralized for induced large pupils as compared to induced small pupils.The main cluster was around 350 ms (p = .039).Notably, there was a period between roughly 250-400 ms that was characterized by fluctuations of around 20 Hz (beta band) and that included this main cluster; this aligns with the decoding results, which pointed towards beta frequencies as carrying most of the information about induced pupil size.
Spontaneous differences in pupil size affect ERPs (Fig. 6b)-ERPs were also slightly less lateralized for spontaneous large pupils as compared to spontaneous small pupils.This effect was qualitatively similar to that of induced pupil size, although the main cluster was slightly earlier, around 280 ms (p = .044),though still within the period that was characterized by beta oscillations.
Stimulus intensity affects ERPs (Fig. 6c)-Stimulus intensity had a complex effect on lateralized ERPs, which is best described as a decreased latency and increased lateralization for increased intensity.The main cluster was around 250 ms (p < .001).Of note, the effect of stimulus intensity was qualitatively different from that of induced and spontaneous pupil size.
Covert visual attention affects ERPs (Fig. 6d)-By far the most pronounced effect was found for covert visual attention, such that ERPs were less lateralized in response to attended as compared to unattended targets.The main cluster arose very rapidly after target onset and persisted until the end of the signal (p < .001).Of note, the effect of covert visual attention was also qualitatively different from that of induced and spontaneous pupil size.

EEG: time-frequency analyses
For the time-frequency analyses, we again focused on parietal electrodes (P3, P4, P7, P8, CP1, CP2, Pz, and POz), this time also including midline electrodes because we did not focus on lateralized responses (unlike for the ERP analyses) . 6The analyses were based on Morlet wavelets of two cycles.Frequencies ranged from 4 to 30 Hz in 1 Hz steps.Power was z-transformed for each participant and frequency separately, such that the grand mean across trials, samples, and electrodes was 0 with a standard deviation of 1.We additionally created aggregate time series for power in the theta (4 -8 Hz), alpha (8 -13 Hz), and beta (13 -29 Hz) frequency bands by averaging over subsets of the 1 Hz frequency bands from the Morlet wavelets, and conducted permutation tests on each band separately as described above for the lateralized ERPs.We also extracted intertrial-coherence effects for each band, participant, and factor separately; these were again tested with cluster-based permutation tests, although this time using standard regression analyses (as opposed to linear mixed-effects analyses) since intertrial coherence is an aggregate measure (as opposed to a single-trial measure).As for the ERP analyses and for the same reasons, we analyzed the window from 100 ms before to 500 ms after target onset.
We did not apply baseline correction, nor did we subtract the mean evoked response from the signal; consequently, the analyses reflect both induced (sustained patterns that are not clearly time-locked) and evoked (transient patterns that are locked to stimulus onset) activity (David et al., 2006).
Induced differences in pupil size do not reliably affect power or coherence in any frequency band (Fig. 7a,e)-Although the decoding results suggested that beta frequencies, mainly around 22 Hz, were strongly affected by induced pupil size, this was not notably reflected in differences in power or intertrial coherence.This suggests that the decoder relied on more subtle differences in the beta band, such as modulation of ERPs that are expressed in this frequency range (also see EEG: lateralized ERPs).
Spontaneous differences in pupil size weakly affect coherence (Fig. 7b,f)-Although the decoding results showed that beta frequencies, mainly around 22 Hz, were somewhat affected by spontaneous pupil size, this was again not notably reflected in differences in power or intertrial coherence, again suggesting that the decoder relied on other effects expressed in this frequency range.However, there was a slight increase in alpha intertrial coherence for spontaneously large as compared to small pupils (p = .018).
Stimulus intensity affects alpha power and coherence in all frequency bands (Fig. 7c,g)-Decoding results showed that alpha frequencies, mainly around 10 Hz, were strongly affected by stimulus intensity.This was reflected in an decrease in alpha power for bright as compared to dim trials with a peak around 400 ms (p < .001).This was also strongly reflected in intertrial coherence, which was larger for bright as compared to dim trials in all frequency bands (all p < .001),with a peak around 200 ms in the alpha band.
Covert visual attention strongly affects power and coherence mainly in theta but also in alpha and beta frequency bands (Fig. 7d,  h)-Decoding results showed that theta frequencies, mainly around 5 Hz, were somewhat affected by covert visual attention.This was also strongly reflected in power, which was smaller for attended as compared to unattended trials for most of the time window and in all frequency bands (theta and alpha: p < .001;beta: p = .006),with a peak around 250 ms in the theta band.This was also reflected in intertrial coherence, although here the pattern was more complex, characterized by an initial very rapid decrease in coherence for attended as compared to unattended trials (all bands: p < .001),which disappeared (and numerically even reversed, though this was not reliable) around 200 ms, followed by a continuation of the decrease (theta: p = .014;alpha: p = .001;beta: p < .001),with a trough around 400 ms in the alpha and beta bands.

Pupil constriction
We investigated how the strength of pupil constriction in response to the target was affected by our four factors (Fig. 8).To test this, we used cross-validation to localize the sample at which each main effect was strongest within the 500 -700 ms post-target window, and then conducted a single linear mixed-effects analysis (see time_series_test.lmer_crossvalidation_test) . 7Pupil size was baseline corrected relative to a 50 ms pre-target baseline period.Induced pupil size, spontaneous pupil size, stimulus intensity, and covert visual attention were included as fixed effects; no interactions were included; byparticipant random intercepts and slopes were included.Since pupil responses are typically slower than responses as measured through EEG, we used a slightly longer window from 0 to 1000 ms after target onset.
Induced differences in baseline pupil size do not affect pupil constriction (Fig. 8a)-Pupil constriction was equally strong for induced large and small pupils (z = 1.37, p = .170);that is, even though the inducers affected the absolute size of the pupil, they did not affect how much the size of the pupil changed in response to the target.Since approximately 20 % more light entered the eye on induced large as compared to induced small pupil trials (see Supplementary results), this is not a trivial result, and suggests a form of brightness constancy that already operates on the level of the pupil light response.
Spontaneous differences in baseline pupil size do affect pupil constriction (Fig. 8b)-Pupils constricted more strongly for spontaneously large pupils as compared to small pupils (z = − 6.99, p < .001).Given that this effect did not occur for induced differences in baseline pupil size, it likely did not result from increased light influx (which was about 23 % for spontaneous large vs small pupils, comparable to the 18 % for induced large vs small pupils), but rather was mediated by increased arousal; that is, large baseline pupil sizes reflect increased attentiveness, in turn resulting in stronger pupil constriction, analogous to the effect of covert visual attention described below.
Stimulus intensity affects pupil constriction (Fig. 8c)-Pupils constricted more strongly to high-intensity targets as compared to lowintensity targets (z = − 18.68, p < .001).This reflects the typical pupil light response. 7Since the pupil response in this case consists of only a single component (a pupil light response), there is no need to conduct a cluster-based permutation test, which is extremely computationally intensive when combined with linearmixed effects modeling (see Mathôt & Vilotijević, 2022).
Covert visual attention affects pupil constriction (Fig. 8d)-Pupils constricted more strongly to targets presented at attended locations as compared to unattended locations (z = − 5.52, p < .001).This reflects the modulation of the pupil light response by covert visual attention (Binda and Murray, 2015).

General discussion
Here we report that pupil size as manipulated indirectly through ipRGC activation affects visual processing as measured through EEG.We experimentally manipulated pupil size by presenting either an equiluminant blue or red inducer prior to each trial (Wardhani et al., 2022); prolonged exposure to blue light activates ipRGCs, which in turn triggers sustained pupil constriction (Gamlin et al., 2007;Mathôt, 2018), thus providing an unobtrusive way to indirectly manipulate pupil size.We compared the effects of both induced and spontaneous differences in pupil size to the effects of stimulus intensity and covert visual attention, all of which have been reported to enhance visual processing as measured by increased detectability of stimuli (Carrasco et al., 2000) and increased SSVEPs (Müller et al., 1998;Suzuki et al., 2019).
We applied neural-network decoding of EEG signals following target onset to quantify whether and how visual processing was affected by induced pupil size, spontaneous pupil size, stimulus intensity, and covert visual attention (Schirrmeister et al., 2017).We found that all of these factors could be decoded highly reliably, with occipital and parietal electrodes carrying most information.However, although the topographical distribution was roughly similar for all four factors, there were also pronounced differences, mainly in terms of which frequency bands carried most information: decoding of induced pupil size mainly relied on beta frequencies (22 Hz peak); spontaneous pupil size also mainly relied on beta frequencies (22 Hz peak); stimulus intensity mainly relied on alpha frequencies (10 Hz peak) and to a lesser extent on theta frequencies; and covert visual attention mainly relied on theta frequencies (5 Hz peak) and to a lesser extent also on alpha frequencies.These dissociations, corroborated by qualitative differences in lateralized ERPs, stimulus-evoked pupil constrictions, and a lack of cross-decoding between factors, suggest that induced pupil size, spontaneous pupil size, stimulus intensity, and covert visual attention all have qualitatively different effects on visual processing.
A first important implication of our results is that pupil size, at least when manipulated indirectly through ipRGC activation, affects visual processing as measured through EEG, especially in the beta band.This is reminiscent of correlational studies that observed a positive correlation between spontaneous pupil-size changes and beta power (Keegan and Merritt, 1995;Podvalny et al., 2021;Waschke et al., 2019), and extends these findings by suggesting that this link may be causal (with the caveat that, while we have manipulated pupil size experimentally, our manipulation is indirect and may also have affected other aspects of visual cognition, as we will discuss in more detail below).One important difference between our study and these previous studies is that previous studies all focused on activity during rest or a pre-stimulus baseline, rather than on activity following target onset; another important difference is that, although we found a highly pronounced reliance on beta activity for decoding, we did not find differences in overall beta power or intertrial coherence; this suggests that pupil size affected beta-band activity in more subtle ways, such as by modulating ERPs that are expressed in this frequency range, and which our ERP analyses also highlighted as being affected by pupil size.However, decoding and time-frequency analyses are fundamentally different, which makes it difficult to directly compare them.For example, decoding is done for each participant separately, which means that it is able to pick up on idiosyncratic effects that are systematic within participants but that differ across participants; in contrast, time-frequency analysis is done across participants, which means that it is only able to pick up effects that are systematic across participants.Furthermore, decoding and time-frequency analyses require different preprocessing steps.Nevertheless, although there are still many details to be worked out, the picture that emerges from our results and others is that pupil size affects activity in the beta band-so what might this reflect, in terms of underlying cognitive processes?
One dominant view relates beta activity to motor activity, typically such that increased beta power is associated with increased tonic muscle contractions (Engel and Fries, 2010;Jenkinson and Brown, 2011); this raises the possibility that the link between pupil size and beta activity reflects oculomotor control of the iris muscles, such as an increased tonic contraction of the iris dilator muscle during pupil dilation.Another-not mutually exclusive-view relates beta activity to visual perception such that increased phase coherence (but not power) is associated with enhanced visual perception (Bressler and Richter, 2015;Hanslmayr et al., 2007); this second view raises the possibility that the link between pupil size and beta activity reflects facilitation of visual perception as a result of the increased light influx that accompanies increased pupil size.
These are testable hypotheses for future studies in which, for example, pupil size and stimulus detectability could be dissociated in order to test which of the two is most strongly related to beta activity; if pupil size affects beta activity more strongly than stimulus detectability does, then the effect on beta is likely related to motor control, whereas the opposite pattern would suggest that the effect is more closely related to perception.A related important aim for future research will be to better characterize these effects on beta activity, and to better understand how induced effects, such as modulations of power or intertrial coherence, which previous studies have mainly focused on Keegan and Merritt (1995), Podvalny et al. (2021), Waschke et al. (2019), relate to evoked effects, such as modulations of ERPs expressed in a particular frequency range, which our results seem to point towards.
A second important implication of our results is that there is a correlation between intertrial coherence in the alpha band and spontaneous pupil size.This correlation is weak and should be replicated, especially given the exploratory nature of our study.However, assuming that it is reliable, it is likely mediated by arousal (or increased attentiveness) rather than by pupil size per se, because it was not observed for induced pupil size, which presumably does not affect arousal.This correlation is likely analogous to (yet far weaker than) the effect of covert visual attention on alpha power and intertrial coherence (see also Cómez et al. 1998): the more a stimulus is attended, either because it has been cued (covert visual attention) or because the participant just happens to be in a state of increased vigilance (spontaneous pupil size), the more alpha intertrial coherence increases.
Although we did not observe a reliable correlation between alpha power and spontaneous pupil size, power and intertrial coherence are related concepts (van Diepen and Mazaheri, 2018).Therefore, it is tempting to link the observed correlation between alpha intertrial-coherence and spontaneous pupil size to the well-established negative correlation between pre-stimulus (as opposed to post-stimulus) alpha power and visual-detection performance (Ergenoglu et al., 2004;Thut et al., 2006); however, this link is complicated by recent reports of both positive (Ceh et al., 2020;Montefusco-Siegmund et al., 2022;Pilipenko and Samaha, 2023) and negative (Hong et al., 2014) correlations between pre-stimulus alpha power and spontaneous pupil size.In our view, pre-stimulus alpha power and spontaneous pupil size likely reflect different dimensions of attention; specifically, pre-stimulus alpha seems suppressed when attention is directed to external visual stimuli (Kraus et al., 2023;Peylo et al., 2021;van den Berg et al., 2014), as during a spatial cueing task, and enhanced when attention is directed to internal states, as during mind wandering (Ceh et al., 2020;Ray and Cole, 1985); in contrast, pupil size seems to reflect the "intensity" of attention regardless of whether this is directed internally or externally (Just and Carpenter, 1993;Kraus et al., 2023;Mathôt, 2018).Therefore, whether pre-stimulus alpha power and spontaneous pupil size correlate negatively or positively with each other, or not at all, likely depends on the context of the task.An important aim for future research will be to better understand whether and how pupil size, pre-stimulus alpha (not addressed in the analyses presented here), post-stimulus alpha, and behavioral performance correlate, and to what extent these correlations are mediated directly by pupil size or indirectly by arousal.
A third important implication of our results is that pupil size should not be considered as just a marker of cognitive state without also considering that pupil size itself may affect visual processing.This is particularly relevant to the growing literature on 'pupil-linked arousal', which is built on the finding that spontaneous fluctuations in pupil size reflect-among other things and other brain areas (Joshi et al., 2016;Megemont et al., 2022)-activity in the locus-coeruleus-norepinephrine (LC -NE) system (e.g., Alnaes et al. 2014;Aston-Jones and Cohen 2005;de Gee et al. 2014;Hong et al. 2014;Murphy et al. 2011Murphy et al. , 2014;;Urai et al., 2017;Waschke et al., 2019).Our findings suggest that researchers should be especially careful when interpreting correlations between spontaneous fluctuations in pupil size and performance on a visual task in terms of LC-NE activity.
Finally, we have manipulated pupil size indirectly by presenting red and blue inducers that differentially activate ipRGCs and that through this route affect pupil size.By looking at the effects of both induced and spontaneous changes in pupil size, and by contrasting these with the well-known effects of stimulus intensity and covert visual attention, we have made an important first step towards understanding the causal role of pupil size in visual processing.However, future studies are necessary to further establish the validity of this induction procedure.For example, our pupil-size induction procedure could be combined with concurrent heart-rate and skin-conductance measurements to confirm that the red/ blue inducers do not differentially affect arousal or fatigue, which could in turn affect visual processing in ways that are unrelated to pupil size.Future studies could also use different ways to manipulate pupil size; for example, eye drops (tropicamide) are a minimally invasive way to pharmacologically dilate the pupil; however, eye drops also affect lens accommodation, which means that they are only suitable for experiments that can be done with blurry vision.In general, in order to fully understand how pupil size causally affects visual processing, future studies will need to develop and use a range of different, well-validated techniques to manipulate pupil size, one of which will be the red/ blue induction procedure that we have used here.
In sum, we found that pupil size as manipulated indirectly through ipRGC activation affects visual processing as measured through EEG, mainly over occipital and parietal electrodes, and mainly in beta frequencies; we observed this for both induced and-although less clearly-spontaneous pupil size changes, which suggests that pupil size affects visual processing, although given the indirect nature of our pupilsize manipulation a direct causal connection needs to corroborated in future research using a variety of different techniques.We further found that spontaneous (but not induced) pupil size is positively correlated with intertrial coherence in the alpha band; these correlations are likely mediated by vigilance/ arousal (Loewenfeld, 1958).Finally, we found that the effect of pupil size on visual processing is qualitatively different from the effects of stimulus intensity and covert visual attention, and is therefore a unique factor that shapes early visual processing.

Open-practices statement
Experimental data, the experiment script, and analysis scripts can be found at https://osf.io/gjpkv/.

Declaration of Competing Interest
None.

Fig. 1 .
Fig. 1.(a) During luminance calibration, participants passively viewed alternating red and blue displays.Red intensity was adjusted until red and blue displays triggered equally strong pupil constriction.(b)The experiment consisted of two red-inducer (large pupils) blocks and two blue-inducer (small pupils) blocks.The first inducer of each block was longer (20 s) than subsequent inducers (1.5 s).(c) During each trial, participants reported whether a small dot (the target) was slightly above or below the midline.Target intensity and cue validity were manipulated.

Fig. 2 .
Fig. 2. The effect of red / blue inducers on pupil size.Error bands indicate grand standard error.(a) From the start of the trial until the presentation of the target.The gray band indicates the presentation of the cue.(b) Mean pupil size during the pre-target interval as a function of trial position in block and inducer color.

Fig. 3 .
Fig. 3. Main results of decoding target-evoked responses.a) Confusion matrix with actual factors on the x-axis and predicted factors on the y-axis.U = Unattended, A = Attended, Spont.= Spontaneous.High (red) values correspond to frequently predicted factors given an actual factor; low (blue) values correspond to infrequent predictions.Percentages sum to 100 % per column.The pronounced red diagonal reflects that factors were reliably decoded.b) Decoding performance expressed as area under the curve (AUC) for each factor.The dotted horizontal line indicates chance level.Error bars indicate 95 % confidence intervals.

Fig. 4 .
Fig. 4. Contributions of electrodes to decoding of a) induced differences in baseline pupil size, b) spontaneous differences in baseline pupil size, c) stimulus intensity, and d) covert visual attention.Dark blue values indicate strong contributions; green-yellow values indicate weak contributions.

Fig. 6 .
Fig. 6.Lateralized target-evoked ERPs (baseline corrected) as a function of time (x-axis) and (a) induced pupil size, (b) spontaneous pupil size, c) stimulus intensity, and d) covert visual attention.Error bands indicate grand standard errors.Vertical bands indicate significant clusters of differences (see main text for details).

Fig. 7 .
Fig. 7. Time-frequency plots as a function of time since target onset (x-axis) and frequency (y-axis) for power as a function of a) induced pupil size, b) spontaneous pupil size, c) stimulus intensity, and d) covert visual attention; and intertrial coherence as a function of e) induced pupil size, f) spontaneous pupil size, g) stimulus intensity, and h) covert visual attention.Positive values are indicated in red; negative values are indicated in blue.Outlines provide a rough indication of frequencies and times where significant contrasts are observed (see main text for details).

Fig. 8 .
Fig. 8. Target-evoked pupil responses as a function of time (x-axis) and a) induced pupil size, b) spontaneous pupil size, c) stimulus intensity, and d) covert visual attention.Responses are baseline corrected, and therefore induced and spontaneous differences in baseline pupil size are not visible here.Vertical bands indicate peak differences (see main text for details).