## 3 Methods
### Asymmetric Loss  
According to statistics on driving paths, the straight driving maneuver is more common compared to turning and lane-changing, resulting in the issue of class imbalance across various samples. This imbalance challenges machine learning models during training, as the dominant class samples are more abundant in the training set. The model may tend to learn features and patterns of the dominant class more strongly, leading to insufficient learning for minority classes and increased difficulty in training the model.  
We introduce a weighted cross-entropy loss function to address the problem of imbalanced training data in driver intent inference and to ensure that the model adapts better to the sample distribution of different classes while ensuring a more balanced contribution of the loss function to each class. In this context, the loss for each class is multiplied by weight, and we adjust the loss for each sample by setting the weight to the reciprocal of the number of samples in the training set, followed by calculating the average loss. This method helps prevent overfitting to classes with a more significant number of samples, ensuring that each class appropriately impacts the overall loss for more effective model training. Specifically, for the 5-class classification of driver intent inference, the weighted cross-entropy loss function can be defined as follows:  
\[L=-\frac{1}{N}\sum_{i=1}^{N}\sum_{j=1}^{5}\omega_{j}y_{ij}\cdot\log(\hat{y}_{ ij}) \tag{3}\]  
where \(N\) is the total number of training samples. \(\omega_{j}\) is the weight for class j, set as the reciprocal of the number of samples for that class in the training set. \(y_{ij}\) is whether the i-th sample in the actual labels belongs to class j. \(\hat{y}_{ij}\) is the model's predicted output, representing the probability that sample i belongs to class j.  
Setting the weights in this manner helps address the issue of imbalanced samples and improves the prediction accuracy for each class. The specific weight adjustments should be tuned and experimented with based on the dataset's characteristics and the task of finding the optimal weight configuration.  
Our experiments showed that identifying certain maneuvers, such as left and right lane changes or turns, can be particularly challenging. This difficulty arises from the dataset's distribution and the inherent characteristics of these maneuvers. Therefore, we adjusted the weights in our model to allocate more significance to these harder-to-recognize categories. Our approach involves increasing the weights for categories based on their difficulty level, with the current coefficients refined through continuous hyperparameter tuning.  
Here, we provide an example weight set for the cross-entropy loss function. Based on the distribution of driving actions in our training dataset, as well as finer adjustments made according to the difficulty level of model recognition for different categories, we arrived at these parameter weights as follows (assuming a hypothetical distribution for illustration purposes):  
Go Straight: weight = 0.3  
Left Lane Change: weight = 1.5  
Left Turn: weight = 1.2  
Right Lane Change: weight = 1.0  
Right Turn: weight = 1.0  
We found that applying these weights enhanced the model's prediction accuracy for minority classes and those more challenging to recognize, without significantly impacting overall performance.