Introduction
Weightless Neural Networks (WNNs), specifically the WiSARD (Wilkie, Stoneham, and Aleksander’s Recognition Device) model, offer a high-speed alternative to traditional deep learning by utilizing Random Access Memory (RAM) nodes as neurons. By treating input bit-patterns as memory addresses, WNNs avoid heavy matrix multiplications, making them ideal for hardware implementation. However, standard WiSARD implementations suffer from "memory explosion," requiring massive amounts of RAM to store all possible bit-pattern combinations. This limitation hinders deployment on memory-constrained edge devices. This paper introduces Bloom WiSARD, which replaces traditional RAM nodes with probabilistic Bloom filters to achieve significant memory compression.
Proposed Method: Bloom WiSARD
The core innovation involves replacing the standard RAM-based discriminators in the WiSARD architecture with Bloom filters—space-efficient probabilistic data structures.
In a standard WiSARD, each class has a discriminator containing several RAM nodes. An input is partitioned into tuples (bit-strings), each pointing to a specific address in a RAM node where a '1' is written during training. In Bloom WiSARD, each node uses a Bloom filter instead of a full RAM table.
During training, a tuple is passed through $k$ independent hash functions (implemented via double hashing with MurmurHash), and the corresponding $k$ positions in a small bit-array are set to '1'. During inference, the system hashes the input tuple; if all $k$ corresponding bits are '1', the filter returns a match. This approach allows for tunable trade-offs between memory footprint ($m$) and the number of hashes ($k$).
Experimental Setup
The model was evaluated across a diverse set of benchmarks, including the MNIST handwritten digit database and various UCI Repository datasets (e.g., Adult, Letter, Satimage, and Wine). Continuous and categorical attributes were converted to binary format using thermometer and one-hot encoding to suit the WNN architecture.
Key Results and Discussion
Bloom WiSARD demonstrated a massive reduction in memory consumption while maintaining competitive accuracy. On the 'Letter' and 'Adult' datasets, the memory footprint was reduced by up to six orders of magnitude compared to standard WiSARD. For instance, on the Letter dataset, memory usage dropped from over 10 GB to approximately 91 KB.
On the MNIST dataset, Bloom WiSARD achieved 91.5% accuracy, nearly identical to the standard model (91.7%). Furthermore, Bloom WiSARD consistently outperformed "Dict WiSARD" (a hash-table-based variant) in memory efficiency. For the 'Banana' dataset, it required approximately 7.7 times less memory than the dictionary approach.
An unexpected insight was the role of "false positives" inherent in Bloom filters. Rather than being a drawback, these false positives act as a form of regularization, similar to dropout in deep neural networks, helping the model generalize better to unseen data. Additionally, because Bloom filters are optimized for representing sparse sets, they are a natural fit for the sparse RAM nodes typically found in WNNs.
Conclusion and Future Work
Bloom WiSARD successfully addresses the memory bottleneck of weightless neural networks, enabling their use in embedded systems without sacrificing predictive power. Future research will explore the use of Counting Bloom Filters to incorporate frequency information and investigate automated methods for tuning filter capacities to optimize the accuracy-memory trade-off.
Summary updated