A theory of capacity and sparse neural encoding. (November 2021)