Elamur Research

Randomized Decoding for Selection-and-Ordering Problems

Paper · 2007 · Pawan Deshpande, Regina Barzilay and David Karger

Summary

A headline generator has to decide which words matter and how those words fit together. A word can look important in isolation and still be a poor choice for the title that the other words can form. This paper studies how to make both decisions in the same search. It represents the available words as vertices in a directed graph and combines the value of choosing a word with the value of placing it after another word. The decoder seeks the highest-scoring path of a specified length, with rules that prevent it from using a word twice or choosing several forms of the same stem.

The difficulty is that a partial path needs a record of what it has already used. Keeping a separate record for every possible combination of words makes the search expensive. The authors adapt a technique called color-coding. They assign random colors to the candidates and find the best path that uses each color at most once. That condition keeps paths from repeating a candidate and gives the search a smaller record to maintain. It also rules out some perfectly valid paths when their words receive the same color. The decoder tries fresh assignments and keeps the strongest result. The paper derives a bound that connects the number of independent trials to the chance of recovering an optimum under the scoring rule.

The authors test the method by generating titles for sections of an algorithms textbook. An exact integer linear programming solver establishes the best attainable graph score for each test section. The randomized decoder matches that optimum throughout the test set, with a median time of 9.7 seconds per section. The exact solver takes a median of 57.3 seconds. Beam search also reaches every optimum at a sufficiently large width, with a median of 224.4 seconds at the smallest width that does so in this test. A narrower beam finds fewer optima and produces titles with lower ROUGE-L scores against the textbook titles.

These comparisons distinguish the quality of a search from the quality of the scoring rule it serves. Finding the graph optimum improved agreement with the reference titles relative to the narrower beams, under the preferences and title lengths used in the experiment. The probability bound concerns a different question. It applies to recovering the best path under the given weights, where the decoder can evaluate success against the exact solver in the experiment. Its usefulness comes from making the search effort adjustable while preserving the requirement that the output contain distinct units.

Deep dive: Randomized Decoding for Selection-and-Ordering Problems

Randomized decoding uses color-coding to choose and order words for titles, with a probability bound and an exact solver to check its results. · about 40 minutes to read

The problem and its context

Choosing the content and the sequence

A generator frequently starts with more material than it is expected to use. A title draws a few words from a document. A summary of several documents may draw a few sentences from a much larger collection. In both cases, the system faces a question about membership and a question about arrangement. A sentence worth retaining may work well after a particular explanation. A candidate title word may be especially suitable when it can sit next to another strong candidate. The paper addresses this kind of decision in text generation and summarization.

One possible design treats selection as a filtering step. It gives each unit a score, keeps enough units to fill the output, and passes them to a component that determines their order. This is a convenient division of work because each component solves a smaller problem. The division also commits the generator early. If the units with the strongest individual scores cannot be arranged into a good sequence, the ordering step has no opportunity to bring back a discarded candidate. Going in the other direction and choosing an order by transition scores alone would leave the value of including each unit to be accounted for separately. The paper proposes scoring both contributions together while choosing the path.

Consider the sentence version of the problem. A collection of articles may contain several sentences that describe the same development. Any member of that group could contribute the desired information, yet its wording and its relation to the surrounding sentences may differ. Choosing a representative before deciding the order hides those differences from the ordering procedure. A joint search can consider the alternatives in context while allowing the summary to use only one of them. The title system makes an analogous distinction for morphological variants. Sharing a stem is a reason to treat two forms as mutually exclusive candidates, while the particular form still affects how the resulting title reads.

Decoding is the search that begins after the preferences have been supplied. In this paper those preferences are local. Each selected unit contributes a selection score, while ordering scores describe pairs of neighboring units. A pair can receive a different score when its direction is reversed. In a title this is what lets the system favor one succession of words over another. In the summarization example the transition can express a preference for reading one sentence immediately after another. The paper asks how to search those scores effectively when the output has a prescribed length and must avoid redundancy.

Why a path must remember its history

Representing candidates as vertices and transitions as edges gives the decoder a way to talk about partial outputs. A partial title is a path ending at the last content word selected so far. Adding another word means traversing an edge from that endpoint. If edge weights contain the relevant selection and ordering preferences, their sum ranks the completed paths. This setup is close to a familiar dynamic programming problem, in which a search stores a best partial result and extends it when another choice becomes available.

The constraint on repeats changes what a partial result has to remember. Two paths could end at the same word and have the same length after visiting different words. The higher-scoring path might already have used a candidate that would be particularly valuable later. If the search keeps only that path, it loses a possible completion from the lower-scoring path. The problem persists when two different words belong to the same equivalence class. A path that used one variant has used up the class, even if it has never visited the vertex for the other variant.

In the paper, an acyclic path is one that never returns to a vertex already on the path. The directed graph itself may contain cycles. Much of the flexibility of the representation comes from having edges in both directions where both orders are possible. It is the chosen sequence that must avoid going around a cycle. The equivalence-class rule goes further than vertex uniqueness by forbidding two different vertices when they represent alternatives the system considers redundant.

An unrestricted shortest-path analogy therefore misses an essential feature of the task. The authors connect their objective to a prize-collecting traveling salesman problem in which the route must visit a specified number of vertices. The title problem has some freedom that a route through every candidate lacks. A section can offer many candidate words, while the title can admit only a small fraction of them. The paper contrasts this setup with a traveling-salesman formulation used for decoding in machine translation. It cites Fast Decoding and Optimal Decoding for Machine Translation for that line of work.

The difference between the number of available vertices and the required number of visits suggests a practical target for the search. Enumerating all choices of a short sequence can be manageable at the smallest lengths. Each increase in length, however, adds another choice from a pool whose size depends on the input. The paper asks whether the dependence on length can be separated from the dependence on the size of that pool. This is the sense in which it invokes fixed-parameter tractability. A running time can grow sharply with the requested length and still have a fixed polynomial dependence on the number of candidates.

That distinction belongs to the optimization problem itself. Each section supplies a separate graph, and the same decoder can face many more possible words in one section than in another. At the same time, the output length determines how much history each path needs. An algorithm designed around a small requested length can exploit this difference. It still has to pay for graph size, including the transitions it examines, and for the growing collection of possible histories.

Beam search was already used for problems of this kind, including earlier title-generation work. It grows partial sequences and retains a limited number of promising ones at each stage. The size of that retained collection is the beam width. A narrow beam limits the work required to extend the candidates, but a path discarded early cannot reenter the search. Under a local scoring rule, a partial sequence with a weaker current score can still lead to a better completed sequence. This makes the width a practical choice about how much search to do.

The paper also discusses A*, which prioritizes partial solutions using an estimate of how good their completions can be. The authors describe settings where it is effective and others where its time and memory needs approach those of exhaustive search. They identify a specific obstacle here. To enforce the length and nonrepetition conditions, a state has to retain information about its history. Many partial outputs that share an endpoint remain distinct from the search's perspective. The authors give this as the reason they did not include A* in the title experiment.

Variants that restrict time or memory and approaches based on local search offer other ways to explore difficult spaces. The paper notes that bounded search can give up the guarantee of recovering an optimum and that the local-search methods it discusses offer no comparable probability bound. Integer linear programming gives a different point of comparison. For a correctly formulated problem, a solver can search over discrete choices and certify the best feasible objective when it finishes. The authors situate their use of this approach alongside earlier decoding work and A Linear Programming Formulation for Global Inference in Natural Language Tasks.

Color-coding itself comes from earlier work by Alon and colleagues. The original task discussed by the paper asks whether a path of the required length exists in an unweighted graph. Here, existence alone is insufficient. The decoder needs the best weighted path and must respect groups of mutually exclusive candidates. The adaptation keeps the earlier technique's use of randomly assigned colors while changing what the search returns and what the colors stand for. This places it between a heuristic that simply prunes partial paths and an exact formulation that must complete a global optimization before it can certify an answer.

The method, step by step

Building the decoding graph

A run starts with scored candidates and a target length. For title generation, the candidates are content words from the body of the section. The decoder needs to know how suitable each candidate is for the title and how suitable each directed transition is between candidates. It also needs a rule for which alternatives are too redundant to appear together. The paper puts this information into a graph that is shared by the decoders in the experiment. The scoring procedure supplies the weights before the search begins.

Randomized search for a weighted path

The steps in order.

Randomized search for a weighted pathStep 1: Build a directed graph from the scored candidates1. Build a directed graph from the scored candidatesStep 2: Group candidates that cannot appear together2. Group candidates that cannot appear togetherStep 3: Choose a palette for the requested length3. Choose a palette for the requested lengthStep 4: Assign random colors to the candidate groups4. Assign random colors to the candidate groupsStep 5: Find the best path with distinct colors5. Find the best path with distinct colorsStep 6: Repeat with fresh assignments6. Repeat with fresh assignmentsStep 7: Return the highest-scoring path found7. Return the highest-scoring path found

The graph's candidate vertices form a set. An edge between two of these vertices gives a possible transition from the first to the second. To handle opening and closing the sequence, the authors add an artificial start vertex and an artificial end vertex. Every candidate can be reached directly from the start, and every candidate can lead directly to the end. The start and end help express the sequence boundaries without counting either as part of the requested content.

V∗ = V ∪ {s, t}

Here V is the set of candidate vertices. The symbols s and t denote the artificial source and sink, respectively. Braces collect the boundary vertices in a set, ∪ denotes set union, and V∗ names the resulting vertex set. The equals sign identifies that set with the union on its right.

 E∗ consists of the edges in E together with an edge from s to each vertex v in V and an edge from each such v to t.

Here E holds the original directed candidate transitions and E∗ holds the transitions after the boundary edges have been added. Each ordered pair describes an edge from its first entry to its second. The variable v ranges over V, as indicated by ∈, and the colon inside each set means that the edge is included for every candidate satisfying the stated condition. The two unions add edges leaving s and edges entering t.

The authors move each candidate's selection contribution onto the edges that enter it. This way, reaching a word accounts for the value of including it, irrespective of which other word preceded it. The same edge also accounts for the value of that transition. For distinct candidate vertices, the paper combines the logarithms of the selection and ordering scores. Written with names for those two inputs, the edge weight takes the following form.

w(v, u) = log sel(u) + log ord(v, u)

The symbols v and u denote the earlier and later candidate vertices. The function sel gives the selection score for u, while ord gives the ordering score for following v with u. The notation log denotes a logarithm and + adds the two contributions. The result w(v, u) is the weight of the directed edge. Using logarithms gives the path search an additive objective for these preferences.

Putting the selection score on the incoming edge preserves the distinction between including a unit and arranging it. A word pays the same selection contribution when reached by different routes, while the associated transition contribution can change with the preceding word. For a path through a candidate, the departing edge can then focus on the next candidate and on how the two fit together. The source edge makes it possible to charge for selecting the opening word even though no ordinary word precedes it. The sink lets the graph score the completion without selecting an extra content word.

An equivalence class is a group from which the decoder may take at most one member. The title graph keeps separate vertices for forms with the same stem. The paper gives the forms examine and examination as an example. A form can be more attractive after a particular word, while another form can make a better transition to the word that follows. If the class were collapsed into a single vertex, an incoming edge and an outgoing edge could implicitly refer to different forms. Retaining the vertices lets both edges refer to the same chosen word.

The authors propose a similar graph for multidocument summarization. There the vertices would represent sentences, and classes could collect sentences that convey similar information. Selection scores would express the desirability of extracting particular sentences. Directed transition scores would express preferences about which sentence should follow another. The desired output would be a sequence of the required number of sentences that contains at most one representative of each redundant group. The example explains the scope of the representation. The title experiment is where the authors implement and evaluate the search.

Coloring the candidates

A straightforward way to prevent repeats in dynamic programming would be to store the exact set of candidates used by every partial path that is still relevant. The candidate pool determines how many such sets are possible. Color-coding replaces those identities in the history with a palette whose size is chosen in relation to the requested length. The endpoint still keeps its identity, because the score of the next transition depends on exactly where the path ends. The earlier vertices can be represented by their colors for the purpose of deciding whether the next extension is legal.

The decoder gives each equivalence class a randomly chosen color, shared by the candidates in that class. A candidate with no alternatives can be treated as a class by itself. The artificial source and sink do not consume colors. A path is called colorful when its ordinary vertices use distinct colors. Revisiting a vertex would repeat its color, and visiting a second member of an already used class would do the same. A colorful path therefore satisfies both restrictions. It can still choose among candidates in a class, because the vertices retain their own transition weights.

Some different classes inevitably receive the same color in a trial. A path that uses members of both classes can be legal under the original constraints and still be inadmissible for that assignment. This is the cost of compressing the history. In a favorable assignment, the classes used by an optimal path all have distinct colors. Then the path remains in the restricted search space. Every path that competes with it in that space is also feasible in the original graph, so none can achieve a higher score. Thus a favorable assignment suffices for the best colorful path to attain the original optimum.

Randomization enters at the coloring stage. Once the colors are assigned, finding the best colorful path is an exact dynamic programming calculation for those colors. Two trials can return different paths because the sets of allowed paths differ. Keeping the strongest result across trials preserves any optimum already encountered. It also preserves the best feasible answer found so far when a later assignment happens to be less useful.

The reduction in state comes from treating distinct partial paths as interchangeable under the colored restriction when they have the same endpoint and use the same colors. The next edge sees that endpoint, and the eligibility of its destination depends on the set of occupied colors. Therefore, for purposes of any later extension, the path with the greater accumulated score dominates the other. The decoder can discard the weaker partial path even if it contains different earlier vertices. The scoring rule and the repeat restriction are both essential to this reasoning. The first makes future edge weights depend on where the path ended. The second makes future admissibility depend on a color set.

Computing the best colorful path

The paper uses the term spectrum for the colors of the interior vertices of a partial path. Its convention excludes the starting vertex and the current endpoint. For a partial path that begins at the source and goes directly to a candidate, the interior is empty. The candidate still has a color, and the state still identifies the candidate. When that endpoint is extended to another vertex, it moves into the interior and its color becomes part of the new spectrum.

q[v, ∅] = w(s, v)

The entry q[v, ∅] is the best score for a partial path ending at candidate v with the empty spectrum ∅. The function w gives the weight of the edge from the source s to v. Such a path has no ordinary vertex before v. The equality initializes the dynamic programming table with the direct source edges.

To fill a larger spectrum, the decoder considers the vertex just before the desired endpoint. Its color must occur in the desired interior, because that predecessor becomes an interior vertex when the edge is appended. Removing its color gives the spectrum of the smaller problem. The color of the new endpoint must be absent from the desired interior. This last restriction ensures that the longer path stays colorful as soon as it is created, even though the endpoint is kept outside the spectrum by convention.

q[v, S] = max {q[u, S − {cᵤ}] + w(u, v) : (u, v) ∈ E∗, cᵤ ∈ S, cᵥ ∉ S}

Here q[v, S] is the best score of a path from s to candidate v with interior spectrum S. The variable u ranges over ordinary predecessor vertices that have an edge (u, v) in the extended edge set E∗. The symbols cᵤ and cᵥ denote the assigned colors of u and v. The condition cᵤ ∈ S requires the predecessor's color to be in the new spectrum, and cᵥ ∉ S requires the endpoint's color to be absent. The expression S − {cᵤ} removes the predecessor's color from the set. The operation max takes the largest of the eligible scores, each formed by adding the weight w(u, v) to the earlier table entry. An entry with no feasible predecessor yields no path.

The table can be filled in order of increasing spectrum size. A proposed entry always depends on an entry whose spectrum has one fewer member, so the smaller problem is already available. The recurrence considers every eligible final transition into a state. Conversely, extending a feasible earlier entry under the displayed conditions produces a feasible path for the new state. This is what lets the table keep the optimum for that state without enumerating every path that could have led there. Recording the predecessor that attains the best value allows the sequence to be recovered from the filled table.

To finish, the decoder considers only partial paths containing the required number of ordinary vertices, adds the edge to the sink, and picks the highest total. Under the paper's spectrum convention, a partial path ending at its last ordinary vertex has that vertex outside the spectrum. The completed path ending at the sink has all its ordinary vertices in the interior. Spelling out that distinction resolves the ambiguity between counting ordinary vertices, counting vertices including the boundaries, and counting edges in the description of the iterations.

argmax_{v ∈ V, |S| = k − 1} {q[v, S] + w(v, t)}

The operation argmax chooses an endpoint v and spectrum S attaining the highest value among the indicated feasible states. The vertex v ranges over the candidates V. The notation |S| is the number of colors in the interior of the partial path. The required number of ordinary vertices is k, so that interior has k − 1 colors before the last candidate v is counted. The quantity q[v, S] is the best partial score and w(v, t) is the weight of the final edge to the artificial sink t. The equality in the subscript limits the comparison to paths of the requested size.

For comparison, the paper discusses searching directly over the possible sequences of distinct candidates. Its growth in the number of candidates is captured by the following running-time expression for enumeration.

O(nᵏ)

Here n is the number of candidate vertices and k is the requested number of ordinary vertices on the path. The exponent indicates how a larger requested length changes the dependence on the candidate pool. The notation O expresses the order of growth. For the worked example of a length-2 path, trying the candidate pairs in both orders gives the quadratic dependence on n described by the paper.

With colors, a spectrum can be represented by a bit vector in which each position says whether a palette color occurs. A table at one vertex can allocate an entry for each subset of the palette. Testing predecessor relationships still involves the graph, including the candidate pair transitions. The paper uses the following rough scaling to illustrate the fixed-parameter advantage of color-coding before factoring in the full cost of getting a desired probability of success.

O(2ᵏ n²)

The symbols k and n again denote the required path length in ordinary vertices and the number of candidate vertices. The factor 2ᵏ describes the growth of the color subsets with a palette of size k. The factor n² reflects the dependence on candidate pairs in the dense directed graph. The O notation describes the rough growth rate. Repeated trials and the option of a larger palette have their own costs, which the paper considers explicitly when choosing how to run the randomized search.

Repeating trials and choosing a palette

For the probability analysis, fix an optimal path. Its ordinary vertices belong to distinct equivalence classes. Their colors are drawn independently in a trial. The first class along the path can take any color. The next class must avoid the color already taken. Each subsequent class has another used color to avoid, provided the earlier draws were distinct. Multiplying the conditional probabilities gives the chance that this particular path survives the coloring.

p = 1 · ((r − 1)/r) · ((r − 2)/r) · … · ((r − (k − 1))/r)

The symbol p denotes the probability of a favorable coloring for the fixed optimal path. The palette contains r colors and the path contains k ordinary vertices. The initial 1 represents the unrestricted first draw. Each fraction divides the number of colors still available by the size of the palette, and · multiplies those probabilities. The ellipsis … continues the pattern through the last class on the path. The formula assumes r is at least k. When there are several optimal paths, the chance of finding an optimum can exceed the chance that this particular path survives.

This probability depends on the path length and palette size. It does not depend on the overall size of the graph, because the coloring event is defined by the classes on a fixed path. Color assignments elsewhere can influence which other paths are feasible for the trial. Once an optimum is feasible, those other paths cannot prevent the search from attaining its score. The weight of the path also plays no part in the probability that its colors will be distinct.

A single trial can have a low probability of retaining the path, especially when many classes must all receive different colors. The authors use independent repetition to increase the probability of obtaining an optimum. They refer to this as amplification. The algorithm compares outputs using the same graph objective each time. A trial that attains the optimum makes the best result over all trials optimal, regardless of what earlier or later trials return. Here is the paper's run budget, with m used for the number of trials so that t can continue to denote the sink elsewhere.

m = (1/p) ln(1/δ)

Here m is the trial budget before rounding up to a whole number of runs. The value p is the probability that the fixed optimal path survives a trial, and δ is the target upper bound on the probability of missing an optimum. The notation ln is the natural logarithm. The reciprocal 1/p scales the budget by the rarity of a favorable assignment, while 1/δ is the reciprocal of the desired failure bound.

(1 − p)ᵐ ≤ e^(−pm) = δ

The left-hand expression is the probability that the favorable event for the fixed path fails in each of the m independent trials. The middle expression is an upper bound on that probability, using e as the base of the natural logarithm. The equality on the right uses the unrounded budget in the preceding formula. Rounding the trial count upward preserves the bound by making the middle expression at most δ. Because the decoder could also recover an optimum through another path, the probability of missing every optimum is bounded by the probability of missing this particular favorable event.

Adding colors raises the chance that a path survives a trial. It also increases the number of spectra that the dynamic program might have to consider. The palette can therefore make each trial more effective and more expensive at the same time. The paper compares palette sizes by combining a per-trial cost proportional to the number of color subsets with a number of trials proportional to the reciprocal of the success probability. The common factor associated with the chosen failure target does not affect that comparison.

Tᵣ ∝ 2ʳ / p

Here Tᵣ is the runtime quantity used to compare palettes of size r. The proportionality sign ∝ indicates that terms common to the palette comparison are omitted. The numerator 2ʳ counts the subsets of the palette. The denominator p is the favorable-coloring probability for that palette. Dividing by it accounts for the increase in required repetition as a favorable draw becomes less likely.

The authors compare the estimated total cost of a palette with that of the next larger palette. The following ratio incorporates the increase in subsets and the change in the chance of a favorable draw.

Tᵣ₊₁ / Tᵣ = 2(1 + 1/r)ᵏ(1 − k/(r + 1))

The numerator Tᵣ₊₁ is the estimated cost with r + 1 colors and the denominator Tᵣ is the estimated cost with r colors. The required length is k. The 2 reflects the doubling of the number of subsets when a color is added. The remaining factors reflect the corresponding change in the probability term. A ratio below 1 favors the larger palette in this comparison. A ratio above 1 favors the smaller palette.

For large values of the required length, the paper studies a continuous approximation in terms of the fraction of palette colors that the path needs. It writes that fraction and the limiting ratio as follows.

α = k/r

The symbol α is the ratio of the required number k of ordinary vertices to the palette size r. It expresses how much of the palette would be occupied by the completed colorful path.

Tᵣ₊₁ / Tᵣ → 2e^α(1 − α)

The arrow → denotes the limiting expression as the length and palette size grow at the indicated proportion. The ratio on the left still compares neighboring palette sizes. The constant e is the base of the natural logarithm, and α has the definition just given. The authors locate the point at which the right-hand expression equals 1, where the neighboring choices have equal estimated cost in this approximation. Their numerical value for α is approximately .76804.

(4.5)ᵏ

This is the paper's approximate exponential factor in the palette and repetition cost at the large-length balance point. The base is 4.5 and the exponent k is the required number of ordinary vertices. It describes the length dependence in this calculation. The work of handling the graph and the choice of the failure bound still matter to the full search. For an actual length, the authors propose evaluating the cost expression for the palette sizes from k through 2k, where 2k means twice that length. This avoids relying on the large-length approximation to make a discrete choice.

Formulating an exact comparison

The paper also formulates the decoder as an integer linear program. Its decision variables indicate whether directed edges have been selected. The objective is a linear sum of their weights. Constraints require those choices to describe a source-to-sink path with the right length and at most one member of each equivalence class. Additional variables exclude cycles that could otherwise contribute to the objective. This formulation gives the experiment a way to establish optimal graph scores independently of the randomized decoder.

The equations below write the sums over the edges that actually exist, including the artificial boundary edges where applicable. This makes explicit which variables participate at the source, the sink, and ordinary vertices. With auxiliary words represented as alternative edges, each edge choice can be understood to refer to the particular transition it realizes.

max_I Σ_{(i,j) ∈ E∗} wᵢⱼ Iᵢⱼ

The operation max_I maximizes the expression over feasible choices of the edge indicators, collectively denoted by I. The symbol Σ sums over each directed edge (i,j) in the extended edge set E∗. Its weight is wᵢⱼ. The indicator Iᵢⱼ is 1 when the edge is selected and 0 otherwise. Multiplication by the indicator includes the weight exactly when that edge belongs to the solution.

Σ_{j : (s,j) ∈ E∗} Iₛⱼ = 1

The index j ranges over destinations of edges from the source s. The sum counts the selected outgoing edges of s through their indicators Iₛⱼ. Setting the sum to 1 gives the path a single first edge.

Σ_{i : (i,t) ∈ E∗} Iᵢₜ = 1

The index i ranges over the origins of edges entering the sink t. Each indicator Iᵢₜ records whether the corresponding edge is chosen. The equality requires a single selected edge into the sink.

Σ_{(i,j) ∈ E∗} Iᵢⱼ = k + 1

Here the sum runs over all edges of the extended graph and counts the selected ones. The target k counts the ordinary vertices. A path with those vertices between its boundaries has k + 1 edges, including the source and sink connections. The equality sets that count explicitly. The authors observe that the later flow conditions also impose the length, so the separate count can be dropped when those conditions are present.

Σ_{i : (i,v) ∈ E∗} Iᵢᵥ = Σ_{j : (v,j) ∈ E∗} Iᵥⱼ   (v ∈ V)

Here v is any ordinary candidate in V. The index i ranges over its incoming neighbors, while j ranges over its outgoing neighbors. The two sums count selected edges entering and leaving v, respectively. The equality gives every ordinary vertex balanced selected degree. An ordinary vertex entered by the path must also be left. The source and the sink have their own conditions because the path is supposed to begin and end there.

Σ_{i ∈ Z} Σ_{j : (i,j) ∈ E∗} Iᵢⱼ ≤ 1

The set Z denotes an equivalence class of ordinary vertices. The outer sum ranges over its members i, and the inner sum ranges over edges leaving each such member for a destination j. The indicator has its previous meaning, and ≤ gives an upper limit of 1 on the total selected outgoing degree of the class. Applied also to classes with a single member, this limit and the degree balance give each ordinary vertex at most one selected predecessor and successor. It is the class limit that supplies the upper bound on degree. Balance by itself only equates the incoming and outgoing counts.

Even with these restrictions a disconnected cycle can satisfy the local degree conditions. Every vertex on the cycle has one selected incoming edge and one selected outgoing edge, and the cycle can use classes distinct from those used by the source-to-sink part. The overall edge count can then be divided between an incomplete path and a cycle. The paper illustrates this problem with a selected subgraph in which the earlier constraints alone leave room for a cycle. The remedy is to require selected edges to carry a quantity that diminishes along the path.

0 ≤ fᵢⱼ ≤ (k + 1) Iᵢⱼ   ((i,j) ∈ E∗)

The variable fᵢⱼ is the flow on edge (i,j). The lower bound 0 makes the flow non-negative. The upper bound uses k + 1, the total flow supplied at the start, multiplied by the edge's selection indicator. An unselected edge has no flow. A selected edge may carry up to the full initial supply.

dᵥ = Σ_{i : (i,v) ∈ E∗} Iᵢᵥ   (v ∈ V∗ − {s})

The variable dᵥ is the demand at vertex v. The domain V∗ − {s} includes ordinary vertices and the sink while excluding the source s. The right-hand side counts selected incoming edges from origins i. At a selected ordinary vertex or at the sink, demand is 1. At an unused ordinary vertex it is 0.

aᵥ = Σ_{i : (i,v) ∈ E∗} fᵢᵥ

The variable aᵥ is the total flow arriving at v. The sum ranges over edges into v and adds their flow values fᵢᵥ. Since unselected edges carry nothing, only the selected incoming edge can contribute at a visited ordinary vertex or the sink.

bᵥ = Σ_{j : (v,j) ∈ E∗} fᵥⱼ

The variable bᵥ is the total flow leaving v. The sum ranges over edges from v to destinations j and adds their flow values fᵥⱼ. At an ordinary vertex with a selected successor, the total is the flow on that outgoing edge.

aᵥ − bᵥ = dᵥ   (v ≠ s)

For each vertex v other than the source s, the incoming amount aᵥ less the outgoing amount bᵥ must equal its demand dᵥ. The minus sign denotes subtraction and ≠ excludes the source from this condition. A visited ordinary vertex consumes one unit before passing the remainder along. An unused vertex has no demand and no selected edges to carry flow.

bₛ = k + 1

The quantity bₛ is the total flow leaving the source. It equals k + 1, where k is the required number of ordinary vertices. Because only one source edge is selected, that edge carries the entire initial amount.

aₜ = 1

The quantity aₜ is the total flow entering the sink. It equals 1, the amount left after the path has passed through the required ordinary vertices. With a single incoming edge at the sink, that edge carries the remaining unit.

The flow construction serves two purposes. On the path leaving the source, each visited ordinary vertex must take a unit away, and the sink must receive the specified remainder. This fixes how many ordinary vertices the path goes through. On a disconnected cycle, every selected vertex would also consume a unit. Flow coming into each cycle vertex from its predecessor would then need to be greater than the flow leaving it for the next vertex. Following that condition around to the starting vertex creates a contradiction. Since no extra selected edges can feed such a cycle under the degree and class restrictions, it cannot occur in a feasible solution.

The optimization solver searches for the best score under these constraints. The randomized decoder uses the same original path requirements, enforced through candidate colors and the length of the dynamic program. Their answers can therefore be compared directly by objective value. Different sequences can count as equally good for this purpose if they attain the same optimum.

Estimating the scores for titles

To generate titles, the authors use a maximum entropy classifier to estimate the probability that a stem drawn from a section will appear in the title. The classifier uses positional and distributional evidence about a stem. One feature records the location of the first sentence in which it occurs. Another gives a weight reflecting how prominent it is in the section relative to its distribution in the collection. The paper identifies that feature as TF-IDF.

The ordering scores come from a bigram estimator, which assigns a score to a word following another word. The authors use Good-Turing smoothing, so the estimates account for words occurring together rarely or having no observed instance of the transition. This estimator supplies the kind of local evidence the graph can represent directly. A transition score can be attached to an edge without needing to remember the whole prefix of the title. A bigram is a two-word instance of an n-gram.

Each distinct content word becomes a graph vertex. Morphological variants stay separate as candidates but belong to the same stem class. The paper treats auxiliary words differently. Instead of making them ordinary vertices, it adds edges that allow a transition between content words to pass through an auxiliary word. The auxiliary vocabulary consists of 24 prepositions and articles taken from the corpus. An edge using an auxiliary word includes the selection preference for the destination content word and carries the ordering preference for the intervening form of the transition.

Consequently, the length passed to the decoder counts content words. Auxiliary choices can change the surface title without changing the number of content vertices in its path. This separation also gives the two types of words different roles in the repeat rule. The constraint operates on the selected content vertices and their stem classes. The auxiliary forms are part of how the chosen transitions are realized.

The authors give each decoder the content-word length of the actual title. Earlier title work, as described in the paper, either supplied a length or used heuristics to choose it. Here the length is kept fixed because the study concerns the search given a requested output size. The classifier and the ordering estimates determine what counts as a good graph path. The exact solver, beam search, and randomized search all face the same scoring and length conditions when the paper compares them. It also makes code available for the randomized decoder.

Experiments and results

The textbook corpus and the comparisons

The corpus consists of 547 sections from an undergraduate algorithms textbook. A section body averages 609.2 words. A title averages 3.7 words in total and 3.0 content words. The shortest title contains 1 word and the longest contains 13 words, counting all words in each title. These are separate length measurements. The total word counts describe the surface titles, while the content-word count is the value used to set a decoding path's length.

The split follows the order of the textbook. The first 382 sections form the training set and the remaining 165 sections form the test set. For the bigram estimates, the paper uses body text from all sections, totaling 461,351 tokens. Thus the held-out sections supply reference titles for the decoding comparison, and their body text contributes to estimating the transition preferences. This matters when interpreting the scope of the evaluation. All systems use the same preference estimates, so the comparison isolates differences in the searches on this corpus even though the ordering estimates use the full set of section bodies.

The authors compare color-coding with integer linear programming and beam search. The exact formulation is solved with lp solve, a mixed integer programming solver that uses branch-and-bound. In broad terms, that method separates discrete choices into subproblems and uses bounds to rule out regions that cannot improve the result. The other decoders are implemented in Python with the Psyco speed-up module. The paper reports optimization effort across the implementations and parallelizes the coloring iterations, which can be computed independently before the trial answers are compared.

Beam search observes the same prohibitions on repeating a candidate or using two members of an equivalence class. Its width controls how many partial paths survive each pruning step. The reported widths are 1, 80, and 1345. Width 1 is the most restricted setting in the comparison. Width 80 is an earlier title-generation setting attributed to Banko and colleagues. Width 1345 is the smallest width the authors found that attains the objective optimum for every title in this particular test set. That threshold is an observed property of the experiment.

Time to obtain the objective optimum

The exact solver gives the paper an objective value to check for each test item. A search that matches that value counts as finding an optimal solution. This criterion allows for tied paths, because the score instead of the identity of one path defines the optimum. It also puts the runtime comparisons in context. A decoder that returns quickly with a weaker path is solving the same search problem with a different outcome.

Median decoding time on the textbook title test set

Color-coding is fastest among the settings that recover every objective optimum.

Median decoding time on the textbook title test setBeam 1: 0.4Beam 10.4Beam 80: 19.3Beam 8019.3Beam 1345: 224.4Beam 1345224.4Integer linear programming: 57.3Integer linear programming57.3Color-coding (this paper): 9.7Color-coding (this paper)9.7
The numbers
System or settingseconds
Beam 10.4
Beam 8019.3
Beam 1345224.4
Integer linear programming57.3
Color-coding (this paper)9.7

For the test sections, the median time is 9.7 seconds with color-coding and 57.3 seconds with the exact solver. Both attain the optimum on every item. Beam search at width 1345 also does so, with a median of 224.4 seconds. Width 1 has the shortest median time in the chart at 0.4 seconds, and width 80 has a median of 19.3 seconds. The narrower beams give up objective accuracy, so their time measurements answer a different practical question about how quickly those settings return an answer.

The paper reports arithmetic means as well as medians. In the test-set comparison, color-coding averages 73.8 seconds and integer linear programming averages 6,536.2 seconds. The means for beam widths 1, 80, and 1345 are 0.6, 28.4, and 368.6 seconds, respectively. The authors emphasize the disparity between the mean and median of the exact solver. Its worst reported case takes 136 hours, making it clear why a few difficult instances can strongly affect the average. They use the median as the main measure of a typical item while retaining the arithmetic mean to show how strongly runtime can vary.

Objective optima recovered on the textbook title test set

Color-coding matches the exact solver throughout the test set, as does the widest beam.

Objective optima recovered on the textbook title test setBeam 1: 0.0Beam 10.0Beam 80: 64.8Beam 8064.8Beam 1345: 100.0Beam 1345100.0Integer linear programming: 100.0Integer linear programming100.0Color-coding (this paper): 100.0Color-coding (this paper)100.0
The numbers
System or settingoptimal solutions %
Beam 10.0
Beam 8064.8
Beam 1345100.0
Integer linear programming100.0
Color-coding (this paper)100.0

Beam width 1 recovers 0.0% of the test-set optima. Width 80 reaches 64.8%. The widest reported beam, integer linear programming, and color-coding each reach 100.0%. The exact solver's entry follows from its role in establishing the optimum. The entries for the other searches are empirical matches to it. In particular, the color-coding result records what happened on the test graphs after repeated trials. The algorithm's probability bound applies separately to a planned number of independent trials and a fixed target failure probability.

The paper also shows how optima accumulate as the randomized decoder runs more trials. On the textbook title test set, the authors report that eleven iterations recover an optimum for 90% of the titles. By 35 iterations, every test optimum has been reached. The curve uses the exact answers to identify when each item first reaches its optimal graph score. It describes how quickly recovery occurred across these graphs. It does not require that every graph have the same chance of success in an individual coloring.

Agreement with the original titles

The paper evaluates title quality with ROUGE-L, which measures overlap with the reference through the longest subsequence of words that the two titles share in order. The shared words can have other words between them. Accordingly, the measure reflects aspects of both decisions that the decoder makes. Candidate words have to occur in the reference to contribute to overlap, and their relative order affects how much of that overlap can count as a common subsequence.

ROUGE-L for generated titles on the textbook test set

The settings that recover every objective optimum share the highest reported reference-overlap score.

ROUGE-L for generated titles on the textbook test setBeam 1: 0.0234Beam 10.0234Beam 80: 0.2373Beam 800.2373Beam 1345: 0.2556Beam 13450.2556Integer linear programming: 0.2556Integer linear programming0.2556Color-coding (this paper): 0.2556Color-coding (this paper)0.2556
The numbers
System or settingROUGE-L
Beam 10.0234
Beam 800.2373
Beam 13450.2556
Integer linear programming0.2556
Color-coding (this paper)0.2556

On the test titles, beam width 1 achieves ROUGE-L of 0.0234. Increasing the beam to 80 gives 0.2373. Color-coding, the exact solver, and beam width 1345 each reach 0.2556. The authors give the ROUGE difference between the narrowest beam and the optimal decoder as 0.2322 points on the reported scale. The results put a reference-based consequence beside the objective comparison. Under the shared scoring setup, the settings that do more successful search also generate titles with better measured agreement against the originals.

The two measures answer different questions even where their trends agree. The percentage of optimal solutions asks whether a decoder attained the greatest graph score for each section. ROUGE-L asks how the outputs from a decoding setting overlap with the textbook titles. A path can attain the greatest graph score without reproducing the reference, and two graph optima could in principle have different surfaces. The reported equality of ROUGE-L among the exact-matching settings gives a corpus-level result. It supplies no item-by-item account of whether those systems took the same path on tied examples.

What the ablations show

Search effort with the preferences held fixed

The paper gives controlled comparisons of decoding effort, a convergence analysis, and a corpus check on the repeat restriction. It leaves the scoring features and graph components in place across the decoder comparisons. The comparisons therefore show what changes when the search procedure changes under common preferences. They supply no independent treatment of the contribution of the classifier features, the transition smoothing, the auxiliary edges, or the equivalence classes.

The beam widths provide the most direct comparison within one search procedure. At width 1, only the strongest current partial sequence survives each pruning decision. This setting obtains no objective optimum on the test set. At width 80, a wider range of partial paths survives and the beam recovers optima for a substantial share of the sections. At width 1345, the first setting the authors found that covers the full set, the median runtime rises considerably. The comparison shows the cost of recovering the missing objective optima with beam width on these graphs. It does not locate a width that would have the same behavior in another corpus.

ROUGE-L adds evidence about why recovering those optima matters to the task. The width-80 beam makes a substantial gain over the greedy setting, while still falling short of the outcome with the objective-matching searches. The underlying preferences are shared. The change in measured title overlap therefore accompanies the change in which feasible paths the decoder manages to find. This is an aggregate relationship across the reported settings. The paper gives no paired analysis showing that every improvement in an individual path's graph score also improves its reference overlap.

Comparing color-coding with the exact program gives another kind of control. The two methods restrict the search differently, but the objective against which the answers are checked is the same. The integer program has to resolve a discrete optimization problem with explicit path constraints. Color-coding repeatedly solves smaller problems, each with a different random restriction. On these test sections, that repeated search obtains matching objective values with a smaller median time. The runtime comparison covers the implementations the authors tested, including the parallelization of coloring trials.

What extra colorings contribute

The convergence analysis changes how much random search has been performed while leaving the graph fixed. A new coloring gives some paths permission to appear that were ruled out before. It can also rule out paths already seen, so the output of a fresh trial by itself need not improve. The best score retained across trials can stay at its previous value or increase. This distinction explains how the experiment can plot an accumulating share of test cases whose optimum has been recovered.

The reported trajectory shows that most of the test items reach their optimum early and the remaining items take additional trials. The independent randomization and the varying lengths give two reasons to avoid interpreting the curve as a single per-trial recovery rate. The bound for a fixed path depends on how many distinct colors the path needs and how large a palette has been chosen. Also, two tasks with the same length can differ in how many paths attain the optimum. The analysis guarantees recovery when a fixed optimum is colorful, while the empirical curve counts success whenever any optimal path is reached.

This analysis evaluates the effect of repetition directly. The choice of palette size, by contrast, is studied through the cost formula. The paper reasons that a larger palette can reduce collisions and increase table size, then derives a way to balance those effects. It does not report a separate runtime sweep across palette sizes on the textbook test set. The numerical approximation for the palette comes from the theoretical comparison, while the observed convergence comes from actual decoding trials.

The evidence for forbidding repeats

The authors check how frequently reference titles repeat content words. They report that 97.9% of the titles in the corpus have no repeated words in that check. The distribution supports the design choice to forbid repeated content vertices in a title path. It also establishes that the assumption has exceptions within the corpus. A title with a repeated content word cannot be reproduced as a path with distinct content vertices under this representation.

This corpus statistic addresses the plausibility of the restriction. The study does not compare the graph with an otherwise identical one where repeated words are allowed. It also does not measure how often human titles use different surface forms from the same stem class. That is a distinct restriction from visiting the same content vertex twice. The graph uses both restrictions, and color-coding can enforce both through assignments to classes, but the repeated-word count directly tests the motivation for only the vertex repeat rule.

The auxiliary-word design likewise stays fixed. By placing articles and prepositions on transitions, the authors let the searches realize some connecting words without spending a content-word position. All decoders receive those choices. The results reveal how the decoders perform on the resulting graph. There is no controlled comparison with a title graph whose auxiliary words are vertices or with one that suppresses these words.

Limitations

Limits the authors specify

The decoding result depends on a local scoring function. The paper assumes that selection and ordering preferences can be combined from unit scores and pairwise transitions. This assumption lets the colored dynamic program extend a path by consulting its current endpoint and spectrum. A score that depends on a longer sequence of earlier decisions would generally require extra information in the state. The paper argues that local scoring covers useful cases, including its bigram-based title setup, and formulates the search for those cases.

A small requested path length relative to the number of candidates is central to the approach. The palette and its subsets replace a history tied to the full graph with one tied to the target length. The number of possible subsets still grows exponentially in the size of the palette, and favorable colorings can be rare when many candidate classes must receive distinct colors. The probability bound gives a cost for increasing confidence. It does not make arbitrary output lengths inexpensive. The authors' fixed-parameter argument explains where the cost is concentrated.

The authors distinguish the randomized guarantee from exact certification. A finite budget can give a chosen upper bound on the failure probability, using independent color assignments and a suitable probability for a fixed optimum. The returned path is feasible whenever the search finds a colorful path of the required length. Knowing that it is globally optimal requires additional evidence, such as the exact solver used in the experiment. The paper's test-set curve can identify the first optimal trial because that comparison is available there.

The experiment takes the real content-word length of each reference title as an input. The paper explicitly sets aside the question of how to determine length in an application. Its title results therefore concern selection and ordering at the supplied length. The authors describe the decoder as applicable to other generation and summarization problems, and their sentence graph shows how such an application might be represented. Their empirical evaluation is on title generation.

Limits visible in the evaluation

The titles and section bodies come from one textbook. The prospective use of this decoder on a different collection raises questions about the number of candidates, the distribution of requested lengths, and the suitability of the selected preferences. The paper provides no empirical answer for those settings. Even within the textbook, the averages describe a setting in which titles are very short relative to sections. That is the particular case where the separation between path length and graph size is most relevant.

The bigram scores are estimated partly from the bodies of the test sections. This is compatible with comparing decoders on fixed graphs, since every search uses the same estimates and the title is used as the reference. It constrains the interpretation of the scores as an evaluation in which all statistical estimation is isolated from the held-out section text. Similarly, the evaluation establishes the recovery of objective optima with the given selection classifier and pairwise preferences. It cannot determine how much better or worse those preferences would work with different training material.

The speed measurements combine algorithm choice and implementation choice. The paper uses an existing exact solver, implements other decoders in Python with an acceleration module, and parallelizes the independent colorings. The median and mean report the behavior of those implementations on the test corpus. The paper gives no controlled hardware or parallelism comparison from which to infer how much of the timing difference would carry over to another implementation. The gap between typical and worst observed behavior also makes a single central runtime an incomplete description of the exact solver.

Reference overlap supplies a task measure beyond objective recovery, but it captures a limited part of title quality. It gives credit for words shared with the textbook title in the same relative order. The paper reports no human assessment of fluency, informativeness, or the adequacy of titles that express the same content differently. Nor does the overlap result show that a better objective score will always give a better title. It shows that successful optimization of these particular preferences improved the reported corpus-level score relative to the narrower beams.

The candidate representation determines which answers can ever be optimal. Content vertices are drawn from the section, the auxiliary vocabulary is the specified corpus-derived set, and the stem classes rule out multiple representatives. A reference title requiring content outside those choices cannot be recovered verbatim by improving the search. Likewise, an example requiring a repeat cannot be solved by increasing the trial budget. The analysis of colorings concerns finding the best path within the graph that has been supplied. The graph and its scoring rules determine what that success can mean for the generated text.

What came after

There is no documented follow-on study here to establish how later work used this decoder. The paper identifies sentence selection and ordering as a possible application of the same weighted-path formulation. Its evidence for solving the search problem in practice comes from textbook titles, and its broader claim rests on whether another task can express its preferences and redundancy rules in the same form.

Cite

Cite as Pawan Deshpande, Regina Barzilay and David Karger. 2007. Randomized Decoding for Selection-and-Ordering Problems. Human Language Technologies 2007: The Conference of the North American Chapter of the Association for Computational Linguistics; Proceedings of the Main Conference.

The paper itself, not this page. BibTeX from the library's record of the work.

@inproceedings{deshpande2007randomized,
  title = {{Randomized Decoding for Selection-and-Ordering Problems}},
  author = {Pawan Deshpande, Regina Barzilay and David Karger},
  booktitle = {Human Language Technologies 2007: The Conference of the North American Chapter of the Association for Computational Linguistics; Proceedings of the Main Conference},
  year = {2007},
  url = {https://aclanthology.org/N07-1056/}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/deshpande-2007-randomized-decoding-selection-ordering-problems/