Top-Confidence Gapped Cross-Entropy for Compact Human Activity Recognition
Human Activity Recognition (HAR) in resource-constrained settings has been studied mainly through architecture design, compression, and deployment, while the role of the training objective has received less attention. This paper introduces Top-Confidence Gapped Cross-Entropy (TCG-CE), a lightweight modification of categorical cross-entropy in which each sample is weighted by the gap between the two most probable predicted classes. TCG-CE adds no trainable parameters and can be used as a drop-in replacement for standard cross-entropy. The method is evaluated on the UCI-HAR and WISDM benchmarks using compact recurrent models, namely TinyRNN, TinyGRU, and TinyLSTM. The evaluation focuses on macro-averaged predictive performance and also reports empirical runtime and memory observations under a fixed execution environment. Across datasets and models, TCG-CE improves balanced classification metrics, with the clearest gains observed on WISDM and in more capacity-limited settings. These results indicate that top-1/top-2 confidence-gap modulation is a practical loss-design strategy for improving macro-level predictive performance in compact HAR classification.
Authors
- Khudran Alzhrani (ORCID: https://orcid.org/0000-0003-2212-0233)
Institutions
- Umm al-Qura University (SA)
Publication Details
- Journal
- Applied Sciences
- Published
- 2026-03-31
- DOI
- https://doi.org/10.3390/app16073394
- Primary Topic
- Context-Aware Activity Recognition Systems
- Type
- article
- Field-Weighted Citation Impact
- 0.00