Stochastic sampling strategies such as top-k and top-p have been widely used in dialogue generation task. However, as an open-domain chatting system, there will be two different conversation scenarios, i.e. chit-chat and knowledge-based question answering. In the former situation, responses diversity is essential due to the one-to-many nature in dialogue. The latter, on the other hand, requires less randomness given that stochastic decoding strategy entails the risk of generating incorrect information. As a result, an adaptive and flexible decoding strategy is needed to cope with these two scenarios simultaneously. To this end, we propose the dynamic decoding strategy (DDS), which can adjust the decoding space w.r.t. different contexts. In DDS, both sequence-level and token-level adaptive search can be achieved to adjust the decoding process in a unified framework. Besides, our adaptive algorithm can not only be used during model inference, but it can also be applied during the model training stage to further enhance the performance. Comprehensive experiments indicate that the proposed decoding strategy can consistently improve the performance of pre-trained dialogue models when coupled with four well-used stochastic decoding algorithms.
翻译:随机采样策略(如top-k和top-p)已广泛应用于对话生成任务。然而,作为开放域聊天系统,对话场景可分为两类:闲聊与基于知识的问答。前者因对话中一对多的特性,响应多样性至关重要;后者则需降低随机性,因为随机解码策略存在生成错误信息的风险。因此,需要一种自适应且灵活的解码策略同时应对这两种场景。为此,我们提出动态解码策略(DDS),该策略能够根据不同的上下文调整解码空间。在DDS中,可实现序列级和词元级的自适应搜索,从而在统一框架内调节解码过程。此外,我们的自适应算法不仅可用于模型推理阶段,还可应用于模型训练阶段以进一步提升性能。综合实验表明,当与四种常用的随机解码算法结合使用时,所提出的解码策略能够持续提升预训练对话模型的性能。