Learning pseudo-independent models