AUTOFT is a data-driven approach that significantly improves generalization to out-of-distribution inputs, surpassing existing methods.