Attentional templates are protected from retroactive interference during visual search: Converging evidence from event-related potentials

Attentional templates are stored representations of target features that guide visual search. Target features may remain fixed or change on every trial, requiring sustained or transient templates, respectively. In separate blocks of trials, two sustained templates guide visual search as efficiently as two transient templates. In mixed blocks, however, the transient template interferes with the sustained template, impairing its efficiency in guiding visual search. Here, we hypothesized that the priority of the sustained template would increase when threatened by interference, eventually restoring efficient guidance of visual search. Participants memorized two possible target colors before the onset of the search display. At encoding, we assessed attentional selection of the two possible target colors with the N2pc. During subsequent maintenance, we measured the CDA as an index of resource allocation in working memory. In Experiment 1, the CDA was smaller with sustained than transient templates in separate blocks, but similar in mixed blocks. Thus, the sustained template received more working memory resources when maintained concurrently with an interfering transient template, suggesting that it was prioritized. In Experiment 2, the priority of the sustained template was further increased as it guided visual search in 80% of cases. The N2pc to possible target colors matching the sustained template was enhanced both at encoding and during visual search, thus eliminating interference from the transient template. Therefore, sustained templates are not necessarily less efficient than transient templates. Rather, prioritization through attentional selection at encoding and resource allocation during maintenance may restore efficient guidance of visual search.


Introduction
Visual search for goal-relevant objects is guided by stored representations of their known features, which are referred to as attentional templates (Duncan and Humphreys, 1989) or attentional control sets (Folk et al., 1992). Attentional templates are activated shortly before visual search (Grubert & Eimer, 2018 to prioritize objects with corresponding attributes and to eventually determine target-matches (Eimer, 2014). That is, attentional templates contribute to the guidance of visual attention toward potential targets and to the decision about their relevance for behavior. Although numerous studies have investigated template-guided visual search (for recent reviews, see Huynh Cong and Ort and Olivers, 2020), many questions remain open regarding where attentional templates are stored and how this affects visual search.
Consistent with prominent models of visual search (Bundesen, 1990;Bundesen et al., 2005;Desimone and Duncan, 1995;Wolfe, 1994Wolfe, , 2007, target features that change through successive selection episodes involve the transient maintenance of attentional templates in working memory (WM). Direct evidence in favor of this assumption was provided by an event-related potential (ERP) observed during the retention interval of WM tasks. The contralateral delay activity (CDA) is a sustained negativity recorded at posterior electrodes contralateral to the memorized stimuli (Vogel and Machizawa, 2004;Vogel et al., 2005), which indexes the number of representations currently maintained in WM. Thus, the CDA amplitude increases with WM load, reaches an asymptote at 3-4 representations, and is associated with individual differences in WM capacity (Feldmann-Wüstefeld et al., 2018;Ikkai et al., 2010;Luria et al., 2016;McCollough et al., 2007;Unsworth et al., 2014;Vogel et al., 2001). Critically, the CDA also occurs in visual search where target features have to be maintained in WM until search is performed. Therefore, the CDA tracks the presence of attentional templates in WM (Carlisle et al., 2011;Woodman and Arita, 2011;Woodman et al., 2013) and the selective encoding of one attentional template over another (Rajsic et al., 2020). While these observations confirm that visual search for varying target features relies on transient templates in WM, visual search for target features that remain fixed across blocks of trials may be different. In this case, corresponding attentional templates may no longer be maintained in WM, but may be transferred to long-term memory (LTM). In line with theories of learning and automaticity (Anderson, 2000;Logan, 2002), LTM may guide visual search (Hutchinson and Turk-Browne, 2012;Stokes et al., 2012;Summerfield et al., 2006) by taking over control of visual attention from WM (Carlisle et al., 2011;Gunseli et al., 2016;Reinhart et al., , 2016Woodman et al., 2013). In that sense, Carlisle et al. (2011) recorded the CDA to explore the nature of attentional templates controlling visual attention. When target features remained fixed, they found that the CDA decreased in amplitude across trials. In fact, the CDA was reliably present only for the first four trials of each run, suggesting that within five trials attentional templates were no longer maintained in WM, but transferred to LTM.
Thus, attentional templates can be maintained transiently in WM or held in a sustained fashion in LTM. However, the guidance of visual search is equally efficient in both cases. To assess efficiency, the N2pc was measured in response to search displays. Similar to the CDA, the N2pc is an enhanced negativity recorded at posterior electrodes contralateral to the attended stimuli (Eimer, 1996;Luck and Hillyard, 1994). Functionally, the N2pc reflects attentional selection of objects with template-matching features at relatively early stages of visual processing (Eimer, 2014;Leblanc et al., 2007;Lien et al., 2008). On this basis, previous studies compared the N2pc in blocks where two possible targets varied on a trial-by-trial basis to blocks where both targets remained fixed throughout (Berggren et al., 2020;Grubert et al., 2016). While reaction times (RTs) were delayed for variable relative to fixed targets, no corresponding attenuation of N2pc components was found (see also Goldstein and Beck, 2018;Huynh Cong and Kerzel, 2020;Kerzel and Witzel, 2019). These observations indicate that sustained and transient templates are equally efficient in guiding attentional selection, and that behavioral costs are generated at post-attentional stages (Moore and Weissman, 2010). However, recent evidence suggests that sustained templates are sometimes less efficient than transient templates. Berggren et al. (2020) ran a mixed condition that involved the simultaneous activation of both types of attentional templates. That is, one of the two targets varied from trial to trial, while the other remained fixed. Critically, RTs were delayed and the N2pc was attenuated for fixed compared with variable targets, suggesting that the efficiency of the sustained template was reduced when paired with the transient template. Moreover, the costs associated with the sustained template emerged whenever a transient template was encoded. As described in the memory literature, recently encoded information interferes in a retroactive fashion with existing representations (Dewar et al., 2007;Wixted, 2004). Similarly, the encoding of each new transient template within WM may retroactively interfere with the maintenance of a previously activated sustained template.
Typically, the distinction between sustained and transient templates is assumed to reflect a strict dichotomy between WM and LTM (Carlisle et al., 2011;Woodman et al., 2013). However, LTM representations may be retrieved and buffered within WM to affect online task performance (Cantor and Engle, 1993;Cowan et al., 2013;Fukuda and Woodman, 2017;Nairne and Neath, 2001). Thus, sustained templates may be subject to characteristics associated with maintaining and processing information in WM although they are repeated on every trial. Similar to transient templates, sustained templates are flexibly activated and deactivated during visual search (Grubert & Eimer, 2018, are impaired by concurrent WM loads (Berggren and Eimer, 2018), and can elicit the CDA during entire search tasks (Grubert et al., 2016;Reinhart et al., 2016;. Moreover, the costs associated with sustained templates are modulated by the allocation of resources in WM (Huynh Cong and Kerzel, 2020). In that sense, WM was recently conceptualized as a limited resource, distributed flexibly and strategically between stored representations depending on their respective priority (Ma et al., 2014). A well-known consequence of the allocation of WM resources is that the precision of the respective representation increases. If the representation is an attentional template, the allocation of WM resources may not only increase its precision, but also improve the guidance of visual search Kerzel and Witzel, 2019;Rajsic et al., 2017;Rajsic and Woodman, 2019).
On this basis, Huynh Cong and Kerzel (2020) hypothesized that the costs associated with the sustained template could simply reflect that more WM resources were allocated to the transient template. Following a dual-target search similar to Berggren et al.'s (2020), participants were asked to recall the color of either the sustained or the transient template on a continuous scale. Besides RT costs, the sustained template was more often forgotten when paired with a transient template, indicating that retroactive interference affected visual search and memory maintenance alike. However, when the sustained template was not forgotten, its recall precision was higher than the recall precision of the transient template (11.9 • vs. 13.3 • ), but RTs were still considerably delayed (689 vs. 649 ms). Paradoxically, the high precision of the sustained template suggests that it was protected from retroactive interference despite impaired visual search. The protection may result from an increase in WM resources. Consistently, Huynh Cong and Kerzel (2020) demonstrated that increasing the priority of the sustained template, and presumably the amount of WM resources it received, attenuated retroactive interference from the transient template. First, the priority of the sustained template was increased by asking participants to recall either the sustained or the transient template after each search episode. As a result, the costs associated with the sustained template were reduced compared with search-only trials. Second, retro-cues were used to prioritize the sustained template by indicating when it was relevant for the upcoming search, which eliminated the sustained template costs.
Taken together, these observations suggest that an attentional template may be protected from retroactive interference through the allocation of WM resources Kerzel, 2020, 2021). At least, WM resources may preserve the precision of the attentional template, but an increase in WM resources may eventually restore efficient guidance of visual search. However, the allocation of WM resources was inferred based on search and memory performance in Huynh Cong and Kerzel (2020), instead of being assessed directly during maintenance. Therefore, one possibility remains that increasing the priority of the sustained template had an effect at encoding and not during maintenance. Recent electrophysiological evidence suggests that prioritization may occur at both stages. In a series of WM tasks, Salahub et al. (2019) used spatial or feature-based cues to indicate which stimuli would be more likely to be probed. In addition to improving recall precision, manipulations of priority resulted in a linear increase of both the N2pc and the CDA elicited by the stimuli to be memorized. That is, prioritized stimuli benefited from improved attentional selection at the time of their encoding into WM, and the corresponding representations received more WM resources during subsequent maintenance. Therefore, the encoding-related N2pc and the CDA pinpoint the WM processes involved in prioritization.
Based on these electrophysiological perspectives, the present study aimed at determining the WM processes protecting the sustained template against retroactive interference Kerzel, 2020, 2021). To achieve protection, the sustained template may be prioritized by two distinct and successive WM processes, each associated with a unique ERP-component (Salahub et al., 2019). At encoding, the sustained template may be prioritized through improved attentional selection, as indexed by the encoding-related N2pc. During subsequent maintenance, the sustained template may be prioritized through enhanced WM resources, as reflected by the CDA. In Experiment 1, we compared the encoding-related N2pc and the CDA for the sustained template when paired with a transient template or another sustained template, that is, with and without retroactive interference. We assumed that the sustained template would be prioritized in the presence of retroactive interference to conserve its high precision despite impaired visual search Kerzel, 2020, 2021). In Experiment 2, we further increased the priority of the sustained template and investigated effects on the encoding-related N2pc and the CDA. Note that Berggren et al. (2020) only recorded the N2pc to investigate attentional selection of the search target (thereafter termed search-related N2pc), which gives no indication of the WM processes involved prior to visual search.

Experiment 1
Each trial began with the presentation of two possible target colors, which the participants had to memorize. After a retention interval of 800 ms, the search display was shown. The search display contained a target in one of the two possible colors, among three differently colored non-targets (see Fig. 1). Participants had to judge the tilt of the search target as quickly and accurately as possible. We recorded ERPs in three conditions. In the blocked transient condition, the two possible target colors changed on every trial. In the blocked sustained condition, the two possible target colors were fixed throughout. In the mixed condition, one possible target color was fixed while the other changed from trial to trial. Thus, participants maintained two transient or two sustained templates in the blocked conditions, but one transient and one sustained template in the mixed condition. Concerning the searchrelated N2pc, we expected to replicate previous results. That is, the N2pc to the search target should be attenuated with sustained relative to transient templates in the mixed condition, revealing the sustained template costs (Berggren et al., 2020). In contrast, the search-related N2pc should be similar with sustained and transient templates in the blocked condition (Berggren et al., 2020;Grubert et al., 2016). Critically, we assumed that the sustained template would be prioritized when threatened by retroactive interference Kerzel, 2020, 2021) through enhanced attentional selection and maintenance of the respective target color (Salahub et al., 2019). Therefore, we expected a larger encoding-related N2pc and CDA for the sustained template in the mixed compared with the blocked condition. To isolate electrophysiological responses to one of two simultaneously active attentional templates, we presented one possible target color laterally and the other vertically above or below fixation (Woodman and Luck, 2003). Because the vertical stimulus elicits similar activity in both hemispheres, differences between hemispheres selectively reflect processing of the lateral stimulus.

Participants
Sample size was based on effect sizes of Salahub et al. (2019;Experiment 2). For ERP differences based on the priority of the stimuli to be memorized, their Cohen's d z ranged from 0.48 to 1.08, which requires a sample size of at least 29 (α = 0.05, power = .8) according to G*Power (Faul et al., 2007). Here, we aimed for a sample of 36 participants, which allowed us to detect differences with d z of 0.42. Undergraduate students participated for class credit or monetary compensation. We collected data until we had 36 valid datasets (age: M = 21.0 years, SD = 2.5, six males). Eight datasets were rejected because of eye movements (see below). The study was approved by the ethics committee of the Faculty of Psychology and Educational Sciences and was carried out in accordance with the Code of Ethics of the World Medical Association (Declaration of Helsinki). Informed consent was given before each experiment.

Apparatus
Stimuli were displayed on a 22.5-inch LCD monitor with a refresh rate of 100 Hz and a pixel resolution of 1920 × 1200 (VIEWPixx Light, VPixx Technologies Inc., Saint-Bruno, Canada), driven by an AMD Radeon HD 7470 with a color resolution of eight bits per channel. CIE1931 chromaticity coordinates and luminance (xyY) of the monitor primaries were R = (0.673, 0.309, 54.2), G = (0.096, 0.747, 123.8), and B = (0.100, 0.093, 19.6). Colors were measured with a Cambridge Research Systems ColorCAL MKII colorimeter (Rochester, UK). Gamma corrections were applied based on the measured gamma curves of the monitor primaries. Participants viewed the screen at a distance of approximately 66 cm.

Stimuli
The experiment was run on MATLAB using the Psychtoolbox-3 (Brainard, 1997;Pelli, 1997). All stimuli were shown on a gray background with a light gray fixation cross (0.13 • × 0.13 • ). Fig. 1 illustrates stimuli and time course. Each trial began with a memory display (200 ms) consisting of two circles (radius of 0.25 • ) and two squares (0.45 • × 0.45 • ) at 0.5 • from the fixation cross. One circle and one square were presented randomly above or below the fixation cross. The other circle and square were presented randomly left or right of the fixation cross. Depending on the participant, either the two circles or the two squares were shown in the two possible target colors. The other shapes were in two different non-target colors. Following a blank inter-stimulus interval of 800 ms, the search display was shown for 100 ms. The search display contained four rectangular bars (0.5 • × 0.25 • ) tilted by 45 • of rotation from vertical. The bars appeared on the diagonals through fixation at an eccentricity of 1.6 • . The orientations of the bars were random with the constraint that 2 bars were tilted to the left and 2 bars Depending on the participant, the two possible target colors were shown on the two circles or on the two squares. The following search display contained four tilted bars and participants reported whether the bar in one of the two possible target colors was tilted to the left or right. In addition to behavioral measures, three ERPs were recorded: the encoding-related N2pc, the CDA, and the search-related N2pc. In the blocked sustained condition, the two possible target colors remained fixed throughout. In the blocked transient condition, the two possible target colors changed on every trial. In the mixed condition, one possible target color remained fixed, while the other varied on a trial-by-trial basis. See the online article for the color version of this figure. (For interpretation of the references to color in this figure legend, the reader is referred to the Web version of this article.) tilted to the right. One of the bars was in one of the two possible target colors, making it the search target. The other bars appeared in different non-target colors. The search target appeared at a random location, but equally likely in the left and right position. The interval between the response to the search display and the onset of the next memory display was 1400 ms.
The colors were defined in CIELAB space because CIELAB is a model of color appearance where distances approximate perceived color differences (Fairchild, 2005). CIELAB consists of one achromatic and two chromatic axes, namely perceived lightness L*, a green-red dimension a* and a blue-yellow dimension b*. The polar coordinates of the chromatic axes (a* and b*) correspond to hue (azimuth) and chroma (radius). Hue indicates how reddish, yellowish, greenish, and bluish a color is, and chroma is a measure of perceived saturation (i.e., difference from gray). The white point of CIELAB was xyY = (0. 280, 0.358, 195.3). Stimuli were presented on a gray background with a luminance of 28.6 cd/m 2 or L* = 45. The fixation was light gray with a luminance of 57.6 cd/m 2 or L* = 61. The six colors used in the memory and search displays were sampled along an isoluminant hue circle at a lightness of L* = 61, and at a chroma of 59. We selected six colors separated by a hue difference of 60 • : orange (45 • ), amber (105 • ), green (165 • ), blue (225 • ), purple (285 • ), and pink (345 • ). The hue difference of 60 • was far above hue discrimination threshold, preventing search biases that result from color similarity and category membership (Witzel & Gegenfurtner, 2013, 2015.

Procedure
Two of the four colors in the memory display had to be memorized and were possible target colors in the following search display. Half of the participants were instructed to memorize the colors of the two squares, whereas the other half was instructed to memorize the colors of the two circles. In the search display, they had to find the bar in one of the two memorized colors and to report its tilt (left, right) by pressing the corresponding button on a response box (RESPONSEPixx Handheld, VPixx Technologies Inc., Saint-Bruno, Canada). Participants were instructed to respond as fast and accurately as possible. If a response was incorrect, faster than 200 ms or slower than 1200 ms, the corresponding visual feedback was shown. Participants started the experiment by practicing the task until they felt comfortable with it, but at least for 20 trials. Every 64 trials, visual feedback about the percentage of correct responses and the median RTs were displayed during a self-terminated break of at least 5 s.

Design
The three conditions were run in separate blocks of 128 trials. The order of conditions was counterbalanced across participants and repeated once for a total of 256 trials per condition. In the blocked transient condition, the two possible target colors were randomly selected on each trial with the constraint that they had to be different from the possible target colors on the preceding trial. In the blocked sustained condition, the two possible target colors were fixed, but selected randomly with the constraint that the color difference be larger than 60 • to avoid less similarity between fixed than between variable colors. In the mixed condition, one possible target color remained constant throughout, while the other was selected randomly from the five remaining colors. Immediate repetitions of the variable color were not allowed. Search displays unpredictably contained one of the two possible target colors and one of the two non-target colors from the memory display, as well as two new non-target colors.
Analyses were performed using BrainVision Analyzer 2.2 (Brain Products, Gilching, Germany). Raw EEG was re-referenced offline to the average earlobes, baseline corrected to − 200 ms before memory display onset, and filtered with a 30 Hz low-pass and a 0.1 Hz high-pass Butterworth filter (slope: 12 dB/octave). The difference between left and right eye electrode constituted the HEOG channel, and the difference between upper and lower eye electrode constituted the VEOG channel. The EEG was segmented into 1500 ms epochs extending from 200 ms before to 1300 ms after memory display onset.

Exclusion of trials and datasets
Trials with behavioral errors (7%) and trials with RTs shorter than 200 ms or longer than 1200 ms (3%) were excluded from both behavioral and electrophysiological analyses. For behavioral analyses, the data for each participant and condition was additionally trimmed by removing correct trials with RTs that were 2.5 SDs above the respective condition mean, which amounted to 1% of the trials. For electrophysiological analyses, and similar to Salahub et al. (2019), individual trials were rejected when blinks and vertical eye movements (VEOG channel exceeding ± 80 μV), horizontal eye movements (HEOG channel exceeding ± 32 μV), and muscular artefacts (any electrode exceeding ± 100 μV) occurred between 200 ms before and 1300 after memory display onset. Following this procedure, 8 datasets were replaced because more than 25% of the trials were lost (ranging from 27% to 46%). The 25% criterion is consistently applied in our laboratory  and is frequently used in the literature on the N2pc (Woodman and Luck, 2003) and the CDA (Rajsic et al., 2020).

Behavior
As in our previous study (Huynh Cong and Kerzel, 2020), separate analyses of RTs and choice errors revealed signs of speed-accuracy tradeoff. Therefore, we defer separate analyses of RTs and choice errors to the Supplementary Materials and focus on inverse efficiency scores (Townsend and Ashby, 1978). Inverse efficiency scores will be referred to as corrected RTs and correspond to RTs divided by (1 -choice error rates). Mean corrected RTs from trials with correct responses were entered into a 2 × 2 within-subjects Analysis of Variance (ANOVA) with the factors Template Type (sustained vs. transient) and Task  corrected RTs were shorter with sustained than transient templates in the blocked condition (655 vs. 719 ms), t(35) = 6.00, p < .001, d z = 1.00, revealing the post-attentional costs associated with transient templates. Conversely, corrected RTs were delayed with sustained relative to transient templates in the mixed condition (722 vs. 658 ms), t (35) = 5.09, p < .001, d z = 0.85, as expected based on the sustained template costs.

Electrophysiology
After rejecting trials with behavioral errors, early or late responses, and electrophysiological artefacts, 84% of the trials remained for analysis. Valid trials were analyzed separately for each template type and task context, yielding 256 trials per type of attentional template in the blocked condition, and 128 trials in the mixed condition. On average, we retained 229 trials (range 194-249) for the sustained template in the blocked condition, 201 trials (range 151-234) for the transient template in the blocked condition, 108 trials (range 87-124) for the sustained template in the mixed condition, and 107 trials (range 88-122) for the transient template in the mixed condition.
Analysis intervals were selected according to previous studies and adjusted to fit our data. For the encoding-related N2pc, visual inspection of the time-course showed that maximum deflections were consistent with Salahub et al. (2019) for sustained templates. For transient templates, however, the encoding-related N2pc was delayed by approximately 150-200 ms (see also Woodman and Luck, 2003). Therefore, we measured the encoding-related N2pc as the mean amplitude from 200 to 300 ms after memory display onset for sustained templates, but from 400 to 500 ms for transient templates. The analysis intervals of the CDA were adjusted accordingly. For sustained templates, the CDA was the mean amplitude from 400 to 1000 ms after memory display onset, as in Salahub et al. (2019). For transient templates, the analysis interval of the CDA was from 600 to 1000 ms to account for the later onset of the encoding-related N2pc.
For the search-related N2pc, maximum deflections appeared slightly earlier than in Berggren et al. (2020) for both sustained and transient templates. Therefore, we placed the analysis interval from 180 to 280 ms after search display onset, rather than from 200 to 300 ms (see also Eimer and Kiss, 2010). The interval from 180 to 280 ms after search display onset corresponds to 1180-1280 after memory display onset. Difference waves obtained by subtracting ipsi-from contralateral activity at electrodes PO7/8 are shown in Fig. 3 (top) for the encoding-related N2pc and the CDA, and Fig. 4 (top) for the search-related N2pc.

Encoding-related N2pc
In the memory display, one possible target color was shown on a lateral position and the other on the vertical midline (see Fig. 1). Voltages ipsilateral to the possible target color on the lateral position were subtracted from voltages contralateral to this color. Individual averages were calculated in the 100 ms interval from 200 to 300 ms after memory display onset for sustained templates, but from 400 to 500 ms for transient templates. These values were subjected to a 2 × 2 withinsubjects ANOVA with the factors Template Type (sustained vs. transient) and Task Context (blocked vs. mixed). There was a main effect of To confirm latency differences in the encoding-related N2pc between sustained and transient templates, we performed a jackknife-based onset analysis with a relative criterion (50% of maximum amplitude) between 200 and 500 ms after memory display onset. These values were compared with paired-sample t-tests and corrections were applied based on Kiesel et al. (2008). The encoding-related N2pc appeared substantially earlier with sustained than transient templates in the mixed condition (231 vs. 322 ms), t c (35) = 6.54, p < .001, but not in the blocked condition (226 vs. 286 ms), t c (35) = 0.55, p = .588. However, maximum amplitudes were consistent with the selected analysis intervals as they appeared 254, 439, 256, and 433 ms after memory display onset in the blocked sustained, the blocked transient, the mixed sustained, and the mixed transient conditions, respectively.

CDA
As for the encoding-related N2pc, voltage differences were calculated with respect to the possible target color on the lateral position in the memory display. Individual averages were calculated in the 600 ms interval from 400 to 1000 ms after memory display onset for sustained templates, but in the 400 ms interval from 600 to 1000 ms for transient templates. These values were subjected to the same ANOVA as above.

Search-related N2pc
In contrast to possible target colors in the memory display, targets were always presented on the lateral position in the search display (see Fig. 1). To calculate the search-related N2pc, voltages ipsilateral to the search target were subtracted from voltages contralateral to this target. Individual averages were calculated in the 100 ms interval from 180 to 280 ms after search display onset, which corresponds to 1180-1280 ms after memory display onset. These values were subjected to the same ANOVA as above. While the main effect of Task Context did not reach

HEOG
To rule out potential contamination of ERPs by eye movements, we analyzed the voltages at lateral eye electrodes. The voltage at the eye electrode ipsilateral to the relevant color was subtracted from the voltage at the eye electrode contralateral to it. We conducted the same ANOVA as above on the mean lateralized HEOG in the same time intervals (encoding-related N2pc, CDA, and search-related N2pc). For the intervals of the search-related N2pc, the ANOVA did not yield any significant effect, ps > .074, suggesting that electrodes PO7/8 were not contaminated by eye movements. For the intervals of the encodingrelated N2pc and the CDA, there were main effects of Template Type, found in the analysis of the encoding-related N2pc, but not in the analysis of the CDA. Moreover, the mean voltage differences in the HEOG were too small to account for results at the posterior electrodes. Lins et al. (1993;Table 5) showed that only 1% ± 3% of the voltage propagates from ocular to posterior electrodes (in their case, electrodes O1/O2, which are adjacent to electrodes PO7/8). On this basis, the propagation would correspond at most to − 0.005 ± 0.014 μV in our data. Therefore, it seems unlikely that the HEOG contributed to ERP results. The remaining effects were not significant, ps > .090.

Discussion
In Experiment 1, we recorded ERPs elicited by sustained and transient templates in the presence and absence of retroactive interference. In the mixed condition, where retroactive interference was expected, we replicated the costs associated with the sustained template. That is, the search-related N2pc was attenuated and corrected RTs were delayed with sustained relative to transient templates. Consistent with the memory literature (Dewar et al., 2007;Wixted, 2004), these observations confirm that the transient template interfered in a retroactive fashion with the sustained template, impairing visual search (Berggren et al., 2020) and memory maintenance (Huynh Cong and Kerzel, 2020). In contrast, sustained and transient templates could not interact in the blocked condition, and no retroactive interference was expected (Berggren et al., 2020;Goldstein and Beck, 2018;Grubert et al., 2016;Huynh Cong and Kerzel, 2020;Kerzel and Witzel, 2019;Moore and Weissman, 2010). Consistently, the search-related N2pc was similar with both types of attentional templates in the blocked condition, which indicates that sustained and transient templates were equally efficient in guiding attentional selection. In contrast, corrected RTs were considerably delayed with transient compared with sustained templates, suggesting that behavioral costs were generated at post-attentional stages.
Critically, we assumed that the sustained template would be prioritized in the presence of retroactive interference (Huynh Cong and Kerzel, 2020, 2021). Since prioritization involves attentional selection at encoding and resource allocation during maintenance (Salahub et al., 2019), we expected a larger encoding-related N2pc and CDA for the sustained template in the mixed than the blocked condition. Results showed that the CDA was smaller for sustained than transient templates in the blocked condition, but similar between the sustained and the transient template in the mixed condition. Thus, the CDA indicates that the sustained template received fewer WM resources when held with another sustained template, but an equal share of WM resources when maintained concurrently with an interfering transient template. In line with our assumption, the sustained template may be protected from retroactive interference by receiving a larger amount of WM resources. As a result, the high precision of the sustained template is conserved from the blocked to the mixed condition (Huynh Cong and Kerzel, 2020), but its ability to efficiently guide visual search is still impaired, as indicated by the sustained template costs.
Further, the jackknife-based onset analysis showed that the encoding-related N2pc occurred earlier to fixed than variable colors in the mixed condition, but not in the blocked condition. It is possible that the delay reflects the serial shift of visual attention between items in the mixed condition (Woodman and Luck, 2003). Accordingly, the fixed color was selected before visual attention was shifted to the variable color. The order of visual attention shifts may indicate that the re-encoding (also referred to as "re-sampling") of an existing sustained template took priority over the encoding of a new transient template. This idea is consistent with studies showing that the presentation of template-matching stimuli is strategically used to re-encode the corresponding attentional templates, improving their precision and stability (Huynh Cong and Kerzel, 2020;Kerzel and Witzel, 2019;Maxcey-Richard and Hollingworth, 2013;Rajsic and Woodman, 2019;Woodman and Luck, 2007). Finally, the encoding-related N2pc was reduced for fixed compared with variable colors both in the blocked and mixed conditions, suggesting that the re-encoding of sustained templates was less demanding than the encoding of transient templates.

Experiment 2
In Experiment 1, the CDA revealed that the sustained template received more WM resources when threatened by retroactive interference from the transient template. While the associated costs were still present, the allocation of WM resources may allow the sustained template to conserve its high precision Kerzel, 2020, 2021). However, it remains unclear whether and how increasing the priority of the sustained template relative to the transient template would eliminate retroactive interference Kerzel, 2020, 2021). In Experiment 2, we focused on the mixed condition and manipulated the probability that the search target matched the sustained or the transient template. As in Experiment 1, the search target was equally likely to correspond to the sustained or the transient template in the unbiased condition (50% vs. 50%). In contrast, the search target was more likely to correspond to the sustained than the transient template in the biased condition (80% vs. 20%). Participants were explicitly informed about these probabilities before the beginning of each experimental block. At encoding, prioritization of the sustained template may improve attentional selection, allowing the sustained template to be stabilized (Huynh Cong and Kerzel, 2020;Kerzel and Witzel, 2019;Maxcey-Richard and Hollingworth, 2013;Rajsic and Woodman, 2019;Woodman and Luck, 2007). During subsequent maintenance, prioritization of the sustained template would further increase the amount of WM resources it receives, ensuring high precision and efficient guidance of visual search (Huynh Cong and Kerzel, 2020. Thus, the encoding-related N2pc and the CDA to the sustained template should increase from the unbiased to the biased condition. Conversely, we expected the costs associated with the sustained template to decrease in the biased compared with the unbiased condition Kerzel, 2020, 2021). As a result, the search-related N2pc should be similar with the sustained and the transient template in the biased condition. In line with our predictions, task instructions about stimulus probabilities have been shown to modulate the encoding-related N2pc and the CDA (Salahub et al., 2019), as well as the search-related N2pc (Berggren and Eimer, 2019).

Participants
As in Experiment 1, data were collected until we obtained a second group of 36 participants meeting our selection criteria (age: M = 20.2 years, SD = 1.7, four males). Following the same procedure as above, 6 datasets were discarded because data loss exceeded 25% (ranging from 28% to 40%).

Stimuli and procedure
These were identical to Experiment 1, with the following exceptions. We only presented the mixed condition. The probability that the search target appeared in the fixed or variable color was manipulated in two conditions. In the unbiased condition, and similar to Experiment 1, the search target was equally likely to be in the fixed or variable color. In the biased condition, the search target appeared in 80% of the trials in the fixed color and in 20% of the trials in the variable color. There were two blocks of 128 trials for the unbiased condition and five blocks of 128 trials for the biased condition. The larger number of trials in the biased condition was necessary to have enough trials with search targets in the variable colors. Unbiased and biased conditions were blocked and the initial condition was counterbalanced across participants.

Behavior
We excluded trials with behavioral errors (6%), trials with early or late responses (3%), and correct trials with outlier RTs (less than 1%). Mean corrected RTs were entered into a 2 × 2 within-subjects ANOVA with the factors Template Type (sustained vs. transient) and Search Probability (unbiased vs. biased). There was a significant main effect of

Electrophysiology
After rejecting trials with behavioral errors, early or late responses, and electrophysiological artefacts, 85% of the trials remained for analysis. For the encoding-related N2pc and the CDA, there were 128 trials per type of attentional template in the unbiased condition, and 320 trials in the biased condition. We retained an average of 107 trials (range 81-122) for the sustained template in the unbiased condition, 107 trials (range 90-119) for the transient template in the unbiased condition, 275 trials (range 252-302) for the sustained template in the biased condition, and 275 trials (range 235-305) for the transient template in the biased condition. For the search-related N2pc, there were 128 trials per type of attentional template in the unbiased condition, but 512 trials for the sustained template and 128 trials for the transient template in the biased condition. On average, we retained 108 trials (range 81-126) for the sustained template in the unbiased condition, 106 trials (range 86-124) for the transient template in the unbiased condition, 450 trials (range 400-497) for the sustained template in the biased condition, and 101 trials (range 72-123) for the transient template in the biased condition.

Encoding-related N2pc
The mean difference waves are shown in Fig. 3 (bottom). Difference waves were calculated with respect to the possible target color on the lateral position in the memory display. We subjected average voltage differences in the 100 ms interval from 200 to 300 ms after memory display onset for sustained templates and from 400 to 500 ms for transient templates to a 2 × 2 within-subjects ANOVA with the factors Template Type (sustained vs. transient) and Search Probability (unbiased vs. biased). There was a main effect of Template Type, F(1, 35) = 32.04, p < .001, η p 2 = 0.478, which was modulated by an interaction with Search Probability, F(1, 35) = 8.36, p = .007, η p 2 = 0.193. The encoding-related N2pc was larger with transient than sustained templates in the unbiased condition (− 1.29 vs. − 0.34 μV), t(35) = 5.65, p < .001, d z = 0.94, but this advantage was reduced in the biased condition (− 1.11 vs. − 0.55 μV), t(35) = 4.36, p < .001, d z = 0.73. Moreover, the encoding-related N2pc increased from the unbiased to the biased condition with sustained templates, t(35) = 2.09, p = .044, d z = 0.35, but was not different with transient templates, t(35) = 1.84, p = .074, d z = 0.31. The main effect of Search Probability did not reach significance, F (1, 35) = 0.03, p = .860, η p 2 = 0.001. One-sample t-tests against zero showed that the encoding-related N2pc was significant in all conditions, ts(35) > 3.74, ps < .001, d z > 0.62.
Jackknife-based onset analysis between 200 and 500 ms after memory display onset revealed that the encoding-related N2pc appeared earlier with sustained than transient templates in the unbiased (223 vs. 337 ms), t c (35) = 15.26, p < .001, and the biased condition (224 vs. 326 ms), t c (35) = 2.26, p = .030. Consistent with the selected analysis intervals, maximum amplitudes were reached 259, 440, 250, and 418 ms after memory display onset in the unbiased sustained, the unbiased transient, the biased sustained, and the biased transient conditions, respectively.

CDA
Ipsi-and contralateral voltage differences were calculated as for the encoding-related N2pc. Individual averages in the 600 ms interval from 400 to 1000 ms after memory display onset for sustained templates and in the 400 ms interval from 600 to 1000 ms for transient templates were subjected to the same ANOVA as above. There was a main effect of

Search-related N2pc
The mean difference waves are shown in Fig. 4 (bottom). Difference waves were calculated with respect to the target, which was always on the lateral position in the search display. Average voltage differences in the 100 ms interval from 180 to 280 ms after search display onset were subjected to the same ANOVA as above. There was a main effect of Template Type, F(1, 35) = 6.18, p = .018, η p 2 = 0.150, indicating that the search-related N2pc was larger with transient than sustained templates (− 0.86 vs. − 0.56 μV). Importantly, however, the two-way interaction was also significant, N2pc was significant in all conditions, as indicated by one-sample t-tests against zero, ts(35) > 3.98, ps < .001, d z > 0.67.

HEOG
We conducted the same ANOVA as above on the mean lateralized HEOG in the same time intervals (encoding-related N2pc, CDA, and search-related N2pc). For the intervals of the CDA and the search-related N2pc, neither of the two ANOVAs yielded significant results, ps > .156, suggesting that electrodes PO7/8 were not contaminated by eye movements. For the interval of the encoding-related N2pc, there was a main effect of Template Type, F(1, 35) = 9.79, p = .004, η p 2 = 0.219, reflecting that the lateralized HEOG was larger with transient than sustained templates (− 0.25 vs. − 0.04 μV).

Discussion
In addition to guaranteeing high precision, prioritization of the sustained template may eliminate retroactive interference from the transient template Kerzel, 2020, 2021). In Experiment 2, we tested this assumption by focusing on the mixed condition and by manipulating the probability that the search target matched the sustained or the transient template. In the unbiased condition, we replicated the sustained template costs. The search-related N2pc was attenuated and corrected RTs were delayed with the sustained compared with the transient template. Conversely, in the biased condition, the search-related N2pc was similar with both types of attentional templates and corrected RTs were even shorter with the sustained than the transient template. That is, these results were similar to those in the blocked condition of Experiment 1 where no retroactive interference occurred. In line with our assumption, prioritization of the sustained template eliminated retroactive interference from the transient template Kerzel, 2020, 2021).
Based on Salahub et al. (2019), we further assumed that prioritization of the sustained template would improve attentional selection at encoding and enhance WM resources during subsequent maintenance. Consistent with Experiment 1, we found that the encoding-related N2pc appeared earlier and was smaller for fixed than variable colors. However, the encoding-related N2pc for fixed colors increased from the unbiased to the biased condition. As expected, the sustained template was prioritized at encoding through improved attentional selection. During subsequent maintenance, the CDA elicited by the sustained template was larger than the CDA elicited by the transient template both in the unbiased and the biased conditions. The larger CDA may reflect that the sustained template received the largest amount of WM resources to conserve its high precision against retroactive interference from the transient template Kerzel, 2020, 2021). However, since the CDA did not increase from the unbiased to the biased condition, the allocation of WM resources may not be responsible for eliminating retroactive interference as initially assumed Kerzel, 2020, 2021). Instead, our results suggest that the sustained template was prioritized and protected from retroactive interference through improved attentional selection at encoding. Most likely, the repeated presentation of the fixed color served to re-encode and stabilize the sustained template (Huynh Cong and Kerzel, 2020;Kerzel and Witzel, 2019;Maxcey-Richard and Hollingworth, 2013;Rajsic and Woodman, 2019;Woodman and Luck, 2007), which reduced retroactive interference from the transient template. Taken together, these observations reveal the existence of distinct and successive processes of prioritization that may add up to protect attentional templates. Thus, the protection of attentional templates may rely on an interaction between attentional selection at encoding and the allocation of WM resources during subsequent maintenance.

General discussion
In two experiments, we recorded ERPs to investigate the WM processes protecting the sustained template against retroactive interference from the transient template. As indicated by the search-related N2pc in Experiment 1, the efficiency of the sustained template was reduced when maintained concurrently with the transient template (Berggren et al., 2020;Huynh Cong and Kerzel, 2020), whereas both types of attentional template were equally efficient in guiding attentional selection when maintained separately (Goldstein and Beck, 2018;Grubert et al., 2016;Kerzel and Witzel, 2019;Moore and Weissman, 2010). Consistent with the memory literature (Dewar et al., 2007;Wixted, 2004), the transient template interfered in a retroactive fashion with the sustained template, impairing visual search (Berggren et al., 2020) and memory maintenance (Huynh Cong and Kerzel, 2020). However, Experiment 2 also showed that increasing the priority of the sustained template eliminated the associated costs, as measured by an increase of the corresponding search-related N2pc. Therefore, prioritization protected the sustained template against retroactive interference, allowing for an efficient guidance of attentional selection during visual search Kerzel, 2020, 2021). In other words, the sustained template is not necessarily worse in guiding attentional selection than the transient template, but prioritization may be necessary to restore equal efficiency in the presence of retroactive interference.
Based on Salahub et al. (2019), we further investigated two distinct and successive WM processes that may underlie prioritization of the sustained template, each associated with a unique ERP-component. At encoding, the sustained template may be prioritized through improved attentional selection, as indexed by the encoding-related N2pc. During subsequent maintenance, the sustained template may be prioritized through enhanced WM resources, as reflected by the CDA. In Experiment 1, the CDA revealed that the sustained template received a larger amount of WM resources in the mixed than in the blocked condition, that is, in the presence than in the absence of retroactive interference. While the sustained template costs were still present, the allocation of WM resources may allow the sustained template to conserve its high precision despite impaired visual search (Huynh Cong and Kerzel, 2020. Consistently, Experiment 2 showed that the CDA was always larger with the sustained than the transient template, confirming that more WM resources were allocated to the sustained template in the presence of retroactive interference. However, the CDA elicited by the sustained template did not increase from the unbiased to the biased condition where the associated costs disappeared. Therefore, the allocation of WM resources may not be the only WM process to attenuate retroactive interference, unlike initially assumed (Huynh Cong and Kerzel, 2020. Instead, prioritization of the sustained template increased the encoding-related N2pc. Possibly, improved attentional selection of the fixed color allowed the sustained template to be strategically re-encoded at the beginning of each trial (Huynh Cong and Kerzel, 2020;Kerzel and Witzel, 2019;Maxcey-Richard and Hollingworth, 2013;Rajsic and Woodman, 2019;Woodman and Luck, 2007). As a result, the sustained template was stable enough to resist retroactive interference generated by the transient template.
Taken together, these results suggest that the sustained template is protected from retroactive interference by two distinct and successive processes of prioritization (Salahub et al., 2019). First, attentional selection stabilizes the sustained template at encoding and ensures the efficient guidance of visual search. Second, the allocation of WM resources guarantees the precision of the sustained template during subsequent maintenance.

WM resources and attentional templates
Based on models that conceptualize WM as a limited resource (Ma et al., 2014), Huynh Cong and  recently proposed that the allocation of WM resources may improve the precision of attentional templates and shape their interactions with visual search. While WM resources typically improve recall precision and visual search (Kerzel and Witzel, 2019;Rajsic et al., 2017;Rajsic and Woodman, 2019), WM resources may also serve to protect attentional templates when threatened by retroactive interference. That is, attentional templates would receive more WM resources in the presence of retroactive interference to conserve a precise representation despite impaired visual search Kerzel, 2020, 2021). Moreover, increasing the priority of attentional templates, and presumably the amount of WM resources they receive (Ma et al., 2014;Salahub et al., 2019), would reduce or eliminate retroactive interference (Huynh Cong and Kerzel, 2020). As laid out above, the present study provides mixed electrophysiological evidence in favor of this proposal. On the one hand, the CDA confirmed that the sustained template received a larger amount of WM resources when paired with a transient template that interfered with the guidance of attentional selection (Experiments 1 and 2). On the other hand, we did not observe the expected increase in WM resources when the sustained template was prioritized, and the associated costs disappeared (Experiment 2). Instead, attentional selection was enhanced at encoding, which may have reduced the necessity of prioritization during maintenance. Consistently, Huynh Cong and Kerzel (2020; Experiment 3) used retro-cues to prioritize the sustained template specifically during maintenance and found that the associated costs disappeared. That is, when prioritization of the sustained template could not occur before maintenance, the allocation of WM resources was able to protect the sustained template against retroactive interference, allowing for an efficient guidance of visual search. These observations corroborate the idea that prioritization of attentional templates involves successive WM processes and suggest that their importance depend on task context.
On this basis, the use of retro-cues in template-guided visual search (Huynh Cong and Kerzel, 2020;Rajsic et al., 2017;Rajsic and Woodman, 2019) may be necessary to isolate and investigate the protective effects of WM resources. In the WM literature, numerous studies used retro-cues to manipulate the priority of representations during maintenance, and reported strengthening and protective effects . Similar to refreshing, retro-cues make the corresponding representations stronger than they were right after encoding, which improves the accessibility for later use (Rerko and Oberauer, 2013;Rerko et al., 2014). Moreover, WM representations are also protected from interference by visual inputs during maintenance or at recall, whereas unprotected representations are impaired (Makovski and Jiang, 2007;Matsukura et al., 2007;. That is, retro-cues strengthen WM representations and allow these representations to conserve their precision in the face of interference. Therefore, WM resources may serve an extended protective function when prioritization does not occur beforehand.

Storage of attentional templates
Consistent with prominent models of visual search (Bundesen, 1990;Bundesen et al., 2005;Desimone and Duncan, 1995;Wolfe, 1994Wolfe, , 2007, target features that changed through successive selection episodes involve the transient maintenance of attentional templates in WM (Carlisle et al., 2011;Rajsic et al., 2020;Woodman and Arita, 2011;Woodman et al., 2013). As a function of repetition, however, attentional templates are transferred to LTM (Carlisle et al., 2011;Gunseli et al., 2016;Reinhart et al., , 2016Woodman et al., 2013), allowing for an effortless and robust access through time (Anderson, 2000;Logan, 2002). While the distinction between sustained and transient templates is assumed to reflect a strict dichotomy between WM and LTM, a growing body of evidence indicates that sustained templates may be retrieved and buffered within WM to affect online task performance, just as other LTM representations (Cantor and Engle, 1993;Cowan et al., 2013;Fukuda and Woodman, 2017;Nairne and Neath, 2001). That is, sustained templates are exposed to principles of maintaining and processing information in WM, similar to transient templates. This includes the flexible activation and deactivation during visual search (Grubert & Eimer, 2018, the impairment by concurrent WM loads (Berggren and Eimer, 2018), and the presence of the CDA during entire search tasks (Grubert et al., 2016;Reinhart et al., 2016;. Adding to these observations, we demonstrated in two experiments that the CDA elicited by sustained templates was reliable although target features were repeated for hundreds of trials. In addition, the CDA elicited by sustained templates was comparable or even larger than the CDA elicited by transient templates. Consistent with previous studies (Grubert et al., 2016;Reinhart et al., 2016;, sustained templates were not entirely transferred to LTM, but were represented in WM to some extent. Finally, since we recorded the CDA to only one attentional template at a time, our results further indicate that the CDA is not only sensitive to the WM load as classically assumed (Feldmann-Wüstefeld et al., 2018;Ikkai et al., 2010;Luria et al., 2016;McCollough et al., 2007;Unsworth et al., 2014;Vogel et al., 2001). Instead, the CDA may also reflect the precision of representations in WM (Luria et al., 2009;Machizawa et al., 2012;Schmidt and Zelinsky, 2017), making it a relevant ERP-component to track the flexible allocation of WM resources during maintenance (Salahub et al., 2019).
Based on these observations, we argue that sustained templates are transferred to LTM and buffered within WM to guide task performance. In the absence of retroactive interference, the simultaneous representation of sustained templates in LTM and WM (Reinhart et al., 2016; allows for the highest precision (Huynh Cong and Kerzel, 2020) and an efficient guidance of attentional selection (Berggren et al., 2020;Goldstein and Beck, 2018;Grubert et al., 2016;Kerzel and Witzel, 2019;Moore and Weissman, 2010). However, an additional amount of WM resources may be necessary to conserve high precision in the presence of retroactive interference (Huynh Cong and Kerzel, 2020. Therefore, the sustained template may be flexibly represented in LTM and WM during visual search, but its representation in WM may necessitate an enhancement when threatened by retroactive interference.

Conclusion
Overall, the present study demonstrated that a transient template interfered in a retroactive fashion with a sustained template, impairing its efficiency in guiding attentional selection. However, prioritization protected the sustained template against retroactive interference and eliminated the associated costs. Particularly, our results suggest that two distinct and successive processes of prioritization were involved. At encoding, the sustained template benefited from enhanced attentional selection, which guaranteed a stable representation against retroactive interference from the transient template. During subsequent maintenance, the sustained template received a larger amount of WM resources to conserve a highly precise representation. Therefore, attentional templates are protected from retroactive interference by an interaction between attentional selection at encoding and resource allocation during subsequent maintenance.

Funding
This research was supported by the grant 100019_182146 from the Swiss National Science Foundation (SNSF) to Dirk Kerzel.

Research data
The data from all experiments is available in the Open Science Framework (https://osf.io/emr2d/). Parts of this work were presented at the Vision Sciences Society Conferences (2021).