Elamur Research

An Exploration of Hierarchical Attention Transformers for Efficient Long Document Classification

Paper · 2022 · Ilias Chalkidis, Xiang Dai, Manos Fergadiotis et al.

Summary

A long document can contain the evidence for a decision in several places. A system reading a court case may need to relate facts from different paragraphs, while one answering a question about a book may need to connect events described far apart. Giving every token access to every other token gets expensive as the document grows. Chalkidis and colleagues study a different arrangement for Transformer attention. Their Hierarchical Attention Transformer, or HAT, lets tokens exchange information within short segments and gives each segment a representative that can exchange information with representatives elsewhere in the document. The authors ask where to put these exchanges between segments, whether they should be trained before the system sees its target task, and how the resulting design compares with a widely used alternative for long documents.

The miniature experiments suggest that the placement of these exchanges matters. The strongest layout overall alternates groups of local processing blocks with blocks that work across segments. It gives local processing more depth and brings document context into the computation at several points. Training the whole hierarchy on masked language modeling, where the system learns to recover concealed tokens, also improves its performance on several diagnostic tasks. A comparison with a hierarchy that acquires its cross-segment layers during task training shows how much the value of advance training depends on the prediction being made.

The authors carry the best overall miniature layout into a larger comparison with Longformer. The larger HAT is generally competitive or better on the downstream tasks, which include assigning labels to documents and paragraphs, judging a claim against a contract, and selecting an answer to a question about a long reading. The conventional masked-token objective slightly favors Longformer at this scale. Full pretraining has its clearest downstream advantage over the partly pretrained HAT on QuALITY, the multiple-choice reading task.

The computational measurements distinguish training from prediction. Against the authors’ Longformer, the larger HAT uses approximately 10% less GPU memory and runs approximately 40% faster on the pretraining objective. During downstream task training, the reported figures are approximately 20% less memory and approximately 45% higher speed. At inference, or prediction after training, the reported ranges are 10-20% less memory and 20-30% higher speed. The paper releases the implementation and trained checkpoints. Its strongest evidence concerns the combination of repeated cross-segment attention, end-to-end pretraining, and the particular long-document classification tasks and baselines studied.

Deep dive: An Exploration of Hierarchical Attention Transformers for Efficient Long Document Classification

Hierarchical Attention Transformers process long documents in segments, improving speed and memory use while preserving classification quality. · about 37 minutes to read

The problem and its context

A long input changes the cost of reading

In ordinary text classification, a system reads a text and chooses labels for it. The decision might concern a medical discharge summary or the facts listed in a court case. The paper also treats tasks in which a long text accompanies a shorter input. A claim about a contract is useful only in relation to the contract, and a proposed answer to a reading question is useful only in relation to the question and its source. In sequential paragraph classification, the input is still a document, while the labels attach to its individual paragraphs. All these tasks give the reader a reason to consider material beyond the immediate neighborhood of a word.

A Transformer represents a document as a sequence of tokens. A token can be a piece of a word, so the sequence length relevant to the computation is the token count. Self-attention updates each position using information from other positions. In the standard dense form, each token can look at every other token in an attention layer. The paper expresses the growth in the number of attention operations as follows.

O(N²)

Here N is the sequence length in tokens, the superscript ² denotes squaring, and O describes how the amount of work grows with length. This use of N belongs to the discussion of dense token attention. In the hierarchy’s architecture, the paper uses N for the number of segments. The dense attention scheme comes from the original Transformer.

Extending an existing encoder to accept a longer sequence therefore increases the cost of the attention within each layer. Truncation offers an expedient response. It limits the input to what the encoder can afford to read, and any omitted material is unavailable for that prediction. The paper discusses earlier legal judgment prediction experiments in which hierarchical processing improved on a system given truncated documents. A document can also be processed in pieces independently, which preserves local readings while leaving the decision procedure to assemble the evidence with whatever representation of those pieces it receives. The question is where in the reader to give those pieces information about each other. Neural Legal Judgment Prediction in English

Sparse attention and hierarchical attention

Longformer addresses length by restricting most attention connections to a window of nearby tokens. It also designates certain tokens as global. A global token can gather information from the entire sequence and be attended to from anywhere in it. The window moves with the token position, so neighboring tokens can be connected even when they fall on opposite sides of a boundary someone might use to divide the text into chunks. The paper describes Longformer as able to process up to 4096 tokens. Its global connections provide a way to move information between distant positions within that input.

Big Bird also combines local and global attention. It adds connections to randomly selected token positions, giving a token some direct links outside its neighborhood. The paper describes both sparse designs as working with representations at the token level. The local, global, and, where applicable, random connections form the attention pattern used to update those representations. Both designs had been initialized from a public checkpoint and then trained further on a masked-token objective. The source of that initialization was RoBERTa. Big Bird

Hierarchy organizes the same problem around units of text. Earlier Hierarchical Attention Networks supplied the motivating idea. A reader can first build a representation of each sentence from its words, then read the sequence of sentence representations. A Transformer hierarchy uses the same general division of labor with Transformer blocks. It can use chunks of several sentences, and its upper-level computations can be distributed through the depth of the reader.

The earlier legal judgment work had already used this principle with BERT. It gave the document’s segments to a pretrained local encoder and applied hierarchical processing above them. In the paper’s account, later evaluations of hierarchical variants of pretrained encoders found results comparable to those of the prominent sparse alternatives. Other work obtained comparable document classification results from a RoBERTa-based hierarchy whose cross-segment component was introduced for the target task. These studies made a strong case for including a hierarchy in a long-document comparison. They left open what a hierarchy would learn if all its layers took part in pretraining. LexGLUE

The authors also discuss Hi-Transformers, whose shallow arrangement lets processing inside segments interact with processing across them. That earlier comparison began with randomly initialized systems and trained them directly for classification. Its evidence concerned the usefulness of the architecture under that training procedure. Another earlier proposal, the Hierarchical Sparse Transformer, covered a single arrangement of its layers. The paper describes most of its evaluated inputs as shorter than 1000 tokens. Together, these precedents motivate a study in which both the depth at which segments interact and the treatment of those interaction layers during pretraining become explicit experimental choices.

The choices the paper separates

The first choice is when segments get to exchange information. A system can build local representations and then exchange information across the document near the top. It can bring document context in early and spend the remaining layers refining the segments. It can also alternate between local and document-level processing, so that each operation can use what the other has already computed. These designs can have the same total number of layers while giving information different routes to the output.

The second choice concerns the starting point for the cross-segment blocks. The authors use ad-hoc as a technical label for a hierarchy built by taking a pretrained local encoder and adding randomly initialized cross-segment layers when training for a target task. The end-to-end alternative includes both kinds of blocks in generic pretraining. Both strategies can inherit substantial knowledge from an existing checkpoint. The distinction concerns when the hierarchy as a whole gets to adapt to its division of work.

The third choice is the comparison with sparse attention. Longformer can move information through both its sliding windows and its designated global tokens. A HAT has local attention on each segment and a distinct attention operation on the segment representatives. These designs differ in both the routes available to information and the cost of using them. The authors therefore examine quality and running cost together. They discuss other efficient attention mechanisms and structured state-space approaches as part of the surrounding work. Their experiments focus on encoder-based prediction, leaving systems that generate long answers or summaries outside the comparison. Efficient Transformers: A Survey

The method, step by step

Turn the document into segments

The document enters the system as a sequence of tokenized text. The authors first use the English sentence splitter from NLTK to find sentence boundaries. They then group sentences in document order until adding another would exceed the capacity of the segment. Segments have a capacity of 128 tokens in the studied systems. This is measured in the units of subword tokenization, where a word can take up several positions. Each segment also has a dedicated position for a special token called [CLS].

In the architecture notation, the resulting document has the following form.

S = [C₁, C₂, C₃, …, Cₙ]

S denotes the document input. Each C is a segment, and its subscript marks its position in that input. The paper calls the number of segments N, represented by the final subscript ₙ in this display. The ellipsis means that the sequence continues in the same order. The square brackets denote an ordered list.

The capacity of each segment is expressed by the following representation.

Cᵢ = [Wᵢ,CLS, Wᵢ,₁, Wᵢ,₂, Wᵢ,₃, …, Wᵢ,ₖ₋₁]

Cᵢ is segment i. Each W denotes a token position in that segment. The first subscript is the segment index. The second subscript denotes the special CLS position or the position of a text token after it. K, shown as ₖ in the final subscript, is the segment capacity including the representative. The final index K minus 1 therefore describes the last position available after the special token. The brackets and ellipsis again indicate an ordered sequence.

Grouping sentences this way addresses two different ways of losing useful input. In the figure, greedy segmentation packs tokens up to the segment boundary without considering sentence boundaries. Some sentences then continue in another segment. This matters because the local encoder reads each segment independently. At the other extreme, treating every sentence as a separate segment can use up the segment allocation on short sentences. Each of those short segments may still have unused token positions. The paper illustrates this with a text of 4 sentences and room for 3 segments, where assigning each sentence its own segment leaves the last sentence out.

The dynamic strategy illustrated in the figure groups nearby sentences where they fit. This makes the input more compact while giving sentences a chance to remain intact. The segment limit and the token limit still apply. Sentence boundaries help decide where a segment ends, while the amount of space available determines how much neighboring material enters the same segment. A segment produced this way is a unit of computation. It may encompass several sentences, and its boundaries can vary between otherwise similar documents.

Read locally, then exchange segment information

The segment-wise encoder, abbreviated SWE, is a Transformer block applied to each segment in isolation. At any given depth, it uses the same weights on every segment. That shared block lets the text positions in a segment influence each other, including the [CLS] position. After the block runs, the state at [CLS] can carry information about the segment that contains it. The system keeps the updated states at the other positions as well.

The cross-segment encoder, abbreviated CSE, receives the sequence of these representative states. It lets the representative of each segment attend to representatives from the other segments. Its output updates the segment states with information from elsewhere in the document. Ordinary token states retain the output of the local block at this point. When another segment-wise block follows, its tokens can attend to their own segment representative, which now carries information gathered across the document. That is the route by which a word in one segment can eventually receive evidence originating in a distant segment.

For a concrete example, consider the paragraph that states a fact in a court case. Its local block can encode relationships between words in that paragraph. A cross-segment block can give its representative information from the representative of another factual paragraph. A later local block can use this contextualized representative when updating the words of the first paragraph. A task that classifies paragraphs can also read a segment representative directly. The same architecture thus provides a path for contextualized words and a representation at the level where the paragraph decision will be made.

How a hierarchical encoder reads a long document

The steps in order.

How a hierarchical encoder reads a long documentStep 1: Tokenize text and group sentences into segments1. Tokenize text and group sentences into segmentsStep 2: Prepend a representative token to each segment2. Prepend a representative token to each segmentStep 3: Add position information within each segment3. Add position information within each segmentStep 4: Encode each segment with a shared local block4. Encode each segment with a shared local blockStep 5: Add document positions to the segment representatives5. Add document positions to the segment representativesStep 6: Exchange information among the representatives6. Exchange information among the representativesStep 7: Continue with local or cross-segment blocks7. Continue with local or cross-segment blocksStep 8: Read outputs at the level the task requires8. Read outputs at the level the task requires

Keep track of two kinds of position

The hierarchy needs to represent where a word is inside a segment and where the segment is inside the document. The first position is measured from the beginning of each segment. The corresponding position embedding is added to the word embedding at the input. An embedding is a vector, or ordered array of values, that the encoder uses as a representation. The local position tells the reader where that token occurs relative to the other tokens handled by the same segment-wise block.

Pʲˢʷ ∈ ℝᴴ,  j ∈ [1, K]

Pʲˢʷ denotes the segment-wise position embedding at local index j. The superscript letters sw identify the segment-wise position system. ∈ means “belongs to.” ℝᴴ is the space of real-valued vectors with H components, and H is the hidden dimensionality of the encoder. The range [1, K] indicates the allowed local indices, with K the capacity of a segment.

The second position embedding belongs to the segment representative and identifies the segment’s place in the document. The authors add it to the representative produced by local encoding before the representative enters a cross-segment block. The same set of cross-segment position embeddings is used across the cross-segment blocks. A representative therefore enters cross-segment attention with both a state computed from its text and an explicit indication of its segment’s location.

Pⁱᶜˢ ∈ ℝᴴ,  i ∈ [1, N]

Pⁱᶜˢ is the cross-segment position embedding for index i. The superscript letters cs identify the cross-segment position system. ℝᴴ and ∈ have the same meanings as in the local position formula. The range [1, N] identifies the positions in the segment sequence, where N is the document’s segment count in the architecture notation. Local token positions can recur across segments because the segment-level positions describe a different unit.

The use of these two position systems also clarifies what passes through the hierarchy. After a local block, each ordinary token has a locally contextualized state, and the special token has a locally contextualized state that serves as the segment summary. After a cross-segment block, the representatives carry additional context, while the ordinary tokens still have their most recent local states. A later block receives these outputs according to its role. This is how the placement of blocks determines when the ordinary positions can use information from other segments.

Arrange the blocks through the depth of the encoder

The paper names four families of layouts. The ad-hoc layout, abbreviated AH, puts the local blocks first and the cross-segment stack above them. This arrangement leaves the final ordinary token states as outputs of local processing. The upper stack can enrich segment representations after that point. A task using a segment or document representation can use the result of the upper stack. A masked-token task reads out ordinary positions, so the added stack provides no path back into those outputs in this layout.

The interleaved layout, abbreviated I, distributes the cross-segment blocks through the encoder. In the simplest description, a local block and a cross-segment block form a repeating pair. The study also varies how much local work happens before each cross-segment update. A stretch of local processing can refine the words and their representative, a cross-segment block can update the representative, and another stretch of local processing can work with the updated state. This makes it possible to give local processing more layers while retaining repeated exchanges across the document.

Early contextualization, abbreviated EC, begins with paired local and cross-segment blocks. Its later blocks are local. Those later blocks can use context already stored in the representatives, but each segment’s later states are developed on their own once the early exchange is complete. A local distinction discovered late in one segment therefore has no further cross-segment block through which to inform the other segments.

Late contextualization, abbreviated LC, starts with local layers and reserves the paired local and cross-segment processing for the later part of the encoder. A cross-segment block can then work with segment summaries that have already undergone several local updates. Unlike the stack of cross-segment blocks above an ad-hoc encoder, the paired part of this layout still includes local blocks among its cross-segment operations. The architecture comparison thus concerns both the timing and frequency of exchanges. The training comparison introduces the additional question of which blocks have already been exposed to generic training.

Read out a token, a segment, or a document

The task-specific architectures start with the state produced at the appropriate level. For token prediction, they use the contextualized output at each token that requires a prediction. A shared projection transforms that state. The projection described in the paper consists of a fully connected layer whose input and output both have hidden dimensionality H, followed by the hyperbolic tangent activation, called Tanh. The projection is the same at different token positions within that task.

Oʷᵢ = PR(HATʷᵢ)

HATʷᵢ is the encoder’s contextualized state for token position i. The superscript w indicates a token-level state. PR is the shared projection just described. Oʷᵢ is the output representation produced by applying it. This vector supplies the token-level prediction head. In masked language modeling, the head uses it to score possible identities for the concealed token.

The segment-level head applies the same form of operation to the representative of each segment.

Oˢᵢ = PR(HATˢᵢ)

HATˢᵢ is the output state for the representative of segment i. The superscript s marks a segment representation. PR is the projection shared across the segment positions for this head. Oˢᵢ is the resulting representation. This is the appropriate level for a prediction such as the original position of a shuffled segment. The encoder reads the document together, and the task attaches a prediction to each segment of that document.

For a document-level decision, the paper applies max pooling to the projected segment states and transforms the result with a projection. The appendix uses the chunk labels in the pooling expression. At this stage the inputs associated with those labels are the projected representations of the chunks.

D = PR(MaxPool([Oˢ₁, Oˢ₂, …, Oˢₙ]))

D is the final document representation. Oˢᵢ denotes the projected representation of segment i, with N the number of segments and the ellipsis standing for the intermediate ones. MaxPool takes the largest value in each vector coordinate across the segment representations. The resulting vector can draw its different coordinates from different segments. PR then projects that pooled vector. The authors choose max pooling based on earlier work that considered alternatives such as averaging and attention-based pooling.

For classifiers that use a fixed label set, the projected output is passed to a classification layer. The paper writes the dimensions of that transformation as follows.

ℝᴴ → ℝᴸ

ℝᴴ is the space of input vectors with H components, ℝᴸ is the space of score vectors with L components, and L is the number of labels. The arrow shows the direction of the transformation. Each output component is a logit, a score before conversion into the decision used by the task. This scheme can put scores at positions in a text, at segment positions, or at the document level, depending on which representation feeds the layer.

Attach the short input to the long one

For document-level natural language inference, the system must judge a hypothesis against a source document. The authors append the hypothesis as its own segment. Because the hypothesis is the item being tested, they use the output at that segment’s representative as the representation of the document and hypothesis together.

[C₁, C₂, …, Cₙ, Cₕ]

The C terms with numerical indices are the document segments in order. N is their count, and the ellipsis stands for the intervening segments. Cₕ is the final segment containing the hypothesis, with h identifying its role. The hypothesis representative can use the cross-segment layers to collect evidence from the document. Its output then feeds the head for the inference labels.

For multiple-choice question answering, the authors construct a separate input for each candidate answer. It includes the document, the question when the task supplies one, and that particular candidate. The same arrangement also works for the diagnostic in which the right candidate is a missing segment and there is no separate written question.

[C₁, C₂, …, Cₙ, C_Q[k], C_AC[k]]

C₁ through Cₙ are the document segments. Here n indexes the final document segment, and the ellipsis indicates the segments between the displayed ones. k identifies the candidate being considered. C_Q[k] is the question segment in the input for candidate k when a question is available, and C_AC[k] is the segment containing that answer candidate. Q and AC label the question and answer-choice roles. The output at the final segment supplies the representation for scoring the candidate.

ℝᴴ → ℝ¹

ℝᴴ is the space of the final segment vectors, with H the hidden dimensionality. ℝ¹ denotes a scalar score, and the arrow denotes the fully connected projection that produces it. Running the scoring procedure for the available candidates gives the output below.

O = [O₁, O₂, …, Oₖ]

O is the list of scores, O₁ and O₂ are the scores of the first displayed choices, and Oₖ denotes the last score in this display. The paper calls the number of choices K in its description of multiple-choice tasks. That local use of K refers to choices rather than segment capacity. Each score describes how the source and, when present, the question support the corresponding candidate. The decision selects among these scores.

Initialize the hierarchy and train it on long inputs

Full pretraining starts from an existing checkpoint. The authors copy the embedding weights and initialize the Transformer blocks using weights from the source encoder. In their preferred procedure, a source block initializes a segment-wise block and, when one follows it in the layout, the cross-segment block paired with it. Those blocks start from the same weights and then serve different purposes during training. The local block repeatedly receives sequences of tokens from individual segments. The cross-segment block receives sequences of representative states drawn from the document.

The miniature experiments use compact BERT checkpoints. The chosen checkpoint depth follows the number of segment-wise blocks in the hierarchy. For example, the I1 miniature hierarchy has 6 segment-wise blocks and is initialized from a 6-layer source checkpoint. The miniature inputs have a maximum of 1024 tokens. The authors use the 2021 English Wikipedia dump to construct the masked-token data and the document-derived diagnostics used at this scale. Well-Read Students Learn Better

The larger experiments start from 12-layer RoBERTa. Their fully pretrained HAT has 16 layers, consisting of 12 segment-wise encoders and 4 cross-segment encoders. In the chosen topology, 3 local blocks precede a cross-segment block, and this arrangement recurs through the depth of the system. The larger input can reach 4096 tokens, organized into 32 segments of capacity 128 tokens. The source for pretraining and document-derived diagnostic data at this scale is C4. The paper uses that corpus to broaden the range of material beyond the miniature study’s Wikipedia inputs. Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer

The generic objective is masked language modeling, abbreviated MLM. The authors select 15% of the tokens for masking and train the encoder to recover the concealed identities. This places the training signal at token positions. When a later local block uses a representative updated by cross-segment attention, the prediction of a masked token can also train the earlier cross-segment computation on which that representative depends. The ad-hoc stack has a different training history. Its added cross-segment layers learn from the downstream or diagnostic task that uses them.

In the miniature comparisons, pretraining runs for another 50k steps at 128 samples per batch. For the larger comparisons, sequences run to 1024 tokens or more, and the step count is likewise 50k. For MLM, the learning rate increases linearly to 1e-4 during the first 5% of the training steps, then decreases linearly. For the other tasks, the authors choose between 1e-5 and 2e-5 using performance on the development subset. They use a 5% warm-up ratio and development-based early stopping for those tasks. This second stage is fine-tuning, in which the pretrained reader and its task-specific prediction mechanism adapt to labeled examples.

The implementation uses Hugging Face Transformers. The authors release their implementation and make the examined trained checkpoints available through Hugging Face Hub. The published implementation therefore includes the hierarchy and its task-specific readouts as well as the trained weights used in the comparisons. Transformers

Experiments and results

What the miniature comparison measures

The miniature comparison examines 8 fully pretrained hierarchical layouts. There are 4 interleaved layouts, 2 early-contextualization layouts, and 2 late-contextualization layouts. They use 12 Transformer blocks, each with 256 hidden units and 4 attention heads. A head is a distinct attention calculation within a block. Keeping the total number of blocks and their dimensions fixed makes it possible to look at the allocation and placement of local and cross-segment processing before committing resources to the larger experiments.

The authors include a 6-layer miniature Longformer and two ad-hoc hierarchical baselines. Their Longformer uses a local window of 128 tokens, matching the HAT’s segment capacity. The data are segmented in a similar manner, then concatenated with [SEP] separators to form Longformer’s input sequence. The initial [CLS] and the [SEP] tokens receive global attention. That gives the baseline document-wide routes at segment boundaries while retaining the local attention pattern of Longformer. Its windows can also span a separator and reach directly into nearby text. The authors describe the miniature Longformer as nearly equal in memory demand and 20% slower than the 12-layer MiniHATs in the masked-language benchmark.

The conventional masked-token evaluation measures cross-entropy loss on training and development data. Cross-entropy penalizes low probability assigned to the correct hidden token, so lower values indicate better predictions on that objective. The other evaluations, which the paper calls midstream tasks, probe abilities relevant to using a long input. Their development scores describe how a system adapted to each diagnostic performs on separate examples. The diagnostics place progressively different demands on the word, segment, and document representations.

Segment masked language modeling chooses 20% of the segments and applies heavier masking within them. SMLM-40 masks 40% of the tokens in the chosen segments. SMLM-100 masks 100%. The task remains token recovery and the metric remains cross-entropy. The key change in the input is where the missing evidence is concentrated. Ordinary masking usually leaves nearby words available to help with a prediction. Concealing an entire segment greatly reduces that local help. A system with access to context from other segments can use whatever clues the rest of the document provides.

Segment order prediction shuffles the segments of a document and asks the system to estimate their original positions. It is formulated as regression, so the prediction is a numerical position for each segment. The metric is mean absolute error, which measures how far the predicted positions lie from the original positions without regard to the direction of the error. A segment can carry clues about its own place in a document. The sequence of other segments can also help resolve which one introduces a subject and which one continues it.

Multiple-choice masked segment prediction removes a segment and presents five candidates, including the segment that originally occupied the missing position. The metric is accuracy, the share of cases in which the correct candidate receives the winning score. The task gives a system a reason to account for both what the document is about and which text fits the local gap. Document topic classification asks for a single topic from the 20-label set used for the English portion of MultiEURLEX. Its metric is micro-averaged F1, which pools the decisions across labels before calculating the score. That task uses the whole-document representation assembled from the segments.

The miniature results

On ordinary MLM, the authors find that assigning more blocks to segment-wise encoding is generally favorable. The interleaved designs I3 and I4, with local-to-cross-segment encoder ratios of 2/1 and 3/1 respectively, give the strongest masked-token results discussed in the paper. The numerical discussion also reports a loss improvement of 0.01 for the AH1 versus I1 and AH2 versus I3 comparisons. Those comparisons concern ordinary masked language modeling, where visible text within the same segment frequently provides much of the information needed for a prediction.

For the diagnostic evaluations, the authors retain the miniature Longformer and AH2, along with I1, I3, EC2 and LC1. AH2 has its four newly initialized cross-segment encoders for tasks that use its segment or document outputs. The paper excludes those blocks from the token-masking readout because their outputs cannot update the ordinary token states in the stacked ad-hoc arrangement. In that case the contrast with a fully pretrained interleaved system includes the path to the prediction as well as the training history of the cross-segment blocks.

The segment-masking development results make that path more consequential. When the task moves from SMLM-40 to SMLM-100, the authors report a much poorer showing for AH2 relative to the hierarchical alternatives that can use other segments to aid token predictions. I1, I3 and LC1 have cross-segment processing followed by local processing at points in their layouts. That gives the rest of the document a route into the hidden-token decisions. The more severe masking makes the route useful under conditions where words in the same segment offer less direct evidence.

Across the other miniature diagnostics, I3 has the best overall showing, with I1 and LC1 behind it in the authors’ account. The ad-hoc AH2 performs substantially worse on missing-segment choice and document topic classification. EC2 also fares poorly on the multiple-choice diagnostic compared with the designs that exchange context in their later layers or across their depth. On document topic classification, LC1 appears stronger than the interleaved variants, while EC2 has the weakest result. The layout carried forward to the larger experiments was therefore chosen for its performance across the diagnostic suite.

What changes in the larger comparison

The larger experiments compare the 16-layer interleaved HAT with a 12-layer Longformer and a 16-layer ad-hoc HAT. The fully pretrained hierarchy retains the overall principle that did well in miniature form: give the encoder more local than cross-segment blocks and spread the exchanges across its depth. The comparison also includes the published Longformer and Big Bird configurations with a local window of 512 tokens for reference on the downstream tasks. The authors’ own Longformer continues to use the shorter window, so the paper distinguishes its comparison from those with the more computationally demanding published versions.

On the ordinary MLM objective, the authors’ 12-layer Longformer has lower cross-entropy than the fully pretrained HAT, with a reported reduction of approximately 0.07. Their discussion reports that the fully pretrained alternatives are substantially ahead of the ad-hoc hierarchy on the same objective, describing the reduction as approximately 0.45. Longformer’s local windows can reach across segment boundaries, and its global attention operates across all 12 layers. The larger HAT has 4 cross-segment blocks and exchanges information through representative states. The authors suggest that these differences help explain Longformer’s small advantage on the token-level objective.

The larger midstream evaluation focuses on segment order prediction and choosing a masked segment. Both hierarchical configurations do better than Longformer on segment ordering. The authors connect that result to the hierarchy’s explicitly defined segment representations. The comparison is useful because the ad-hoc hierarchy also benefits from this structure. The masked-segment choice task gives a different result: predictions are almost perfect across the larger configurations. The diagnostic has little room at this scale to distinguish their ability to select a missing segment. The paper omits the topic classification diagnostic in the larger study, where document-level prediction is already tested by the downstream suite.

What the downstream tasks ask of the reader

MIMIC-III supplies approximately 50k hospital discharge summaries. The main task description says that the input is one discharge summary and the target is its set of applicable top-level ICD-9 codes, with 19 possible codes. The appendix describes the experimental split as custom and says that the original leaf labels were mapped to top-level categories. Its taxonomy name differs from that in the main description, a discrepancy discussed below. The result concerns a coarse-label discharge-summary task. In that task, relevant evidence can appear in different portions of the same summary and several labels can apply.

Approximately 11K cases in ECtHR-LJP come from the European Court of Human Rights. The input is the factual account, organized as a list of paragraphs. The output consists of the articles of the European Convention on Human Rights whose alleged violation the court considered. The labels here concern the articles at issue. The hierarchy can pool information from across the factual account to make case-level predictions. As with the medical task, the appropriate output can contain several labels.

ContractNLI supplies 607 nondisclosure agreements. Each document is paired with 17 templated hypotheses. A document–hypothesis pair is assigned entailment, contradiction, or neutral. Entailment indicates that the document supports the hypothesis, contradiction that it conflicts with it, and neutral that the relation falls into neither of those classes. This task tests whether a reader can use a long source to make a focused decision about a short statement. The HAT attaches that statement as the final segment and reads its contextualized representation.

QuALITY contains roughly 5k questions about books or articles. A question comes with 4 alternatives and a single correct answer. The authors use the standard training set. They divide the original development set 50/50 to produce the development and test sets used in their experiment. The original held-out labels require submission to obtain scores, so the results called test results in this comparison refer to the custom partition. The long source, question, and candidate answer must all contribute to the score for a proposed answer.

ECtHR-ARG contains approximately 300 cases. Its original annotations identify argumentative spans within paragraphs from the court’s analysis. The paper recasts the task as sequential paragraph classification, where each paragraph receives the types found in it. There are 13 original argument types, of which the authors retain the 8 most frequent. They describe the remaining types as occurring in less than 50 labeled paragraphs. The output is a set of labels for each paragraph, and the paragraphs are read together. Treating a paragraph as a segment gives the hierarchy a representative aligned with the unit that receives those labels.

Downstream quality and computational cost

The downstream comparison is reported for development and test subsets. The authors describe the fully pretrained HAT as generally strong across document and paragraph classification, contract inference, and multiple-choice reading. The best configuration varies across tasks. The clearest numerical downstream contrast discussed in the paper is on ECtHR-ARG. The authors report a gap of approximately 15% in favor of the hierarchical systems over their own short-window Longformer. Against the published Longformer and Big Bird configurations with the larger windows, the reported gap is roughly 1-2%. These figures describe comparative performance on the argument task. The paper’s narrative gives them as approximate gaps without specifying a split or metric for those particular figures.

The authors ascribe some of the stronger paragraph result to the way the hierarchy represents a paragraph consistently as a segment. A short sliding window provides a different kind of local unit. The long-window configurations can give a paragraph classifier access to a wider neighborhood, which the paper offers as an explanation for the narrower gap against them. On the other tasks, the authors’ short-window Longformer is generally comparable with those larger-window configurations. Its use of global separator tokens is part of that comparison, since these give it additional pathways for information from faraway positions.

QuALITY separates the fully pretrained systems from the ad-hoc HAT more clearly than the other downstream tasks. Longformer and the interleaved HAT enter fine-tuning with their cross-document pathways already used in generic training. The ad-hoc hierarchy begins that stage with new cross-segment layers placed above its local stack. The authors connect the gap to the need to weigh evidence in the document jointly with the question and the candidate answer. Across the other larger downstream tasks, the advantage of full hierarchical pretraining is more limited.

The cost measurements distinguish training, which includes the backward pass used to update weights, from inference, which requires only the forward computation. The hardware benchmark uses a single NVIDIA A100. The authors measure throughput in batches per second and peak GPU memory over 100 steps. They repeat the benchmark three times and report their best benchmark results, a choice they explain as a way to avoid occasional latency outliers. The miniature throughput and memory comparison also identifies its device as an A100 with 40GB of capacity.

The larger HAT uses approximately 10% less GPU memory and is roughly 40% faster than the authors’ Longformer on the MLM pretraining benchmark. For downstream fine-tuning, the authors report roughly 20% lower memory use and roughly 45% greater speed. The chart compares the reported memory savings in those two training settings. Both use the paper’s own Longformer as the reference, so the values describe relative savings in each setting.

GPU memory savings of the larger HAT against the authors’ Longformer on MLM and downstream tasks

The reported memory saving is larger during downstream fine-tuning than during masked language modeling.

GPU memory savings of the larger HAT against the authors’ Longformer on MLM and downstream tasksMLM pre-training: 10MLM pre-training10Downstream fine-tuning (this paper): 20Downstream fine-tuning (this paper)20
The numbers
System or settingGPU memory saved %
MLM pre-training10
Downstream fine-tuning (this paper)20

At inference, the reported GPU memory saving is 10-20% and the speed gain is 20-30%. These measurements answer a different practical question from the training figures. Training benchmarks describe the cost of fitting or adapting the encoder. Inference benchmarks describe the cost of using the trained reader for predictions. The inference results favor the hierarchy against the authors’ Longformer, with smaller reported speed gains than during downstream training. The paper also reports greater computational gains against the published sparse configurations that use 512-token windows, which are more costly than the authors’ short-window baseline.

What the ablations show

The route to the prediction matters

The layout study is the paper’s central controlled comparison. It fixes the overall block count of the fully pretrained miniature encoders and changes which blocks operate on tokens or on representatives, as well as where those blocks appear. A standard masked-token objective generally rewards the variants with more segment-wise processing. This is consistent with the task’s evidence structure. If a masked token can be identified from words in the same segment, local blocks work directly on the states that the final prediction reads. A cross-segment block operates on a smaller set of states and depends on a later local computation to affect an ordinary token output.

The heavier segment-masking diagnostics expose the other side of that allocation choice. When the selected segment loses more words, the rest of the document becomes a potentially useful source of evidence. A system can take advantage of that source at token positions only if the architecture connects the segment-level exchange to those positions. The fully pretrained interleaved and late variants that do well in these diagnostics provide such a route. The ad-hoc stack is especially limited by the level at which its final processing takes place. Even a useful contextualized representative at the top of that stack cannot influence a word output that was already finished below it.

This explains why the strongest layout can depend on what the evaluation hides. Ordinary MLM rewards a good reading of the surviving context as it is usually distributed. Segment masking creates gaps for which ordinary neighboring evidence is less available. The comparison offers evidence that cross-segment communication can be used to support word recovery. It says less about how often that communication is needed for routine masking or on a downstream example whose decisive evidence fits wholly within a segment.

Cross-segment attention can arrive too early for some decisions

The early and late layouts help distinguish the presence of cross-segment attention from its placement. In the early layout, the states entering document-wide attention have undergone relatively little local processing. Later local layers can improve those states inside their respective segments, but the document-wide exchange is already over. In the late layout, each segment can build a more developed local representation before the representatives meet. The interleaved layout can revisit segment relationships using states that have been refined since an earlier exchange.

The missing-segment choice results in the miniature study fit that account. The early variant EC2 trails I1, I3 and LC1 on the diagnostic. The authors suggest that early cross-segment attention may be working with representations that are still too immature for the distinctions required by this kind of choice. A candidate can be compatible with the general topic and still fit poorly at the missing location. A representative refined through local processing may offer better information for judging that fit. The experiment measures the quality of the choices, while the explanation about early representations is the authors’ interpretation of the layout comparison.

The topic results qualify the broad preference for interleaving. LC1 does particularly well on document topic classification. A reader that develops the segments locally and exchanges context near the top can supply useful states to the pooling operation for this task. I3 is the strongest overall miniature option because it does well across different forms of prediction. The evidence supports a balance of substantial local processing and repeated exchange for the overall suite, while allowing a task-specific advantage for late exchange.

Warm-starting and full pre-training are different interventions

The initialization comparison uses the I1 hierarchy to ask how much it should inherit from the source checkpoint. The authors compare starting randomly, copying only embeddings, copying embeddings together with the local blocks, and copying embeddings together with both sorts of blocks. For the last option, they contrast paired and unpaired assignments. Paired initialization uses the same source block to initialize the local block and its following cross-segment block. Unpaired assignment gives them weights from independently assigned source blocks.

The authors report that each warm-start strategy improves on random initialization in the MLM comparison, and that paired initialization gives the best result. The practical implication within this experiment is that weights developed for processing tokens can still be a useful starting point for a block that operates on segment representatives. The loss comparison concerns the result after training. Once copied, the local and cross-segment blocks receive different inputs and are free to adapt separately.

The comparison between the fully trained and ad-hoc hierarchies asks whether the cross-segment computations benefit from being part of generic pretraining. In miniature form, the differences on missing-segment choice and topic classification favor full pretraining. On the larger downstream suite, the clearest separation is QuALITY. There, the ad-hoc stack must learn to combine the source, question, and candidate answer from task supervision. The fully trained HAT has already developed paths between segments before learning to score answers.

The QuALITY result also combines two architectural and training choices. The ad-hoc hierarchy both introduces its cross-segment parameters during fine-tuning and puts them above the local stack. The interleaved hierarchy trains those parameters in advance and uses them repeatedly at different depths. The paper gives both distinctions as possible explanations for the gap. A comparison that crossed each training history with each layout at this scale would be needed to estimate their individual contributions.

Segment structure can help even with recently added layers

The large segment-order diagnostic favors both hierarchical configurations over Longformer. This makes it harder to ascribe every advantage of HAT to generic end-to-end training. Both hierarchies expose a dedicated state for each segment. That state is a natural output for predicting where the segment originally occurred. Longformer’s global markers give it ways to communicate across the input, but its attention still contextualizes positions through local windows and global connections within a common sequence.

The paragraph argument results point in the same direction. Both HATs are strong against the authors’ Longformer, whereas the gap is smaller against the Longformer and Big Bird variants with wider local windows. The authors suggest that explicit paragraph encoding helps the hierarchy and that wider windows make the sparse alternatives better suited to that comparison. These results concern several changing features at once. The systems differ in attention design, input representation, and window length where applicable. The observed patterns support the relevance of the paragraph boundary without isolating a single cause for the entire performance gap.

There is also a distinction between the segmentation illustration and the task ablations. The illustration shows how several short sentences can consume the segment allowance when each is processed alone, and how greedy packing can put words from a sentence into different segments. It motivates the dynamic grouping used throughout the study. The principal layout experiments vary the placement of encoding blocks under the chosen segmentation. They do not give a task-by-task numerical estimate of the contribution of dynamic grouping.

Limitations

Limits identified by the authors

The authors identify the pretraining objective as a major limit. Masked language modeling gives direct supervision to the predictions for tokens. It can train higher-level states indirectly as long as those states help recover the masked items. A good result under that objective therefore establishes something specific about word recovery. The authors raise the possibility of pretraining with objectives designed to improve the segment or document representations more directly. They mention approaches based on paired encoders, including VICReg and SimCLR. They lacked the resources to run that comparison.

Document-to-document information retrieval is outside the experiment. In the approaches the authors discuss, comparing entire documents calls for a paired-encoder architecture that encodes multiple long documents together for the task. That changes both the learning problem and the computational demands. Long-document generation is also beyond the evaluation. A task such as text summarization requires generating an output sequence from the source, whereas the HAT experiments score a fixed set of labels or choices. The authors discuss encoder–decoder work on long text as a separate line of research. LongT5

The authors are also explicit about scale. Their configurations reach up to 150M parameters. They cite research on scaling laws to explain why size, training duration, and data volume could matter to the quality of a long-document encoder. Their own access to compute limited the size of the configurations they could train. The reported comparisons describe the range they studied. Relative quality and cost at substantially different sizes or under much longer training schedules remain open.

The initial layout sweep is broad at miniature scale, but the larger study follows the most promising candidate. This was the authors’ way of using the available compute. Accordingly, the larger interleaved system is directly compared with the larger baselines, while the broad comparison of where to put cross-segment blocks comes from miniature HATs. Building and evaluating larger versions of the early and late variants could reveal whether the miniature ranking holds when depth, representation size, and sequence length change together.

Limits visible in the experimental setup

The strongest speed and memory figures are measured for specific configurations and hardware. The comparison with the authors’ own Longformer is especially informative because its local window matches the HAT’s segment capacity and it gets global attention at separator positions. The published Longformer and Big Bird use wider windows, so the comparison with them includes a difference in the amount of local attention. Throughput on an A100 also describes how the implementations run on the chosen hardware. The study leaves open how the same configurations compare under different hardware, software implementations, batch sizes, or input length distributions.

The benchmark reports peak allocation and throughput over a fixed run. Those measurements show how the compared computations use memory and time under the benchmark conditions. The paper suggests that the cheaper iterations could allow a HAT to train longer under a similar GPU-hour budget. That is a hypothesis about a different training comparison. The downstream results come from the stated training schedules. Establishing quality at matched total compute would require measuring the effect of spending the available budget on additional training.

The fixed input budget still imposes a practical coverage limit. Grouping sentences helps preserve boundaries and can save otherwise unused positions, but the encoder has a fixed segment capacity and a maximum number of segments in the tested configurations. The cross-segment blocks exchange learned representative states rather than every token state. Tasks requiring exact distant wording or detailed alignment across passages might put different demands on such a representation. The evaluation shows that the chosen representation is useful for the studied tasks. It does not measure which details are retained or lost as information moves through the representatives.

The task formulations also matter for interpreting the reported comparisons. The MIMIC-III main description names ICD-9 and reports 19 top-level codes. The appendix instead names MeSH when it explains the mapping to top-level labels. Both describe a coarse-label task, and the inconsistency leaves the exact taxonomy unclear from the paper’s descriptions. The QuALITY evaluation uses a held-out portion of the original development data as its test set. In ECtHR-ARG, the paper maps span annotations to paragraph labels and limits the evaluation to 8 frequent types. Each choice changes what the reported scores cover. A score on the paragraph version, for example, describes the ability to identify types in a paragraph, while the original span annotations locate the particular text associated with a type.

Finally, the diagnostics establish performance on deliberately constructed tasks. Shuffled segments give direct supervision about document order. Masking a segment creates an explicit missing-information problem. Those results are evidence that an encoder can use context under the tested conditions. They do not trace the source of each successful prediction. The larger systems’ near-ceiling performance on missing-segment choice also limits the power of that task to reveal differences. More difficult examples could distinguish different uses of context, but no such comparison is reported here.

What came after

The paper is cited in The Rise and Potential of Large Language Model Based Agents. The citing work is a survey of agents. Its citation places this long-document encoder study in the literature considered by that survey. The connection establishes readership across those subjects. The available account of the survey does not specify which part of the HAT study it discusses or identify an agent that uses the architecture.

It is also cited in How to Improve LLMs’ Performance on Specific Languages, a study framed around language similarity derived from language systems. This records a citation from work with a language-specific performance question. The citation by itself gives no basis for attributing the study’s method or results to segment-wise encoding, cross-segment attention, or the authors’ pretraining procedure.

Cite

Cite as Ilias Chalkidis, Xiang Dai, Manos Fergadiotis, Prodromos Malakasiotis and Desmond Elliott. 2022. An Exploration of Hierarchical Attention Transformers for Efficient Long Document Classification. arXiv:2210.05529.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.48550/arxiv.2210.05529 · arXiv 2210.05529

@misc{chalkidis2022exploration,
  title = {{An Exploration of Hierarchical Attention Transformers for Efficient Long Document Classification}},
  author = {Ilias Chalkidis, Xiang Dai, Manos Fergadiotis, Prodromos Malakasiotis and Desmond Elliott},
  year = {2022},
  doi = {10.48550/arxiv.2210.05529},
  eprint = {2210.05529},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2210.05529}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/chalkidis-2022-exploration-hierarchical-attention-transformers-efficient/

References

39 references, from the paper's own bibliography.

  1. Adrien Bardes, Jean Ponce, and Yann LeCun. 2022. Vicreg: Variance-invariance-covariance regularization for self-supervised learning (https://openreview.net/forum?id=xm6YD62D1Ub). In The International Conference on Learning Representations (ICLR). OpenAlex ↗ · Scholar ↗
  2. Iz Beltagy, Matthew E. Peters, and Arman Cohan. 2020. Longformer: The Long-Document Transformer (http://arxiv.org/abs/2004.05150). arXiv:2004.05150 [cs]. ArXiv: 2004.05150. our card
  3. Ilias Chalkidis, Ion Androutsopoulos, and Nikolaos Aletras. 2019. Neural Legal Judgment Prediction in English (https://doi.org/10.18653/v1/P19-1424). In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4317–4323, Florence, Italy. Association for Computational Linguistics. our card
  4. Ilias Chalkidis, Manos Fergadiotis, and Ion Androutsopoulos. 2021a. MultiEURLEX - a multi-lingual and multi-label legal document classification dataset for zero-shot cross-lingual transfer (https://doi.org/10.18653/v1/2021.emnlp-main.559). In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 6974–6996, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics. our card
  5. Ilias Chalkidis, Manos Fergadiotis, Nikolaos Manginas, Eva Katakalou, and Prodromos Malakasiotis. 2021b. Regulatory compliance through Doc2Doc information retrieval: A case study in EU/UK legislation where text similarity has limitations (https://doi.org/10.18653/v1/2021.eacl-main.305). In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pages 3498–3511, Online. Association for Computational Linguistics. OpenAlex ↗ · Scholar ↗
  6. Ilias Chalkidis, Manos Fergadiotis, Dimitrios Tsarapatsanis, Nikolaos Aletras, Ion Androutsopoulos, and Prodromos Malakasiotis. 2021c. Paragraph-level rationale extraction through regularization: A case study on European court of human rights cases (https://doi.org/10.18653/v1/2021.naacl-main.22). In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 226–241, Online. Association for Computational Linguistics. our card
  7. Ilias Chalkidis, Abhik Jana, Dirk Hartung, Michael Bommarito, Ion Androutsopoulos, Daniel Katz, and Nikolaos Aletras. 2022. LexGLUE: A benchmark dataset for legal language understanding in English (https://doi.org/10.18653/v1/2022.acl-long.297). In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 4310–4330, Dublin, Ireland. Association for Computational Linguistics. our card
  8. Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. 2020. A simple framework for contrastive learning of visual representations (http://proceedings.mlr.press/v119/chen20j/chen20j.pdf). arXiv preprint arXiv:2002.05709. our card
  9. Krzysztof Marcin Choromanski, Valerii Likhosherstov, David Dohan, Xingyou Song, Andreea Gane, Tamas Sarlos, Peter Hawkins, Jared Quincy Davis, Afroz Mohiuddin, Lukasz Kaiser, David Benjamin Belanger, Lucy J Colwell, and Adrian Weller. 2021. Rethinking attention with performers (https://openreview.net/forum?id=Ua6zuk0WRH). In International Conference on Learning Representations. our card
  10. Arman Cohan, Iz Beltagy, Daniel King, Bhavana Dalvi, and Dan Weld. 2019. Pretrained language models for sequential sentence classification (https://doi.org/10.18653/v1/D19-1383). 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), pages 3693–3699, Hong Kong, China. Association for Computational Linguistics. OpenAlex ↗ · Scholar ↗
  11. Xiang Dai, Ilias Chalkidis, Sune Darkner, and Desmond Elliott. 2022. Revisiting transformer-based models for long document classification (https://arxiv.org/abs/2204.06683). In Findings of the Association for Computational Linguistics: EMNLP 2022, Abu Dhabi, UAE. Association for Computational Linguistics. OpenAlex ↗ · Scholar ↗
  12. Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding (http://arxiv.org/abs/1810.04805). arXiv:1810.04805 [cs]. ArXiv: 1810.04805. our card
  13. Albert Gu, Karan Goel, and Christopher Ré. 2022. Efficiently modeling long sequences with structured state spaces (https://arxiv.org/abs/2111.00396). In The International Conference on Learning Representations (ICLR). OpenAlex ↗ · Scholar ↗
  14. Albert Gu, Isys Johnson, Karan Goel, Khaled Kamal Saab, Tri Dao, Atri Rudra, and Christopher Re. 2021. Combining recurrent, convolutional, and continuous-time models with linear state space layers (https://openreview.net/forum?id=yWd42CWN3c). In Advances in Neural Information Processing Systems. OpenAlex ↗ · Scholar ↗
  15. Mandy Guo, Joshua Ainslie, David Uthus, Santiago Ontanon, Jianmo Ni, Yun-Hsuan Sung, and Yinfei Yang. 2022. LongT5: Efficient text-to-text transformer for long sequences (https://doi.org/10.18653/v1/2022.findings-naacl.55). In Findings of the Association for Computational Linguistics: NAACL 2022, pages 724–736, Seattle, United States. Association for Computational Linguistics. our card
  16. Ankit Gupta, Albert Gu, and Jonathan Berant. 2022. Diagonal state spaces are as effective as structured state spaces (https://doi.org/10.48550/ARXIV.2203.14343). OpenAlex ↗ · Scholar ↗
  17. Ivan Habernal, Daniel Faber, Nicola Recchia, Sebastian Bretthauer, Iryna Gurevych, Indra Spiecker genannt Döhmann, and Christoph Burchard. 2022. Mining legal arguments in court decisions (https://doi.org/10.48550/ARXIV.2208.06178). OpenAlex ↗ · Scholar ↗
  18. Jordan Hoffmann, Sebastian Borgeaud, Arthur Mensch, Elena Buchatskaya, Trevor Cai, Eliza Rutherford, Diego de Las Casas, Lisa Anne Hendricks, Johannes Welbl, Aidan Clark, Tom Hennigan, Eric Noland, Katie Millican, George van den Driessche, Bogdan Damoc, Aurelia Guy, Simon Osindero, Karen Simonyan, Erich Elsen, Jack W. Rae, Oriol Vinyals, and Laurent Sifre. 2022. Training compute-optimal large language models (https://doi.org/10.48550/ARXIV.2203.15556). our card
  19. Alistair E W Johnson, Tom J Pollard, Lu Shen, H Lehman Li-Wei, Mengling Feng, Mohammad Ghassemi, Benjamin Moody, Peter Szolovits, Leo Anthony Celi, and Roger G Mark. 2016. MIMIC-III, a freely accessible critical care database (https://www.nature.com/articles/sdata201635.pdf). Sci. Data, 3. our card
  20. Jared Kaplan, Sam McCandlish, Tom Henighan, Tom B. Brown, Benjamin Chess, Rewon Child, Scott Gray, Alec Radford, Jeffrey Wu, and Dario Amodei. 2020. Scaling laws for neural language models (http://arxiv.org/abs/2001.08361). CoRR, abs/2001.08361. our card
  21. A. Katharopoulos, A. Vyas, N. Pappas, and F. Fleuret. 2020. Transformers are rnns: Fast autoregressive transformers with linear attention (https://proceedings.mlr.press/v119/katharopoulos20a.html). In Proceedings of the International Conference on Machine Learning (ICML). OpenAlex ↗ · Scholar ↗
  22. Nikita Kitaev, Lukasz Kaiser, and Anselm Levskaya. 2020. Reformer: The efficient transformer (https://openreview.net/forum?id=rkgNKkHtvB). In International Conference on Learning Representations. our card
  23. Yuta Koreeda and Christopher Manning. 2021. ContractNLI: A dataset for document-level natural language inference for contracts (https://doi.org/10.18653/v1/2021.findings-emnlp.164). In Findings of the Association for Computational Linguistics: EMNLP 2021, pages 1907–1919, Punta Cana, Dominican Republic. Association for Computational Linguistics. our card
  24. Yang Liu, Jiaxiang Liu, Li Chen, Yuxiang Lu, Shikun Feng, Zhida Feng, Yu Sun, Hao Tian, Hua Wu, and Haifeng Wang. 2022. Ernie-sparse: Learning hierarchical efficient transformer through regularized self-attention (https://doi.org/10.48550/ARXIV.2203.12276). OpenAlex ↗ · Scholar ↗
  25. Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019. RoBERTa: A Robustly Optimized BERT Pretraining Approach (http://arxiv.org/abs/1907.11692). arXiv:1907.11692 [cs]. ArXiv: 1907.11692. our card
  26. Bo Pang, Erik Nijkamp, Wojciech Kryściński, Silvio Savarese, Yingbo Zhou, and Caiming Xiong. 2022. Long document summarization with top-down and bottom-up inference (https://doi.org/10.48550/ARXIV.2203.07586). OpenAlex ↗ · Scholar ↗
  27. Richard Yuanzhe Pang, Alicia Parrish, Nitish Joshi, Nikita Nangia, Jason Phang, Angelica Chen, Vishakh Padmakumar, Johnny Ma, Jana Thompson, He He, and Samuel R. Bowman. 2021. Quality: Question answering with long input texts, yes! (http://arxiv.org/abs/2112.08608) CoRR, abs/2112.08608. our card
  28. Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. 2020. Exploring the limits of transfer learning with a unified text-to-text transformer (http://jmlr.org/papers/v21/20-074.html). Journal of Machine Learning Research, 21(140):1–67. our card
  29. Zejiang Shen, Kyle Lo, Lauren Yu, Nathan Dahlberg, Margo Schlanger, and Doug Downey. 2022. Multi-lexsum: Real-world summaries of civil rights lawsuits at multiple granularities (https://openreview.net/forum?id=z1d8fUiS8Cr). In Thirty-sixth Conference on Neural Information Processing Systems Datasets and Benchmarks Track. OpenAlex ↗ · Scholar ↗
  30. Yi Tay, Mostafa Dehghani, Samira Abnar, Yikang Shen, Dara Bahri, Philip Pham, Jinfeng Rao, Liu Yang, Sebastian Ruder, and Donald Metzler. 2021. Long range arena : A benchmark for efficient transformers (https://openreview.net/forum?id=qVyeW-grC2k). In International Conference on Learning Representations. our card
  31. Yi Tay, Mostafa Dehghani, Dara Bahri, and Donald Metzler. 2022. Efficient transformers: A survey (https://doi.org/10.1145/3530811). ACM Comput. Surv. our card
  32. Iulia Turc, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. Well-read students learn better: The impact of student initialization on knowledge distillation (http://arxiv.org/abs/1908.08962). CoRR, abs/1908.08962. OpenAlex ↗ · Scholar ↗
  33. Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Ł ukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need (https://proceedings.neurips.cc/paper/2017/file/3f5ee243547dee91fbd053c1c4a845aa-Paper.pdf). In Advances in Neural Information Processing Systems, volume 30. Curran Associates, Inc. our card
  34. Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Remi Louf, Morgan Funtowicz, Joe Davison, Sam Shleifer, Patrick von Platen, Clara Ma, Yacine Jernite, Julien Plu, Canwen Xu, Teven Le Scao, Sylvain Gugger, Mariama Drame, Quentin Lhoest, and Alexander Rush. 2020. Transformers: State-of-the-Art Natural Language Processing (https://doi.org/10.18653/v1/2020.emnlp-demos.6). In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 38–45, Online. Association for Computational Linguistics. our card
  35. Chuhan Wu, Fangzhao Wu, Tao Qi, and Yongfeng Huang. 2021. Hi-transformer: Hierarchical interactive transformer for efficient and effective long document modeling (https://doi.org/10.18653/v1/2021.acl-short.107). In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 2: Short Papers), pages 848–853, Online. Association for Computational Linguistics. OpenAlex ↗ · Scholar ↗
  36. Wenhan Xiong, Barlas Oğuz, Anchit Gupta, Xilun Chen, Diana Liskovich, Omer Levy, Wen-tau Yih, and Yashar Mehdad. 2021. Simple Local Attentions Remain Competitive for Long-Context Tasks (https://arxiv.org/pdf/2112.07210.pdf). arXiv, 2112.07210. OpenAlex ↗ · Scholar ↗
  37. Liu Yang, Mingyang Zhang, Cheng Li, Michael Bendersky, and Marc Najork. 2020. Beyond 512 tokens: Siamese multi-depth transformer-based hierarchical encoder for long-form document matching (https://doi.org/10.1145/3340531.3411908). In Proceedings of the 29th ACM International Conference on Information and Knowledge Management, CIKM '20, page 1725–1734, New York, NY, USA. Association for Computing Machinery. OpenAlex ↗ · Scholar ↗
  38. Zichao Yang, Diyi Yang, Chris Dyer, Xiaodong He, Alex Smola, and Eduard Hovy. 2016. Hierarchical attention networks for document classification (https://doi.org/10.18653/v1/N16-1174). In Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 1480–1489, San Diego, California. Association for Computational Linguistics. our card
  39. Manzil Zaheer, Guru Guruganesh, Kumar Avinava Dubey, Joshua Ainslie, Chris Alberti, Santiago Ontanon, Philip Pham, Anirudh Ravula, Qifan Wang, Li Yang, et al. 2020. Big bird: Transformers for longer sequences (https://proceedings.neurips.cc/paper/2020/file/c8512d142a2d849725f31a9a7a361ab9-Paper.pdf). Advances in Neural Information Processing Systems, 33. our card