Expand-and-sparsify (EaS) representations map a d-dimensional input to a much wider, m-dimensional space with a linear map and keep only its k largest coordinates. The theory behind them draws the map at random and needs m to grow exponentially with d. We ask what happens at practical widths when the map is instead learned by gradient descent: how much does learning add, and what does the sparsity cost compared with a dense layer of the same width? On 121 OpenML tasks, eight expansion factors and fully paired comparisons, we find that (i) learning the map matters most when the layer is narrow, adding a median 3.4 accuracy points at m = d and less than half a point at m = 256d; (ii) from m = 2d on, a learned EaS layer that keeps at most 10% of its units is within 0.7 accuracy points of a dense ReLU layer of the same width (equivalence tests; 0.83 after correcting for testing eight widths); (iii) binarizing the EaS code costs less than half a point, so binary EaS codes beat binary dense ones at the largest widths; and (iv) the sparsity a layer can afford within one point of ReLU grows with its width, from 90% up to m = 16d to 97% from m = 64d. The comparison carries over to deep models trained from scratch: in an MLP-Mixer on CIFAR-10 and a Transformer language model on WikiText-103, top-k with 10% of units active matches ReLU over five seeds, while 3% costs up to 3.5 points or 5% perplexity, less the wider the layer. In short, once an expanded layer is learned and at least twice as wide as its input, keeping only a tenth of its units costs less than one accuracy point.
翻译:暂无翻译