Source code of the paper accepted at CIARP 2024, the 27th IberoAmerican Congress on Pattern Recognition.
Spiking Neural Networks (SNNs), inspired by the real brain's behavior, offer an energy-efficient alternative to traditional artificial neural networks coupled with their neural joint activity, also referred to as population coding. This population coding is replicated in SNNs by attributing more than one neuron to each class in the output layer. This study leverages SNNs for fraud detection through real-world datasets, namely the Bank Account Fraud dataset suite, addressing the fairness and bias issues inherent in conventional machine learning algorithms. Different configurations of time steps and population sizes were compared within a 1D-Convolutional Spiking Neural Network, whose hyperparameters were optimized through a Bayesian optimization process. Our proposed SNN approach with neural joint activity enables the classification of fraudulent opening of bank accounts more accurately and fairly than standard SNNs. The results highlight the potential of SNNs to surpass non-population coding baselines by achieving an average of 47.08% of recall at a business constraint of 5% of false positive rate, offering a robust solution for fraud detection. Moreover, the proposed approach attains comparable results to gradient-boosting machine models while maintaining predictive equality towards sensitive attributes above 90%.
Keywords: Spiking Neural Networks
To install the required packages, run the following command:
pip install -r requirements.txt
Download the six Variant of the Bank Account Fraud (BAF) Dataset and extract the parquet files to the data folder.
The Bank Account Fraud (BAF) dataset is a synthetic dataset based on real-world data that simulates bank account opening applications. The dataset contains 6 parquet files, each representing a different variant of the dataset (Base, Variant I, Variant II, Variant III, Variant IV, and Variant V). It contains 30 features and a binary target variable indicating whether the application is fraudulent or not.
The repository is structured as follows:
data
: Contains the Bank Account Fraud dataset.images
: Contains the images used in this README file.src
: Contains the source code of the project.modules
: Contains the utilitary files used in the project.get_best_hyperparams.ipynb
: Jupyter notebook to find the best combinations of hyperparameters for the 1D-Convolutional Spiking Neural Network architectures.get_metrics.ipynb
: Jupyter notebook to find the metrics for each architecture.main_evaluation.py
: Main script to run the experimentation that repeats the classification multiple times for each dataset.main_optimization.py
: Main script to run the Bayesian optimization of the architectures with population coding.plot_pareto_front.ipynb
: Jupyter notebook to plot the Pareto front of the optimized architectures.plot_scatter.ipynb
: Jupyter notebook to plot the scatter plot of the evaluation experimentation.plot_tradeoff.ipynb
: Jupyter notebook to plot the tradeoff between the performance and fairness metrics.
To cite this work, use the following bibtex entry:
@inproceedings{perdigao_exploring_2025,
author="Perdig{\~a}o, Dylan
and Antunes, Francisco
and Silva, Catarina
and Ribeiro, Bernardete",
editor="Hern{\'a}ndez-Garc{\'i}a, Ruber
and Barrientos, Ricardo J.
and Velastin, Sergio A.",
title="Exploring Neural Joint Activity in Spiking Neural Networks for Fraud Detection",
booktitle="Progress in Pattern Recognition, Image Analysis, Computer Vision, and Applications",
year="2025",
publisher="Springer Nature Switzerland",
address="Cham",
pages="45--59",
isbn="978-3-031-76604-6",
doi={10.1007/978-3-031-76604-6_4},
}
This code is imported and adapted from the original research repository. Consequently, the code may contain bugs or issues. If you encounter any issues while running the code, please open an issue in the repository.