Supervised structure learning