# Federated Learning for Malware Detection in IoT Devices

IoT機器におけるマルウェア検出のための連合学習

Valerian Rey, Pedro Miguel Sánchez Sánchez, Alberto Huertas Celdrán, Gérôme Bovet, Martin Jaggi · arXiv · 2021年4月15日

- **課題** IoT機器のマルウェア検出に必要な振る舞いデータは機微な情報を含むため、中央サーバーに集めることが難しいです。この論文では、連合学習によって元データを共有せずに検出モデルを学習できるかを検討します。
- **手法** 各クライアントはN-BaIoTの機器別トラフィック特徴量でローカルモデルを学習し、サーバーがパラメータを集約します。教師あり分類器と教師なしオートエンコーダによる異常検知をあわせて評価しています。
- **結果** 教師あり設定では、MINI-BATCH AVGが中央集中学習に近い精度を示しました。教師なし設定では、既知の機器のTPRが単独学習より大きく上がりました。悪意のあるクライアントに対しては平均集約が脆弱で、MEDはほとんどの攻撃で高い耐性を示しました。

## IoTマルウェア検出におけるデータ共有の限界

IoT機器はセキュリティ機能が不足したまま大量に配備されており、マルウェア感染のリスクが大きいです。従来のML/DLベースの検出は、複数の機器のデータを中央サーバーに集めて学習することが多いです。しかし機器の振る舞いデータが機微な情報や私的な情報を含む場合、この方式はプライバシーと完全性の観点で適していません。この論文は、連合学習（Federated Learning）により元データを共有せずにIoTマルウェア検出モデルを学習できるかを検討しています。研究上の問いは2つです。1つ目は、連合学習モデルが各クライアントの単独学習や中央集中学習と比べてどれほどの性能を示すかです。2つ目は、悪意のあるクライアントが混ざる状況で連合学習がどれほど脆弱か、また頑健な集約関数がそれをどの程度緩和するかです。

データセットは、9個の実際のIoT機器のネットワークトラフィックを含むN-BaIoTで、機器ごとにファイルが分かれているため、クライアントごとの非同一分布分割に使われています。

## クライアント・サーバー構成と2つの集約方式

各クライアントは1つのIoT機器のトラフィックデータを持ち、サーバーはモデルの初期化とパラメータ集約を担当します。入力は、パケットごとに得られる115次元の数値特徴量です。前処理にはmin-max正規化を用います。連合正規化では、各クライアントがローカルの最小値と最大値をサーバーに送り、サーバーが要素ごとの大域的な最小値と最大値を計算して配信し直します。教師あり学習の設定ではMLP分類器を使い、隠れ層のない線形モデルから最大3層の隠れ層までの計4種類の構造を比較します。教師なし設定ではオートエンコーダを学習します。オートエンコーダはMSEで正常（良性）データを再構成するよう学習され、再構成誤差の平均と標準偏差から閾値を決め、閾値を超えたサンプルを異常と判定します。

閾値の式は、平均に標準偏差を加えた形です。集約はFedAVGをベースとし、集約関数を入れ替え可能なパラメータとして扱います。MINI-BATCH AGGREGATIONは、ミニバッチを1つ学習するたびにサーバーと通信します。MULTI-EPOCH AGGREGATIONは、Eエポックをまとめて学習した後にサーバーと通信し、これをT=30ラウンドにわたって繰り返します。この2つの方式は通信回数とローカル学習量の組み合わせが異なるため、コストを比べる際の基準になります。

![Figure 1: Framework architecture and its components. The sharing of normalization values and the collaborative hyper- parameter selection are omitted for simpl…](https://refivu.com/papers/95bd62ab-6913-4636-86fb-d82f1fc8a32c/figures/figure-6faee97a69d62dddcaf420048b749073.png?thumb=512)

**Figure 1** : Framework architecture and its components. The sharing of normalization values and the collaborative hyper- parameter selection are omitted for simplicity.

[出典](https://arxiv.org/abs/2104.09994v3) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Valerian Rey, Pedro Miguel Sánchez Sánchez, Alberto Huertas Celdrán, Gérôme Bovet, Martin Jaggi · Federated Learning for Malware Detection in IoT Devices · 論文の図を引用 · 元のPDFの5ページ目から図の部分を抽出しています。

## 中央学習・単独学習との性能比較

実験では、8個のクライアントがそれぞれ9個の機器のうち1つを担当し、残りの1つは学習に使わない新しい機器として評価に用いました。教師あり学習の結果では、MINI-BATCH AVGが3つのクラス比率の設定すべてで中央集中学習にかなり近い精度を示しました。MULTI-EPOCH AVGは、既知の機器では精度がわずかに下がる一方、新しい機器では中央学習を上回るケースがありました。例えば既知の機器（7.87%）の設定では、精度は中央学習が99.96、MINI-BATCH AVGが99.96、MULTI-EPOCH AVGが99.92、単独学習が99.78です。新しい機器（7.87%）の設定では、単独学習が98.94、MULTI-EPOCH AVGが99.89、MINI-BATCH AVGが99.89、中央学習が99.88です。

教師なし設定では、既知の機器のTPRは単独学習の88.00から連合学習の99.98へと大きく上がりました。一方、同じ既知の機器のTNRは単独学習が97.38で、連合学習の94.84および95.12より高くなっています。新しい機器では、TNRは単独学習の59.66から連合学習の91.78〜92.61へと上がりました。著者らは、より多くの多様なデータを使う連合方式と中央方式が性能に大きな利点をもたらすと解釈しており、連合学習はプライバシーを守りながら中央学習と同程度の性能に到達できると考えています。ただし、50%と95%の設定では、30ラウンド後も精度が完全には収束していないと報告されています。

## 悪意のあるクライアントと頑健な集約関数

敵対的実験は、教師あり学習の設定で、95%の良性データ分割とMINI-BATCH AGGREGATIONを用いて行われました。データポイズニングにはAll labels flipping攻撃を、モデルポイズニングにはGradient factor攻撃とModel cancelling攻撃を使用しました。平均集約（AVG）は、すべてのクライアントが正直なときに最も良い結果を示しますが、悪意のあるクライアントが1人でもいると、Gradient factorとModel cancelling攻撃ではモデルが定数予測器に崩壊すると報告されています。座標ごとの中央値（MED）は、ほとんどの攻撃で平均より高い耐性を示しますが、All labels flipping攻撃で悪意のあるクライアントが3人いる場合、平均F1-Scoreは約14%にとどまります。

また、悪意のあるクライアントが1人だけでも、All labels flippingとModel cancelling攻撃では最小F1-Scoreが0%まで下がることがあります。座標ごとのトリム平均TM(c)は、悪意のあるクライアント数がcを超えると失敗します。2-Resamplingは、正直なクライアントだけの場合は精度を高めますが、頑健性を下げます。この結果は、頑健な集約関数が被害を減らすものの十分な防御ではないという著者らの結論を裏づけています。

## 実験の範囲と適用条件

この結果には、いくつかの適用範囲があります。1つ目は、学習クライアント数が8人に制限されていることです。これはN-BaIoTが9個の機器のデータしか含まないためです。2つ目は、敵対的実験での悪意のあるクライアントの割合が最大37.5%であり、著者らはこの範囲に限って結果を解釈している点です。3つ目は、著者らが大規模B5G環境への外挿を提案しているものの、実際の大規模データセットでは検証していない点です。4つ目は、実験結果のばらつきが大きく、悪意のあるクライアントの無作為な選択によって平均F1-Scoreが直感に反した形で現れうると明らかにされていることです。通信コストの分析では、MULTI-EPOCH AVGはMINI-BATCH AVGより通信が約1300倍から2000倍少ない一方、ローカル学習のステップは約3.75倍多くなります。

このコスト比較は、選択されたハイパーパラメータとモデルサイズの条件で計算されたものです。

## 論文情報

- **著者**: Valerian Rey, Pedro Miguel Sánchez Sánchez, Alberto Huertas Celdrán, Gérôme Bovet, Martin Jaggi
- **学会・ジャーナル**: arXiv · プレプリント
- **公開日**: 2021年4月15日
- **登録日**: 2026年11月6日
- **更新日**: 2021年11月19日
- **バージョン**: v3
- **arXiv**: 2104.09994
- **DOI**: 10.1016/j.comnet.2021.108693
- **カテゴリ**: cs.CR · cs.LG
- **ライセンス**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **掲載内容**: 論文情報・解説・論文の図

[元論文 ↗](https://arxiv.org/abs/2104.09994v3) · [PDF ↗](https://arxiv.org/pdf/2104.09994v3)

この解説は、Refivuの韓国語解説をAIで翻訳したものです。不正確な翻訳や誤りが含まれる可能性があります。論文と図の利用条件は各出典に従います。

## アブストラクト

This work investigates the possibilities enabled by federated learning concerning IoT malware detection and studies security issues inherent to this new learning paradigm. In this context, a framework that uses federated learning to detect malware affecting IoT devices is presented. N-BaIoT, a dataset modeling network traffic of several real IoT devices while affected by malware, has been used to evaluate the proposed framework. Both supervised and unsupervised federated models (multi-layer perceptron and autoencoder) able to detect malware affecting seen and unseen IoT devices of N-BaIoT have been trained and evaluated. Furthermore, their performance has been compared to two traditional approaches. The first one lets each participant locally train a model using only its own data, while the second consists of making the participants share their data with a central entity in charge of training a global model. This comparison has shown that the use of more diverse and large data, as done in the federated and centralized methods, has a considerable positive impact on the model performance. Besides, the federated models, while preserving the participant's privacy, show similar results as the centralized ones. As an additional contribution and to measure the robustness of the federated approach, an adversarial setup with several malicious participants poisoning the federated model has been considered. The baseline model aggregation averaging step used in most federated learning algorithms appears highly vulnerable to different attacks, even with a single adversary. The performance of other model aggregation functions acting as countermeasures is thus evaluated under the same attack scenarios. These functions provide a significant improvement against malicious participants, but more efforts are still needed to make federated approaches robust.

## この論文を引用

Valerian Rey, Pedro Miguel Sánchez Sánchez, Alberto Huertas Celdrán, Gérôme Bovet, Martin Jaggi (2021). Federated Learning for Malware Detection in IoT Devices. arXiv:2104.09994v3. https://doi.org/10.1016/j.comnet.2021.108693

**BibTeX**

```
@article{rey2021federated,
  title = {{Federated Learning for Malware Detection in IoT Devices}},
  author = {Valerian Rey and Pedro Miguel Sánchez Sánchez and Alberto Huertas Celdrán and Gérôme Bovet and Martin Jaggi},
  year = {2021},
  eprint = {2104.09994},
  archivePrefix = {arXiv},
  doi = {10.1016/j.comnet.2021.108693},
  url = {https://arxiv.org/abs/2104.09994v3}
}
```

## この論文の用語

- [accuracy](https://refivu.com/ja/terms/1995c0cd6282-accuracy)
- [mean squared error](https://refivu.com/ja/terms/e8df98e6d7b7-mean-squared-error)
- [Federated learning](https://refivu.com/ja/terms/c6fc55e6f812-federated-learning)
- [F1-Score](https://refivu.com/ja/terms/bab94490d1a7-f1-score)
- [Autoencoder](https://refivu.com/ja/terms/a4d4d93d1cff-autoencoder)
- [FEDAVG](https://refivu.com/ja/terms/42fd22f625c0-fedavg)
- [non-IID](https://refivu.com/ja/terms/83ef54c01151-non-iid)

## ほかの論文解説

- [Frequency-Assisted Mamba for Remote Sensing Image Super-Resolution](https://refivu.com/ja/papers/63382188-9e18-459f-8b8e-eca2d338fa84-frequency-assisted-mamba-for-remote-sensing-image-super.md)
- [BinsFormer: Revisiting Adaptive Bins for Monocular Depth Estimation](https://refivu.com/ja/papers/7fc81cb2-3782-4326-9ffa-5af4ea6fe25b-binsformer-revisiting-adaptive-bins-for-monocular-depth.md)
- [DepthFormer: Exploiting Long-Range Correlation and Local Information for Accurate Monocular Depth Estimation](https://refivu.com/ja/papers/6ae73f26-dcaf-4126-aff6-1308b2c0214f-depthformer-exploiting-long-range-correlation-and-local.md)
- [Unifying Flow, Stereo and Depth Estimation](https://refivu.com/ja/papers/a17a6b8c-5864-4598-9183-8a1c09180428-unifying-flow-stereo-and-depth-estimation.md)
- [CTformer: Convolution-free Token2Token Dilated Vision Transformer for Low-dose CT Denoising](https://refivu.com/ja/papers/631c562b-701d-4ee6-bdac-c7947557f3d2-ctformer-convolution-free-token2token-dilated-vision.md)
- [A Transformer-Based Feature Segmentation and Region Alignment Method For UAV-View Geo-Localization](https://refivu.com/ja/papers/40248641-910a-4482-8dee-ddb16d64651d-a-transformer-based-feature-segmentation-and-region.md)
- [DU-GAN: Generative Adversarial Networks with Dual-Domain U-Net Based Discriminators for Low-Dose CT Denoising](https://refivu.com/ja/papers/46030b78-75d0-4156-80ef-e92602d09b95-du-gan-generative-adversarial-networks-with-dual-domain.md)
- [Moving Object Segmentation in 3D LiDAR Data: A Learning-based Approach Exploiting Sequential Data](https://refivu.com/ja/papers/36e15bd6-0697-40e1-86f7-8a11dca9344b-moving-object-segmentation-in-3d-lidar-data-a.md)

---

AI解説には誤りが含まれることがあります。 [Refivu](https://refivu.com/ja/papers/95bd62ab-6913-4636-86fb-d82f1fc8a32c-federated-learning-for-malware-detection-in-iot-devices)
