Abstract
Finding similar items in massive datasets is a foundational challenge in computer science. While traditional Locality Sensitive Hashing (LSH) relies on dimensionality reduction, biological systems like the fruit fly olfactory circuit use expansive, sparse representations. This paper introduces BioHash, an unsupervised, data-driven hashing algorithm inspired by these neural motifs. By employing local Hebbian learning instead of backpropagation, BioHash generates high-dimensional sparse codes that outperform traditional LSH and deep learning methods in both accuracy and computational efficiency.
Introduction: Beyond Dimensionality Reduction
The "curse of dimensionality" typically forces similarity search algorithms to project data into lower-dimensional spaces to save memory. However, the fruit fly's olfactory system employs a counter-intuitive strategy: it projects scent data into a higher-dimensional space ($m \gg d$) and then sparsifies the representation so only a few neurons fire.
While previous models like FlyHash demonstrated the power of this "expansion + sparsification" motif, they relied on random projections. BioHash improves upon this by making the process data-driven through local learning rules, bridging the gap between fast random methods and slow, supervised deep learning.
Methodology: Expansion, Learning, and Sparsification
BioHash and its image-centric variant, BioConvHash, operate through three primary stages:
- Expansion: Input data of dimension $d$ is projected into a significantly larger hidden layer of dimension $m$.
- Local Hebbian Learning: Unlike standard neural networks that use global backpropagation, BioHash updates synaptic weights using a local Hebbian plasticity rule. Weights are adjusted based only on the activity of connected neurons, allowing the model to learn data distributions without expensive gradient calculations.
- Sparsification ($k$-WTA): The final hash is generated using a "$k$-Winner-Take-All" approach, where only the top $k$ most active neurons are set to 1, and the rest to -1.
For image data, BioConvHash incorporates "divisive normalization" and "cross-channel inhibition"—biological mechanisms that help the model remain invariant to lighting changes and shadows.
Key Insights: The "Particle" Intuition
A core conceptual breakthrough in BioHash is the interpretation of hidden units as "particles" in the data space. These units are attracted to regions of high data density but maintain a repulsive force to ensure efficient coverage of the entire space.
This local learning mechanism ensures that the hash codes are not just random, but are optimized to represent the underlying structure of the dataset. Because the learning rule is local, BioHash is inherently more scalable than methods requiring global optimization.
Results and Performance
BioHash was evaluated against benchmarks including MNIST, CIFAR-10, and GloVe word embeddings. Key findings include:
- Accuracy: On MNIST, BioHash achieved a Mean Average Precision (mAP) of 44.38% at a short hash length ($k=2$), vastly outperforming standard LSH (12.45%).
- Efficiency: Training on CIFAR-10 took between 4 and 35 seconds on a single GPU, whereas competing deep hashing methods like GreedyHash required over an hour to achieve comparable results.
- Robustness: BioConvHash demonstrated significant resistance to lighting variations, maintaining performance even when query images were dimmed by 70%.
Conclusion
BioHash demonstrates that neurobiological motifs—specifically expansive sparse representations and local learning—can provide powerful solutions for modern computational challenges. By mimicking the fruit fly's olfactory circuit, BioHash offers a fast, accurate, and scalable alternative for unsupervised similarity search. Future work will explore adapting the algorithm for Maximum Inner Product Search (MIPS) and integrating multi-probe retrieval methods.
Summary updated