RATT: Leveraging Unlabeled Data to Guarantee Generalization