Page 210 - 《软件学报》2025年第4期
P. 210

1616                                                       软件学报  2025  年第  36  卷第  4  期


                 vs. 8.5%). 实验结果同时印证了第     2.2.1  节的描述: 由于生成   COT  解释的过程中缺乏真实标签的引导, 因此获得的
                 COT  解释并不完全准确, 而可控性解释则不存在这一问题, 更有利于提升模型的理解和推理能力. 3) 带有真实标
                 签引导的   COT  方法生成解释所构造的混合数据集            (D C-COT 与 1  D C-COT2 ) 同样能够提升模型的性能, 有利于缓解捷
                 径学习. 并且, 相比于传统      COT  方法构造的    D COT , D C-COT 与 1  D C-COT 更有利于缓解模型的捷径学习  (Dec. 8.5% vs.
                                                                     2
                 7.5%), 进一步表明了真实标签的引导对于生成高质量的解释数据具有很大作用. 然而, 使用我们提出的                             D mi 数据
                                                                                                    x
                 集微调后的模型在分布外测试场景中的性能仍然优于使用                      D C-COT 与 1  D C-COT 微调后的模型  (Avg. 79.4% vs.
                                                                               2
                 78.5%), 并且与分布内准确率的差值更低          (Dec. 6.3% vs. 7.5%). 这表明基于可控性解释构造的数据集        D mi 更有利
                                                                                                  x
                 于缓解模型的捷径学习. 可能是因为           COT  方法更加注重逐步推理, 更适用于需要明确推理步骤的任务, 如数学推
                 理问题. 而对于此类自然语言理解任务来说, 通过               COT  逐步推理所获得的解释性数据可能较为复杂冗长. 总体而
                 言, 由本文提出框架所获得可控性解释数据对于缓解模型捷径学习与提升模型鲁棒性的效果优于使用传统                                     COT
                 方法或者带有真实标签引导的           COT  方法所获得的解释数据, 进一步证明了我们构造的数据集                 D mi 的有效性.
                                                                                            x


                 表 6 解释性数据的获取方案对自然语言推理任务下                        表 7 解释性数据的获取方案的提示模版示例

                           LLaMA  模型的影响结果 (%)                  Dataset           Prompt template
                     BERT pretraining approach. arXiv:1907.11692, 2019.

                             ID           OOD                  D COT          Let’s think step by step.
                   w/ Data             MNLI-  MNLI-    Dec.     D mix       Why the answer is <gold-label>?
                           MNLI-m HANS             Avg.
                                       Hard-m Hard-mm          D C-COT1  The answer is <gold-label>. Let’s think step by step.
                            84.8  69.2  81.5  80.5  77.1 7.7
                   w/ D pro                                          Why the answer is <gold-label> ? Let’s think step by
                                                               D C-COT2
                            85.8  69.6  81.0  81.2  77.3 8.5                         step.
                   w/ D COT
                 w/ D mix  (ours)  85.8  74.8  81.3  82.2  79.4 6.3
                  w/ D C-COT1  86.1  72.1  81.5  82.0  78.5 7.6
                            85.8  70.9  81.3  81.3  77.8 7.5
                  w/ D C-COT2
                 4   总 结
                    本文首次探究了多种生成式预训练大语言模型在自然语言理解任务中的捷径学习现象. 研究显示: 捷径学习
                 现象仍然存在于最近流行的生成式预训练大模型之中, 并且损害了模型在分布外测试场景中的鲁棒性. 基于这一
                 发现, 本文进一步探索了适用于生成式预训练模型捷径学习问题的缓解方案: 基于可控性解释的混合数据增强框
                 架. 该框架从数据的角度出发, 首先抽取部分样本赋予提示, 其次通过提示工程并利用                          ChatGPT  自动生成可控性
                 解释; 最后设计混合策略将可控性解释数据与部分提示性数据相结合, 构造混合数据集用于微调模型. 最终有效缓
                 解了生成式大模型的捷径学习问题, 显著提升了模型在分布外测试场景中的鲁棒性与泛化性, 同时并未牺牲甚至
                 略有提升模型在分布内场景中的表现. 本文提出的解决方案不仅适用于各种类型的任务, 并且能够用于缓解多种
                 已知甚至未知类型的捷径, 具有广泛的适用性与较高的实践价值.

                 References:
                  [1]  Devlin J, Chang MW, Lee K, Toutanova K. BERT: Pre-training of deep bidirectional Transformers for language understanding. In: Proc.
                     of the 2019 Conf. of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Vol. 1:
                     Long and Short Papers). Minneapolis: ACL, 2019. 4171–4186. [doi: 10.18653/v1/N19-1423]
                  [2]  Liu YH, Ott M, Goyal N, Du JF, Joshi M, Chen DQ, Levy O, Lewis M, Zettlemoyer L, Stoyanov V. RoBERTa: A robustly optimized

                  [3]  Williams A, Nangia N, Bowman S. A broad-coverage challenge corpus for sentence understanding through inference. In: Proc. of the
                     2018 Conf. of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Vol. 1:
                     Long Papers). New Orleans: Association for Computational Linguistics, 2018. 1112–1122. [doi: 10.18653/v1/N18-1101]
                  [4]  Utama PA, Moosavi NS, Gurevych I. Mind the trade-off: Debiasing NLU models without degrading the in-distribution performance. In:
                     Proc. of the 58th Annual Meeting of the Association for Computational Linguistics. Association for Computational Linguistics, 2020.
                     8717–8729. [doi: 10.18653/v1/2020.acl-main.770]
                  [5]  Utama PA, Moosavi NS, Gurevych I. Towards Debiasing NLU models from unknown biases. In: Proc. of the 2020 Conf. on Empirical
   205   206   207   208   209   210   211   212   213   214   215