(A) Before entering the MRI scanner, participants learned stay and switch cues (Phase 1) that would be embedded in a subsequent attention task (Phase 2). One painting and one room were ‘stay’ cues, and one painting and one room were ‘switch’ cues. ‘Stay’ cues indicated that, during the subsequent memory-guided attention task, participants should stay in the same attentional state on the following trial. ‘Switch’ cues indicated that participants should switch to the other attentional state on the following trial. (B) The attention task involved the presentation of 3D-rendered rooms with paintings. Participants had to attend either to the style of the paintings (‘art’ trials) or the spatial layout of the rooms (‘room’ trials). On ‘art’ trials, the task was to find paintings that could have been painted by the same artist because of their similarity in artistic style, even though the content of the paintings might be different (e.g., the art match and base image have paintings by the same artist). On ‘room’ trials, the task was to find rooms that had the same spatial layout from a different perspective, even though their other features (wall color, specific furniture exemplars) varied (e.g., the room match and the base image have the same spatial layout from a different perspective). (C) Trial structure of the attention task. In the explicitly instructed task, the attentional state on each trial was randomly assigned (‘ART’ or ‘ROOM’). On ‘art’ trials, participants had to determine if any of the paintings in the search set was painted by the same artist as the painting in the base image (i.e., if there was an art match). On ‘room’ trials, participants had to determine if any of the rooms in the search set had the same spatial layout as the room in the base image (i.e., if there was a room match). The memory-guided task was similar, except the attentional cue was not explicitly instructed at the beginning of each trial. Instead, participants had to choose their attentional goal at the beginning of each trial based on the stay or switch cue in the previous trial. Here, there is a room ‘stay’ cue (outlined in green), indicating that on the next trial, the participant should select ‘room’ as their attentional goal. If instead there was a room ‘switch’ cue, the participant would have to select ‘art’ as their attentional goal on the following trial. Particular stay and switch cues only appeared in the attended dimension: I.e., art stay/switch cues only appeared on trials where art was attended, and room stay/switch cues only appeared on trials where rooms were attended. Finally, some trials contained neither a stay cue nor a switch cue. On trials following such ‘no cue’ trials, participants were free to choose either ‘art’ or ‘room’ as their attentional state. Stay/switch cues were also embedded in the search set in the explicitly instructed task, but there they had no relevance for the upcoming attentional state.