Deep Learning models are a standard solution for sensor-based Human Activity Recognition (HAR), but their deployment is often limited by labeled data scarcity and models' opacity. Neuro-Symbolic AI (NeSy) provides an interesting research direction to mitigate these issues by infusing knowledge about context information into HAR deep learning classifiers. However, existing NeSy methods for context-aware HAR require computationally expensive symbolic reasoners during classification, making them less suitable for deployment on resource-constrained devices (e.g., mobile devices). Additionally, NeSy approaches for context-aware HAR have never been evaluated on in-the-wild datasets, and their generalization capabilities in real-world scenarios are questionable. In this work, we propose a novel approach based on a semantic loss function that infuses knowledge constraints in the HAR model during the training phase, avoiding symbolic reasoning during classification. Our results on scripted and in-the-wild datasets show the impact of different semantic loss functions in outperforming a purely data-driven model. We also compare our solution with existing NeSy methods and analyze each approach's strengths and weaknesses. Our semantic loss remains the only NeSy solution that can be deployed as a single DNN without the need for symbolic reasoning modules, reaching recognition rates close (and better in some cases) to existing approaches.
翻译:深度学习模型是基于传感器的人体活动识别(HAR)的标准解决方案,但其部署常受限于标注数据稀缺性和模型不透明性。神经符号人工智能(NeSy)通过将情境信息知识注入HAR深度学习分类器,为缓解这些问题提供了有趣的研究方向。然而,现有用于情境感知HAR的NeSy方法在分类过程中需要计算开销较大的符号推理器,使其难以部署在资源受限设备(如移动设备)上。此外,针对情境感知HAR的NeSy方法从未在野外数据集上评估过,其在真实场景中的泛化能力存疑。本研究提出一种基于语义损失函数的新方法,该方法在训练阶段将知识约束注入HAR模型,避免了分类过程中的符号推理。在脚本化数据集和野外数据集上的结果表明,不同语义损失函数在超越纯数据驱动模型方面具有显著效果。我们还将该方案与现有NeSy方法进行比较,分析各方法的优缺点。本文提出的语义损失是唯一可部署为单一深度神经网络而无需符号推理模块的NeSy解决方案,其识别率接近(某些情况下优于)现有方法。