Collaborative Learning via Bilevel Optimization