Bloom Filter Encoding for Machine Learning
John Cartmell, Mihaela Cardei, Ionut Cardei
TL;DR
<3-5 sentence high-level summary>This paper addresses the need for memory-efficient and privacy-preserving preprocessing for machine learning by introducing an encoded Bloom filter transform that maps each sample to an $m$-bit vector using $k$ hash functions with a secret key. The method preserves structure in expectation, enabling accurate classification across diverse data types while reducing memory usage and protecting original data. Empirical results on six datasets using four classifiers show competitive accuracy relative to raw data and traditional transforms like PCA/LDA, along with meaningful compression and privacy metrics (entropy $0.38$–$0.68$ and bit occupancy $0.13$–$0.60$). The work demonstrates a flexible preprocessing approach with tunable trade-offs between accuracy, compression, and privacy, and suggests extensions to regression and distributed settings.
Abstract
We present a method that uses the Bloom filter transform to preprocess data for machine learning. Each sample is encoded into a compact, privacy-preserving bit array. This reduces memory use and protects the original data while keeping enough structure for accurate classification. We test the method on six datasets: SMS Spam Collection, ECG200, Adult 50K, CDC Diabetes, MNIST, and Fashion MNIST. Four classifiers are used: Extreme Gradient Boosting, Deep Neural Networks, Convolutional Neural Networks, and Logistic Regression. Results show that models trained on Bloom filter encodings achieve accuracy similar to models trained on raw data or other transforms. At the same time, the method provides memory savings while enhancing privacy. These results suggest that the Bloom filter transform is an efficient preprocessing approach for diverse machine learning tasks.
