Learning compositional functions via multiplicative weight updates