## 2 Materials and Methods
### Wavelet Transform
#### 2.7.4 Selection of Epochs for PAC Calculation  
In studies with behavioral tasks, the signal often contains evoked responses to visual stimuli and event-related potentials due to button presses. Additionally, different periods of the task may be associated with different cognitive states. Thus, in this context, PAC is usually calculated at certain time intervals (epochs) defined by events such as stimulus onsets. For example, in [43], the epochs were 1000 ms delay periods between the encoding and test stimuli, and in [40], they were the intervals at 0-2000 ms before the stimuli in the 2-back task. A common consideration in selecting the epochs is excluding the visual-evoked potentials (VEP) [21; 33]. However, some studies do not follow this recommendation, e.g., in [34], PAC was calculated during the 100-1500 ms period from the start of the visual stimulus presentation, which lasted 2 s. Moreover, an essentially opposite approach was adopted in the studies [12; 37; 38], where each epoch for PAC calculation started with the stimulus onset and ended at the time of response. The authors concatenated several such epochs to obtain a signal of 5000 \(\pm\) 150 ms length, which in the 3-back task required on average 8.23 epochs in [37]. Thus, the mean duration of an epoch was \(\sim\)600 ms, of which more than half probably contained a substantial VEP. At the same time, this approach largely excludes the evoked potential from the button press (except for its spread due to temporal smoothing by low-frequency filters), while this potential likely contaminates the later periods used in other studies of the n-back task.  
In our 'basic' method, we considered 'VEP-free' intervals lasting from 500 ms from stimulus onset (=250 ms from its offset) until 3000 ms when the next stimulus appeared and selected only the intervals without boundaries produced by artifactual time interval rejection. However, an often overlooked fact is that a filter creates temporal smoothing [50] and will spread the VEP into the adjacent time periods. Consequently, to avoid VEP influence, the contaminated portions must be discarded, and so we removed buffer zones at each end of a 'VEP-free' interval (Figure 1). The length of the buffer zones was chosen to be three periods of the lowest considered theta frequency of 4 Hz, i.e., 750 ms. Thus, PAC was calculated over 1000-ms epochs at the latencies 1250-2250 ms from stimulus onset.  
In view of the substantial reduction of the total signal length by the buffer zones, we also considered an alternative method without them, as well as a variant with PAC calculation over the entire session, without selecting any epochs.  
In regard to the 'VEP-free' intervals, we decided to avoid the term'maintenance periods', as they are sometimes called [21; 40], because in the 3-back task, at least three stimuli need to be maintained in memory at all times, including the periods of stimulus presentation, and thus, apart from the beginning and end of a stimulus series, there are no 'pure encoding' or 'pure retrieval' periods.  
The benchmark LFP data contained no events, so in our analysis, we treated them as continuous, i.e., without selecting epochs, in all algorithm variants but one. In this last variant ('simulated epochs'), we extracted epochs with the same timing as in one of the participants performing the 3-back task (after shortening the LFP data to match the length of the cleaned EEG for this subject, i.e., 224 s). This was carried out to explore the influence of epoching on PAC reliability, which could occur due to the reduction of the total data length as well as a possible specific interaction of the temporal structure of the epochs with brain rhythms. The total time of the selected epochs was 33 and 27 s in the two half-sessions in this calculation.