Modeling Winner-Take-All Competition in Sparse Binary Projections
Wenye Li

TL;DR
This paper introduces a supervised and unsupervised model for sparse binary projections that enhances similarity search accuracy and speed, inspired by biological neural mechanisms, with practical applications demonstrated through empirical evaluations.
Contribution
The paper presents a novel supervised-WTA model and extends it to an unsupervised setting, offering an efficient algorithm for sparse binary projections in similarity search.
Findings
Significantly improved search accuracy over state-of-the-art methods
Faster running speed in similarity search tasks
Effective in both supervised and unsupervised scenarios
Abstract
Inspired by the advances in biological science, the study of sparse binary projection models has attracted considerable recent research attention. The models project dense input samples into a higher-dimensional space and output sparse binary data representations after the Winner-Take-All competition, subject to the constraint that the projection matrix is also sparse and binary. Following the work along this line, we developed a supervised-WTA model when training samples with both input and output representations are available, from which the optimal projection matrix can be obtained with a simple, effective yet efficient algorithm. We further extended the model and the algorithm to an unsupervised setting where only the input representation of the samples is available. In a series of empirical evaluation on similarity search tasks, the proposed models reported significantly improved…
| Datasets | SUP | UNSUP | LSH | FJL | FLY | LIFTING | ITQ | SPH | ISOH | |
|---|---|---|---|---|---|---|---|---|---|---|
| 2 | ||||||||||
| ARTFC | 4 | |||||||||
| 8 | ||||||||||
| 16 | ||||||||||
| 32 | ||||||||||
| 2 | ||||||||||
| GLOVE | 4 | |||||||||
| 8 | ||||||||||
| 16 | ||||||||||
| 32 | ||||||||||
| 2 | ||||||||||
| MNIST | 4 | |||||||||
| 8 | ||||||||||
| 16 | ||||||||||
| 32 | ||||||||||
| 2 | ||||||||||
| SIFT | 4 | |||||||||
| 8 | ||||||||||
| 16 | ||||||||||
| 32 | ||||||||||
| 2 | N.A. | N.A. | ||||||||
| ImageNet | 4 | N.A. | N.A. | |||||||
| 8 | N.A. | N.A. | ||||||||
| 16 | N.A. | N.A. | ||||||||
| 32 | N.A. | N.A. |
| Dimension | SUP | UNSUP | LSH | FJL | FLY | LIFTING | ITQ | SPH | ISOH | |
|---|---|---|---|---|---|---|---|---|---|---|
| 2 | ||||||||||
| 4 | ||||||||||
| 8 | ||||||||||
| 16 | ||||||||||
| 32 | ||||||||||
| 2 | ||||||||||
| 4 | ||||||||||
| 8 | ||||||||||
| 16 | ||||||||||
| 32 | ||||||||||
| 2 | ||||||||||
| 4 | ||||||||||
| 8 | ||||||||||
| 16 | ||||||||||
| 32 | ||||||||||
| 2 | ||||||||||
| 4 | ||||||||||
| 8 | ||||||||||
| 16 | ||||||||||
| 32 |
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdvanced Image and Video Retrieval Techniques · Face and Expression Recognition · Machine Learning in Bioinformatics
Modeling Winner-Take-All Competition in Sparse Binary Projections
Wenye Li
School of Science and Engineering
The Chinese University of Hong Kong, Shenzhen
Shenzhen, China
Abstract
Inspired by the advances in biological science, the study of sparse binary projection models has attracted considerable recent research attention. The models project dense input samples into a higher-dimensional space and output sparse binary data representations after the Winner-Take-All competition, subject to the constraint that the projection matrix is also sparse and binary. Following the work along this line, we developed a supervised-WTA model when training samples with both input and output representations are available, from which the optimal projection matrix can be obtained with a simple, effective yet efficient algorithm. We further extended the model and the algorithm to an unsupervised setting where only the input representation of the samples is available. In a series of empirical evaluation on similarity search tasks, the proposed models reported significantly improved results over the state-of-the-art methods in both search accuracies and running speed. The successful results give us strong confidence that the work provides a highly practical tool to real world applications.
K****eywords Sparse Binary Projection Winner-Take-All Competition Unsupervised Learning
1 Introduction
Random projection has emerged as a powerful tool in data analysis applications [1]. It is often used to reduce the dimension of data samples in the Euclidean space. It provides a simple and computationally efficient way to reduce the storage complexity of the data by trading a controlled amount of representation error for faster processing speed and smaller model sizes [2].
Very recently, with strong biological evidence, a sparse binary projection model called the FLY algorithm was designed and attracted people’s much attention. Instead of performing dimension reduction, the algorithm increases the dimension of the input samples with a random sparse binary projection matrix. After the winner-take-all (WTA) competition that happens in the output space, the samples are converted into a set of sparse binary vectors. In similarity search tasks, it was reported that such sparse binary vectors outperformed the hashed vectors produced by the classical locality sensitive hashing (LSH) method that is based on the random dense projection [3].
Following the work along this line, we proposed two models with the explicit treatment of the WTA competition. Instead of residing on the random generation of the projection matrix, one of our models seeks the optimal projection matrix under a supervised setting, while the other model operates purely in an unsupervised manner. For each model, we derived an algorithm that is surprisingly simple. In empirical evaluations, both algorithms reported significantly improved results in similarity search accuracies and running speed over the state-of-the-art approaches, and hence provided a practical tool in data analysis applications with high potential.
A note on notation. Unless specified otherwise, a capital letter, such as , denotes a matrix. A lower-cased letter, with or without a subscript, denotes a vector or a scalar. For example denotes the -th row, denotes the -th column, and denotes the -th entry of the matrix .
The paper is organized as follows. Section 2 introduces the necessary background. Section 3 presents our models and the algorithms. Section 4 reports the experiments and the results, followed by the conclusion in Section 5.
2 Background
2.1 Sparse Binary Projection Algorithms
Different from classical projection methods that commonly map data from a higher-dimensional space to a lower-dimensional space, the FLY algorithm increases the dimension of the data. It was designed by simulating the fruit fly’s olfactory circuit, whose function is to associate similar odors with similar tags. Each odor is initially represented as a -dimensional feature vector of firing rates. To associate each odor with a tag involves three steps. Firstly, a divisive normalization step [4] centers the mean of the feature vector. Secondly, the dimension of the feature vector is expanded from to with a sparse binary connection matrix [5, 6], which has the same number of ones in each row. Thirdly, the WTA competition is involved as a result of strong inhibitory feedback coming from an inhibitory neuron. After the competition, all but the highest-firing out of the features are silenced [7]. These remaining features just correspond to the tag assigned to the input odor.
The FLY algorithm can be studied as a special form of the LSH method which produces similar hashes for similar input samples. But different from the classical LSH method which reduces the data dimension, the FLY algorithm increases the dimension with a random sparse binary matrix, while ensuring the sparsity and binarization of the data in the output space. Empirically, the FLY algorithm reported improved results over the LSH method [3] in similarity search applications.
The success of the FLY algorithm inspired considerable research attention, among which one of particular interest to us is the LIFTING algorithm [8] that removes the randomness assumption of the projection matrix, which is partially supported by most recent biological discoveries [6]. In the work, the projection matrix is obtained through supervised learning. Suppose training samples with both dense input representation and sparse output representation are available. The LIFTING algorithm seeks the projection matrix that minimizes in the feasible region of sparse binary matrices. To solve the optimization problem, the Frank-Wolfe algorithm was found to have quite good performance [9, 10].
2.2 Winner-Take-All Competition
Evidences in neuroscience showed that excitation and inhibition are common activities in neurons [7, 11]. Based on the lateral information, some neurons raise to the excitatory state, while the others get inhibited and remain silent. Such excitation and inhibition result in competitions among neurons. Modeling neuron competitions is of key importance, with which useful applications are found in a variety of tasks [12, 13]. Specifically in machine learning, the competition mechanism has motivated the design of computer algorithms for a long time, from the early self-organizing map [14] to more recent work in developing novel neural network architectures [15, 16].
To model the competition stage, the WTA model is routinely adopted. We are interested with the following form of the WTA model. For a -dimensional input vector and a given hash length , a function outputs a vector satisfying, for each ,
[TABLE]
Thus the output entries with value just mark the positions of top- values of . For simplicity and without causing ambiguity, we do not differentiate whether the input/output vector of the function is a row vector or a column vector.
3 Model
3.1 Supervised Training
We start from a supervised setting. Let a set of samples be given in the form of and with each being an input sample and being its output representation satisfying for a given integer . We assume that, for a fixed integer 111As in [3], is set to in this paper., there exists a projection matrix with () and .
The WTA function defined in Eq. (1) satisfies:
[TABLE]
for all and .
Now we are interested in inferring such a projection matrix from the given data. But unfortunately, seeking the matrix directly from Eq. (2) is generally hard. A matrix that satisfies all the constraints may not exist due to the noise in the observed samples. Even if it exists, the computational requirement can be non-trivial. A straightforward modeling of the problem as a linear integer program would involve variables and constraints, which is infeasible to solve even for moderately small and .
To ensure the tractability, we resort to a relaxation approach. For any feasible , and , we define a measure to quantify the compliance with the condition in Eq. (2). When and , the measure is non-negative if the condition is met; otherwise, it is negative. Naturally, we sum up the values of the measure over all , and , and define
[TABLE]
The value of measures how well a matrix meets the conditions in Eq. (2). Maximizing with respect to in the feasible region of sparse binary matrices provides a principled solution to seeking the projection matrix. And we call it the supervised-WTA model.
Considering that
[TABLE]
Therefore, maximizing is equivalent to maximization sub-problems. Each sub-problem seeks a row vector by
[TABLE]
subject to:
[TABLE]
Denote
[TABLE]
and the optimal solution of to Eq. (4) is given by
[TABLE]
3.2 Unsupervised Training
The supervised-WTA model utilizes both input and output representations to learn a projection matrix. When only the input representation is available, we can extend the work to an unsupervised-WTA model, by maximizing the objective:
[TABLE]
subject to the constraints: , , , and for all and .
Different from the supervised model, the unsupervised model treats the unknown output representation as a variable, and jointly optimizes on both and . To maximize , an alternating algorithm can be used. Start with a random initialization of as , and solve the model iteratively. In -th () iteration, maximize with respect to and get the optimal . Then maximize with respect to and get the optimal .
The optimal is given by:
[TABLE]
for all . Similarly to the supervised model, the optimal is given by:
[TABLE]
for all , where .
Denote by . Obviously, the sequence monotonically increases for . Therefore the alternating optimization process is guaranteed to converge when the objective value can’t be increased any more.
It is worth mentioning that the unsupervised-WTA model can be studied as a generic clustering method [17]. The model puts data samples into clusters and each sample belongs to clusters. A special case of leads to a hard clustering method. Two samples with the element of one in the same output dimension indicates that they have the same cluster membership.
The unsupervised-WTA model can also be treated as a feature selection method [18]. This can be seen from the fact that each output dimension is associated with a subset of features, instead of all features in the input space. The model is able to choose these features automatically and encode the information in the projection matrix . A detailed discussion of the clustering and the feature selection viewpoints goes beyond the scope of this paper and is hence omitted.
3.3 Complexity Issues
Computing the optimal solution to the supervised-WTA model is straightforward and can be implemented with high efficiency. To obtain each projection vector , a naïve implementation needs operations, among which are for the summation operation in Eq. (6) and are for the sorting operations in Eq. (7) by the Heapsort algorithm [19]. Therefore, computing the whole projection matrix needs operations. In fact, by utilizing the sparse structure of the output matrix , the computational complexity for can be further reduced to . As seen in Section 4.3, this is a highly efficient result.
To solve the unsupervised-WTA model, in each iteration we need to compute both and . Computing one needs operations by utilizing the sparse structure of , where are for multiplying with and are for the sorting operations in Eq. (9). Computing one has the same complexity as in the supervised-WTA model, . Therefore, the total complexity per iteration is , which is also an efficient solution as seen in Section 4.3.
For both WTA models, the memory requirement is mainly from the matrices , and , and the storage complexity is , which can be further reduced to if sparse matrix representation is adopted.
The training algorithms are parallelizable. Each vector of and can be solved independently with high parallel efficiency. It is also notable that, after simple pre-processing of the training data, all computations only involve simple vector addition and scalar comparison operations.
4 Evaluation
4.1 General Settings
To evaluate the performance of the proposed models, we carried out a series of experiments under the following settings.
Application: Similarly to the work of [3], we applied the proposed models in similarity search tasks. Similarity search aims to find similar samples to a given query object among potential candidates, according to a certain distance or similarity measure [20]. The complexity of accurately determining similar samples relies heavily on both the number of candidates and their dimension. Computing the distances seems straightforward, but unfortunately could often become prohibitive if the number of candidates is too large or the dimension of the data is too high.
To handle the difficulty brought by the high dimension of the input data, we can either reduce the data dimension while approximately preserving their pairwise distances, or increase the dimension but confining the data in the output space to be sparse and binary, in the hope of significantly improved search speed with the new representation.
Objective: Our major objective is to evaluate and compare the similarity search accuracies for different algorithms. Each sample in a given dataset was used, in turn, as the query object, and the other samples in the same dataset were used as the search candidates. For each query object, we compared its nearest neighbors in the output space with its nearest neighbors in the input space, and recorded the ratio of common neighbors in both spaces. The ratio is averaged over all query objects as the search accuracy of each algorithm. Obviously, a higher similarity search accuracy indicates a better preserving of locality structures from the input space to the output space by the algorithm.
Datasets: In the evaluation, four real datasets and five artificially generated datasets were used. The real datasets have the input representation only; while the artificial datasets have both the input representation and the output representation . Specifically these datasets are:
- •
GLOVE [21]: - to -dimensional GloVe word vectors trained on a subset of 330 million tokens from wikimedia database dumps222https://dumps.wikimedia.org/ with the most frequent words.
- •
ImageNet [22]: a large collection of images represented as -dimensional visual words quantized from SIFT features.
- •
MNIST [23]: -dimensional images of handwritten digits in gray-scale.
- •
SIFT [24]: -dimensional SIFT descriptors of images used for similarity search.
- •
ARTFC: five sets of -dimensional dense vectors () and -dimensional sparse binary vectors (). For each hash length of , a set of -dimensional sparse binary vectors were randomly generated with the hash length. Then the vectors were projected to -dimensional dense vectors through principal component analysis. In this way, the samples’ pairwise distances are roughly preserved between the input space and the output space; i.e., for all pairs of samples in the same set.
Algorithms to compare: We compared the proposed supervised-WTA (denoted by SUP) model and the unsupervised-WTA (UNSUP) model with the LSH algorithm [25, 26], the fast Jonson-Lindenstrauss projection (FJL) algorithm [27], the FLY algorithm [3] and the LIFTING algorithm [8]. The LSH algorithm maps -dimensional inputs to -dimensional dense vectors with a random dense projection matrix. The FJL algorithm is a fast implementation of the LSH algorithm with a sparse projection matrix. The FLY algorithm uses a random sparse binary matrix to map -dimensional inputs to -dimensional vectors. The LIFTING algorithm trains a sparse binary projection matrix in a supervised manner for the -dimensional to -dimensional projection. Both the FLY and the LIFTING algorithms involve a WTA competition stage in the output space to generate sparse binary vectors for each hash length.
Besides, we conducted the comparison with a number of other hashing algorithms, including iterative quantization (ITQ) [28], spherical hashing (SPH) [29] and isotrophic hashing (ISOH) [30]. These algorithms were popularly used in literature to produce sparse binary data embeddings.
Computing environment: All the algorithms were implemented in MATLAB platform running on an 8-way computing server, with which a maximum of threads were enabled for each algorithm. For the LIFTING algorithm, IBM CPLEX was used as the linear program solver that was needed by the Frank-Wolfe algorithm.
4.2 Similarity Search Accuracy
We carried out the experiment on the artificial datasets and the real datasets. From each ARTFC dataset, we randomly chose training samples with both the input () and the output () representations, and chose another testing samples with the input representation only. For the two proposed WTA models, we trained a sparse binary projection matrix each based on the training data. Then we generated -dimensional sparse binary output vectors via the WTA competition after projecting the testing samples with the matrix. For the LIFTING algorithm, the same training and testing procedures were applied. For all other algorithms, we applied each of them on the testing samples to get either dense or sparse binary output vectors. Then the output vectors are used in similarity search and compared against the input vectors, as illustrated in Section 4.1.
We repeated the process for fifty runs and recorded the average accuracies. The results are given in Table 1. Each row shows the similarity search accuracies with a specific hash length 333As in [3, 8], the hash length is defined as the number of ones in each output vector for the FLY, LIFTING and WTA algorithms. For other algorithms, it is defined as the output dimension.. Consistent with the results reported in [3], the sparse binary projection algorithms reported improved results over the classical LSH method. Among the algorithms, it is evidently shown that, with the support of the supervised information, the LIFTING and the supervised-WTA algorithms reported further improved results over the FLY algorithm. Most prominently, with the hash length , the FLY algorithm has an accuracy of , while the supervised-WTA model’s accuracy reaches , almost ten times higher. When comparing the two supervised algorithms, the supervised-WTA model outperformed the LIFTING algorithm with all hash lengths.
Among the unsupervised learning algorithms, the proposed unsupervised-WTA model reported the best performances, significantly better than the results given by the LSH, FJL, FLY, ITQ, SPH and ISOH algorithms. Its accuracies are even better than the supervised-WTA model with the hash length .
On GLOVE/MNIST/SIFT datasets, only the input representation is available. We randomly chose samples for training and samples for testing. As suggested in [8], we computed for the training data via the Frank-Wolfe algorithm, and used as the output representation for training. Then we carried out the experiment under the same setting as on ARTFC datasets. Again the two WTA models reported evidently improved results.
When comparing the two WTA models on these datasets, the unsupervised-WTA model performed even better than the supervised-WTA model on most tests. In cases with known only, an approximation of has to be obtained through matrix factorization. The quality of this approximated becomes critical to the supervised-WTA model. We believe this is the major reason why the supervised model no longer excels.
Besides, we tested the algorithms’ performances on a much larger ImageNet dataset with one million images for training and images for testing. Computing the output representation becomes infeasible on such a large training set, and therefore the results of SUP and LIFTING were not available. Comparing the with the other available algorithms, once again the unsupervised-WTA algorithm reported significantly improved search accuracies.
In addition to the experiment on similarity search accuracies, we further investigated the influence of different input/output dimensions on the performance of the proposed models. We fixed the output dimension to while varying the input dimension from to on GloVe word vectors. We recorded the similarity search accuracies by all the algorithms. From the results in Table 2, we can see that the WTA models reported consistently improved results.
4.3 Running Speed
As a practical concern, we compared the training time of the proposed WTA models with the LIFTING algorithm. In the experiment, we used the ARTFC datasets with -dimensional inputs and -dimensional outputs, and the number of training samples varied from to .
We recorded the training time of each algorithm to compute the sparse binary projection matrix . On all training sets, the proposed models reported significantly faster speed than the LIFTING algorithm. With samples (ref. Fig. 1(a)), the supervised-WTA model took less than seconds to get the optimal solution, hundreds of times faster than the LIFTING algorithm which took around seconds.
The unsupervised-WTA model needs to solve multiple and iteratively. It took to seconds with samples, which was slower than the supervised-WTA model but several times faster than the LIFTING algorithm. With samples (ref. Fig. 1(d)), the supervised-WTA model took less than seconds, and the unsupervised-WTA model took about seconds to get the solutions. For the LIFTING algorithm, we didn’t finish the execution in our platform within hours. All these real results were consistent with the complexity analysis given in Section 3.3, and justified the running efficiency of the proposed WTA models.
We further carried out the experiment on the much larger ImageNet dataset and reported the results in Fig. 1(e). Due to the prohibitive computation to obtain the output representations, only the results of the UNSUP algorithm are available. From the results we can see, with a hash length , the algorithm took less than seconds to train a projection matrix with samples, and took around seconds to train with one million samples. We believe that these are reasonably efficient and promising results to practical application scenarios.
5 Conclusion
With strong evidence from biological science, the study of sparse binary projection models has attracted much research attention recently. By mapping lower-dimensional dense data to higher-dimensional sparse binary vectors, the models have reported excellent empirical results and proved to be useful in practical applications.
Sparse binary projections are tightly coupled with WTA competitions. The competition is an important stage for pattern recognition activities that happen in the brain. Accordingly, our work started from the explicit treatment of the competition, and proposed two models to seek the desired projection matrix. Specifically, one model utilizes both input and output representations of the samples, and trains the projection matrix as a supervised learning problem. The other model utilizes the input representation only and trains the matrix in an unsupervised manner, which equips the model with wider application scenarios. For each model, we developed a simple, effective and efficient algorithm. In the evaluation, the models significantly outperformed the state-of-the-art methods, in both search accuracies and running speed.
Our work potentially triggers a number of topics to study. Firstly, the algorithms for both models only involve simple vector addition and scalar comparison operations, which are highly parallelizable. Such characteristics make the computing procedures suitable to be implemented with customized hardware [31], which provides a high-throughput and economical solution for large-scale data analysis applications.
Secondly, the unsupervised-WTA model provides a unified framework that combines the clustering and the feature selection techniques. We firmly believe that new applications along this line are possible. Besides, this viewpoint may provide a potential bridge that helps to make clear why the WTA competition leads to algorithms that preserve the locality structures of the data well, as reported in this paper.
Thirdly, there is potential to design new artificial neural network architectures. The WTA competition and the relaxation techniques adopted in this paper can be used as an activation function of the neurons in an artificial neural network. We warmly anticipate future work along this direction [32, 16].
6 Acknowledgments
This work was supported by Shenzhen Fundamental Research Fund (JCYJ20170306141038939, KQJSCX20170728162302784).
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] E. Bingham and H. Mannila. Random projection in dimensionality reduction: applications to image and text data. In SIGKDD , pages 245–250. ACM, 2001.
- 2[2] W. Johnson and J. Lindenstrauss. Extensions of Lipschitz mappings into a Hilbert space. Contemporary Mathematics , 26(189-206):1, 1984.
- 3[3] S. Dasgupta, C. Stevens, and S. Navlakha. A neural algorithm for a fundamental computing problem. Science , 358(6364):793–796, 2017.
- 4[4] S. Olsen, V. Bhandawat, and R. Wilson. Divisive normalization in olfactory population codes. Neuron , 66(2):287–299, 2010.
- 5[5] S. Caron, V. Ruta, L. Abbott, and R. Axel. Random convergence of olfactory inputs in the drosophila mushroom body. Nature , 497(7447):113, 2013.
- 6[6] Z. Zheng, S. Lauritzen, E. Perlman, C. Robinson, et al. A complete electron microscopy volume of the brain of adult drosophila melanogaster. Cell , 174(3):730–743, 2018.
- 7[7] C. Stevens. What the fly’s nose tells the fly’s brain. Proceedings of the National Academy of Sciences , 112(30):9460–9465, 2015.
- 8[8] W. Li, J. Mao, Y. Zhang, and S. Cui. Fast similarity search via optimal sparse lifting. In NIPS , pages 176–184, 2018.
