Abstract
Background: Congenital heart disease is a major cause of mortality in small babies and children, where early diagnosis is very important for proper treatment and improving clinical outcomes. Unfortunately, conventional auscultation-based diagnosis methods mostly rely on expert interpretation that limits their scalability in very far and mountain regions having comparatively low-resource environments. To address these major problems, we propose a deep learning-based method with a spectral minimax-guided context attention transformer framework. Methods: The input signal to the framework is phonocardiogram signals. The proposed framework leverages the optimal use of spectral representation of heart sounds to capture time-frequency features and introduces a novel minimax transformation block designed for cardiac sound mapping analysis. The minimax attention block enhances spectral discrimination by mapping features to a relatively high-dimensional space to improve stratification, thereby compressing them to reduce sensitivity to repetition and noise. Additionally, we employ a cosine-oriented contextual attention module to improve feature representation, adaptively adjusting spatial and temporal features. This approach allows the proposed framework to highlight important acoustic differences and more effectively understand interlayer variations in heart sound patterns. The design also incorporates window-based focus and hierarchical feature clustering to efficiently represent local and global correlations. Results: We conducted experiments on the heart sound dataset known as the ZCHSound. We found that the proposed framework outperforms the basic methods on many assessment metrics. Conclusion: Although some challenges remain in multi-class classification with unbalanced datasets, the results demonstrate the potential of simple spectral learning and cosine-oriented attention to improve the automated diagnosis of congenital heart disease.