Improving Generalization in Convolutional Neural Networks with a Dynamic Attention Layer

This paper introduces a novel Dynamic Attention Layer (DAL) that enhances the generalization capabilities of Convolutional Neural Networks in both in-distribution and out-of-distribution scenarios. By dynamically adjusting attention weights based on selected percentiles during training, DAL improves the network’s ability to capture both dominant and subtle features, resulting in better accuracy and robustness across diverse datasets. The study demonstrates DAL’s effectiveness through rigorous testing, showing it outperforms traditional attention mechanisms and data augmentation techniques, offering a valuable advancement in computer vision.