Optimal Transport-Driven Federated Out-of-Distribution Detection in Heterogeneous Data
Yuan He, Yingchun Cui, Zhengda Wu, Heran Xi, Jinghua Zhu · 2025
In the Industrial Internet of Things (IIoT), collaborative intelligence among distributed devices is essential for achieving autonomy and robustness, especially when facing non-IID and out-of-distribution (OOD) data. Deep neural networks have achieved significant success in various applications, but their prediction confidence often degrades on OOD data, which is critical in IIoT environments with heterogeneous sources. Centralized OOD detection methods assume data is centrally stored and require a large number of real OOD samples, which are impractical and costly in federated learning due to data silos and privacy issues. To address the above challenges, we formulate the new problem of OOD detection on heterogeneous data in a federated learning framework. We propose a novel multi-task optimal model named FOOD that improves OOD accuracy through optimal transport theory in a distributed manner with data privacy protection. Specifically, FOOD generates pseudo-OOD samples based on optimal transport theory and purifies training samples to enhance classification accuracy. We use the Wasserstein distance to measure the similarity between in-distribution and out-of-distribution samples and generate heterogeneous pseudo-OOD samples among different clients. FOOD is a plug-and-play plugin that can improve deep neural models' performance without introducing extra overhead. Experiments on OOD datasets show that FOOD significantly enhances OOD detection and classification on several public OOD datasets, AUROC improved by 1.69%, AUPR by 1.75%, and ACC by 4.67%. Using optimal transport theory, our work provides a practical approach to improving data generalization in generative models.