Xian Qian
Yang Liu

The University of Texas at Dallas

800 W. Campbell Rd., Richardson, TX, USA

{qx,yangl}@hlt.utdallas.edu

The University of Texas at Dallas

800 W. Campbell Rd., Richardson, TX, USA

{qx,yangl}@hlt.utdallas.edu

We propose two polynomial time inference algorithms to compress sentences under bigram and dependency-factored objectives. The first algorithm is exact and requires $O\left({n}^{6}\right)$ running time. It extends Eisner’s cubic time parsing algorithm by using virtual dependency arcs to link deleted words. Two signatures are added to each span, indicating the number of deleted words and the rightmost kept word within the span. The second algorithm is a fast approximation of the first one. It relaxes the compression ratio constraint using Lagrangian relaxation, and thereby requires $O\left({n}^{4}\right)$ running time. Experimental results on the popular sentence compression corpus demonstrate the effectiveness and efficiency of our proposed approach.

Sentence compression aims to shorten a sentence by removing uninformative words to reduce reading time.
It has been widely used in compressive summarization [9, 8, 10, 3, 15].
To make the compressed sentence readable, some techniques consider the n-gram language models of the compressed sentence [4, 12].
Recent studies used a subtree deletion model for compression [1, 13, 15],
which deletes a word only if its modifier in the parse tree is deleted.
Despite its empirical success, such a model fails to generate compressions that are not subject to the subtree constraint (see Figure 1).
In fact, we parsed the Edinburgh sentence compression corpus using the MSTparser^{1}^{1}http://sourceforge.net/projects/mstparser/,
and found that $2561$ of $5379$ sentences ($47.6\mathrm{\%}$) do not satisfy the subtree deletion model.

Methods beyond the subtree model are also explored. Trevor et al. proposed synchronous tree substitution grammar [5], which allows local distortion of the tree topology and can thus naturally capture structural mismatches. [7, 17] proposed the joint compression model, which simultaneously considers the n-gram model and dependency parse tree of the compressed sentence. However, the time complexity greatly increases since the parse tree dynamically depends on the compression. They used Integer Linear Programming (ILP) for inference which requires exponential running time in the worst case.

In this paper, we propose a new exact decoding algorithm for the joint model using dynamic programming. Our method extends Eisner’s cubic time parsing algorithm by adding signatures to each span, which indicate the number of deleted words and the rightmost kept word within the span, resulting in $O\left({n}^{6}\right)$ time complexity and $O\left({n}^{4}\right)$ space complexity. We further propose a faster approximate algorithm based on Lagrangian relaxation, which has $TO\left({n}^{4}\right)$ running time and $O\left({n}^{3}\right)$ space complexity ($T$ is the iteration number in the subgradient decent algorithm). Experiments on the popular Edinburgh dataset show that the proposed approach is 10 times faster than a high-performance commercial ILP solver.

We define the sentence compression task as: given a sentence composed of $n$ words, $\mathbf{x}={x}_{1},\mathrm{\dots},{x}_{n}$, and a length $L\le n$, we need to remove $\left(n-L\right)$ words from $\mathbf{x}$, so that the sum of the weights of the dependency tree and word bigrams of the remaining part is maximized. Formally, we solve the following optimization problem:

$\underset{\mathbf{z},\mathbf{y}}{max}$ | $\sum _{i}}{w}_{i}^{\text{tok}}{z}_{i}+{\displaystyle \sum _{i,j}}{w}_{ij}^{\text{dep}}{z}_{i}{z}_{j}{y}_{ij$ | (1) | |||

$$ | |||||

s.t. | $\mathbf{z}\text{isbinary},{\displaystyle \sum _{i}}{z}_{i}=L$ | ||||

$\mathbf{y}\text{isaprojectiveparsetreeoverthe}$ | |||||

$\mathrm{\u2001}\text{subgraph:}\left\{{x}_{i}|{z}_{i}=1\right\}$ |

where $\mathbf{z}$ is a binary vector, ${z}_{i}$ indicates ${x}_{i}$ is kept or not. $\mathbf{y}$ is a square matrix denoting the projective dependency parse tree over the remaining words, ${y}_{ij}$ indicates if ${x}_{i}$ is the head of ${x}_{j}$ (note that each word has exactly one head). ${w}_{i}^{\text{tok}}$ is the informativeness of ${x}_{i}$, ${w}_{ij}^{\text{bgr}}$ is the score of bigram ${x}_{i}{x}_{j}$ in an n-gram model, ${w}^{\text{dep}}$ is the score of dependency arc ${x}_{i}\to {x}_{j}$ in an arc-factored dependency parsing model. Hence, the first part of the objective function is the total score of the kept words, the second and third parts are the scores of the parse tree and bigrams of the compressed sentence, $$ indicates both ${x}_{i}$ and ${x}_{j}$ are kept, and are adjacent after compression. A graph illustration of the objective function is shown in Figure 2.

Throughout the paper, we assume that all the parse trees are projective. Our method is a generalization of Eisner’s dynamic programming algorithm [6], where two types of structures are used in each iteration, incomplete spans and complete spans. A span is a subtree over a number of consecutive words, with the leftmost or the rightmost word as its root. An incomplete span denoted as ${I}_{j}^{i}$ is a subtree inside a single arc ${x}_{i}\to {x}_{j}$, with root ${x}_{i}$. A complete span is denoted as ${C}_{j}^{i}$, where ${x}_{i}$ is the root of the subtree, and ${x}_{j}$ is the furthest descendant of ${x}_{i}$.

Eisner’s algorithm searches the optimal tree in a bottom up order. In each step, it merges two adjacent spans into a larger one. There are two rules for merging spans: one merges two complete spans into an incomplete span, the other merges an incomplete span and a complete span into a large complete span.

First we consider an easy case, where the bigram scores ${w}_{ij}^{\text{bgr}}$ in the objective function are ignored.

The scores of unigrams ${w}_{i}^{\text{tok}}$ can be transfered to the dependency arcs, so that we can remove all linear terms ${w}_{i}^{\text{tok}}{z}_{i}$ from the objective function. That is:

$\sum _{i}}{w}_{i}^{\text{tok}}{z}_{i}+{\displaystyle \sum _{i,j}}{w}_{ij}^{\text{dep}}{z}_{i}{z}_{j}{y}_{ij$ | ||||

$=$ | $\sum _{i,j}}\left({w}_{ij}^{\text{dep}}+{w}_{j}^{\text{tok}}\right){z}_{i}{z}_{j}{y}_{ij$ |

This can be easily verifed. If ${z}_{j}=0$, then in both equations, all terms having ${z}_{j}$ are zero; If ${z}_{j}=1$, i.e., ${x}_{j}$ is kept, since it has exactly one head word ${x}_{k}$ in the compressed sentence, the sum of the terms having ${z}_{j}$ is ${w}_{j}^{\text{tok}}+{w}_{kj}^{\text{dep}}$ for both equations.

Therefore, we only need to consider the scores of arcs. For any compressed sentence, we could augment its dependency tree by adding a virtual arc $i-1\to i$ for each deleted word ${x}_{i}$. If the first word ${x}_{1}$ is deleted, we connect it to the root of the parse tree ${x}_{0}$, as shown in Figure 3. In this way, we derive a full parse tree of the original sentence. This is a one-to-one mapping. We can reversely get the the compressed parse tree by removing all virtual arcs from the full parse tree. We restrict the score of all the virtual arcs to be zero, so that scores of the two parse trees are equivalent.

Now the problem is to search the optimal full parse tree with $n-L$ virtual arcs.

We modify Eisner’s algorithm by adding a signature to each span indicating the number of virtual arcs within the span. Let ${I}_{j}^{i}\left(k\right)$ and ${C}_{j}^{i}\left(k\right)$ denote the incomplete and complete spans with $k$ virtual arcs respectively. When merging two spans, there are 4 cases, as shown in Figure 4.

- •
Case 1 Link two complete spans by a virtual arc : ${I}_{i+1}^{i}\left(1\right)={C}_{i}^{i}\left(0\right)+{C}_{i+1}^{i+1}\left(0\right)$.

The two complete spans must be single words, as the length of the virtual arc is 1.

- •
Case 2 Link two complete spans by a non-virtual arc: ${I}_{j}^{i}\left(k\right)={C}_{r}^{i}\left({k}^{\prime}\right)+{C}_{r+1}^{j}\left({k}^{\mathrm{\prime \prime}}\right),{k}^{\prime}+{k}^{\mathrm{\prime \prime}}=k$.

- •
Case 3 Merge an incomplete span and a complete span. The incomplete span is covered by a virtual arc: ${I}_{j}^{i}\left(j-i\right)={I}_{i+1}^{i}\left(1\right)+{C}_{j}^{i+1}\left(j-i-1\right)$. The number of the virtual arcs within ${C}_{j}^{i+1}$ must be $j-i-1$, since the descendants of the modifier of a virtual arc ${x}_{j}$ must be removed.

- •
Case 4 Merge an incomplete span and a complete span. The incomplete span is covered by a non-virtual arc: ${C}_{j}^{i}\left(k\right)={I}_{r}^{i}\left({k}^{\prime}\right)+{C}_{j}^{r}\left({k}^{\mathrm{\prime \prime}}\right),{k}^{\prime}+{k}^{\mathrm{\prime \prime}}=k$.

The score of the new span is the sum of the two spans. For case 2, the weight of the dependency arc $i\to j$, ${w}_{ij}^{\text{dep}}$ is also added to the final score. The root node is allowed to have two modifiers: one is the modifier in the compressed sentence, the other is the first word if it is removed.

For each combination, the algorithm enumerates the number of virtual arcs in the left and right spans, and the split position (e.g., ${k}^{\prime},{k}^{\mathrm{\prime \prime}},r$ in case 2), thus it takes $O\left({n}^{3}\right)$ running time. The overall time complexity is $O\left({n}^{5}\right)$ and the space complexity is $O\left({n}^{3}\right)$.

Next, we consider the bigram scores. The following proposition is obvious.

For any right-headed span ${I}_{j}^{i}$ or ${C}_{j}^{i}$, $i\mathrm{>}j$, words ${x}_{i}\mathit{,}{x}_{j}$ must be kept.

Suppose ${x}_{j}$ is removed, there must be a virtual arc $j-1\to j$ which is a conflict with the fact that ${x}_{j}$ is the leftmost word. As ${x}_{j}$ is a descendant of ${x}_{i}$, ${x}_{i}$ must be kept. ∎

When merging two spans, a new bigram is created, which connects the rightmost kept words in the left span and the leftmost kept word in the right span. According to the proposition above, if the right span is right-headed, its leftmost word is kept. If the right span is left-headed, there are two cases: its leftmost word is kept, or no word in the span is kept. In any case, we only need to consider the leftmost word in the right span.

Let ${I}_{j}^{i}\left(k,p\right)$ and ${C}_{j}^{i}\left(k,p\right)$ denote the single and complete span with $k$ virtual arcs and the rightmost kept word ${x}_{p}$. According to the proposition above, we have, for any right-headed span $p=i$.

We slightly modify the two merging rules above, and obtain:

- •
Case 2’ Link two complete spans by a non-virtual arc: ${I}_{j}^{i}\left(k,j\right)={C}_{r}^{i}\left({k}^{\prime},p\right)+{C}_{r+1}^{j}\left({k}^{\mathrm{\prime \prime}},j\right),{k}^{\prime}+{k}^{\mathrm{\prime \prime}}=k$. The score of the new span is the sum of the two spans plus ${w}_{ij}^{\text{dep}}+{w}_{p,r+1}^{\text{bgr}}$.

- •
Case 4’ Merge an incomplete span and a complete span. The incomplete span is covered by a non-virtual arc. For left-headed spans, the rule is ${C}_{j}^{i}\left(k,q\right)={I}_{r}^{i}\left({k}^{\prime},p\right)+{C}_{j}^{r}\left({k}^{\mathrm{\prime \prime}},q\right),{k}^{\prime}+{k}^{\mathrm{\prime \prime}}=k$, and the score of the new span is the sum of the two spans plus ${w}_{pr}^{\text{bgr}}$; for right-headed spans, the rule is ${C}_{j}^{i}\left(k,i\right)={I}_{r}^{i}\left({k}^{\prime},i\right)+{C}_{j}^{r}\left({k}^{\mathrm{\prime \prime}},r\right)$, and the score of the new span is the sum of the two spans.

The modified algorithm requires $O\left({n}^{6}\right)$ running time and $O\left({n}^{4}\right)$ space complexity.

In this section, we propose an approximate algorithm where the length constraint ${\sum}_{i}{z}_{i}=L$ is relaxed by Lagrangian Relaxation. The relaxed version of Problem (1) is

$\underset{\lambda}{min}\underset{\mathbf{z},\mathbf{y}}{max}$ | $\sum _{i}}{w}_{i}^{\text{tok}}{z}_{i}+{\displaystyle \sum _{i,j}}{w}_{ij}^{\text{dep}}{z}_{i}{z}_{j}{y}_{ij$ | (2) | |||

$$ | |||||

$+\lambda \left({\displaystyle \sum _{i}}{z}_{i}-L\right)$ | |||||

s.t. | $\mathbf{z}\text{isbinary}$ | ||||

$\mathbf{y}\text{isaprojectiveparsetreeoverthe}$ | |||||

$\mathrm{\u2001}\text{subgraph:}\left\{{x}_{i}|{z}_{i}=1\right\}$ |

Fixing $\lambda $, the optimal $\mathbf{z},\mathbf{y}$ can be found using a simpler version of the algorithm above. We drop the signature of the virtual arc number from each span, and thus obtain an $O\left({n}^{4}\right)$ time algorithm. Space complexity is $O\left({n}^{3}\right)$. Fixing $\mathbf{z},\mathbf{y}$, the dual variable is updated by

$\lambda =\lambda +\alpha \left(L-{\displaystyle \sum _{i}}{z}_{i}\right)$ |

where $\alpha >0$ is the learning rate. In this paper, our choice of $\alpha $ is the same as [16].

We evaluate our method on the data set from [4]. It includes 82 newswire articles with manually produced compression for each sentence. We use the same partitions as [10], i.e., 1,188 sentences for training and 441 for testing.

Our model is discriminative – the scores of the unigrams, bigrams and dependency arcs are the linear functions of features, that is, ${w}_{i}^{\text{tok}}={\mathbf{v}}^{T}\mathbf{f}\left({x}_{i}\right)$, where $\mathbf{f}$ is the feature vector of ${x}_{i}$, and $\mathbf{v}$ is the weight vector of features. The learning task is to estimate the feature weight vector based on the manually compressed sentences.

We run a second order dependency parser trained on the English Penn Treebank corpus to generate the parse trees of the compressed sentences. Then we augment these parse trees by adding virtual arcs and get the full parse trees of their corresponding original sentences. In this way, the annoation is transformed into a set of sentences with their augmented parse trees. The learning task is similar to training a parser. We run a CRF based POS tagger to generate POS related features.

We adopt the compression evaluation metric as used in [10] that measures the macro F-measure for the retained unigrams (${F}_{ugr}$), and the one used in [4] that calculates the F1 score of the grammatical relations labeled by RASP [2].

We compare our method with other 4 state-of-the-art systems. The first is linear chain CRFs, where the compression task is casted as a binary sequence labeling problem. It usually achieves high unigram F1 score but low grammatical relation F1 score since it only considers the local interdependence between adjacent words. The second is the subtree deletion model [1] which is solved by integer linear programming (ILP)^{2}^{2}We use Gurobi as the ILP solver in the paper. http://www.gurobi.com/. The third one is the bigram model proposed by McDonald [12] which adopts dynamic programming for efficient inference. The last one jointly infers tree structures alongside bigrams using ILP [17]. For fair comparison, systems were restricted to produce compressions that matched their average gold compression rate if possible.

Features for unigram ${x}_{i}$ |

${w}_{i-2}$, ${w}_{i-1}$, ${w}_{i}$, ${w}_{i+1}$, ${w}_{i+2}$ |

${t}_{i-2}$, ${t}_{i-1}$, ${t}_{i}$, ${t}_{i+1}$, ${t}_{i+2}$ |

${w}_{i}{t}_{i}$ |

${w}_{i-1}{w}_{i}$, ${w}_{i}{w}_{i+1}$ |

${t}_{i-2}{t}_{i-1}$, ${t}_{i-1}{t}_{i}$, ${t}_{i}{t}_{i+1}$, ${t}_{i+1}{t}_{i+2}$ |

${t}_{i-2}{t}_{i-1}{t}_{i}$, ${t}_{i-1}{t}_{i}{t}_{i+1}$, ${t}_{i}{t}_{i+1}{t}_{i+2}$ |

whether ${w}_{i}$ is a stopword |

Features for selected bigram ${x}_{i}{x}_{j}$ |

distance between the two words: $j-i$ |

${w}_{i}{w}_{j}$, ${w}_{i-1}{w}_{j}$, ${w}_{i+1}{w}_{j}$, ${w}_{i}{w}_{j-1}$, ${w}_{i}{w}_{j+1}$ |

${t}_{i}{t}_{j}$, ${t}_{i-1}{t}_{j}$, ${t}_{i+1}{t}_{j}$, ${t}_{i}{t}_{j-1}$, ${t}_{i}{t}_{j+1}$ |

Concatenation of the templates above |

$$ |

Dependency Features for arc ${x}_{h}\to {x}_{m}$ |

distance between the head and modifier $h-m$ |

dependency type |

direction of the dependency arc (left/right) |

${w}_{h}{w}_{m}$, ${w}_{h-1}{w}_{m}$, ${w}_{h+1}{w}_{m}$, ${w}_{h}{w}_{m-1}$, ${w}_{h}{w}_{m+1}$ |

${t}_{h}{t}_{m}$, ${t}_{h-1}{t}_{m}$, ${t}_{h+1}{t}_{m}$, ${t}_{h}{t}_{m-1}$, ${t}_{h}{t}_{m+1}$ |

${t}_{h-1}{t}_{h}{t}_{m-1}{t}_{m}$, ${t}_{h}{t}_{h+1}{t}_{m-1}{t}_{m}$ |

${t}_{h-1}{t}_{h}{t}_{m}{t}_{m+1}$, ${t}_{h}{t}_{h+1}{t}_{m}{t}_{m+1}$ |

Concatenation of the templates above |

$\left\{{t}_{h}{t}_{k}{t}_{m}\right|{x}_{k}$ lies between ${x}_{h}$ and ${x}_{m}\}$ |

Three types of features are used to learn our model: unigram features, bigram features and dependency features, as shown in Table 1. We also use the in-between features proposed by [11], which were shown to be very effective for dependency parsing.

System | C Rate | ${F}_{uni}$ | RASP | Sec. | |
---|---|---|---|---|---|

Ours(Approx) | $0.68$ | 0.802 | 0.598 | 0.056 | |

Ours(Exact) | $0.68$ | $0.805$ | $0.599$ | $0.610$ | |

Subtree | $0.68$ | $0.761$ | $0.575$ | $0.022$ | |

TM13 | $0.68$ | $0.804$ | $0.599$ | $0.592$ | |

McDonald06 | $0.71$ | $0.776$ | $0.561$ | $0.010$ | |

CRFs | $0.73$ | $0.790$ | $0.501$ | $0.002$ |

We show the comparison results in Table 2. As expected, the joint models (ours and TM13) consistently outperform the subtree deletion model, since the joint models do not suffer from the subtree restriction. They also outperform McDonald’s, demonstrating the effectiveness of considering the grammar structure for compression. It is not surprising that CRFs achieve high unigram F scores but low syntactic F scores as they do not consider the fluency of the compressed sentence.

Compared with TM13’s system, our model with exact decoding is not significantly faster due to the high order of the time complexity. On the other hand, our approximate approach is much more efficient, about 10 times faster than TM13’ system, and achieves competitive accuracy with the exact approach. Note that it is worth pointing out that the exact approach can output compressed sentences of all lengths, whereas the approximate method can only output one sentence at a specific compression rate.

In this paper, we proposed two polynomial time decoding algorithms using joint inference for sentence compression.
The first one is an exact dynamic programming algorithm, and requires $O\left({n}^{6}\right)$ running time.
This one does not show significant advantage in speed over ILP.
The second one is an approximation of the first algorithm.
It adopts Lagrangian relaxation to eliminate the compression ratio constraint, yielding lower time complexity $TO\left({n}^{4}\right)$.
In practice it achieves nearly the same accuracy as the exact one, but is much faster.^{3}^{3}Our code is available at http://code.google.com/p/sent-compress/

The main assumption of our method is that the dependency parse tree is projective, which is not true for some other languages. In that case, our method is invalid, but [17] still works. In the future, we will study the non-projective cases based on the recent parsing techniques for 1-endpoint-crossing trees [14].

We thank three anonymous reviewers for their valuable comments. This work is partly supported by NSF award IIS-0845484 and DARPA under Contract No. FA8750-13-2-0041. Any opinions expressed in this material are those of the authors and do not necessarily reflect the views of the funding agencies.

- [1] T. Berg-Kirkpatrick, D. Gillick and D. Klein(2011-06) Jointly learning to extract and compress. pp. 481–490. Cited by: 1, 4.1.
- [2] T. Briscoe and J. Carroll(2002) Robust accurate statistical annotation of general text. External Links: Link Cited by: 4.1.
- [3] Y. Chali and S. A. Hasan(2012) On the effectiveness of using sentence compression models for query-focused multi-document summarization. See , pp. 457–474. Cited by: 1.
- [4] J. Clarke and M. Lapata(2008) Global inference for sentence compression: an integer linear programming approach. J. Artif. Intell. Res. (JAIR) 31, pp. 399–429. Cited by: 1, 4.1, 4.1.
- [5] T. Cohn and M. Lapata(2009-04) Sentence compression as tree transduction. J. Artif. Int. Res. 34 (1), pp. 637–674. External Links: ISSN 1076-9757, Link Cited by: 1.
- [6] J. M. Eisner(1996) Three new probabilistic models for dependency parsing: an exploration. COLING ’96, Stroudsburg, PA, USA, pp. 340–345. External Links: Link, Document Cited by: 3.1.
- [7] P. Genest and G. Lapalme(2012) Fully abstractive approach to guided summarization. pp. 354–358. Cited by: 1.
- [8] C. Li, F. Liu, F. Weng and Y. Liu(2013-10) Document summarization via guided sentence compression. Cited by: 1.
- [9] F. Liu and Y. Liu(2009-08) From extractive to abstractive meeting summaries: can it be done by sentence compression?. pp. 261–264. Cited by: 1.
- [10] A. F. T. Martins and N. A. Smith(2009) Summarization with a joint model for sentence extraction and compression. pp. 1–9. Cited by: 1, 4.1, 4.1.
- [11] R. McDonald, K. Crammer and F. Pereira(2005) Online large-margin training of dependency parsers. Cited by: 4.2.
- [12] R. McDonald(2006-04) Discriminative Sentence Compression with Soft Syntactic Constraints. Cited by: 1, 4.1.
- [13] H. Morita, R. Sasano, H. Takamura and M. Okumura(2013-08) Subtree extractive summarization via submodular maximization. pp. 1023–1032. Cited by: 1.
- [14] E. Pitler, S. Kannan and M. Marcus(2013) Finding optimal 1-endpoint-crossing trees. Cited by: 5.
- [15] X. Qian and Y. Liu(2013-10) Fast joint compression and summarization via graph cuts. pp. 1492–1502. Cited by: 1.
- [16] A. M. Rush, D. Sontag, M. Collins and T. Jaakkola(2010-10) On dual decomposition and linear programming relaxations for natural language processing. pp. 1–11. Cited by: 3.3.
- [17] K. Thadani and K. McKeown(2013-08) Sentence compression with joint structural inference. Cited by: 1, 4.1, 5.

Generated on Wed Jun 11 17:47:50 2014 by LaTeXML