Learning sparse codes from compressed representations with biologically plausible local wiring constraints