Multi-instance embedding learning with deconfounded instance-level prediction