通过失败教学:基于反例的课程学习以提升Transformer自改进能力
Teaching by Failure: Counter-Example-Driven Curricula for Transformer Self-Improvement
AI总结:
本文提出基于反例的课程学习方法CEDC,通过迭代聚焦模型自身失败来提升Transformer模型在复杂输入下的鲁棒性和外推能力。
摘要:
Transformer模型常常表现出脆弱的外推能力,在遇到比训练时更长或结构更复杂的输入时会失败。我们引入了基于反例的课程学习(CEDC),这是一种自动框架,通过迭代聚焦于模型自身的失败来提高模型的鲁棒性。在每一步中,CEDC使用当前模型生成一组多样化的候选问题,利用一个快速可执行的验证器来识别错误预测(反例),然后在包含这些发现失败的增强数据集上对模型进行微调。我们在一系列算法和自然语言任务上评估了CEDC,包括整数加法、排序、Dyck-2语言识别以及三个文本分类基准测试。与静态训练和标准课程学习基线相比,CEDC在长度外推方面达到最高30倍的提升,计算效率比均匀数据增强高3.75倍,且无需手动难度启发式。我们对反例进行了详细分析,展示了课程如何自然适应目标更复杂的错误模式。我们的发现确立了由验证器引导、基于失败的学习作为一种简单、强大且高效的范式,用于增强Transformer模型的泛化能力。
英文摘要:
Transformer models often exhibit brittle extrapolation, failing on inputs that are longer or structurally more complex than those seen during training. We introduce Counter-Example-Driven Curricula (CEDC), an automated framework that improves model robustness by iteratively focusing on its own failures. At each step, CEDC uses the current model to generate a diverse set of candidate problems, employs a fast, executable verifier to identify incorrect predictions (counter-examples), and then fine-tunes the model on a dataset enriched with these discovered failures. We evaluate CEDC on a suite of algorithmic and natural language tasks, including integer addition, sorting, Dyck-2 language recognition, and three text classification benchmarks. Compared to static training and standard curriculum learning baselines, CEDC achieves up to 30x greater length extrapolation, is 3.75x more computationally efficient than uniform data augmentation, and requires no manual difficulty heuristics. We provide a detailed analysis of the counter-examples, showing how the curriculum naturally adapts to target progressively more complex error modes. Our findings establish verifier-guided, failure-driven learning as a simple, powerful, and efficient paradigm for enhancing the generalization capabilities of Transformer models.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。