A Character-Level Length-Control Algorithm for Non-Autoregressive Sentence Summarization
Abstract
Sentence summarization aims at compressing a long sentence into a short one that keeps the main gist.
It has extensive real-world applications such as headline generation.
In previous work, researchers have developed various approaches to improve the ROUGE score, which is the main evaluation metric for summarization, whereas controlling the summary length has not drawn much attention.
In our work, we address a new problem of explicit character-level length control for summarization and propose a dynamic programming algorithm based on the Connectionist
Temporal Classification (CTC) model.
Results show that our approach not only achieves higher ROUGE scores but also yields more complete sentences.
Introduction
Sentence summarization aims at compressing a long sentence into a short one that keeps the main gist of the input.
It is an established setting of summarization, and has extensive real-world applications such as headline generation [26, 30, 8] and being a key component of document summarization [40, 21].
In previous work, researchers have developed various approaches to improve the ROUGE score, which is the main evaluation metric for summarization [17], whereas controlling the summary length has not drawn much attention.
Recently, researchers argue that length control is the key to summarization, since it is typically required by real-world applications [20].
Moreover, the ROUGE score is found to be sensitive to the summary length [33, 32], and summarization systems can achieve higher scores by simply generating longer output.
Previous work mainly addresses length control in the word level, i.e., restricting the summary length by a pre-defined number of words [33, 18].
In this paper, we address explicit length control in the character level for summarization, which is a different setting from previous work.
In other words, we restrict the summary length by the number of characters, such as letters, punctuation marks, and spaces.
We observe that this is a more realistic setting in real-world applications than word-level length control.
For example, the headline shown in a mobile app or web page is constrained by the screen width (roughly speaking, the number of characters), rather than the number of words.
Likewise, a commercial LED display allows a certain number of characters; ideally, the text shown should fit the character-level budget, or otherwise it will be scrolling, making it difficult to read.
However, the character-level constraint is likely to be satisfied if we only perform word-level control, despite the positive correlation between word and character lengths.
Moreover, character-level length control is a common evaluation setting for summarization systems.
For example, a sub-task in the DUC evaluation requires the maximum target length to be 75 bytes [27].
Such an important setting, unfortunately, is not adequately addressed in previous summarization studies.
Our work largely bridges the gap between the methodological summarization research and its evaluation.
We further observe that controlling the summary length by characters cannot be easily addressed by previous approaches.
For example, truncating is able to explicitly control the length, but the resulting summary is incomplete; Takase and Okazaki [36] feed length embeddings into the model as input, but such an approach cannot control the summary length in an explicit manner; and Schumann et al.
[33] perform constrained discrete optimization by selecting a certain number of words from the source text as the output, but their generated summaries may vary to a large extent in terms of the number of characters.
To this end, we propose NACC, a Non-Autoregressive summarization model with Character-level length Control.
We adopt a non-autoregressive approach because it generates all tokens in parallel and is much faster than autoregressive models.
More importantly, we observe that non-autoregressive models predict the output words independently.
Such predicted probabilities are thus local, which provides us with the unique opportunity to design a dynamic programming algorithm to constrain the summary length.
Specifically, we formulate length control as a knapsack-like problem, where the weight is the number of characters in a token and the value is the predicted probability of the token.
In this way, we are able to explicitly control the summary length at the character level, while retaining the completeness of the output text.
We evaluated our NACC model on the Gigaword headline generation [10] and DUC2004 [27] datasets in two settings: supervised and unsupervised.
In the latter setting, NACC learns from the pseudo-reference given by an unsupervised word-extraction method based on discrete search [33].
Experiments show that NACC establishes the state-of-the-art performance of non-autoregressive summarization under various target lengths in both settings; NACC even outperforms autoregressive
Transformers [37] in the unsupervised setting, where the input and output have stronger correspondence.
These all confirm the effectiveness of our length-control algorithm.
Regarding inference efficiency, we show that non-autoregressive models without length control are 10 times faster than autoregressive ones; even with our length-control dynamic programming, NACC is still several times more efficient.
Further, our NACC is capable of length-transfer generation, i.e., generating summaries of different lengths from the training targets.
Related Work
Non-Autoregressive Generation.
Non-autoregressive (NAR) models [12] predict target tokens in parallel and thus enjoy a much higher inference efficiency than autoregressive (AR) ones, which generate output tokens sequentially.
NAR generation is more difficult than AR, because there lacks dependencies among the outputs.
Previous work addresses the dependency issue by iterative refinement [16, 22, 3, 13] or structured decoding with the conditional random field (CRF) [35, 34, 4].
The Connectionist Temporal Classification (CTC) algorithm
[11] addresses a common problem in
NAR generation, namely, token repetition, by merging consecutive identical tokens (unless separated by an empty token).
We follow our previous work [18] and adopt CTC for NAR summarization, allowing empty tokens scattering over the entire sentence to generate a short summary.
NAR models are traditionally thought to generate worse-quality text than AR models.
However, we have the unique insight that NAR also brings new opportunities for designing length-control algorithms: since the model predicts output independently, the decoding problem can be divided into shared sub-problems for dynamic programming.
Text Summarization.
Summarization systems can be generally categorized into two types: extractive and abstractive.
Extractive methods output a summary by extracting important sentences or clauses from the source text [5, 23, 15, 44], while abstractive methods generate summaries with new expressions [25, 28, 9].
Depending on the availability of training data, we may categorize summarization systems into supervised and unsupervised ones.
Supervised methods typically follow a sequence-to-sequence (seq2seq) paradigm [43, 19].
Recently, unsupervised summarization is drawing increasing attention because it does not require parallel training data.
Yang et al.
[42] use the lead approach (selecting the first several words or sentences) as pseudo-groundtruth for seq2seq training.
Alternatively, cycle consistency is adopted as the training objective for unsupervised summarizaiton [38, 2].
Schumann et al.
[33] generate a summary by maximizing a heuristically defined scoring function (involving fluency and semantic similarity) with word-level extraction.
We consider both supervised and unsupervised settings in our work.
Controlling the output length is crucial for deploying summarization systems to real-world applications.
In early extractive summarization research, truncating is adopted for fair comparison [23, 24, 15], but the resulting summary may not be complete sentences.
As pointed out by [32, 33], however, the length-control problem is not adequately addressed for abstractive summarization in the neural era, probably because researchers do not want to hurt the completeness.
For example, length information [20, 36] and soft penalty [34] are adopted to encourage short summaries, but they cannot control the length in an explicit way.
Very recently, Schumann et al.
[33] address the length-control problem by extracting a certain number of source tokens as the summary.
Our previous work [18] designs a CTC-based algorithm that controls the output words explicitly.
However, these approaches cannot be applied to the character level.
Our paper proposes a character-level length-control algorithm that can explicitly constrain the number of characters within a given budget, which is different from all previous work.
Approach
In this section, we first introduce the CTC-trained NAR model for summarization (§3.1).
Then, we propose a dynamic programming algorithm to explicitly control the number of characters (§3.2).
3.1 A Non-Autoregressive Model for Summarization
In the summarization task, the goal is to compress a source text x
= (x 1 , x 2 , . . .
, x S ) into a shorter text y =
(y 1 , y 2 , . . .
, y T ) , while preserving the key information.
Encoder-Only Architecture.
Our work follows recent non-autoregressive summarization methods [34, 18], utilizing the encoder-only Transformer [37] as the base model (Figure 1a).
It is essentially a stack of Transformer layers, the last of which predicts all words simultaneously; thus, it has a much higher inference efficiency than autoregressive models.
Formally, let E ( i ) ∈
R S ×
d be the contextual representation of the input x at the
i th
Transformer layer, where S is the number of tokens in x and d is the dimension.
Specially, E (0) is the word and positional embeddings of input tokens.
Each layer is a Transformer block [37] based on its predecessor, which can be denoted by E ( i ) =
Layer ( i ) ( E ( i − 1) ) , for i ≥ 1 .
At the last layer E ( L ) , a softmax function is applied to predict the probability at every prediction slot independently, given by P s ( ·| x ) = softmax( W e ( L ) s ) for input slot s = 1 , · · · , S , where e ( L ) s is a column vector transposing the s th row of matrix E ( L ) , and W is a weight matrix.
Such an encoder-only architecture is able to capture the strong correspondence between the input and output in the summarization task and outperforms encoder–decoder non-autoregressive models, shown by our previous work [18].
CTC Training.
Training the above encoder-only architecture requires padding the target with empty tokens ϵ ; otherwise, the output will have the same length as the input, and cannot be a summary.
Gu et al.
[12] pad ϵ s at the end of the target, but this hinders the input–output correspondence.
Instead, we follow our previous work [18] and train our model with the Connectionist Temporal
Classification (CTC) [11], allowing ϵ s to scatter over the entire target summary as appropriate.
During inference, the CTC approach removes ϵ s to generate a shorter text as the summary.
In addition,
CTC merges consecutive identical tokens that are not separated by ϵ , because non-autoregressive generation suffers from the word-repetition problem [12, 31].
We denote the CTC operation as Γ , for example, Γ( aaϵϵabbϵ ) = aab .
For training, CTC maximizes the marginal likelihood of token sequences (including ϵ ) that can be reduced to the target text y :
P ( y | x ) = (cid:88) w :Γ( w )=
y
P ( w | x ) = (cid:88) w :Γ( w )=
y
S (cid:89) s =
P s (w s | x ) (1) 𝜖 , -0.
US, -0.
Factory, -0.
N/A [1,5] [11,15] [6,10] [46,50] 𝜖 , -0.
us, -0.
𝜖𝜖 , -0.
US, -0. US maker,-0.
Factory has, -0.
𝜖𝜖𝜖 , … … …
Factory has, -0.5 has, -0. 𝜖𝜖𝜖𝜖 , … … …
Factory has a, -0.7 a, -0.2 has, -0.
𝑤 1: 𝑤 1: 𝑤 1: 𝑤 1: 𝜖 (𝑆) , … … … …
𝑤 1:𝑆 Generation slots
N/A
N/A … … … … … …
Factory has a 2.3 % raise of orders in september
Transformer
[Figure]
Input:
[Figure]
orders for manufactured goods rose 2.3 percent in september, the commerce department said here thursday.
L e n g t
h b u c k e t
[Figure]
Model architecture
[Figure]
algorithm …
[Figure]
where P ( w | x ) is the probability of generating a token sequence w = w 1 , · · · , w S , and P s (w s | x ) is given by the non-autoregressive model.
Although a brute force summation in Eqn.
(1) is intractable, it can be efficiently computed by dynamic programming.
We refer interested readers to Alex et al.
[11] for the details of the above marginalization in CTC training.
3.2 The Proposed Algorithm for Character-Level Length-Control Decoding
One of our main contributions is to propose a dynamic programming (DP) algorithm for characterlevel length control.
As mentioned in §1, controlling the number of characters in the output is important for summarization, since real-world applications usually involve character-level length constraints.
Our insight is that a non-autoregressive model predicts probabilities independently, so the lengthcontrol problem can be divided into shared sub-problems, making DP algorithms feasible.
We formulate character-level length control as a knapsack-like problem.
We treat the number of characters in a word (plus one) as the weight, 2 denoted by u (w) for the word w , and the predicted log-probability as the value v s (w)
=
log P s (w | x ) for the prediction slot s .
Our goal of character-level length-control summarization can be formulated as
[Equation]
subject to
[Equation]
where U is the total length budget.
Here, the value is the sum of the log-probability of every generation slot including ϵ , whereas the length is said in terms of the words of the CTC-reduced sequence y =
Γ(w 1 , · · · , w S ) .
We observe that handling every possible integer weight (i.e., length) as in a standard knapsack algorithm may slow down the inference.
Thus, we divide the lengths into buckets for efficient inference.
Formally, let the l th bucket cover the length ranging from α · ( l − 1) + 1 to α · l characters, where α is a hyperparameter controlling the bucket size.
We denote by d s,l = d s,l 1 · · · d s,ls the most probable s -token sequence that is reduced to a summary in the l th length bucket.
Specially, we let d s, 0 mean that the reduced summary has zero words.
The initialization of d s,l fills in the DP table for l = 0 and s = 1 .
• For l = 0 , we must have d s,
= ϵ · · · ϵ ( s -many), because l = 0 means no non-
ϵ word has been generated.
(First row of Figure 1b.)
• For s = 1 , we have
[Equation]
Here, l = 0 is the same as the previous bullet item.
For l > 0 , we select the most probable word for each length bucket according to the value v 1 ( · ) , i.e., the predicted log-probability of the first generation slot.
(First column of Figure 1b.)
The DP recursion is to compute d s,l based on a newly predicted token w s , assuming its top-left sub-table is filled.
This involves three scenarios:
• Case 1: w s = ϵ .
In this case, the new word is ϵ .
Thus, the index for generation slots increases from s − 1 to s , but the summary length does not change.
We denote D s,l 1 as the set containing the candidate sequence, given by
[Equation]
where ⊕ denotes string concatenation.
(See yellow dash arrows in Figure 1b.)
• Case 2: w s ̸
= ϵ , but w s =
d s − 1 ,l s − 1 .
In other words, the candidate non-
ϵ word w s for the s th slot is identical to the last token of d s − 1 ,l .
Since repeated tokens are merged during CTC decoding, the output length index l is unchanged.
We form this sequence as a set:
[Equation]
(Also see yellow dash arrows in Figure 1b.)
• Case 3: w s ̸
=
ϵ and w s ̸
= d s − 1 ,l ′ s −for some l ′ ≤ l .
That is, w s is neither ϵ nor repetition, and
thus the summary length will be increased from bucket l ′ to l .
We denote this candidate set by
[Equation]
(See blue arrows in Figure 1b.)
Then, our DP finds the most probable sequence at each recursion step:
[Equation]
where d s is the s th token of a sequence d from the three candidate sets above.
Theorem 1.
If the bucket size α = 1 and consecutive repetitions are not merged, then d S,T is the most probable sentence of T characters given by the S prediction slots.
(2) If α ̸ = 1 or repeating tokens are merged, our algorithm may not be exact.
(See Appendix A for the proof.)
Discussion.
Our DP algorithm is inspired by the standard 0-1 knapsack problem [1], but also differs in several significant ways.
First, we merge consecutive tokens during CTC decoding; this establishes some dependencies among different generation slots, and thus exact inference with DP is not possible.
Second, our value function is non-stationary, as it changes over time.
We require that every slot should select a token, either ϵ or a word.
In both cases, the token’s value is added to the total value.
Therefore, our algorithm is compatible with negative values, namely, log-probabilities in our application, because only the relative difference matters for the value function.
Experiments 4.1 Setup
Datasets.
Our model is evaluated on the Gigaword headline generation [30] and DUC datasets [27].
The Gigaword dataset comprises pairs of news articles and titles; we follow the standard setting [30, 33, 18] and adopt the first sentence of each news article as the input and consider the news title as the summary.
In total, the dataset contains 3.8M, 198K, and 1951 samples for training, validation, and test, respectively.
On the other hand, the DUC2004 dataset has 500 paired samples and is designed for test-only; its performance is obtained by models trained on Gigaword.
Metrics.
We follow previous work [33, 30, 34] and evaluate the output by ROUGE scores [17]:
ROUGE- n evaluates n -gram overalpping, whereas ROUGE-
L evaluates the longest common sequence.
We follow the convention and adopt ROUGE F1 for the Gigaword dataset [38, 33, 18] and
ROUGE Recall for the DUC2004 dataset [6, 39].
Implementation Details.
We use a Transformer encoder as the base model, which has 6 layers andattention heads for each layer, following the settings in [37].
The dimensions are 512 and 2048 for the attention and feed-forward modules, respectively.
Each training batch contains samples amounting to 4K tokens.
The learning rate is chosen from {1e-4, 5e-4} by validation, and we ran 100K gradient updates for the unsupervised setting, but 400K updates for the supervised setting.
Note that, in the unsupervised setting, our model learns from an extractive search-based method [33], and thus its training is relatively easy.
By contrast, the supervised setting takes human-written sentences as the training targets, which are more abstractive and difficult to train with.
All experiments were run on an i9-9940X CPU and an RTX6000 GPU.
For our length-control algorithm, we adopt a bucket size of 4, and only consider the most probablewords for every generation slot (cf.
w s in Eqn. 6) due to efficiency concerns.
4.2 Results and Analyses
Results on Gigaword Headline Generation.
Table 1 presents the performance on the Gigaword test set in both supervised and unsupervised settings.
For the supervised setting, we train with the groundtruth references, which contain 51.29 characters on average.
In the unsupervised setting, the training targets of machine learning models (Rows 9–13) are the output summaries given by an unsupervised search-based method [33]; specifically, we adopt the standard 8-word setting, which counts to 48.75 characters on average.
Based on these, we set our length constraint to be 50 characters.
We observe that our proposed algorithm is the only machine learning-based approach that can perform explicit character-level length control.
For fair comparison, we truncate the output of other methods to satisfy the length constraint.
As seen, NACC even with truncating outperforms all other non-autoregressive (NAR) models [34, 29, 41] in both settings.
Specifically, Su et al.
[34] emit multiple end-of-sequence tokens at the end of the output sequence to generate a shorter summary than the source text (Rows 1 & 9);
Qi et al.
[29] propose to pretrain a summarization system in an autoregressive manner, and gradually adapt it to the NAR setting (Rows 5 & 10);
Yang et al.
[41] 3 propose a two-step strategy of autoregressive part-of-speech (POS) prediction and non-autoregressive summary generation (Rows 6 & 11).
Our
NACC trained by CTC is able to surpass all these methods, demonstrating the effectiveness of
CTC training for summarization.
Besides, NACC outperforms its search-based teacher model [33], showing that learning can smooth out the search noise.
Equipped with the length-control algorithm, our NACC model has a significant boost in terms of
ROUGE scores.
In a fair comparison with the same base architecture, the length-control algorithm alone improves NACC (truncate) by ~3 points.
Our full model achieves an improvement of more than 4 total ROUGE points compared with previous state-of-the-art NAR methods.
Regarding the inference efficiency, NACC with truncating is faster than previous NAR models.
Even with the length-control algorithm, our NACC is still in the same ballpark, being ~500x faster than the search-based method.
Additionally, we design a variant of the unsupervised summarization method based on [33], where we directly impose the character-level length constraint during each search step (Row 8).
We find this approach outperforms truncating word-constrained search (Row 7), but is much worse than our machine learning-based NACC with the length-control algorithm.
[Table]
predicted summaries.
R-1, R-2, R-L:
ROUGE-1, ROUGE-2, ROUGE-L. ∆ R: The difference of total ROUGE (sum of R-1, R-2, and R-L) in comparison with the (previous) state-of-the-art NAR summarization system [34].
Time: Average inference time in seconds for one sample on an i9-9940X CPU and an RTX6000 GPU.
[Table]
Results on DUC2004.
Table 2 shows the performance of NACC on DUC2004, where we constrain the summary length to be at most 75 characters, following previous work [39, 2, 33].
Since the Gigaword training summaries have very different lengths from DUC2004 summaries, it is not straightforward to evaluate NACC in the supervised setting, as this involves length transfer.
Therefore, we consider the unsupervised setting for DUC2004, where we use 13-word summaries (~80 characters) from [33] as our training targets.
(We will have length-transfer experiments in later analysis.)
Experiments show that NACC with length control again largely outperforms previous NAR models, while retaining high inference efficiency.
Results are consistent with the Gigaword experiment.
Human Evaluation.
We additionally conducted human evaluations to investigate the effectiveness of our approach.
Due to the limit of time and resources, we mainly considered the overall quality and completeness/fluency, as they are the key of our work but may not be adequately captured by automatic metrics such as ROUGE scores.
For controlled comparison, we consider NACC with truncating and NACC with the proposed length-control algorithm.
We invited three human annotators to compare the output summaries on each of 150 randomly selected samples from the Gigaword test set.
We adopted the unsupervised setting in Table 1, where models were trained with 8-word summaries generated by [33]. The two systems’ outputs for a sample were
[Table]
Setting #
Approach
Len
ROUGE F
Time RR-
R-L
Supervised
AR
Transformer (truncate) 40.
Transformer (length control) 39.
NAR
NACC (truncate) 34.
[Figure]
NACC (length control) 34.
[Figure]
truncate) 46.
[Table]
[Figure]
Transformer (length control) 45.
[Table]
[Figure]
(truncate) 47.
[Table]
[Figure]
(length control) 47.
[Table]
[Figure]
[Figure]
Figure blindly given to annotators in a random order; annotators then voted for the better summary or a tie, regarding the overall quality and completeness/fluency separately.
We counted the votes for each decoding method on the two evaluation criteria, and show the percentage of wins/ties/loses in Table 3.
As seen, our length-control decoding has a dominant advantage over the truncating method in terms of both the overall quality and completeness/fluency.
Further, this result is statistically significant based on a two-sided binomial test (ignoring ties), verifying that our length-control algorithm indeed improves the quality and completeness of the predicted summaries.
Comparison with Autoregressive Models.
We are curious about how our non-autoregressive NACC is compared with autoregressive (AR) methods.
Thus, we train a standard AR Transformer with truncating and length-control decodings, and show results in Table 4.
As seen, our length-control algorithm is not compatible with the AR Transformer and hurts the
ROUGE scores (Rows 2 & 6).
This is because our algorithm is based on dynamic programming and requires model outputs to be local, so that the length-control problem can be divided into shared subproblems; however, the predicted probabilities of the AR Transformer depend on partial generation at previous time steps.
Note that this is not a disadvantage of our approach, but shows that NAR generation provides unique opportunities for length control.
Admittedly, NACC has slightly lower ROUGE scores than AR Transformers in the supervised setting (Rows 1–4), because human-written summaries are flexible, causing difficulties for NAR training.
Nevertheless, our NACC achieves much higher inference efficiency, and outperforms all previous NAR systems (recall Table 1).
In the unsupervised setting, our approach achieves higher performance than the AR Transformer, which is a very strong result.
This is because we learn from a search-based method that extracts source words as the summary [33], and our CTC training—with blank tokens scattering over the whole output sentence as appropriate—can capture such strong correspondence between input and output.
Moreover, the proposed length-control algorithm is able to maintain the summary completeness given the length constraint, achieving better ROUGE scores than NACC with truncating.
[Table]
Analysis of the Length Bucket.
Our dynamic programming is an approximate algorithm with a α -sized length bucket (see Figure 1b and §3.2).
Here, we investigate the effect of the bucket size in terms of ROUGE scores (the arithmetic mean of R-1, R-2, and R-L) and inference efficiency in the unsupervised setting where training targets are 8-word summaries from [33], following Table 1.
As seen in Figure 2, the ROUGE score continuously decreases with a larger bucket size (thick orange curve).
This not only confirms the inexactness of our algorithm, but also shows that a small bucket size does not hurt the performance much.
On the other hand, the inference time decreases drastically at the beginning (thin blue curve) because we have fewer dynamic programming steps; as the bucket size increases, the inference time convergences to NACC without length control.
Based on this analysis, we set the bucket size to be 4 in our experiments.
Length-Transfer Generation.
Our NACC model is capable of length-transfer generation, that is, generating summaries of different lengths from the training targets.
Such generation is important to real-world applications where summaries of various lengths are needed for the same input, e.g., fitting different screen widths.
Although generating a short enough summary may satisfy all possible length constraints, a longer summary that better utilizes the length budget can preserve more information; this is also reflected by ROUGE scores, which prefer longer summaries, as argued by [33].
Figure 3 compares the performance of NACC with Su et al.
[34] when learning from 8-word summaries in the unsupervised setting.
When the inference length budget is less than training ( x -axis < 50 ), the ROUGE score of NACC decreases almost linearly with a decreasing length budget, but Su et al.
[34]’s approach degrades faster than ours.
For x -axis > 50 , we find the soft penalty in [34] is unable to generate longer summaries than trained (shown by the dashed orange line), whereas our approach is able to utilize the increased length budget and achieve higher ROUGE scores.
Case Study.
Table 5 shows example summaries generated by NACC and the AR Transformer on the
Gigaword test set.
As seen, a model without length control may generate a summary that happens to have the desired length (AR Transformer in the supervised setting), a shorter summary (NACC in the supervised setting), or a longer summary (both AR Transformer and NACC in the unsupervised setting).
A shorter summary fails to utilize the entire length budget, leading to less information conveyed, whereas a longer summary requires truncating for explicit length control.
Both cases are undesired.
By contrast, our proposed algorithm is able to generate a summary whose length is close to but less than the length budget.
The resulting summary is more complete than truncating, and better keeps the key information.
Conclusion
In this work, we propose a Non-Autoregressive Summariation model with Character-level length
Control (NACC), which can explicitly control the number of characters in the predicted summaries.
Experiments show that our NACC approach not only achieves the state-of-the-art non-autoregressive (NAR) performance on Gigaword and DUC2004 datasets under length constraints, but is several times faster than autoregressive (AR) models and even outperforms an AR Transformer in the unsupervised setting.
Moreover, our approach is able to perform length-transfer generation, that is, generating summaries of different lengths from the training set.
Limitation and Future Work.
Our proposed length-control algorithm only works with nonautoregressive models, which is a limitation (but not a disadvantage) of our work.
We have clearly stated this throughout the paper.
Our NACC approach—although largely outperforming previous NAR models and retaining high inference efficiency—achieves lower ROUGE scores than AR models in the supervised setting.
This is the limitation of all NAR approaches in general, and can be addressed by future work.
We nevertheless outperform AR models in the unsupervised setting.
Acknowledgments
We thank all reviewers for their valuable comments.
The research is supported in part by the Natural
Sciences and Engineering Research Council of Canada (NSERC) under grant No.
RGPIN2020-04465, the Amii Fellow Program, the Canada CIFAR AI Chair Program, a UAHJIC project, a donation from
DeepMind and the Digital Research Alliance of Canada (alliancecan.ca).
Checklist
For all authors... (a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope?
[Yes] (b) Did you describe the limitations of your work?
[Yes] See Section 5.
(c) Did you discuss any potential negative societal impacts of your work?
[N/A] (d) Have you read the ethics review guidelines and ensured that your paper conforms to them?
[Yes] 2.
If you are including theoretical results... (a) Did you state the full set of assumptions of all theoretical results?
[Yes]
In Theorem 1.
(b) Did you include complete proofs of all theoretical results?
[Yes] In Appendix A. 3.
If you ran experiments... (a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)?
[Yes] Footnote 1.
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)?
[Yes] See Section 4.1 for the key setups and the codebase (Footnote 1) for full details.
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)?
[N/A]
In our preliminary experiments, we found the results are pretty robust.
(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)?
[Yes] See Section 4.1.
If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... (a) If your work uses existing assets, did you cite the creators?
[Yes] See Section 4.1.
(b) Did you mention the license of the assets?
[N/A] (c) Did you include any new assets either in the supplemental material or as a URL?
[No] (d) Did you discuss whether
and how consent was obtained from people whose data you’re using/curating?
[N/A] (e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content?
[N/A] 5.
If you used crowdsourcing or conducted research with human subjects... (a) Did you include the full text of instructions given to participants and screenshots, if applicable?
[N/A] (b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable?
[N/A] While we conducted a human evaluation of machine learning systems, it was neither crowdsourced nor involving human subjects.
Instead, it was researchers studying machine learning systems’ outputs (i.e., subjects are machine learning).
(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation?
[N/A]
Our human evaluation of machine learning systems was done by in-lab research assistants; the research activities were part of their job duties paid through regular salary.
A Proof of Theorem
Theorem 1.
If the bucket size α = 1 and consecutive repetitions are not merged, then d S,T is the most probable sentence of T characters given by the S prediction slots.
(2) If α ̸ = 1 or repeating tokens are merged, our algorithm may not be exact.
Proof.
[Part (1)]
Our NACC is trained by the Connectionist Temporal Classification (CTC) algorithm
[11], which merges repeated consecutive tokens and removes ϵ s in the output sequence.
Since the merging operation establishes dependencies between tokens in the output sequence, our length-control algorithm is inexact.
In this part, we consider a variant of the CTC algorithm that does not merge repeated tokens but only removes ϵ s; we denote this modified reduction operation by Γ ′ .
For example, Γ ′ ( aaϵabbϵ ) = aaabb .
Our thus revised algorithm works as follows.
We denote (cid:101) d s,l = (cid:101)
d s,l 1 · · · (cid:101) d s,ls as the recursion variable, being the most probable s -token sequence that is reduced to a summary of length l .
The initialization of (cid:101)
d s,l is the same as the original length-control algorithm (§3.2), since the merging operation is not involved here.
However, the recursion involves only two cases:
• Case 1: w s = ϵ .
The recursion of this case is also the same (see Eqn. 4):
[Equation]
• Case 2: w s ̸ =
ϵ .
We have a set of candidate sequences:
[Equation]
This is analogous to Eqn.
(6), where α = 1 (due to our theorem assumption).
Also, the condition w s ̸
= (cid:101) d s − 1 ,l ′ s −in Eqn.
(6) is dropped here because this algorithm variant does not merge repeated tokens.
Then, the algorithm chooses the most probable candidate sequence as (cid:101) d s,l , given by
[Equation]
Now we will prove that the algorithm is exact: suppose P s,l := (cid:80) s i=1 v i ( (cid:101) d s,li ) is the log probability of (cid:101)
d s,l , we have
[Equation]
In other words, (cid:101) d s,l is the most probable s -token sequence that is reduced to length l .
This is proved by mathematical induction as follows.
Base Cases.
For l = 0 , the variable (cid:101) d s, 0 can only be s -many ϵ s.
The optimality in Eqn.
(11) holds trivially.
For s = 1 but l > 0 , the algorithm chooses (cid:101) d 1 ,l = argmax d 1 : u (d 1 )=
l v 1 (d 1 ) .
Therefore, P 1 ,l = max d 1 : | Γ ′ (d 1 ) | =
l v 1 (d 1 ) , showing that Eqn.
(11) is also satisfied with only one term in the summation.
Induction Step.
The induction hypothesis assumes P s − 1 ,l ′ =
[Equation]
for every l ′ < l .
We will show that the algorithm finds the sequence (cid:101)
d s,l with P s,l = max
[Equation]
Word
P 1 ( ·| x )
P 2 ( ·| x )
I 0.
am 0.
a 0.
ϵ 0.
According to Eqn.
[Equation]
the variable (cid:101) d s,l is the most probable sequence in (cid:101)
D s,l 1 ∪ (cid:101)
D s,l 2 .
Thus, we have
[Equation]
Here, (13) separates the max operation over l ′ and d s ; (14) is due to the induction hypothesis; (15) holds because the two max terms in (14) are independent given l ′ , and thus the summations can be grouped; and (16) further groups the two max operations with l ′ eliminated.
The last two lines are originally proved in [14] and also used in [7].
[Part (2)]
We now prove our algorithm may be inexact if α ̸ = 1 or repeated tokens are merged.
We show these by counterexamples.
Suppose α ̸ = 1 and in particular we assume α = 2 .
We further assume repeated tokens are not merged.
Consider the example shown in Table 6.
The length-control algorithm finds (cid:101) d 1 , 1 = { “am” } , and then (cid:101) d 2 , 2 = { “am I” } with the probability of 0 . 4 · 0 . 1 = 0 .
04 , as the first bucket covers the length range [1 , 2] and second [3 , 4] .
Here, we notice that two words are separated by a white space, which also counts as a character).
However, the optimum should be { “I am” } , which has a probability of 0 . 3 · 0 . 6 = 0 .
Now suppose repeated tokens are merged, and we further assume the length bucket α = 1 in this counterexample.
Again, this can be shown by Table 6: the algorithm finds d 1 , 1 = { “I” } and d 1 , 2 = { “am” } , based on which we have d 2 , 3 = { “I a” } with probability 0 .
= 0 .
However, the optimum should be { “a I” } with probability 0 . 2 · 0 . 1 = 0 .
The above theoretical analysis helps us understand when our algorithm is exact (or inexact).
Empirically, our approach works well as an approximate inference algorithm.