HyperSCA: A Comprehensive Hyperparameter Optimization Framework for Deep Learning-based Side Channel Attacks
Deep learning has become the dominant approach for profiled side-channel analysis (SCA), however, its effectiveness is often limited by a challenging hyperparameter optimization (HPO) process. The field is currently hindered by fundamental limitations: fragmented evaluation methodologies prevent fair comparisons among HPO methods, while the widespread use of generic cryptographically-agnostic loss functions leads to suboptimal attack models. This paper introduces HyperSCA, an automated framework designed to address these challenges. We posit that domainspecific loss functions—designed to align learning objectives with attackers’ operational goals—provide a more efficient means of improving DLSCA performance than complex HPO search strategies. To validate this hypothesis, we introduce two novel SCA-aware loss functions: Distance Correlation (DC) loss and Binomial Distribution (BD) loss, which embed critical cryptographic properties directly into the training process. To enable fair and rigorous evaluation, HyperSCA establishes a unified benchmarking paradigm that enforces a strict wall-clock time budget and optimizes directly for SCA-specific metrics. Extensive evaluations across five public AES datasets support our hypothesis. CNN, MLP, and Transformer models trained with our SCA-aware losses achieve a substantial reduction in trace count for key recovery compared to state-of-the-art methods. This performance gain is achieved within a significantly reduced time budget: from hours or days to under 30 minutes. HyperSCA thus makes HPO more practical for security practitioners. By demonstrating the impact of loss function design, this work provides a new perspective on DLSCA.