Venue: NAACL 2021

# Discourse Probing of Pretrained Language Models

Fajri Koto  Jey Han Lau   Timothy Baldwin

School of Computing and Information Systems

The University of Melbourne

frajri@student.unimelb.edu.au, jeyhan.lau@gmail.com, tbaldwin@unimelb.edu.au

###### Abstract

Existing work on probing of pretrained language models (LMs) has predominantly focused on sentence-level syntactic tasks. In this paper, we introduce document-level discourse probing to evaluate the ability of pretrained LMs to capture document-level relations. We experiment with 7 pretrained LMs, 4 languages, and 7 discourse probing tasks, and find BART to be overall the best model at capturing discourse -- but only in its encoder, with BERT performing surprisingly well as the baseline model. Across the different models, there are substantial differences in which layers best capture discourse information, and large disparities between models.

+
Footnote †: _Corresponding of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies_, pages 3849–3864

## 1 Introduction

The remarkable development of pretrained language models Devlin et al. (2019); Lewis et al. (2020); Lan et al. (2020) has raised questions about what precise aspects of language these models do and do not capture. Probing tasks offer a means to perform fine-grained analysis of the capabilities of such models, but most existing work has focused on sentence-level analysis such as syntax Hewitt and Manning (2019); Jawahar et al. (2019); de Vries et al. (2020), entities/relations Papanikolaou et al. (2019), and ontological knowledge Michael et al. (2020). Less is known about how well such models capture broader discourse in documents.

Rhetorical Structure Theory is a framework for capturing how sentences are connected and describing the overall structure of a document Mann and Thompson (1986). A number of studies have used pretrained models to classify discourse markers Sileo et al. (2019) and discourse relations Nie et al. (2019); Shi and Demberg (2019), but few Kato et al. (to appear) have systematically investigated the ability of pretrained models to model discourse structure. Furthermore, existing work relating to discourse probing has typically focused exclusively on the BERT-base model, leaving open the question of how well these findings generalize to other models with different pretraining objectives, for different languages, and different model sizes.

Our research question in this paper is: _How much discourse structure do layers of different pretrained language models capture, and do the findings generalize across languages?_

There are two contemporaneous related studies that have examined discourse modelling in pre-trained language models. Upadhye et al. (2020) analyzed how well two pretrained models capture referential biases of different classes of English verbs. Zhu et al. (2020) applied the model of Feng and Hirst (2014) to parse IMDB documents Maas et al. (2011) into discourse trees. Using this (potentially noisy) data, probing tasks were conducted by mapping attention layers into single vectors of document-level rhetorical features. These features, however, are unlikely to capture all the intricacies of inter-sentential abstraction as their input is formed based on discourse relations1 and aggregate statistics on the distribution of discourse units.

\begin{table}
\begin{tabular}{p{56.9pt} p{28.5pt} r l c} \hline \hline Model & Type & \#Param & \#Data & Objective \\ \hline BERT & & 110M & 16GB & MLM+NSP \\ RoBERTa & Enc & 110M & 160GB & MLM \\ ALBERT & & 12M & 16GB & MLM+SOP \\ ELECTRA & & 110M & 16GB & MLM+DISC \\ \hline GPT-2 & Dec & 117M & 40GB & LM \\ \hline BART T5 & Enc+Dec & 121M & 160GB & DAE \\  & & 110M & 750GB & DAE \\ \hline \hline \end{tabular}
\end{table}
Table 1: Summary of all English pretrained language models used in this work. “MLM” = masked language model, “NSP” = next sentence prediction, “SOP” = sentence order prediction, “LM” = language model, “DISC” = discriminator, and “DAE” = denoising autoencoder.



To summarize, we introduce 7 discourse-related probing tasks, which we use to analyze 7 pretrained language models over 4 languages: English, Mandarin Chinese, German, and Spanish. Code and public-domain data associated with this research is available at [https://github.com/fajri91/discourse_probing](https://github.com/fajri91/discourse_probing).

## 2 Pretrained Language Models

We outline the 7 pretrained models in Table 1. They comprise 4 encoder-only models: BERT Devlin et al. (2019), RoBERTa Liu et al. (2019), ALBERT Lan et al. (2020), and ELECTRA Clark et al. (2020); 1 decoder-only model: GPT-2 Radford et al. (2019); and 2 encoder-decoder models: BART Lewis et al. (2020) and T5 Raffel et al. (2019). To reduce the confound of model size, we use pretrained models of similar size (\(\sim\)110m model parameters), with the exception of ALBERT which is designed to be lighter weight. All models have 12 transformer layers in total; for BART and T5, this means their encoder and decoder have 6 layers each. Further details of the models are provided in the Supplementary Material.

## 3 Probing Tasks for Discourse Coherence

We experiment with a total of seven probing tasks, as detailed below. Tasks 4-6 are component tasks of discourse parsing based on rhetorical structure theory (RST; Mann and Thompson (1986)). In an RST discourse tree, EDUs are typically clauses or sentences, and are hierarchically connected with discourse labels denoting: (1) nuclearity = nucleus (N) vs. satellite (S);2 and (2) discourse relations (e.g. _elaborate_). An example of a binarized RST discourse tree is given in Figure 1.

Footnote 2: The satellite is a supporting EDU for the nucleus.

1. **Next sentence prediction.** Similar to the next sentence prediction (NSP) objective in BERT pretraining, but here we frame it as a 4-way classification task, with one positive and 3 negative candidates for the next sentence. The preceding context takes the form of between 2 and 8 sentences, but the candidates are always single sentences.
2. **Sentence ordering.** We shuffle 3-7 sentences and attempt to reproduce the original order. This task is based on Barzilay and Lapata (2008) and Koto et al. (2020), and is assessed based on rank correlation relative to the original order.
3. **Discourse connective prediction.** Given two sentences/clauses, the task is to identify an appropriate discourse marker, such as _while_,

Figure 1: Illustration of the RST discourse probing tasks (Tasks 4–6).

 

or_, or _although_(Nie et al., 2019), representing the conceptual relation between the sentences/clauses.
4. **RST nuclearity prediction.** For a given ordered pairing of (potentially complex) EDUs which are connected by an unspecified relation, predict the nucleus/satellite status of each (see Figure 1).
5. **RST relation prediction.** For a given ordered pairing of (potentially complex) EDUs which are connected by an unspecified relation, predict the relation that holds between them (see Figure 1).
6. **RST elementary discourse unit (EDU) segmentation.** Chunk a concatenated sequence of EDUs into its component EDUs.
7. **Cloze story test.** Given a 4-sentence story context, pick the best ending from two possible options Mostafazadeh et al. (2016); Sharma et al. (2018). This task is harder than NSP, as it requires an understanding of commonsense and storytelling Chaturvedi et al. (2017); Liu et al. (2018).

## 4 Experimental Setup

We summarize all data (sources, number of labels, and data split) in Table 2. This includes English, Chinese, German, and Spanish for each probing task. For NSP and sentence ordering, we generate data from news articles and Wikipedia. For the RST tasks, we use discourse treebanks for each of the four languages.

We formulate all probing tasks except sentence ordering and EDU segmentation as a classification problem, and evaluate using accuracy. During fine-tuning, we add an MLP layer on top of the pretrained model for classification, and only update the MLP parameters (all other layers are frozen). We use the [CLS] embedding for BERT and ALBERT following standard practice, while for other models we perform average pooling to obtain a vector for each sentence, and concatenate them as the input to the MLP.3

Footnote 3: BERT and ALBERT performance with average pooling

Figure 2: Probing task performance on English for each of the seven tasks, plus the average across all tasks. For BART and T5, layers 7–12 are the decoder layers. All results are averaged over three runs, and the vertical line for each data point denotes the standard deviation (noting that most results have low s.d., meaning the bar is often not visible).

 

Footnote 3: The results of the proposed method are shown in Figure 2.

For sentence ordering, we follow Koto et al. (2020) and frame it as a sentence-level sequence labelling task, where the goal is to estimate \(P(r|s)\), where \(r\) is the rank position and \(s\) the sentence. The task has 7 classes, as we have 3-7 sentences (see Section 3). At test time, we choose the label sequence that maximizes the sequence probability. Sentence embeddings are obtained by average pooling. The EDU segmentation task is also framed as a binary sequence labelling task (segment boundary or not) at the (sub)word level. We use Spearman rank correlation and macro-averaged F1 score to evaluate sentence ordering and EDU segmentation, respectively.

We use a learning rate \(1e-3\), warm-up of 10% of total steps, and the development set for early stopping in all experiments. All presented results are averaged over three runs.4

Footnote 4: More details of the training configuration are given in the Appendix.

## 5 Results and Analysis

In Figure 2, we present the probing task performance on English for all models based on a representation generated from each of the 12 layers of the model. First, we observe that most performance fluctuates (non-monotonic) across layers except for some models in the NSP task and some ALBERT results in the other probing tasks. We also found that most models except ALBERT tend to have a very low standard deviation based on three runs with different random seeds.

We discover that all models except T5 and early layers of BERT and ALBERT perform well over the NSP task, with accuracy \(\geq\) 0.8, implying it is a simple task. However, they all struggle at sentence ordering (topping out at \(\rho\sim 0.4\)), suggesting that they are ineffective at modelling discourse over multiple sentences; this is borne out in Figure 4, where performance degrades as the number of sentences to re-order increases.

Interestingly, for Discourse Connectives, RST Nuclearity, and RST Relation Prediction, the models produce similar patterns, even though the discourse connective data is derived from a different dataset and theoretically divorced from RST. BART outperforms most other models in layers 1-6 for these tasks (a similar observation is found for NSP and Sentence Ordering) with BERT and ALBERT struggling particularly in the earlier layers. For EDU segmentation, RoBERTa and again the first few layers of BART perform best. For the Cloze Story Test, all models seem to improve as we go deeper into the layers, suggesting that high-level story understanding is captured deeper in the models.

We summarize the overall performance by calculating the averaged normalized scores in the last plot in Figure 2.5 RoBERTa and BART appear to be the best overall models at capturing discourse information, but only in the _encoder layers_ (the first 6 layers) for BART. We hypothesize that the BART decoder focuses on sequence generation, and as such is less adept at language understanding. This is supported by a similar trend for T5, also a denoising autoencoder. BERT does surprisingly well (given that it's the baseline model), but mostly in the deeper layers [7-10], while ELECTRA performs best at the three last layers.

Footnote 5: Given a task, we perform min–max normalization for all model-layer scores (\(7\times 12\) scores in total), and then compute the average over all tasks for each model’s layer.

In terms of the influence of training data, we see mixed results. BART and RoBERTa are the two best models, and both are trained with more data than most models (an order of magnitude more; see Table 1). But T5 (and to a certain extent GPT-2) are also trained with more data (in fact T5 has the most training data), but their discourse modelling performance is underwhelming. In terms of training objectives, it appears that a pure decoder with an LM objective (GPT-2) is less effective at capturing discourse structure. ALBERT, the smallest model (an order of magnitude less parameters than most), performs surprisingly well (with high standard deviation), but only at its last layer, suggesting that discourse knowledge is concentrated deep inside the model.

Lastly, we explore whether these trends hold if we use a larger model (BERT-base vs. BERT-large) and for different languages (again based on monolingual BERT models for the respective languages). Results are presented in Figure 3. For model size ("English (large)" vs. "English"), the overall pattern is remarkably similar, with a slight uplift in absolute results with the larger model. Between the 4 different languages (English, Chinese, German, and Spanish), performance varies for all tasks except for NSP (e.g. EDU segmentation appears to be easiest in Chinese, and relation prediction is the hardest in German), but the _shape_ of the lines is largely the same, indicating 

a particular task are consistent across languages.

## 6 Conclusion

We perform probing on 7 pretrained language models across 4 languages to investigate what discourse effects they capture. We find that BART's encoder and RoBERTa perform best, while pure language models (GPT-2) struggle. Interestingly, we see a consistent pattern across different languages and model sizes, suggesting that the trends we found are robust across these dimensions.

## Acknowledgements

We are grateful to the anonymous reviewers for their helpful feedback and suggestions. The first author is supported by the Australia Awards Scholarship (AAS), funded by the Department of Foreign Affairs and Trade (DFAT), Australia. This research was undertaken using the LIEF HPC-GPGPU Facility hosted at The University of Melbourne. This facility was established with the assistance of LIEF Grant LE170100200.

## References

* R. Barzilay and M. Lapata (2008)Modeling local coherence: an entity-based approach. Computational Linguistics34 (1), pp. 1-34. External Links: ISSN 0950-321X Cited by: SS1. P. Bourgonje and M. Stede (2020)The postdam commentary corpus 2.2: extending annotations for shallow discourse parsing. In Proceedings of the 12th Language Resources and Evaluation Conference, Marseille, France, pp. 1061-1066. External Links: Link, Document Cited by: SS1. L. Carlson, D. Marcu, and M. Ellen Okuvovsky (2001)Building a discourse-tagged corpus in the framework of Rhetorical Structure Theory. In Proceedings of the Second SIGdial Workshop on Discourse and Dialogue, Cited by: SS1. S. Chaturvedi, H. Peng, and D. Roth (2017)Story comprehension for predicting what happens next. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, Copenhagen, Denmark, pp. 1603-1614. External Links: ISBN 978-3-319 

Spanish Treebank. In Proceedings of the 5th Linguistic Annotation Workshop, pp. 1-10. Cited by: SS2.
* W. de Vries, A. van Cranenburgh, and M. Nissim (2020)What's so special about BERT's layers? a closer look at the NLP pipeline in monolingual and multilingual models. In Findings of the Association for Computational Linguistics: EMNLP 2020, Online, pp. 4339-4350. External Links: Link, Document Cited by: SS6.
* J. Devlin, M. Chang, K. Lee, and K. Toutanova (2019)BERT: pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), Minneapolis, Minnesota, pp. 4171-4186. External Links: Link, Document Cited by: SS6.
* V. Wei Feng and G. Hirst (2014)A linear-time bottom-up discourse parser with constraints and post-editing. In Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), Baltimore, Maryland, pp. 511-521. External Links: Link, Document Cited by: SS6.
* J. Hewitt and C. D. Manning (2019)A structural probe for finding syntax in word representations. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), Minneapolis, Minnesota, pp. 4129-4138. External Links: Link, Document Cited by: SS6.
* G. Jawahar, B. Sagot, and D. Seddah (2019)What does BERT learn about the structure of language?. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, Florence, Italy, pp. 3651-3657. External Links: Link, Document Cited by: SS6.
* F. Koto, J. Han Lau, and Timothy Baldwin to appear. Top-down discourse parsing via sequence labelling. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics, Cited by: SS6.
* F. Koto, A. Rahimi, J. Han Lau, and T. Baldwin (2020)IndoLEM and IndoBERT: a benchmark dataset and pre-trained language model for Indonesian NLP. In Proceedings of the 28th International Conference on Computational Linguistics (COLING 2020), Cited by: SS6.
* Z. Lan, M. Chen, S. Goodman, K. Gimpel, P. Sharma, and R. Socitut (2020)ALBERT: a lite BERT for self-supervised learning of language representations. In ICLR 2020: Eighth International Conference on Learning Representations, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Veselin Stroyanov, and Luke Zettlemoyer (Eds.), pp. . External Links: Link, Document Cited by: SS6.
* M. Lewis, Y. Liu, N. Goyal, J. Chazvininejad, A. Mohamed, O. Levy, V. Stoyanov, and L. Zettlemoyer (2020)BART: denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, Online, pp. 7871-7880. External Links: Link, Document Cited by: SS6.
* Y. Li, W. Feng, J. Sun, F. Kong, and G. Zhou (2014)Building Chinese discourse corpus with connective-driven dependency tree structure. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), Doha, Qatar, pp. 2105-2114. External Links: Link, Document Cited by: SS6.
* F. Liu, T. Cohn, and T. Baldwin (2018)Narrative modeling with memory chains and semantic supervision. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), Melbourne, Australia, pp. 278-284. External Links: Link, Document Cited by: SS6.
* Y. Liu, M. Ott, N. Goyal, J. Du, M. Joshi, D. Chen, O. Levy, M. Lewis, L. Zettlemoyer, and V. Stoyanov (2019)RoBERTa: a robustly optimized BERT pretraining approach. arXiv preprint arXiv:1907.11692. Cited by: SS6.
* A. L. Maas, R. E. Daly, P. T. Pham, D. Huang, A. Y. Ng, and C. Potts (2011)Learning word vectors for sentiment analysis. In Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies, Portland, Oregon, USA, pp. 142-150. External Links: Link, Document Cited by: SS6.
* Natural Language Workshop: Proceedings of a Workshop Held at Marina del Rey, California, May 1-2, 1986, External Links: Link, Document Cited by: SS6.
* J. Michael, J. A. Botha, and I. Tenney (2020)Asking without telling: exploring latent ontologies in contextual representations. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), Online, pp. 6792-6812. External Links: Link, Document Cited by: SS6.
* N. Mostafazadeh, N. Chambers, X. He, D. Parikh, D. Batra, L. Vanderwende, Pushmeet Kohli, and J. Allen (2016)A corpus and cloze evaluation for deeper understanding of commonsense stories. In Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, San Diego, California, pp. 839-849. External Links: Link, Document Cited by: SS6.

 

Shashi Narayan, Shay B. Cohen, and Mirella Lapata (2018)Don't give me the details, just the summary! topic-aware convolutional neural networks for extreme summarization. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, Brussels, Belgium, pp. 1797-1807. External Links: Link Cited by: SS3.
* A. Nie, E. Bennett, and N. Goodman (2019)DisSent: learning sentence representations from explicit discourse relations. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, Florence, Italy, pp. 4497-4510. External Links: Link, Document Cited by: SS1, SS2.
* Y. Papanikolaou, I. Roberts, and A. Pierleoni (2019)Deep bidirectional transformers for relation extraction without supervision. In Proceedings of the 2nd Workshop on Deep Learning Approaches for Low-Resource NLP (DeePoL 2019), Hong Kong, China, pp. 67-75. External Links: Link, Document Cited by: SS1, SS2.
* A. Radford, J. Wu, R. Child, D. Luan, D. Amodei, and I. Sutskever (2019)Language models are unsupervised multitask learners. OpenAI blog1 (8), pp. 9. External Links: ISSN 0021-909X Cited by: SS1.
* C. Raffel, N. Shazeer, A. Roberts, K. Lee, S. Narang, M. Matena, Y. Zhou, W. Li, and P. J. Liu (2019)Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research21 (140), pp. 1-67. External Links: Link, Document Cited by: SS1.
* R. Sharma, J. Allen, O. Bakhshandeh, and N. Mostafazadeh (2018)Tackling the story ending biases in the story cloze test. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), Melbourne, Australia, pp. 752-757. External Links: Link, Document Cited by: SS1.
* W. Shi and V. Demberg (2019)Next sentence prediction helps implicit discourse relation classification within and across domains. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), Hong Kong, China, pp. 5790-5796. External Links: Link, Document Cited by: SS1.
* D. Siloe, T. Van De Cruys, C. Pradel, and P. Muller (2019)Mining discourse markers for unsupervised sentence representation learning. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), Minneapolis, Minnesota, pp. 3477-3486. External Links: Link, Document Cited by: SS1.
* S. Upadhye, L. Bergen, and A. Kehler (2020)Predicting reference: what do language models learn about discourse models?. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), Online, pp. 977-982. External Links: Link, Document Cited by: SS1.
* E. Voita, R. Sennrich, and I. Titov (2019)The bottom-up evolution of representations in the transformer: a study with machine translation and language modeling objectives. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), Hong Kong, China, pp. 4396-4406. External Links: Link, Document Cited by: SS1.
* Z. Zhu, C. Pan, M. Abdalla, and F. Rudzicz (2020)Examining the rhetorical capacities of neural language models. In Proceedings of the Third BlackboxNLP Workshop on Analyzing and Interpreting Neural Networks for NLP, Online, pp. 16-32. External Links: Link, Document Cited by: SS1.

 



## Appendix A Pretrained Language Models

The pretrained models are sourced from Huggingface ([https://huggingface.co/](https://huggingface.co/)), as detailed in Tables 3 and 4.

## Appendix B Data Construction, Examples, and Training Configuration

### Next Sentence Prediction

We use spaCy ([https://spacy.io/](https://spacy.io/)) to perform sentence tokenization, and ensure that the distractor options in the training set do not overlap with the test set. For all languages and models, the training configurations are similar: the maximum tokens in the context and the next sentence are 450 and 50, respectively. If the token lengths are more than this, we truncate the context from the beginning of the sequence, and truncate the next sentence at the end of the sequence. We concatenate context with each option, and perform binary classification.

Other training configuration details: learning rate = 1e-3, Adam epsilon =1e-8, maximum gradient norm = 1.0, maximum epochs = 20, warmup = 10% of the training steps, and patience for early stopping = 5 epochs.

### Sentence Ordering

In generating sentence ordering data, we once again use spaCy ([https://spacy.io/](https://spacy.io/)) to perform sentence tokenization. For all languages and models, the training configurations are similar, with the maximum tokens in each sentence = 50, learning rate = 1e-3, Adam epsilon = 1e-8, maximum gradient norm = 1.0, training epochs = 20, warmup = 10% of the training steps, and patience for early stopping = 10 epochs.

### Discourse Connective Prediction

As our Chinese and German data is extracted from discourse treebanks, the number of distinct connective words varies. For instance, in the Chinese discourse treebank, we find 246 unique connective

\begin{table}
\begin{tabular}{r r} \hline \hline
**\#Sentence** & **Total** \\ \hline  & 3 & 2000 \\  & 4 & 2000 \\  & 5 & 2000 \\  & 6 & 2000 \\  & 7 & 2000 \\ \hline Total & 10000 \\ \hline \hline \end{tabular}
\end{table}
Table 6: Example of English NSP data with 2-sentence context. 1 indicates the correct next sentence.

\begin{table}
\begin{tabular}{l l} \hline \hline
**Language** & **Huggingface model** \\ \hline Chinese & bert-base-chinese \\ German & bert-base-german-dbmdz-uncased \\ Spanish & bert-base-spanish-wurm-uncased \\ \hline \hline \end{tabular}
\end{table}
Table 4: List of non-English BERT models.

\begin{table}
\begin{tabular}{c c} \hline \hline
**Model** & **Huggingface model** \\ \hline BERT & bert-base-uncased \\ BERT (large) & bert-large-uncased \\ RoBERTa & roberta-base \\ ALBERT & albert-base-v2 \\ ELECTRA & electra-base-discriminator \\ \hline GPT-2 & gpt2 \\ \hline BART & bart-base \\ T5 & t5-small \\ \hline \hline \end{tabular}
\end{table}
Table 3: List of English pretrained language models

\begin{table}
\begin{tabular}{r r} \hline \hline
**Context** \\ \hline
**s1:** The Eastern Star, mostly carrying elderly tourists, capsized on 1 June near Jianli in Hubei province. \\
**s2:** Just 14 of the 456 passengers and crew are known to have survived. \\ \hline
**Options** \\ \hline
**0:** The channel recently said its signal was carried by 22 satellites \\
**0:** That step has become a huge challenge for opposition candidates \\
**0:** Six men were convicted and then acquitted of the atrocity and no-one has since been convicted of involvement in the bombing \\
**1:** A search is continuing for eight people who remain missing. \\ \hline \hline \end{tabular}
\end{table}
Table 5: NSP data based on the number of sentences.



words. To simplify this, we set the connective word to _OTHER_ if its word frequency is less than 12.

For all languages and models, the training configurations are: maximum token length of each sentence = 50, learning rate = 1e-3, Adam epsilon = 1e-8, maximum gradient norm = 1.0, maximum epochs = 20, warmup = 10% of the training steps, and patience for early stopping = 10 epochs.

### RST-related Tasks

In Figures 7 and 8, we present the distribution of the nuclearity and relation labels for the 4 different discourse treebanks. The English treebank is significantly larger, with a strong preference for the NS (nuclear-satellite) relationship. Unlike other languages, the proportion of NN (nuclear-nuclear) relationships in the Chinese discourse treebank (CDTB) is the highest. We also notice that the relation label set in CDTB is the simplest, with only 4 labels.

Most of the training details for nuclearity and relation prediction are the same as for the NSP task, except we set the maximum token length of each sentence to 250. Particularly for EDU segmentation, we set the maximum token length in a document to 512.

### Cloze Story Test

As discussed in Table 2, we use cloze story test version-1 Mostafazadeh et al. (2016). Although version-2 Sharma et al. (2018) is better in terms of story biases, the gold labels for the test set are not publicly available, which limited our ability to explore different layers of a broad range of pre-trained language models (due to rate limiting of test evaluation).

For the data split, we followed previous work Liu et al. (2018) in splitting the development set into a training and validation set. We perform binary classification similar to the NSP task, by first merging all 4-sentence stories into a single text (context). We limit the context to a maximum of 450 tokens, and each candidate sentence (as the story ending) is limited to 50 tokens. Other training details are the same as for the NSP task.

Figure 5: Discourse connective word distribution.

 



**ENGLISH****S1:** Two men nudged the door open.

**S2:** Slipped into the room with him.

**Connective word:** and

**CHINESE**

**S1:** Our "H+



## Appendix C Full Experimental Results

\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Layer** & **NSP** & \multicolumn{1}{l}{**Sent. Ord.**} & \multicolumn{1}{l}{**Discourse Conn.**} & \multicolumn{1}{l}{**Nuclearity Relation**} & \multicolumn{1}{l}{**EDU segment.**} & \multicolumn{1}{l}{**Cloze ST.**} \\ \hline \multicolumn{6}{l}{BERT (English); std = 0.00 – 0.02} \\ \hline

[MISSING_PAGE_POST]

96 & 0.40 & 0.57 & 0.79 & 0.60 & 0.48 & 0.88 \\ \hline \hline \end{tabular}
\end{table}
Table 9: Full results for BERT, RoBERTa, ALBERT, and ELECTRA over English.





\begin{table}
\begin{tabular}{c c c c c c c c} \hline
**Layer** & **NSP** & **Sent.** & **Discourse** & **Nuclearity** & **Relation** & **EDU** & **Cloze** \\  & & **Ord.** & **Conn.** & & & **segment.** & **ST.** \\ \multicolumn{7}{l}{} \\ GPT-2 (English); std = 0.00 – 0.02 & & & & & \\ \hline

[MISSING_PAGE_POST]

 \hline \end{tabular}
\end{table}
Table 10: Full results for GPT-2, BART, and T5 over English.





\begin{table}
\begin{tabular}{c c c c c c c} \hline
**Layer** & **NSP** & **Sent.** & **Discourse** & **Nuclearity** & **Relation** & **EDU** \\  & & **Ord.** & **Conn.** & & & **segment.** \\ \hline \multicolumn{6}{l}{Chinese; std = 0.00 – 0.02.} \\ \hline

[MISSING_PAGE_POST]

76 & 0.54 & 0.50 \\ \hline \end{tabular}
\end{table}
Table 11: Full results for the BERT monolingual models over Chinese, German, and Spanish.





\begin{table}
\begin{tabular}{c c r r r r r r}
**Layer** & **NSP** & \multicolumn{1}{l}{**Sent.****Discourse**} & \multicolumn{1}{l}{**Nuclearity Relation**} & \multicolumn{1}{l}{**Relation**} & \multicolumn{1}{l}{**EDU**} & \multicolumn{1}{l}{**Cloze**} \\  & & **Ord.****Conn.** & \multicolumn{3}{r}{**Conn.**} & \multicolumn{2}{r}{**segment.****} & \multicolumn{1}{l}{**ST.**} \\ \hline \multicolumn{6}{l}{BERT-Large (English); std = 0.00 – 0.02.} \\ \hline

[MISSING_PAGE_POST]

 \end{tabular}
\end{table}
Table 12: Full results of English BERT-large.





## Appendix D Frozen vs. Fine-tuned BERT Layers

## Appendix E Full Results of Models with Average Pooling

Figure 10: Full results of all models over English with average pooling on all tasks except in EDU segmentation (with the only differences over Figure 2 being for BERT and ALBERT, where we originally used [CLS] embeddings on two-text classification probing tasks).

Figure 9: A comparison of BERT with frozen vs. fine-tuned layers.



[CLS] vs. Average Pooling in English BERT-base Model

Average pooling generally performs worse than [CLS] embeddings in the last layers of BERT.

Figure 11: Comparison of [CLS] vs. average pooling embeddings for BERT-base across the five tasks for English. Please note that sentence ordering and EDU segmentation are always performed with average pooling embeddings and sequence labelling at the (sub)word level, respectively.