## 2 Methodology
### Algorithm for Cognitive Load Calculation  
The AttenD algorithm is used to detect the driver's level of distraction and can quantify the driver's cognitive load based on eye movement data. Its basic assumption is that human attention is closely linked to gaze behavior. It also introduces the concept of a time buffer to reflect the driver's cognitive load [33]. When the driver's gaze frequently deviates from the driving-relevant region (FRD), the time buffer value decreases, indicating increased cognitive load. In other words, the time buffer value is negatively correlated with the extent of the driver's cognitive load. In existing studies, the FRD in the AttenD algorithm is usually considered to be fixed. However, in reality, there are differences in the size and location of these regions from driver to driver or lane change direction. Therefore, in this study, by observing the swipe pattern and gaze characteristics of each driver, based on which the range of FRD coordinates was selected when changing lanes to the left or right, we improved the AttenD algorithm by varying the FRD dynamically to make the results of the cognitive load calculation more accurate. Figure 2 illustrates the process framework of the improved AttenD algorithm, which was implemented using the R programming language. The detailed procedure is as follows:  
The key thresholds and parameters for judging the driving load are provided at first, including an initial value of 2.0 s for the time buffer value, an initial physiological response delay of 0 s with a threshold of 0.1 s, an initial delay for the rearview mirror and central control screen of 0 s with a threshold of 1.0 s, and a time step of 0.0167 s. Then, we input the integrated and cleaned dataset, read each data entry, and calculate the time buffer value according to the following steps. Step 1: Match the corresponding FRD region according to the driver behavior (left lane change or right lane change) corresponding to each gaze point. If the value of gaze point quality is higher than the threshold value, the eye movement indicator is considered valid and it is time to progress to step 3; if it is lower than the threshold value, switch to the head rotation angle indicator and go to step 2. Step 2: If the head rotation angle is greater than or equal to 20\({}^{\circ}\), output the time buffer value as the time buffer minus the actual time step length; if it is less than 20\({}^{\circ}\), consider that both the gaze point at the current timestamp and the previous timestamp are within the FRD and proceed to step 3. Step 3: If both of the current and the previous timestamps are within the FRD, judge the result of the output time buffer value; otherwise, go to step 4. If the time buffer value is equal to 2 s, the output time buffer value is equal to the original. If the time buffer value is less than 2 s, the output time buffer value is the original time buffer value plus the time step. Step 4: If the gaze point of the current timestamp is within the FRD but the previous one is not, make a judgment based on the physiological response delay value; otherwise, go to step 5. If the physiological response delay is less than 0.1 s, update the physiological response delay value to the physiological response delay value plus the time step, and the time buffer value will remain unchanged. If it is greater than or equal to 0.1 s, then the time buffer value is calculated in the same way as in step 3. Step 5: If the viewpoint of the current timestamp is not within the FRD, the evaluation is based on other driving-related regions. If the viewpoint is neither in the rearview mirror nor in the dashboard, the output time buffer value is the original time buffer value minus the time step.