Giter Club home page Giter Club logo

facfed's Introduction

FAC-Fed: Federated adaptation for fairness and concept drift aware stream classification

Federated Learning (FL) is an emerging collaborative learning paradigm of Machine Learning (ML) involving distributed and heterogeneous clients. Enormous collections of continuously arriving heterogeneous data residing on distributed clients require federated adaptation of efficient mining algorithms to enable fair and high-quality predictions with privacy guarantees and minimal response delay. In this context, we propose a federated adaptation that mitigates discrimination embedded in the streaming data while handling concept drifts (FAC-Fed). We present a novel adaptive data augmentation method that mitigates client-side discrimination embedded in the data during optimization, resulting in an optimized and fair centralized server. Extensive experiments on a set of publicly available streaming and static datasets confirm the effectiveness of the proposed method. To the best of our knowledge, this work is the first attempt towards fairness-aware federated adaptation for stream classification, therefore, to prove the superiority of our proposed method over state-of-the-art, we compare the centralized version of our proposed method with three centralized stream classification baseline models (FABBOO, FAHT, CSMOTE). The experimental results show that our method outperforms the current methods in terms of both discrimination mitigation and predictive performance.

The datsets used in this project

Code

Dataset Processing Scripts

The datasets directory contains all the datasets used in this project. Below is a description of python scripts written to process each dataset:

  • load_adult.py: Utility script for loading and preprocessing the 'Adult' dataset commonly used in machine learning tasks related to income prediction.

  • load_bank.py: This script is designed to load and preprocess the 'Bank' dataset, which includes data for marketing campaigns of banking institutions.

  • load_default.py: A script that handles the loading and initial processing of the 'Default' dataset, which might be related to credit card defaulting data (Replace with the actual functionality).

  • load_law.py: Loads the 'Law' dataset and prepares it for analysis, possibly containing information about legal precedents or case outcomes (Replace with the actual functionality).

FAC-Fed main scripts

The following scripts constitute the complete methodology of FAC-Fed

  • facfed_main.py: Main script for the 'FacFed' framework that orchestrates the fairness aware federated learning process on different datasets.

  • cfsote.py: The script contains functions related to the 'CFSOTE' algorithm for adaptive data augmnetation for discrimination mitigation.

  • onn.py: Contains the implementation of an Online Neural Network (ONN) used as a bse model in FAC-Fed.

Running the facfed_main.py Script

To run the facfed_main.py script with the default settings, you can use the following command:

python facfed_main.py --num_clients 3 --fairness_notion 'stp_score' --dataset_name 'bank' --distribution 'attr'

Prerequisites

Before running the script, ensure you have the following Python libraries installed:

  • numpy
  • pandas
  • sklearn
  • scipy
  • matplotlib
  • tensorflow
  • pytorch
  • scikit-multiflow

Citation Request

f you find this work useful in your research, please consider citing:

@article{badar2023fac,
  title={FAC-fed: Federated adaptation for fairness and concept drift aware stream classification},
  author={Badar, Maryam and Nejdl, Wolfgang and Fisichella, Marco},
  journal={Machine Learning},
  volume={112},
  number={8},
  pages={2761--2786},
  year={2023},
  publisher={Springer}
}

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.