Learning Representations that Enable Generalization in Assistive Tasks