The First Principles of Deep Learning and Compression