Deep Learning Functional Groups