A mechanistic model of early sensory processing based on subtracting sparse representations