Hamp-KD-TinyHar: Hardware-Aware Mixed-Precision Pruning and Validation-Safe Knowledge Distillation for Resource-Efficient Human Activity Recognition on TinyML Devices
D. Shaik AbdullaResearch Scholar, Bharatiya Engineering Science and Technology Innovation University, Anantapur, Andhra Pradesh, India. 2022wpcse006@bestiu.edu.in0009-0000-3885-9855
Dr.P. Dileep Kumar ReddyProfessor, Dean, R&D, Department of CSE, Narsimha Reddy Engineering College (Autonomous), Secunderabad, Telangana, India. dileepreddy503@gmail.com0000-0002-0521-8370
Wearable and smartphone-based Human Activity Recognition (HAR) needs to run on energy, compute, memory (flash and SRAM) constrained Internet-of-Things (IoT) nodes, but compact models typically suffer from an accuracy degradation upon direct pruning or quantization. HAMP-KD-TinyHAR is a four-stage pipeline that (i) generates a leakage-resistant, subject-disjoint data protocol by training it only on the data; (ii) transfers knowledge from a temporal teacher with 1.89 M parameters to a EdgeNeXt-style student network with 93.6 k parameters with knowledge distillation (KD) and validation-gated auxiliary attention and relation transfer; (iii) performs progressive structured channel pruning with physical compaction; and (iv) assigns W4/W8 precision of weight quantization based on gradient-weighted quantization-sensitivity score and quantization-aware training. Operating points are locked in a development seed and tested on 5 different seeds with the UCI-HAR raw inertial benchmark (9 channels x 128 samples; 6 classes). The compact profile, HAMP-Compact, reaches 93.42 ± 1.63% accuracy and 93.54 ± 1.56% Macro-F1 with 29,038 parameters, 24.28 KB weight storage, and 3.45 M MACs, giving a 15.06× compression factor. It improves Macro-F1 by 1.56 percentage points and reduces storage by 93.36%, parameters by 68.97%, and MACs by 69.96% compared to the uncompressed student. With respect to a uniform-INT8 model, it reduces an additional 56.18% memory footprint and 42.72% of MACs while improving the Macro-F1 score by −0.074 points (p = 0.791 and p = 1.000 for the paired t-test and Wilcoxon test, respectively). The second profile (HAMP-Accuracy) achieves a Macro-F1 of 93.48 ± 1.87% at 35.55 KB and 5.34 M MACs, and HAMP-Compact has the lowest seed variance of all compressed models. In conclusion, bit-distillation before bit-compression, combined with measured layer sensitivity to guide bit-width allocation, maintains high HAR quality while operating within a sub-25 KB envelope for ubiquitous sensing in all environments, and provides a reliable operating point for always-on, ubiquitous sensing.