Skip to content

rithram/fbfc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flyhash Bloom Filter Classifier

Code for the Fly Bloom Filter Classifier (FBFC) and the scripts for running the experiments presented in the paper Fruit-fly Inspired Neighborbood Encoding for Classification at SIGKDD conference on KDD, 2021.

Setting up environment

This section details the setup of the compute environment for executing the provided scripts.

Prerequisites

  • python3.8
  • pip
  • virtualenv

Installing requirements

$ mkdir fbfc
$ virtualenv -p /usr/bin/python3.8 fbfc
$ source fbfc/bin/activate
(fbfc) $ export PYTHONPATH=`pwd`
(fbfc) $ pip install --upgrade pip
(fbfc) $ pip install -r requirements.txt

Algorithm

Flyhash

The Flyhash operation h for any xinR is defined as:

image,

where mproj is the sparse binary projection matrix with sd nonzero entries in each row of the matrix, and wta is the winner-take-all operation that sets the top-rho entries in a vector to 1 and the rest of the entries in the vector to 0, where rhollm.

Binary FBFC learning

Given a data set dset, with labs, the per-class binary Flyhash Bloom Filters (FBFs) wl, can be generated as follows:

wconc.

This above process can be visualized in a simple 2-class toy classification problem in the following figure:

FBFC1-v2

Non-binary FBFC learning

The above binary FBFs are not robust to labeling noise, we can use a non-binary FBF for each class defined as:

nbwconc,

where cin is the FBF decay rate that controls how much impact one example has, with c1 corresponding to the binary FBF.

FBFC inference

For a test point xr, the predicted label yL is done as follows:

ymin.

The inference can be visualized in the above toy classification problem as follows:

FBFC2-v2

Experiments

The experiments for the paper are detailed in expts.md.

Citation

Please use the following citation for the paper:

Sinha, Kaushik, and Parikshit Ram. "Fruit-fly Inspired Neighborhood Encoding for Classification." Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery & Data Mining. 2021.

or

@inproceedings{sinha2021fruit,
  title={Fruit-fly Inspired Neighborhood Encoding for Classification},
  author={Sinha, Kaushik and Ram, Parikshit},
  booktitle={Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery \& Data Mining},
  pages={1470--1480},
  year={2021}
}

About

Code for the Fly Bloom Filter Classifier

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published