Out-of-Distribution (OOD) detection is critical for ensuring the reliability of machine learning models in safety-critical applications such as autonomous driving and medical diagnosis. While deploying personalized OOD detection directly on edge devices is desirable, it remains challenging due to large model sizes and the computational infeasibility of on-device training. Federated learning partially addresses this but still requires gradient computation and backpropagation, exceeding the capabilities of many edge devices. To overcome these challenges, we propose SecDOOD, a secure cloud-device collaboration framework for efficient on-device OOD detection without requiring device-side backpropagation. SecDOOD utilizes cloud resources for model training while ensuring user data privacy by retaining sensitive information on-device. Central to SecDOOD is a HyperNetwork-based personalized parameter generation module, which adapts cloud-trained models to device-specific distributions by dynamically generating local weight adjustments, effectively combining central and local information without local fine-tuning. Additionally, our dynamic feature sampling and encryption strategy selectively encrypts only the most informative feature channels, largely reducing encryption overhead without compromising detection performance. Extensive experiments across multiple datasets and OOD scenarios demonstrate that SecDOOD achieves performance comparable to fully fine-tuned models, enabling secure, efficient, and personalized OOD detection on resource-limited edge devices. To enhance accessibility and reproducibility, our code is publicly available at https://github.com/Dystopians/SecDOOD.
翻译:分布外检测对于确保自动驾驶和医疗诊断等安全关键应用中机器学习模型的可靠性至关重要。虽然直接在边缘设备上部署个性化分布外检测是理想的,但由于模型规模庞大以及端侧训练的计算不可行性,这仍然具有挑战性。联邦学习部分解决了这个问题,但仍需要梯度计算和反向传播,超出了许多边缘设备的能力。为了克服这些挑战,我们提出了SecDOOD,一个安全的云-端协作框架,用于实现无需端侧反向传播的高效端侧分布外检测。SecDOOD利用云端资源进行模型训练,同时通过将敏感信息保留在设备端来确保用户数据隐私。SecDOOD的核心是一个基于超网络的个性化参数生成模块,该模块通过动态生成本地权重调整,将云端训练的模型适配到设备特定的分布,从而有效地结合中心化和本地化信息,而无需本地微调。此外,我们的动态特征采样与加密策略选择性地仅加密信息量最大的特征通道,在不影响检测性能的前提下,大幅降低了加密开销。在多个数据集和分布外场景上的大量实验表明,SecDOOD实现了与完全微调模型相当的性能,从而能够在资源受限的边缘设备上实现安全、高效且个性化的分布外检测。为了增强可访问性和可复现性,我们的代码已在 https://github.com/Dystopians/SecDOOD 公开。