Federated learning for multiple industrial sensors
Training neural network for anomalous sound detection without uploading data to server
Federated learning has been become a promising approach to train an AI model without centralized training data. Data is preserved in local devices to update the global model, and only models need to be transmitted to central server. Since network speed in factories is usually very slow, the collection for large amount of training data becomes infeasible. Sometimes, it even relies on manual collection. Therefore, federated learning is expected to a great candidate for building an AI system at field site without sophisticated network capacity. In this article, I will demonstrate the feasibility of federated learning with anomalous sound dataset for industrial machines.
DCASE 2020 dataset
This dataset is made for DCASE competition in 2020. Basically, it includes six types of machines (ToyCar, ToyConveyor, fan, pump, slider, valve). For each machine type, there are four products (machine_id = 0, 2, 4, 6). For more details about this dataset, please check ref[2].
Methods
- I used all wav files in train folder in development set[3] for training, and that in test folder for pAUC calculation.
- Since the dataset is highly unbalanced, pAUC is adopted for performance metrics. The script for pAUC calculation from official github[4] is used directly in this test.
- Model structure the same as the official baseline model, which is a vanilla autoencoder. For more details about this model, please check ref[2].
- In centralized training, training data from four machine_ids are mixed together, while in federated training each machine_id represent a single client. In real case, different machine_id stands for different products of the same type at different machines.
- The example code of federated learning from [5] is adapted for this task. It’s simple, clear, and most of all, based in pytorch.
- I set global_epoch =50 and local_epoch =30 in this study. Larger epoch doesn’t change the result significantly.
Results & Discussion
- The central hypothesis of this test is that the performance of global model trained via federated learning can be comparable to that via centralized training. It seems to be verified by the test result.
Conclusion
As you might have known, the cost of building and maintaining AI system in factory is very high. Computing resource, network infrastructure and sensor deployment are all required for AI system and become the entrance barrier for company to adopt AI technology. In this post, I try to illustrate that federated learning my be a tool to reduce the cost of the system without sacrificing the performance.
Reference
[1] Federated Learning: Collaborative Machine Learning without Centralized Training Data (https://ai.googleblog.com/2017/04/federated-learning-collaborative.html)
[2] http://dcase.community/challenge2020/task-unsupervised-detection-of-anomalous-sounds-results
[3] https://zenodo.org/record/3678171
[4] https://github.com/y-kawagu/dcase2020_task2_baseline
For information about industrial IoT solution at Coretronic, please check https://www.coretronicmems.com/news20200923.html