How does BERT process disfluency? (2021)

Abstract: Natural conversations are filled with disfluencies. This study investigates if and how BERT understands disfluency with three experiments: (1) a behavioural study using a downstream task, (2) an analysis of sentence embeddings and (3) an analysis of the attention mechanism on disfluency. The behavioural study shows that without fine-tuning on disfluent data, BERT does not suffer significant performance loss when presented disfluent compared to fluent inputs (exp1). Analysis on sentence embeddings of disfluent and fluent sentence pairs reveals that the deeper the layer, the more similar their representation (exp2). This indicates that deep layers of BERT become relatively invariant to disfluency. We pinpoint attention as a potential mechanism that could explain this phenomenon (exp3). Overall, the study suggests that BERT has knowledge of disfluency structure. We emphasise the potential of using BERT to understand natural utterances without disfluency removal.

## introduction natural conversations are often disfluent. consider the following utterance: "how does, i mean, does bert understand disfluency?" upon hearing this question, you understand that the speaker first tried to ask a 'how' question with a presupposition that bert understands disfluency, but then corrected it to a yes-no question, thus removing this presupposition. disfluent utterances like these are prevalent in natural dialogues, but rare in written texts. recent transformer-based language models such as bert have amazed us in a sweep of nlp tasks requiring language understanding. since bert was pre-trained on written corpora, one might expect it to struggle with disfluent inputs like the one above. traditionally, considerable effort in nlp has been devoted to disfluency detection and removal, especially in the context of dialogue systems. but is disfluency removal necessary for transformer-based language models or can they understand disfluent sentences out of the box? we approach this question from the outside in with three experiments. experiment 1 stands outside the blackbox and explores how bert performs behaviourally in a downstream task when presented with fluent vs disfluent language. experiment 2 gets into the blackbox and investigates how embeddings of disfluent inputs change from the lowest to the highest layers. finally, experiment 3 attempts to explain bert's mechanism of disfluency processing by looking at attention on disfluent sentence parts. we discovered that the results of all three experiments are congruent in that semantic understanding is only weakly impaired by the presence of disfluencies. crucially, bert represents disfluent utterances similarly to their fluent counterparts in deeper layers. this ability could be explained by the self-attention mechanism which is central to transformed-based architectures. we hypothesise that bert balances a trade-off between semantic selectivity and disfluency invariance 1 , and that disfluency is processed similar to other syntactic features. ## discussion disfluencies are prevalent in natural conversations. this study investigates how transformer-based language models such as bert process disfluent utterances and asks whether these models have an "innate" understanding of disfluency. there are benefits of retaining instead of removing disfluencies when building dialogue systems because disfluency contributes to communicative meaning. a system that is better at understanding and responding to disfluent utterances will allow users to speak more naturally while also reducing the burden for engineers to introduce additional pipeline steps for data cleaning. we investigated if and how bert understands disfluency from the outside in; first by assessing the performance on a downstream task (experiment 1), then by computing sentence embedding similarities between disfluent-fluent sentence pairs (experiment 2), and finally by probing attention on disfluent segments (experiment 3). experiment 1 shows that without fine-tuning on disfluent data, bert can perform fairly well on a natural language inference task containing disfluent language using a small synthetic dataset. experiment 2 shows that the sentence embedding of a disfluent sentence becomes more similar to its fluent counterpart the deeper the layer. similarities of [cls] tokens are low in earlier layers, but improve steadily in the final four layers. in addition to insights into disfluency processing, the results also suggest that layer 1 of bert represents lexical presence without information on the relation among the tokens. the fact that pairs are most similar in the deepest layers supports previous findings that semantic meaning is more concentrated in the deeper layers of bert. experiment 3 investigates why embedding similarity increases by looking at attention on disfluent segments. we found that bert distinguishes the reparandum and alteration by paying less attention to the reparandum from layers 4 to 12. overall, the results are congruent in three experiments for two datasets. we conclude that bert has knowledge of the structure of disfluency. it processes disfluency similar to other syntactic features and extracts semantic meaning by selectively attending to different parts of the disfluency at different intensities. thus, we believe that attention is the key mechanism that modulates the selectivityinvariance tradeoff and allows bert to embed disfluent sentences similar to fluent ones in deep layers. ## future work for future studies, we could expand the scope from bert to other transformer language models such as distillbert @xcite , @xcite and xlnet @xcite . it would be interesting to see if language models trained with different objectives and on different data also possess the capability of resolving disfluent inputs. in addition to more models, we could expand the scope to more languages and study if models such as multilingual bert or mt5 @xcite have knowledge of disfluency using the annotated disfluency data in german, french and chinese from the duel corpus @xcite . ## conclusion natural conversations are filled with disfluencies such as self-repairs, repetitions and abandonment. this study shows that bert has an out-of-the-box understanding of disfluency: it represents a disfluent sentence similar to its fluent counterpart in deeper layers. this is achieved by identifying the disfluency's structure and paying less attention to the reparandum. the results of this study raise the question whether we can use transformer models to process disfluent utterances directly instead of first removing disfluent components in a preprocessing step. we argue that retaining disfluencies is beneficial for dialogue systems, both in terms of better capturing communicative meaning and enabling users to communicate more naturally with dialogue systems.