I was reading the previous Q&As about sparse coding and sparse autoencoder differences but I am still confused what is the point in using sparse coding. It is said that sparse autoencoder give us a way to model the sparse codes (and thus generate them for every new input), while sparse coding is a way to calculate the codes directly for a given image, and we should repeat the whole optimization process for any new image. In my mind having a model is way better than doing a task for every new input. Why on the earth somebody want to do sparse coding instead?
You might want to read this recent paper, https://arxiv.org/abs/1708.03735v2 on precisely this topic of sparse coding and autoencoders. In this paper the authors show that indeed one can set up an autoencoder such that the ground truth dictionary is a critical point of that autoencoder's squared loss function.