R ISSANEN D ATA A NALYSIS : E XAMINING D ATASET C HARACTERISTICS VIA D ESCRIPTION L ENGTH
A BSTRACT
We introduce a method to determine if a certain capability helps to achieve an accurate model of given data.
We view labels as being generated from the inputs by a program composed of subroutines with different capabilities, and we posit that a subroutine is useful if and only if the minimal program that invokes it is shorter than the one that does not.
Since minimum program length is uncomputable, we instead estimate the labels’ minimum description length (MDL) as a proxy, giving us a theoretically-grounded method for analyzing dataset characteristics.
We call the method Rissanen Data Analysis (RDA) after the father of MDL, and we showcase its applicability on a wide variety of settings in NLP, ranging from evaluating the utility of generating subquestions before answering a question, to analyzing the value of rationales and explanations, to investigating the importance of different parts of speech, and uncovering dataset gender bias.
I NTRODUCTION & R ELATED W ORK
In many practical learning scenarios, it is useful to know what capabilities would help to achieve a good model of the data.
According to Occam’s Razor, a good model is one that provides a simple explanation for the data (Blumer et al., 1987), which means that the capability to perform a task is helpful when it enables us to ﬁnd simpler explanations of the data.
Kolmogorov complexity (Kolmogorov, 1968) formalizes the notion of simplicity as the length of the shortest program required to generate the labels of the data given the inputs.
In this work, we estimate the
Kolmogorov complexity of the data by approximately computing the data’s Minimum Description
Length (MDL; Rissanen, 1978), and we examine how the data complexity changes as we add or remove different features from the input.
We name our method Rissanen Data Analysis (RDA) after the father of MDL, and we use it to examine several open questions about popular datasets.
We view a capability as a function f ( x ) that transforms x in some way (e.g., adding a feature), and we say f is helpful if invoking it leads to a shorter minimum program for mapping x to the corresponding label in a dataset.
Finding a short program is equivalent to ﬁnding a compressed version of the labels given the inputs, since the program can be run to generate the labels.
Thus, we can measure the shortest program’s length by estimating the labels’ maximally compressed length, or Minimum
Description Length (MDL; Rissanen, 1978; Gr¨unwald, 2004).
While prior work in machine learning uses MDL for model optimization (Hinton & van Camp, 1993)
, selection (Yogatama et al., 2019), and probing (Voita & Titov, 2020; Whitney et al., 2020; Lovering et al., 2021), we use MDL for a very different end: to understand the data itself (“dataset probing”).
RDA addresses empirical and theoretical inadequacies of prior data analysis methods.
For example, two common approaches are to evaluate the performance of a model when the inputs are modiﬁed or ablated (1) at training and test time or (2) at test time only.
Training time input modiﬁcation has been used to evaluate the usefulness of the capability to decompose a question into subquestions (Min et al., 2019b; Perez et al., 2020), to access the image for image-based question-answering (Antol et al., 2015;
Zhang et al., 2016a), and to view the premise when detecting if it entails a hypothesis (Gururangan et al., 2018; Poliak et al., 2018; Tsuchiya, 2018).
However, these works evaluate performance only on held-out dev examples, a fraction of the total examples in the dataset, which also are often drawn from a different distribution (e.g., in terms of quality).
To understand what datasets teach our models, we must examine the entire dataset.
Test time ablation has been used to evaluate the capability to view word order (Pham et al., 2020; Sinha et al., 2020; Gupta et al., 2021) or words of different types (Sugawara et al., 2020), or to perform multi-hop reasoning (Jiang & Bansal, 2019).
However, it is hard to rule out factors that may explain poor performance (e.g., distribution shift) or good performance (e.g., other ways to solve a problem).
Here, we examine an intrinsic property of the dataset, MDL, and we provide a theoretical argument justifying why it is the correct measure to use.
We use RDA to provide insights on a variety of datasets.
In §3.1, we examine a benchmark for answering questions where prior work has claimed that decomposing questions into subquestions is helpful (Min et al., 2019b; Perez et al., 2020) and called such claims into question (Min et al., 2019a; Jiang & Bansal, 2019; Chen & Durrett, 2019).
RDA shows that subquestions are helpful and exposes how evaluation methods in prior work may have caused the value of subquestions to be underestimated.
In §3.2, we evaluate if explanations are useful for recognizing textual entailment.
Written explanations and decision-relevant keywords (“rationales”) are both helpful, and rationales are more helpful than explanations.
We examine a variety of popular NLP tasks (Appendix §A), evaluating the extent to which they require relying on word order, different types of words, and gender bias.
Overall, our results show that RDA can answer a broad variety of questions about datasets.
R ISSANEN D ATA A NALYSIS
How can we determine whether or not a certain capability f ( x ) is helpful for building a good model of the data?
To answer this question, we view a dataset with inputs x 1: N and labels y 1: N as generated by a program that maps x n → y n .
Let the length of the shortest such program P be L ( y 1: N | x 1: N ) , the data’s Kolmogorov complexity.
We view a capability as a function f that maps x n to a possibly helpful output f ( x n ) , with L ( y 1: N | x 1: N , f ) being the length of the shortest label-generating program when access to f is given.
We say that f is helpful exactly when L ( y 1: N | x 1: N , f ) <
L ( y 1: N | x 1: N ) .
2. M INIMUM D ESCRIPTION L ENGTH
The above inequality requires us to ﬁnd the shortest program P , which is uncomputable in general.
However, because P is a program that generates y 1: N given x 1: N , we can instead consider any compressed version of y 1: N , along with an accompanying decompression algorithm that produces y 1: N given x 1: N and the compressed y 1: N .
To ﬁnd L , then, we ﬁnd the length of the maximally compressed y 1: N , or Minimum Description Length (MDL; Rissanen, 1978).
While MDL is not computable, just like Kolmogorov complexity, many methods have been proposed to estimate MDL by restricting the set of allowed compression algorithms (see Gr ¨ unwald, 2004, for an overview).
Here, we use online coding (Rissanen, 1984; Dawid, 1984), which is effective for estimating MDL when used with deep learning (Blier & Ollivier, 2018; Yogatama et al., 2019; Voita & Titov, 2020).
2. O NLINE C ODING
To examine how much y 1: N can be compressed, we look at the minimum number of bits (minimal codelength) needed by a sender Alice to transmit y 1: N to a receiver Bob, when both share x 1: N .
Without loss of generality, we assume y n is an element from a ﬁnite set.
In online coding, Alice ﬁrst sends Bob the learning algorithm A , including the model architecture, trainable parameters θ , optimization procedure, hyperparameter selection method, initialization scheme, random seed, and pseudo-random number generator.
Alice and Bob
each initialize a model p θ 1 using the random seed and pseudo-random number generator, such that both models are identical.
Next, Alice sends each label y n one by one.
Shannon (1948) showed that there exists a minimum code to send y n with − log 2 p θ n ( y n | x n ) bits when Alice and Bob share p θ n and x n .
After Alice sends y n , Alice and Bob use A to train a better model p θ n +1 ( y | x ) on ( x 1: n , y 1: n ) to get shorter codes for future labels.
The codelength for y 1: N is then:
[Equation]
Overall, Alice’s message consists of A plus the label encoding ( L p ( y 1: N | x 1: N ) bits).
When Alice and Bob share f , Alice’s message consists of A plus L p ( y 1: N | x 1: N , f ) bits to encode the labels with a model p θ ( y | x, f ) .
f is helpful when it shortens the message: L p ( y 1: N | x 1: N , f ) <
L p ( y 1: N | x 1: N ) .
[Figure]
t p o t
[Figure]
L o n [Figure] f o r m
[Figure]
r B A S E )
[Figure]
d e l e n g t
h p e r
[Figure]
p l e
[Figure]
2. P RACTICAL I MPLEMENTATION WITH B LOCK - WISE C ODING
The online code in Eq.
1 is expensive to compute.
It has a computational complexity that is quadratic in N (assuming linear time learning), which is prohibitive for large N and compute-intensive A .
Following Blier & Ollivier (2018), we upper bound online codelength by having Alice and Bob only train the model upon having sent 0 =
t 0 < t 1 < · · · < t S = N labels.
Alice thus sends all labels in a “block” y t s +1: t s +1 at once using p θ ts , giving codelength:
[Equation]
Since θ t 0 has no training data, Alice sends Bob the ﬁrst block with a uniform prior.
We use Eq. 2 in practice to evaluate when f ( x ) reduces program length (implementation details in Appendix §C).
E XAMINING D ATASET C HARACTERISTICS 3. I S IT HELPFUL TO ANSWER SUBQUESTIONS ?
Yang et al.
(2018) proposed H OTPOT QA as a dataset that beneﬁts from decomposing questions into subquestions, but recent work has questioned such beneﬁt (Min et al., 2019a; Jiang & Bansal, 2019;
Chen & Durrett, 2019) while there is also evidence that decomposition helps (Min et al., 2019b; Perez et al., 2020).
We use RDA to evaluate if subquestions and their answers (“subanswers”) are useful.
Experimental Setup
H OTPOT QA consists of crowdsourced questions ( “Are Coldplay and Pierre
Bouvier from the same country?”
) whose answers are intended to rely on information from two
Wikipedia paragraphs.
The input consists of these two “supporting” paragraphs, 8 “distractor” paragraphs, and the question.
Answers are either yes , no , or a text span in an input paragraph.
As our model, we use L ONGFORMER BASE (Beltagy et al., 2020), a transformer (Vaswani et al., 2017) modiﬁed to handle long inputs as in H OTPOT QA (details in Appendix §D.3).
We consider a subanswer to be a paragraph containing question-relevant information, as Perez et al.
(2020) claimed that subquestions help by using a QA model to ﬁnd question-relevant text.
We indicate up tosubanswers to the model by prepending “ > ” to the ﬁrst subanswer paragraph and “ (cid:29) ” to the second.
Methods for Selecting Subanswers We use the two supporting paragraphs as oracle subanswers.
We also consider the answers to subquestions generated by 4 methods (details in Appendix §D.1).
To answer generated subquestions, we use the R O BERT A LARGE (Liu et al., 2019) ensemble from Perez et al.
We use the paragraphs containing predicted answer spans to subquestions as subanswers.
3.1. R ESULTS
Fig.
1 shows codelengths (ﬁrst) and MDL (second).
Decompositions consistently reduce codelength and MDL.
Decomposition methods reduces MDL to varying extents, ranked worst to best as: no decomposition, Pseudo-Decomposition, Seq2Seq, ONUS, DLM, and oracle.
Overall, the capability to answer subquestions reduces program length, in a way that depends on subquestion quality.
To understand when decompositions reduce codelength, we plot the codelength reduction from decomposition against the original codelength for L ONGFORMER BASE in Fig.
1 (third).
As the original codelength decreases, the beneﬁt from decomposition increases, until the no-decomposition baseline reaches a certain loss, at which point the beneﬁt from decomposition decreases.
We hypothesize that a certain, minimum amount of task understanding is necessary before decompositions are useful.
However, as loss decreases, the task-relevant subroutines can be learned from the data directly, without decomposition.
The limited value in low-loss regimes occurs because models approach the same, minimum loss H ( y | x ) in the limit of dataset size.
Our observation partly explains why a few earlier studies (Min et al., 2019a; Jiang & Bansal, 2019; Chen & Durrett, 2019), which only evaluated ﬁnal performance, drew the conclusion that H OTPOT QA does not beneﬁt much from multi-step reasoning or question decomposition.
In contrast, MDL does capture differences in performance across data regimes, demonstrating that RDA is the right approach going forward.
3. A RE E XPLANATIONS AND R ATIONALES U SEFUL ?
Recent work proposes to generate reasons before predicting an answer to achieve better accuracy (e.g.,
Rajani et al., 2019; Wiegreffe et al., 2020).
These studies often test on natural language inference (NLI), a task that involves determining if a premise entails or contradicts (or neither) a hypothesis.
Using NLI as a testbed, we use RDA to evaluate if providing a reason is a useful capability.
Dataset and Model We use e-SNLI (Camburu et al., 2018), which annotated each example in
SNLI (Bowman et al., 2015) with (1) an extractive rationale that marks entailment-relevant words and (2) a written explanation of the right answer.
We randomly sample 10k examples from e-SNLI to examine the usefulness of rationales and explanations.
As our model, we use an ensemble ofmodel classes – a FastText bag-of-words model and 9 transformer variants (details in Appendix D.5).
Adding explanations and rationales We add the rationale by surrounding each entailment-relevant word with asterisks, and we add the explanation before the hypothesis, separated by a special token.
For comparison, we also evaluate MDL when including only the explanation or rationale patterns as input.
For the latter, we include the rationale without the actual premise and hypothesis words by replacing each rationale word with “*” and other words with “ ”.
3.2. R ESULTS
Fig.
1 (rightmost) shows MDL.
Adding rationales greatly reduces MDL over using the normal input (“Input (I)”) or rationale markings without input words (“Rationale (R)”), suggesting that rationales complement the input.
The reduction comes from focusing on rationale words speciﬁcally.
We see almost as large MDL reductions when only including rationale-marked words and masking non-rationale words (“R Words” vs. “I+R”).
In contrast, we see little improvement over rationale markings alone when using only non-rationale words with rationale words masked (“Rationale (R)” vs.“Non-R Words”).
Our results show that a useful subroutine for NLI is to locate task-relevant words, suggesting directions for future work similar to Zhang et al.
(2016b)
; Perez et al.
Similarly, explanations greatly reduce MDL (Fig.
1 right, rightmost two bars), especially when the input is also provided.
Explanations, like rationales, are also complementary to the input.
Interestingly, adding rationales to the input reduces MDL more than adding explanations, suggesting that while explanations are useful, they are harder to use for label compression than rationales.
For additional analysis on other datasets, see Appendix §A, where we evaluate the usefulness of word order, different types of words, and male vs. female -gendered words across 12 NLP tasks.
C ONCLUSION
Our work opens up ample opportunity for future work: uncovering which capabilities help on what tasks, detecting dataset biases for data statements (Gebru et al., 2018; Bender & Friedman, 2018), and expanding on RDA, e.g., investigating the underlying data distribution (Whitney et al., 2020).
Overall, RDA is a theoretically-justiﬁed tool that provides valuable insights on a variety of datasets.
A E XAMINING T EXT D ATASETS
So far, we used RDA to determine when adding input features helps reduce label description lengths.
Similarly, we evaluate when removing certain features increases description length, to determine what features help achieve a small MDL.
Here, we view the “original” input as having certain features missing, and we evaluate the utility of a capability f that recovers the missing features to return the normal task input.
If f reduces the label-generating program length, then it is useful to have access to f (the ablated features).
To illustrate, we examine the utility of different kinds of words and of word order on the General Language Understanding Evaluation benchmark (GLUE;
Wang et al., 2019), a central evaluation suite in NLP, as well as SNLI and Adversarial NLI (ANLI; Nie et al., 2020).
Datasets GLUE consists of 9 tasks (8 classiﬁcation, 1 regression 1 ).
Two are single-sentence classiﬁcation; CoLA (Corpus of Linguistic Acceptability; Warstadt et al., 2018) involves determining if a sentence is linguistically acceptable or not, while SST-2 (Stanford Sentiment Treebank 2; Socher et al., 2013) involves predicting if a sentence has positive or negative sentiment.
Three tasks involve determining if two sentences are similar or paraphrases of each other: MRPC (Microsoft Research
Paragraph Corpus; Dolan & Brockett, 2005), QQP (Quora Question Pairs) 2 , and STS-B (Semantic
Textual Similarity Benchmark; Cer et al., 2017).
The rest are NLI tasks: QNLI (Question NLI, derived from SQuAD; Rajpurkar et al., 2016), RTE (Recognizing Textual Entailment; Bentivogli et al., 2009),
MNLI (Multi-genre NLI; Williams et al., 2018), and WNLI (Winograd NLI; Levesque et al., 2012)
; we omit WNLI due to its size, 634 training examples.
ANLI consists of NLI data collected in three rounds, where annotators wrote hypotheses that fooled state-of-the-art NLI models trained on data from the previous round.
We consider each round as a separate dataset, to examine how NLI datasets have evolved over time, from SNLI to MNLI to ANLI 1 , ANLI 2 , and ANLI 3 .
Experimental Setup We follow a similar setup as for e-SNLI (§3.2), using the 10-model ensemble and evaluating MDL on up to 10k examples per task.
A. T HE USEFULNESS OF PART - OF - SPEECH WORDS
We consider the original input to be the full input with words of a certain POS masked out (with “ ”) and evaluate the utility of a subroutine that ﬁlls in the masked words.
To control for the number of words masked, we restrict the subroutine such that it returns a version of the input with exactly the same proportion of words masked, chosen uniformly at random.
If the subroutine is useful, then words of a given type are more useful for compression than randomly-chosen input words.
In particular, we report the difference between MDL when (1) words of a given POS are masked and (2)
[Table]
[Figure]
M D L C o n t e n t M
D L R a n d o m
[Figure]
the same fraction of words are masked uniformly at random: MDL − POS − MDL − Random .
We evaluate nouns, verbs, adjectives, adverbs, and prepositions.
We show results in Figure 2.
Adjectives are much more useful than other POS for SST-2, a sentiment analysis task where relevant terms are evidently descriptive words (e.g., “the service was terrible ”).
For CoLA, verbs play an important role in determining if a sentence is linguistically acceptable, likely due to the many examples evaluating verb argument structure (e.g., “The toast burned” vs. “The toast buttered.”).
Other tasks (MRPC, RTE, and QNLI) do not rely signiﬁcantly on any one POS, suggesting that they require reasoning over multiple POS in tandem.
Nouns are consistently less useful on NLI tasks, suggesting that NLI datasets should be supplemented with knowledge-intensive tasks like open-domain QA that rely on names and entities, in order to holistically evaluate language understanding.
Prepositions are not important for any GLUE task, suggesting where GLUE can be complemented with other tasks and illustrating how RDA can be used to help form comprehensive benchmarks in the future.
A. T HE USEFULNESS OF DIFFERENT WORD TYPES
How useful are content words?
Sugawara et al.
(2020) hypothesized that “content” words are particularly useful for NLP tasks, taking content words to be nouns, verbs, adjectives, adverbs, or numbers.
We test their utility on GLUE, SNLI, and ANLI using RDA, by evaluating MDL − Content −
MDL − Random (Fig. 3 left).
The value is positive for SST-2, STS-B, QNLI, SNLI, and ANLI 2 and negative for MRPC, MNLI, ANLI 1 , and ANLI 3 .
In particular, the value for SST-2 is very high (1732), indicating that content words are important for sentiment classiﬁcation, likely due to the importance of adjectives as found in §A.1.
For QNLI, content words are important, despite earlier ﬁndings that each individual POS group (nouns, verbs, adjectives, or adverbs) were not important for QNLI (§A.
Fig. 2), indicating that QNLI requires reasoning over multiple POS in tandem.
How useful are “logical” words?
Sugawara et al.
(2020) hypothesized that words that have to do with the logical meaning of a sentence (e.g., quantiﬁers and logical connectives) are useful for NLP tasks.
Using GLUE, SNLI, and ANLI, we test the usefulness of logical words, which we take as: all, any, each, every, few, if, more, most, no, nor, not, n’t, other, same, some, and than (following Sugawara et al., 2020).
As shown in Fig.
3 (middle), MDL − Logical − MDL − Random is positive for CoLA, SST-2,
MNLI, ANLI 2 , and ANLI 3 and negative for STS-B and QQP.
Notably, MDL − Logical − MDL − Random is large for MNLI, ANLI 2 , and ANLI 3 , three entailment detection tasks, where we would expect logical words to be important.
How useful are causal words?
Another group of words that Sugawara et al.
(2020) hypothesized are useful are words that express causal relationships: as, because, cause, reason, since, therefore, and why .
As shown in Fig.
3 (right), MDL − Causal − MDL − Random to be within std.
error of 0 for all tasks except SST-2, QNLI, SNLI, and ANLI 2 , where MDL − Causal − MDL − Random < 0 .
Thus, causal words do not appear particularly useful for GLUE.
[Figure]
[Figure]
A. D O DATASETS SUFFER FROM GENDER BIAS ?
Gender bias in data is a prevalent issue in machine learning (Bolukbasi et al., 2016; Blodgett et al., 2020).
For example, prior work found that machine learning systems are worse at classifying images of women (Phillips et al., 2000; Buolamwini & Gebru, 2018), at speech recognition for women and speakers from Scotland (Tatman, 2017), and at POS tagging for African American vernacular (Jørgensen et al., 2015).
RDA can be used to diagnose such biases.
Here, we do so by masking male-gendered words and evaluating the utility of an oracle subroutine that reveals malegendered words while masking female-gendered words.
If the subroutine is useful and MDL − Male −
MDL [Figure] > 0 , then masculine words are more useful than feminine words for the dataset (gender bias).
We use male and female word lists from Dinan et al.
(2020a;b).
The two lists are similar in size ( ∼ 530 words each) and POS distribution (52% nouns, 29% verbs, 18% adjectives), and the maleand female- gendered words occur with similar frequency.
Fig.
4 (left) shows the results.
Masculine words are more useful for SST-2 and MRPC while no GLUE datasets have feminine words as more useful.
For SST-2, feminine words occur more frequently than masculine words (2.7% vs. 2.2%, evenly distributed across class labels), suggesting that RDA uncovers a gender bias that word counts do not.
This result highlights the practical value of RDA in uncovering where evaluation benchmarks under-evaluate the performance of NLP systems on text related to different demographic groups.
As hinted above, we may wish to focus on gender bias present in datasets beyond easy-to-detect differences in male- and female- gendered word frequency.
To control for frequency, we evaluate
MDL − Male − MDL − Random and MDL − Female − MDL − Random , as we did for our word type experiments.
We show results in Fig.
4 (right).
For SST-2 and QNLI, masculine words are more useful than randomly-chosen words, while feminine words are less useful than randomly-chosen words, a sign of gender bias.
Most tasks, however, do not show similar patterns of bias as SST-2 and QNLI do.
A. H OW USEFUL IS WORD ORDER ?
Recent work claims that state-of-the-art NLP models do not use word order for GLUE tasks (Pham et al., 2020; Sinha et al., 2020; Gupta et al., 2021), so we use RDA to examine the utility of word order on GLUE, by testing the value of a subroutine that unshufﬂes words when input words have been shufﬂed.
Fig.
5 (left) shows MDL with and without shufﬂing, normalized by the MDL of the label-only prior p ( y ) as a baseline.
Word order helps to obtain smaller MDL on all tasks.
For example, on MNLI, adding word order enables the labels to be compressed from 75% → 50% of the baseline compression rate.
For CoLA, the linguistic acceptability task, input word order is necessary to compress labels
[Figure]
z
[Figure]
d b y ( y )
[Figure]
at all.
Prior work may have come to different conclusions about the utility of word order because they evaluate the behavior of trained models on out-of-distribution (word-shufﬂed) text, while estimates an intrinsic property of the dataset
A. H OW USEFUL IS INPUT LENGTH ?
Input text length can be highly predictive of the class label.
RDA can be used to evaluate text datasets for such length bias.
We evaluate MDL when only providing the input length, in terms of number of tokens (counted via spaCy).
4 As shown in Fig.
5 (right), the labels in MRPC, STS-B, QQP, and
SNLI can be compressed using the input length, though not to a large extent.
Other tasks cannot be compressed using length alone.
Our results on SNLI agree with Gururangan et al.
(2018) who found that hypotheses were generally shorter for entailment examples and longer for neutral examples.
Similarly, they also found that length is less discriminative on MNLI than SNLI.
B V ALIDATING R ISSANEN D ATA A NALYSIS
In this section, we verify that ¯ L p ( y 1: N | x 1: N , f ) <
¯ L p ( y 1: N | x 1: N ) holds in practice when we use an f that we know is helpful.
To this end, we use CLEVR (Johnson et al., 2017), an image-based question-answering (QA) dataset.
CLEVR is a synthetic dataset where many questions are carefully designed to beneﬁt from answering subquestions.
For example, to answer the CLEVR question “ Are there more cubes than spheres? ”
it helps to know the answer to the subquestions “ How many cubes are there? ”
and “ How many spheres are there? ”
and then compare the resulting answers.
We hypothesize that MDL decreases as we give a model answers to subquestions.
We test our hypothesis on three types of question in CLEVR which have 1-2 relevant subquestions.
“Integer Comparison” questions ask to compare the numbers of two kinds of objects and have two subquestions, i.e., “Are there more cubes than spheres?”
where the two subquestions are “ How many cubes are there? ”
and “ How many spheres are there? ”
“Attribute Comparison” questions ask to compare the properties of two objects, i.e., “ Is the metal object the same color as the rubber thing? ”, where there are two subquestions which each ask about the property of a single object, i.e., “ What color is the metal object? ”
and “ What color is the rubber thing? ”
“Same Property As” questions ask whether or not one object has the same property as another object, i.e., “ What material is the sphere with the same color as the rubber cylinder? ”, where there is one subquestion that asks about a property of one object, i.e., “ What color is the rubber cylinder? ”
To obtain oracle subanswers, we use ground-truth programs given by CLEVR that can be executed over a symbolic, graph-based representation of the image to answer each question.
For each question category above, we evaluate the subprogram corresponding to its subquestion(s) to generate oracle subanswer(s).
We append subanswers to the question (in order), and we evaluate the utility of providing 0-2 subanswers.
[Figure]
Model We use the FiLM model from Perez et al.
(2018) which combines a convolutional network for the image with a GRU for the question (Cho et al., 2014).
The model minimizes cross-entropy loss (27-way classiﬁcation).
We follow training strategy from Perez et al.
(2018) using the public code, except we train for at most 20 epochs (not 80), since we only train on subsets of CLEVR.
Results Fig.
6 shows codelengths and MDL.
For all question types, ¯ L p ( y 1: N | x 1: N , f ) < ¯
L p ( y 1: N | x 1: N ) when all oracle subanswers are given, as expected.
For “Integer Comparison” (top) and “Attribute Comparison” (middle), the reduction in MDL is larger than for “Same Property
As” questions (Fig. 6 bottom).
For comparison question types, the subanswers alone can be used to determining the answer, explaining the larger decreases in MDL.
Our results align with our expectations about when answers to subquestions are helpful, empirically validating RDA.
C E XPERIMENTAL S ETUP
To evaluate MDL, we ﬁrst randomly sort examples in the dataset.
We use S = 9 blocks where t 0 =and t 1 = 64 < · · · < t S = N such that t s +1 t s is constant (log-uniform spacing).
To train a model on the ﬁrst s blocks, we randomly split the available examples into train (90%) and dev (10%) sets, choosing hyperparameters and early stopping epoch using dev loss (codelength).
We otherwise follow each model’s training strategy and hyperparameter ranges as suggested by its original paper.
We then evaluate the codelength of the ( s + 1) -th block.
Various random factors impact MDL, such as the order of examples, model initialization, and randomness during training.
Thus, we report the mean and std.
error of MDL over 5 random seeds.
For computational efﬁciency, we only sweep over hyperparameters for the ﬁrst random seed and reuse the best hyperparameters for the remaining seeds.
D
M ODEL D ETAILS
D.
Q UESTION D ECOMPOSITION M ETHODS
Three of the question decomposition we test are unsupervised methods from Perez et al.
(2020): pseudo-decomposition (retrieval-based subquestions), seq2seq (subquestions from a sequence-tosequence model), and ONUS (One-to-N Unsupervised Sequence transduction).
Last, we test the ability of a more recent, large language model (GPT3; Brown et al., 2020) to generate subquestions using a few labeled question-decomposition examples.
Since generating with GPT3 is expensive, we use its generated subquestions as training data for a smaller T5 model (Raffel et al., 2020), a “Distilled Language Model” (explained below).
D. D ISTILLED L ANGUAGE M ODEL D ECOMPOSITIONS D.2. L ANGUAGE M ODEL D ECOMPOSITIONS
Large language models are highly effective at text generation (Brown et al., 2020) but have not yet been explored in the context of question decomposition.
In particular, one obstacle is the sheer computational and monetary cost associated with such models.
We thus use a language model to generate question decompositions while conditioning on a few labeled question-decomposition pairs, and then we train a smaller, sequence-to-sequence model on the generated question-decomposition pairs, which we use to efﬁciently decompose many questions.
Our approach, which we call Distilled
Language Model (DLM), leverages the large language model to produce pseudo- training data for a more efﬁcient model.
As our language model, we use the 175B parameter, pretrained GPT-3 model (Brown et al., 2020) via the OpenAI API.
5 We label the maximum number of question-decomposition pairs that ﬁt in the context window of GPT-3 (2048 tokens or 46 question-decompositions).
For labeling, we sample questions randomly from H OTPOT QA’s training set.
To condition the language model, we format question-decomposition pairs as “[Question] =
[Decomposition]”, where the decomposition consists of several consecutive sub-questions.
We concatenate the pairs, each on a new line, with a new question on the ﬁnal line to form a prompt.
We then generate from the LM, conditioned on the prompt.
For decoding, we found that GPT-3 copies the question as the decomposition with greedy decoding.
Therefore, we use a sample-and-rank decoding strategy, to choose the best decoding out of several possible candidates.
We sample 16 decompositions with top-p sampling (Holtzman et al., 2020) with p = 0 .
95 , rank decompositions from highest to lowest based their average token-level log probability, and choose the highest-ranked decomposition which satisﬁes the basic sanity checks for decomposition from Perez et al.
The sanity checks avoid the question-copying failure mode by checking if a decomposition has (1) more than one sub-question (question mark), (2) no sub-question which contains all words in the multi-hop question, and (3) no sub-question longer than the multi-hop question.
We generate decompositions for H OTPOT QA dev questions, which we estimate costs $0 .
15 per example or $1 .
1 k for the 7405 dev examples via the OpenAI API.
Decomposing alltraining examples would roughly cost an extra $13 .
3 k, motivating distillation.
D.2. D ISTILLING D ECOMPOSITIONS
As our distilled, sequence-to-sequence model, we use the 3B parameter, pretrained T5 model (Raffel et al., 2020) via HuggingFace Transformers (Wolf et al., 2020).
We ﬁnetune T5 on our questiondecomposition examples and then use it to generate subquestions for all training questions.
To ﬁnetune T5, we split our question-decomposition examples into train (80%), dev (10%), and test (10%) splits.
We ﬁnetune T5 with a learning rate of 1 e − 4 , and we sweep over label smoothing ∈ { 0 . 1 , 0 . 2 , 0 . 4 , 0 . 6 } , number of training epochs ∈ { 3 , 5 , 10 } , and batch size in ∈ { 16 , 32 , 64 } , choosing the best hyperparmeters ( 0 . 1 , 3 , 64 , respectively) based on dev BLEU (Papineni et al., 2002).
We stop training early when dev BLEU does not increase after one training epoch.
We generate decompositions using beam search of size 4 and length penalty of 0 . 6 as in Raffel et al.
(2020), achieving a test BLEU of 50.7.
We then ﬁnetune a new T5 model using the best hyperparameters on all question-decomposition examples except for a small set of 200 examples used for early stopping.
D. L ONGFORMER
We train the model to predict the span’s start token and end token by minimizing the negative loglikelihood for each prediction.
We treat yes/no questions as span prediction as well by prepending “yes” and “no” to the input, following Perez et al.
We use the implementation from Wolf et al.
Similar to Beltagy et al.
, we train L ONGFORMER models for up to 6 epochs, stopping training early if dev loss doesn’t decrease after one epoch.
We sweep over learning rate ∈ { 3 × 10 − 5 , 5 × 10 − 5 , 1 × 10 − 4 } .
D. R EGRESSION
STS-B is
a regression task in GLUE where labels are continuous values in [0 , 5] .
Here, we learn to minimize mean-squared error, which is equivalent to minimizing log-likelihood and thus codelength.
We treat each scalar prediction as the mean of a Gaussian distribution and tune a single standard deviation parameter shared across all predictions from a single model.
We choose the variance based on dev log-likelihood using grid search over [10 − 2 . 5 , 10 1 . 5 ] with 1000 log-uniformly spaced samples.
To send the ﬁrst block of labels, Alice and Bob use a uniform distribution over the interval [0 , 5] .
Hyperparam
L ONGFORMER
R O BERT
A
BART
ALBERT
GPT
Learning Rate { 3e-5,5e-5,1e-4 } { 1e-5,2e-5,3e-5 } { 5e-6,1e-5,2e-5 } { 2e-5,3e-5,5e-5 } { 6.25e-5,3.125e-5,1.25e-4 }
[Table]
Max Epochs
[Table]
Ratio
[Table] 1e [Table] 1e
[Table]
1e1e- 1e- [Table] ∞ ∞ ∞ The FastText library only supports classiﬁcation, so we turn STS-B into a 26-way classiﬁcation task by rounding label values to the nearest 0.2, following T5 (Raffel et al., 2020).
We compute a real-valued, mean prediction by evaluating the average class label value when marginalizing over class probabilities.
We then tune variance on dev as usual.
D.
[Figure]
To limit the effect of the choice of learning algorithm A , we may ensemble many model classes.
To do so, we have Alice train M models of different classes and send the next block’s labels using the model that gives the shortest codelength.
To tell Bob which model to use to decompress a block’s labels, Alice also sends log 2 M bits per block s = 1 , . .
, S − 1 , adding ( S − 1) log 2 M to MDL.
In this way, MDL relies less on the behavior of a single model class.
For experiments in §3.2 (e-SNLI) and Appendix A, we use a 10-model ensemble, with the following model classes: FastText Bag-of-Words (Joulin et al., 2017), transformers (Vaswani et al., 2017) trained from scratch (110M and 340M parameter versions), BART BASE (encoderdecoder; Lewis et al., 2020), ALBERT BASE (encoder-only; Lan et al., 2020), R O BERT A BASE and
R O BERT A LARGE (encoder-only; Liu et al., 2019) and the distilled version D ISTIL R O BERT A (Sanh et al., 2019), and GPT2 (decoder-only; Radford et al., 2019) and D ISTIL GPT2 (Sanh et al., 2019).
For each model, we minimize cross-entropy loss and tune softmax temperature 7 on dev to alleviate overconﬁdence on unseen examples (Guo et al., 2017; Desai & Durrett, 2020).
We follow each models’ ofﬁcial training strategy and hyperparameter sweeps (details below), using the FastText codebase 8 and HuggingFace
Transformers (Wolf et al., 2020) for other models.
D.5. F AST T EXT
For the FastText classiﬁer, we initialize with the 2M pretrained, 300-dimensional word vectors trained on Common Crawl (600B tokens).
9 We tune hyperparameters using the ofﬁcial implementation of automatic hyperparameter tuning, which we run for 6 hours, which is generally sufﬁcient for 20+ hyperparmeter trials and convergence on dev accuracy.
The tuning implementation chooses the hyperparameters based on dev accuracy instead of loss as we typically do, but our procedure of tuning a softmax temperature parameter helps FastText reach signiﬁcantly below-baseline loss.
D.5. T RANSFORMER M ODELS
Other models in our ensemble are transformer-based models trained with HuggingFace
Transformers (Wolf et al., 2020).
Table 1 shows hyperparameter ranges used for each model, chosen based on those in each model’s original paper for GLUE.
To train the T RANSFORMER from scratch, we use the R O BERT A BASE and R O BERT A LARGE architecture with R O BERT A hyperparameters but with larger batch sizes ( ∈ { 64 , 128 } ) for the LARGE transformer (for better results).