Human Activity Recognition (HAR) models often suffer from performance degradation in real-world applications due to distribution shifts in activity patterns across individuals. Test-Time Adaptation (TTA) is an emerging learning paradigm that aims to utilize the test stream to adjust predictions in real-time inference, which has not been explored in HAR before. However, the high computational cost of optimization-based TTA algorithms makes it intractable to run on resource-constrained edge devices. In this paper, we propose an Optimization-Free Test-Time Adaptation (OFTTA) framework for sensor-based HAR. OFTTA adjusts the feature extractor and linear classifier simultaneously in an optimization-free manner. For the feature extractor, we propose Exponential DecayTest-time Normalization (EDTN) to replace the conventional batch normalization (CBN) layers. EDTN combines CBN and Test-time batch Normalization (TBN) to extract reliable features against domain shifts with TBN's influence decreasing exponentially in deeper layers. For the classifier, we adjust the prediction by computing the distance between the feature and the prototype, which is calculated by a maintained support set. In addition, the update of the support set is based on the pseudo label, which can benefit from reliable features extracted by EDTN. Extensive experiments on three public cross-person HAR datasets and two different TTA settings demonstrate that OFTTA outperforms the state-of-the-art TTA approaches in both classification performance and computational efficiency. Finally, we verify the superiority of our proposed OFTTA on edge devices, indicating possible deployment in real applications. Our code is available at https://github.com/Claydon-Wang/OFTTA.
翻译:人体活动识别模型在实际应用中常因个体间活动模式的分布偏移而性能下降。测试时自适应是一种新兴学习范式,旨在利用测试数据流在实时推理中调整预测结果,该范式在活动识别领域尚未被探索。然而,基于优化的测试时自适应算法计算成本高,难以在资源受限的边缘设备上运行。本文提出一种面向传感器活动识别的免优化测试时自适应框架。该框架同时以无需优化的方式调整特征提取器和线性分类器。对于特征提取器,我们提出指数衰减测试时归一化方法,用于替代传统批量归一化层。该方法组合了传统批量归一化与测试时批量归一化,通过使测试时归一化影响在深层网络中呈指数衰减,来提取可靠特征以应对域偏移。对于分类器,我们通过计算特征与原型间的距离来调整预测,其中原型由维护的支撑集计算得出。支撑集的更新基于伪标签,该伪标签可受益于EDTN提取的可靠特征。在三个公开跨人活动识别数据集和两种不同测试时自适应设置下的大量实验表明,OFTTA在分类性能和计算效率方面均优于现有最优测试时自适应方法。最后,我们在边缘设备上验证了所提OFTTA的优越性,表明其在实际应用中的部署可能性。我们的代码开源在https://github.com/Claydon-Wang/OFTTA。