Elastic Representation: Mitigating Spurious Correlations for Group Robustness