Coder Social home page Coder Social logo

segmented-fl's Introduction

Segmented Federated Learning

This is an implementation of the 2020 IJCNN paper Intrusion Detection with Segmented Federated Learning for Large-Scale Multiple LANs.

Table of Contents

General information

Predominant network intrusion detection systems (NIDS) aim to identify malicious traffic patterns based on a handcrafted dataset of rules. Recently, the application of machine learning in NIDS helps alleviate the enormous effort of human observation. Federated learning (FL) is a collaborative learning scheme concerning distributed data. Instead of sharing raw data, it allows a participant to share only a trained local model. Despite the success of existing FL solutions, in NIDS, a network’s traffic data distribution does not always fit into the single global model of FL; some networks have similarities with each other but other networks do not. We propose Segmented-Federated Learning (Segmented-FL), where by employing periodic local model evaluation and network segmentation, we aim to bring similar network environments to the same group.

Setup instructions

This is a quick guide to get started with the sources.

Dependencies

You will need Python 3 to run the systems.

Upgrade pip to the latest version, use:

sudo python3 -m pip install --upgrade pip

Forking or cloning

Consider forking the project if you want to make changes to the sources. If you simply want to run it locally, you can simply clone it.

Forking

If you decide to fork, follow the instructions given by github. After that you can clone your own copy of the sources with:

git clone https://github.com/YOUR_USER_NAME/homogeneous-learning.git

Make sure you change YOUR_USER_NAME to your user name.

Running the systems

First, please download the Segmented Intrusion Detection Dataset (SIDD). Place the unzipped files at the following location in the root dir to form the following tree structure:

|-- Segmented-FL
    |-- main.py
    |-- cnn
    |-- n005
    |  |-- pcap
    |  |-- local.npy
    |-- n006
    |  |-- pcap
    |  |-- local.npy
    |-- ...

Then, the algorithm can be run by simply typing:

python main.py  

Segmented Intrusion Detection Dataset (SIDD)

SIDD is the first image-based network intrusion detection dataset. This large-scale dataset includes the feature maps (images) of network traffic data from 15 different observation locations of different countries in Asia. This dataset is used to identify two different types of anomalies from benign network traffic. Each image with a size of 48 × 48 contains multi-protocol communications within 128 seconds. The SIDD dataset can be to applied to a broad range of tasks such as machine learning-based network intrusion detection, non-iid federated learning, and so forth.

  • The folders in the dataset are named as> node name_collection date_device id_anomaly type. For example, n005_20191001_000001_1 means the traffic data including Type A anomaly collected on October 1, 2019 by device id 1 at node 005.

  • In each folder, traffic data images were separated into the benign and anomaly.

  • Currently, we are providing the images of two types of anomaly:

    • Type A: Server Message Block (SMB) attack (folder names like xx_xx_xx_1)

    • Type B: TCP SYN flood attack (folder names like xx_xx_xx_3)

  • Refer to PyTorch Writing Custom Datasets, DataLoaders and Transforms for preprocesing the dataset. We will release the preprocessed dataset and the code shortly.

Citation

If this repository is helpful for your research or you want to refer the provided results in this work, you could cite the work using the following BibTeX entry:

@inproceedings{sun2020segmented,
  author    = {Yuwei Sun and
               Hideya Ochiai and
               Hiroshi Esaki},
  title     = {Intrusion Detection with Segmented Federated Learning for Large-scale
               Multiple LANs},
  booktitle = {International Joint Conference on Neural Networks (IJCNN)},
  year      = {2020}
}

@article{sun2020sfl,
  author    = {Yuwei Sun and
               Hiroshi Esaki and
               Hideya Ochiai},
  title     = {Adaptive Intrusion Detection in the Networking of Large-scale LANs
               with Segmented Federated Learning},
  journal   = {IEEE Open Journal of the Communications Society},
  volume    = {2},
  pages     = {102--112},
  year      = {2021}
}

Further readings

Segmented Federated Learning

Decentralized DL

segmented-fl's People

Contributors

yuweisunn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

segmented-fl's Issues

File path parse bug.

when i run code, i got a trouble when enter TypeA as anomaly type in code scenario, maybe it is about file path parse. Can you check it out. i attached image here.
bug_FL_Segment

n005

I can't find the file I need for this project |-- n005
| |-- pcap
| |-- local.npy
|-- n006
| |-- pcap
| |-- local.npy Where can I get the data? Sorry for your trouble

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.