Position Matters! Empirical Study of Order Effect in Knowledge-grounded Dialogue (2023)

Abstract: With the power of large pretrained language models, various research works have integrated knowledge into dialogue systems. The traditional techniques treat knowledge as part of the input sequence for the dialogue system, prepending a set of knowledge statements in front of dialogue history. However, such a mechanism forces knowledge sets to be concatenated in an ordered manner, making models implicitly pay imbalanced attention to the sets during training. In this paper, we first investigate how the order of the knowledge set can influence autoregressive dialogue systems’ responses. We conduct experiments on two commonly used dialogue datasets with two types of transformer-based models and find that models view the input knowledge unequally. To this end, we propose a simple and novel technique to alleviate the order effect by modifying the position embeddings of knowledge input in these models. With the proposed position embedding method, the experimental results show that each knowledge statement is uniformly considered to generate responses.

## introduction transformer-based @xcite pretrained language models are widely used to build dialogue systems @xcite @xcite @xcite @xcite @xcite . in addition to general-purpose dialogue systems, many specialized dialogue systems have been proposed. representative examples include personalized dialogue systems @xcite @xcite @xcite , knowledge-grounded dialogue systems @xcite @xcite @xcite , and prompting dialogue systems @xcite . previous works focus on how perturbations in dialog history affect models' responses @xcite @xcite @xcite @xcite . they conduct many experiments and measure the effect of perturbations from the aspect of response quality and information theory to show that these language models are robust and not sensitive to the perturbations in input history. however, dialog history and knowledge are inherently different aspects of a conversation. dialog history has a temporal property, i.e., the topic and specificity of conversation change as the dialog progresses, whereas knowledge facts are information referenced to generate a response. although the perturbation in history does not influence the figure 2 : input format for gpt-series models. the position ids do not treat knowledge equally but as a sequence. the updated position embeddings show our proposed method, where each knowledge statement is encoded with its own position embeddings, hence, models can treat each input sentence equally during training. the same color of blocks indicates using the same layer to generate embeddings. ## knowledge-grounded dialogue methods in this work, we study the order effect in trans-fertransfo @xcite , which is a stateof-the-art knowledge-grounded method. we train transfertransfo on two datasets and measure the sentence-level order effect on the test datasets. ## alleviate the order effect in this section, we analyse the reason for the order effect in the gpt-series models and propose a method to alleviate the phenomenon. figure 2 shows the input format of the classic gpt-series. there are three types of embeddings in the model: word embedding to capture the semantic meaning of each word, token embedding to represent the speaker and absolute position embedding that encodes position information of input sequence. figure 2 shows that the position ids for each knowledge start from zero with different positional embedding layers. in this naive setting, knowledge of the set are treated equally and not input with the order during training.