How to Learn from Relationships