A brain doesn’t light up all at once — at any moment only a few cells fire, and meaning lives in which few. k-winners-take-all keeps the top few activations and silences the rest. Slide sparsity (or tap) from a dense blaze down to a single winner.
k-winners-take-all sparse coding over 24 units with fixed random activations. Sparsity sets k = max(1, round((1−slider)·N)); the rule keeps the k largest activations and zeros the rest — a hard, exact top-k. As k shrinks the representation gets sparser (fewer cells, more distributed capacity, less interference), down to a single winner at k=1. The readout shows the fraction of activation energy retained by the surviving k. A fail-loud self-check throws unless exactly k units survive and higher sparsity keeps fewer of them.
Fixed random activations stand in for a real feature response; true sparse coding learns an overcomplete dictionary and solves an L1-penalised inference. The top-k selection and the retained-energy fraction are computed exactly.