Efficient invariant feature subspace recovery for domain generalization