On Amortizing Inference Cost for Structured Prediction
Paper · 2012 · Vivek Srikumar, Gourab Kundu and Dan Roth
Summary
A system that assigns a structure to a sentence frequently has to make several decisions together. In semantic role labeling, for instance, it scores possible roles for each candidate argument of a verb, then searches for the best assignment that satisfies the constraints on the whole predicate. A new predicate normally starts a new search. The authors ask what happens when the system remembers its earlier searches. Many inputs produce the same pattern of decisions, even when the inputs and the scores differ. If the system can tell that a previously found structure is optimal for the new input, it can return that structure immediately.
The paper represents each search as an integer linear program. A vector of binary decisions describes the structure, linear constraints specify the legal assignments, and a vector of scores determines which legal assignment wins. The authors group problems by the feasible assignments they share, then give three ways to certify a cached answer. The first checks whether changes to the scores favor the old answer. The second asks whether the new scores are a non-negative combination of earlier score vectors that agree on an answer. The third combines those tests. The paper also tries approximations that either relax the score checks or use the frequency of earlier answers.
The authors keep the existing semantic role labeler and populate its cache by processing 225,000 verb predicates from Gigaword. On the standard Penn Treebank test set, the baseline achieves 75.85% F1. The exact schemes give solver-call speedups of 2.44, 2.18 and 2.50. Their small differences in F1 arise because equally good assignments under the optimization objective can differ under the evaluation metric. The approximate versions of the first and third tests raise solver-call speedup to 3.19 and 3.25 and yield F1 scores of 75.76 and 75.46, respectively. The fastest setting by elapsed inference time is the relaxed first test, with a clock speedup of 1.81.
The distinction between solver calls and elapsed time matters throughout the paper. A more permissive certificate can avoid more integer optimization while taking longer to check. The experiments show both how much work can be avoided on this workload and how the cost of recognizing reusable answers affects the speed the system actually gains.
Deep dive: On Amortizing Inference Cost for Structured Prediction
On Amortizing Inference Cost for Structured Prediction shows when past solutions can spare a solver from repeating work on new inputs. · about 33 minutes to read
The problem and its context
Finding a structure requires a joint decision
In structured prediction, the answer consists of decisions that have to fit together. Consider dependency parsing. The parser assigns links between words, and the links have to form a tree. A scoring function can give each possible link a value. The job of the inference procedure is to find a set of links with a high total score that also obeys the tree constraints. A collection of individually attractive links can violate those constraints. The optimization problem concerns the collection as a whole.
The paper uses a parser based on Non-Projective Dependency Parsing using Spanning Tree Algorithms to make the setup concrete. The words in a sentence supply the vertices of a graph, a learned scoring function weights candidate edges, and the maximum spanning tree supplies the parse. The paper also describes earlier work that expresses this search as an integer linear program, using a binary variable to indicate the presence of each candidate edge in the unlabeled case. The requirements on the output then become constraints on the joint assignment of those variables.
The same general arrangement appears in the paper's discussion of semantic role labeling. Here the elements under consideration are candidate arguments of a verb, and the decisions specify roles for those candidates. Scores express the evidence for individual candidate–role assignments. Constraints apply to the resulting predicate–argument structure. The questions are different from those of parsing, but the optimization has familiar parts. The input supplies a set of decisions and their scores, a set of rules determines which combinations are legal, and inference chooses a legal combination with the greatest score.
This setup also explains why the authors can study inference independently of how the scores were learned. The scoring procedure is responsible for expressing preferences over decisions in the current input. The inference procedure receives those preferences and applies the constraints. The baseline repeats that operation for every input, even when a previously processed input led to the same structural answer. The paper asks whether the inference procedure can make use of that history across a collection of inputs.
How earlier approaches approached the cost
The authors place the work in a line of research that expresses joint decisions in natural language tasks through optimization. They point to A Linear Programming Formulation for Global Inference in Natural Language Tasks as an early example of this formulation. They also cite its use in sentence compression and mention inference during training, including in the structured perceptron, structured support vector machines and Guiding Semi-Supervision with Constraint-Driven Learning. Their theorems work on the optimization problems presented to the inference procedure, so they can be stated without choosing among these ways of obtaining scores.
Some structures permit a direct algorithm such as dynamic programming. The authors choose integer linear programming as a general representation for their analysis. It expresses which components of an output may be selected and how they are allowed to interact, even when a task-specific procedure is available. The search can be expensive in the worst case, particularly as a problem accumulates variables and constraints. For a system that processes a corpus, whatever effort the solver spends on an input is then repeated for the next input.
The paper also discusses approaches to making individual searches cheaper, including cutting planes, Lagrangian relaxation and On Dual Decomposition and Linear Programming Relaxations for Natural Language Processing. These methods address how to solve a given instance. The authors' question begins one step earlier, with the decision about whether a new instance needs to reach the solver. The two questions fit together. A system can use a fast inference procedure for the instances that require a search and still benefit from a test that lets it avoid some of those searches entirely.
The implementation in the paper begins from the system described in The Importance of Syntactic Parsing and Inference in Semantic Role Labeling. That system proposes and scores candidate arguments, then uses integer optimization to impose constraints across the proposed roles. The separation makes it possible to isolate the change the authors care about. Once the scores are available, the new procedure has a choice between certifying a known assignment and asking the existing solver for an assignment.
What can be shared across inputs
A cache of already processed sentences would help when a sentence turns up again. The opportunity here is broader. With a consistent way to number the variables, sentences containing different words can have the same pattern of links. Different occurrences of a verb can likewise produce the same arrangement of roles for their indexed candidates. Reusing a solution means reusing that pattern of decisions for the current candidates. The system still has to determine which decisions the current input presents and how they are scored.
The authors use part-of-speech tagging to explain why the space of theoretically available outputs can give a misleading impression of how many different answers a system will encounter. In the standard Penn Treebank tag set, each position has 45 possible labels. As another position is added, the number of unconstrained tag sequences multiplies by the size of that inventory. Many such sequences have little bearing on actual sentences. In practice, a tag sequence can recur across sentences with different words, and frequently occurring sequences are especially valuable for reuse because each occupies a single place in the space of distinct outputs.
The paper's motivation therefore has a structural side and a statistical side. The structural side concerns whether inputs can be represented with the same feasible assignments. The statistical side concerns whether a manageable collection of assignments accounts for a substantial share of the answers. Shared feasibility makes a comparison possible. Repeated optima make the comparison potentially worthwhile. Either property on its own leaves a gap. A familiar-looking assignment needs to be legal for the current instance, and membership in a familiar class still leaves a choice among the legal assignments.
That last choice is where the paper's optimization results enter. A commonly observed answer may be worth checking first, but commonness supplies no proof that it wins under the current scores. The authors look for conditions on the scores under which a saved solution is sufficient to answer a new problem. Amortizing the cost means that an earlier solve can serve later inputs whose scores satisfy such a condition. The benefit is measured across inputs because every successful reuse saves a search that the ordinary inference procedure would have performed.
The method, step by step
Representing a new input as a search over binary choices
The method starts after an input has been turned into candidate decisions and scored. For the dependency parser, imagine assigning a position in a vector to each candidate edge. A selected edge receives the active binary value. The vector for a whole parse records which edges the parser selected. In semantic role labeling, a position instead represents a proposed assignment of a particular label to a particular candidate. The same mathematical operation works in either case. Each active position contributes its corresponding score to the total for the proposed structure.
Some binary vectors represent impossible outputs under the constraints, so the search first has a well-defined set of legal answers. The paper gives this set the following notation.
Kₚ = {y ∈ {0, 1}ⁿ | Mᵀy ≤ b}
Here p denotes an inference problem, and Kₚ is its feasible set. The vector y describes a possible assignment to all n decision variables. The notation {0, 1}ⁿ means that each of its n components is either 0, for an inactive decision, or 1, for an active decision. The vertical bar means “such that,” and ∈ means “belongs to.” The real-valued matrix M specifies coefficients for the constraints, ᵀ denotes transposition, and the vector b contains the corresponding bounds. The inequality applies component by component to the vector of constraint values Mᵀy. The braces enclose the set of assignments satisfying these requirements, and = identifies that set with Kₚ.
The search chooses an assignment in this set with the highest total score.
yₚ ∈ arg max[y ∈ Kₚ] cₚᵀy
The vector cₚ contains the objective coefficients, or decision scores, for problem p. Its transpose multiplied by y gives the total score of assignment y. The expression arg max refers to the assignments attaining the maximum, with the brackets specifying that y ranges over Kₚ, the feasible set. The vector yₚ is a solution for p, and ∈ indicates that it belongs to the set of maximizers. This way of writing the objective accommodates tied scores. An individual cached solution is one assignment the original optimization judged best.
Having the same number of decisions is a prerequisite for reusing an assignment component by component. The authors also require the same feasible set under that representation. They call the resulting group an equivalence class of integer linear programs. If a class is denoted by [P], its common number of variables is n[P], and its common feasible set is K[P]. Writing p ∼ [P] means that problem p belongs to the class. Any vector that represents a legal assignment for one member is then legal for the others. The class can contain many different objective vectors, so membership establishes which answers can be considered and leaves their ranking to the scores.
For the tagging example that motivates reuse, the size of the unconstrained output space has a simple expression.
45ⁿ
The number 45 is the size of the Penn Treebank tag inventory used in the example. The exponent n is the number of tokens in the sentence. The expression counts the ways of filling all positions when any tag can be put at any position. The reuse method deals with observed solutions and the feasible assignments of each optimization problem. The expression gives a sense of how far these can be from an unconstrained enumeration.
Looking up a candidate before calling the solver
The cache associates solved problems with their class, objective coefficients and answers. When a new problem arrives, its class directs the lookup to entries with the right decision space. The method then applies one of the paper's checks to decide whether there is a cached answer it can use. For some checks, a single prior problem supplies the evidence. Others use several prior problems that returned the same answer. The approximate schemes can also use counts of how frequently particular answers occurred.
How a new inference problem uses past solutions
The steps in order.
The last step gives the procedure its behavior over a sequence of inputs. An input that reaches the solver can provide evidence for future reuse. A class with no entries initially falls through to the solver, and once there are entries, the checked condition governs whether they suffice. The implementation can skip storing a solved objective when it is already covered by the test used to maintain the cache. This keeps the membership check from growing simply because repeated evidence was encountered.
The framework also clarifies what remains to be paid for at inference time. The current problem has to be formed because both feasibility and scores can matter. Retrieving a candidate and checking the condition takes work of its own. The payoff comes when these steps cost less than the solve they replace. The authors design the checks to operate on stored solutions and their objectives so that a successful test can return a complete assignment directly.
The first certificate checks the direction of each score change
Suppose the system has solved an earlier problem and obtained an assignment. Imagine that the score for every decision included in that assignment rises, and the score for every decision excluded from it falls. Compare the cached assignment with any feasible competitor. Where both assignments make the same choice, a change in the corresponding score affects them equally. Where the cached assignment includes a decision that the competitor excludes, an increase helps the cached assignment. Where the competitor includes a decision that the cached assignment excludes, a decrease hurts the competitor. That covers every place where their scores can respond differently.
Theorem 1 formalizes this comparison. The new and old problems must first share a feasible set. The difference between their objective vectors is then defined as follows.
δc = c_q − cₚ
The symbols p and q denote the cached and new problems, respectively. The vectors cₚ and c_q contain their objective coefficients. The notation δc denotes the vector of changes, with − subtracting the old vector from the new one component by component. The equals sign defines the difference used by the test.
(2yₚ,ᵢ − 1)δcᵢ ≥ 0 for each i ∈ {1, …, nₚ}
Here i indexes a decision variable, nₚ is the number of variables in p, and {1, …, nₚ} is their index set. The symbol ∈ indicates membership in that set. The value yₚ,ᵢ is the cached assignment's choice at index i. The factor in parentheses uses the constants 2 and 1 to give a positive sign for an active decision and a negative sign for an inactive one. The component δcᵢ is the score change at that position. Juxtaposition means multiplication, and ≥ 0 requires a non-negative product. Equality allows a coefficient to stay where it was.
The original assignment already matched or exceeded each competitor under the old scores. The sign check ensures that every difference between the solutions contributes a change favorable to the cached answer or leaves its margin alone. As a result, its lead over any particular feasible competitor cannot shrink. The proof works even when the old score margin is zero. What the certificate establishes is that the cached answer still attains the maximum.
This is a sufficient condition. The sign check can fail when a score moves in the wrong direction even though the old answer has ample margin over the alternatives and still wins. The method can test another stored objective paired with the same or a different answer. If a check succeeds, one earlier problem has supplied everything needed for the guarantee. In the authors' implementation, the system can iterate through the earlier problems in the class and check their coefficient changes directly.
The second certificate combines scores that agree on an answer
Theorem 2 starts from several earlier objectives with a common optimal assignment. For each of those objectives, compare that assignment with an arbitrary feasible alternative. The shared answer scores at least as well under every one of the objectives. Give the objectives non-negative weights and add them, and the comparison still holds. This works because the competitor loses or ties in each of the individual comparisons, and none of the weights reverses a comparison.
The test asks whether the new objective can be reconstructed in that way.
c_q = ∑ⱼ xⱼ cₚʲ with x ≥ 0
Here c_q is the new objective vector, and cₚʲ is the objective vector of the cached problem indexed by j. The sum ∑ⱼ ranges over the m prior problems selected for the test, all of which share the feasible set and a common optimal assignment. The vector x consists of m real-valued weights, and xⱼ weights the contribution from problem j. The requirement x ≥ 0 means that each weight is non-negative, with 0 allowing an objective to make no contribution. The equals sign requires the weighted sum to reproduce the new coefficient vector exactly.
The authors describe the set of attainable objectives as a cone. A vector belongs to it when it can be assembled from the stored vectors by scaling them by non-negative weights and adding the results. The weights have no fixed total. Geometrically, the stored objectives provide directions along which the same answer has already been established. Operationally, the system asks whether a collection of linear equations and inequalities in the unknown weights has a solution. Those unknowns are continuous, so the checking problem can use a linear programming solver.
The shared answer is essential. Each term in the proof contributes support for the same candidate against every feasible competitor. Mixing objectives from problems with different stored answers does not establish that agreement. The implementation therefore organizes the check around a proposed answer and the objectives associated with it. A new objective can have a higher score for some decision and a lower one for another, with no simple directional relation to a single cached objective. It can still enter the cone formed by several objectives that agree on the answer.
The third certificate combines the two forms of evidence
A new objective can fall outside the cone and still be close to an objective in it in exactly the directions allowed by the first theorem. Theorem 3 looks for such an objective. It first imagines constructing an intermediate set of scores from earlier problems with a common answer. By Theorem 2, that answer is optimal for the intermediate objective. It then asks whether the change from there to the actual objective favors the cached assignment according to Theorem 1.
Δc(x) = c_q − ∑ⱼ xⱼ cₚʲ
The vector Δc(x) is the residual after subtracting the intermediate objective from the new objective c_q. The parentheses indicate that the result depends on the vector x of real-valued combination weights. The term xⱼ cₚʲ is the objective vector of earlier problem j scaled by its weight, ∑ⱼ adds the terms from the m cached problems, and − takes the componentwise difference. The cached problems share a feasible set and an optimal assignment, and the same feasible set applies to q.
(2yₚ,ᵢ − 1)Δcᵢ(x) ≥ 0 for each i ∈ {1, …, nₚ}, with x ≥ 0
The component yₚ,ᵢ is the common answer's binary decision at index i, and Δcᵢ(x) is the residual score at that index. The factor made from 2, yₚ,ᵢ and 1 sets the direction of the comparison according to the cached decision. The product must be at least 0, as expressed by ≥. The index i belongs to the set of variable positions, denoted by {1, …, nₚ}, where nₚ is the number of decisions. The condition x ≥ 0 requires every weight in the combination to be non-negative. The certificate succeeds if some single vector of weights satisfies all of these requirements together.
With all the weight placed on a particular cached objective at its original scale, the test can express the first theorem's direct comparison. When the combination reproduces the new objective exactly, the residual vanishes and the test has the form of the second theorem. In the general case, the weights can move the intermediate objective to a place where the remaining score changes have the right signs. The search over weights is again a linear feasibility problem. The cached assignment is fixed while this search runs, making each sign factor a known constant.
This more flexible condition gives the procedure another way to find a certificate when the first or second check would fail. Its cost depends on the number of stored objectives relevant to the proposed answer and on the work of solving the feasibility problem. There is thus a difference between a condition's ability to certify an assignment from available evidence and its value as a quick test before an integer solver. The same distinction guides the implementation and the interpretation of the timing results.
Keeping the checks small enough to be useful
The authors use a database to store solved problems and retrieve their equivalence classes and answers. For the checks based on linear programming, they first score observed structures under the new objective. Suppose two observed structures are both feasible, and one has a lower current score. The lower-scoring one cannot maximize the objective because the other is already a counterexample. This lets the procedure focus on the highest scoring observed structures when deciding which certificates to attempt. A tie among observed structures can leave several candidates for consideration.
The cache itself can also be pruned. For the cone test, the authors observe that objectives on the boundary determine the cone. An objective already represented as a non-negative combination of retained objectives adds no new direction to that representation. They describe a similar opportunity for the combined check and implement a simpler rule that avoids storing an instance already covered by the theorem being used. The practical gain is a smaller collection of coefficients for future feasibility problems.
There is an important distinction between ranking observed candidates and certifying one of them. A structure with the highest score among cached alternatives has beaten a known collection of feasible competitors. The integer program may admit additional assignments. An exact certificate extends the comparison to all feasible assignments by using the properties of earlier optima. That is what permits a cache hit to replace a full search even though the cache contains only a small portion of the legal structures.
Approximation through frequency or a relaxed check
The paper also studies how much work can be saved when the reuse decision is allowed to make mistakes. Its simplest approach uses the most frequent answer in the class if that answer has sufficient support. Support is a count of how frequently a structure has been seen. If there is insufficient evidence in the cache, the ordinary inference procedure handles the input. The choice on a frequency-based hit depends on the class and its stored counts. The objective specific to the new input plays no part in picking that answer.
The top-K variant keeps the frequency and support criteria but includes several candidates. It scores the qualifying structures from its shortlist under the current objective and returns the candidate with the highest score. Here K specifies the size of the frequency-ranked shortlist. This approach takes advantage of the current input when choosing among familiar possibilities. Its success still depends on whether the appropriate structure was frequent enough to reach the shortlist. It evaluates the supplied candidates directly and treats the best of them as the answer.
The remaining approximations use the exact theorems as a starting point. The first theorem requires every score change to have the allowed sign. A relaxed test gives each component a tolerance.
(2yₚ,ᵢ − 1)δcᵢ + ε ≥ 0
The binary decision yₚ,ᵢ is the cached choice at coordinate i. The factor using 2 and 1 assigns the sign for that choice, and δcᵢ is the difference between the new and old coefficient at that coordinate. The tolerance ε is added to the signed difference, as indicated by +. The inequality ≥ 0 must hold at every coordinate. A positive tolerance permits a limited score change against the recommendation of the exact sign test.
The combined theorem admits the same kind of relaxation after the intermediate objective has been subtracted.
(2yₚ,ᵢ − 1)Δcᵢ(x) + ε ≥ 0
Here yₚ,ᵢ is the common binary assignment for the cached problems at coordinate i. The constants 2 and 1 again set the sign, and Δcᵢ(x) is the residual coefficient for a combination defined by the weights x. The addition of ε permits the signed residual at a coordinate to fall below 0 by the tolerance. A feasible choice of non-negative weights must make ≥ 0 hold for every component after that addition.
An exact certificate works because each relevant part of the score change preserves the cached assignment's advantage. A relaxation admits changes that can diminish that advantage. The old answer can still win, particularly if earlier comparisons left it with room to spare. It can also lose, and the relaxed condition alone does not establish which case applies. The paper therefore measures predictive performance as well as speed for these versions. The tolerance and the frequency support threshold give different ways to control reuse. One governs how closely a new objective must satisfy a certificate, while the other governs how much past evidence qualifies a structure for consideration.
How the semantic role labeler supplies the cache
The experiment uses an existing semantic role labeler with classifiers trained on PropBank. A parse-based heuristic proposes candidate arguments. An argument identifier filters those candidates, and a second classifier scores each remaining candidate for the available role labels. A softmax transformation puts the raw classifier scores into a common numerical range. Inference then chooses a joint set of role assignments subject to structural and linguistic constraints on the predicate as a whole.
In this application, the predicate and the number of argument candidates identify the equivalence class. The authors explain that together they determine the feasible set in the labeler's integer program. Occurrences with the same class can have different words, candidates and numerical scores. What they share is the decision space in which the candidate positions and their allowed roles are represented. An assignment retrieved from this class can therefore be interpreted on the current candidates. Looking up a class with the same candidate count alone would discard the predicate information used to determine feasibility.
The paper simulates a system that has already accumulated experience. It runs the labeler on Gigaword and records the classes, objectives and assignments it obtains. These are solutions produced by the labeler itself. PropBank supplies the data for training the classifiers, and processing Gigaword supplies prior optimization problems for the cache. At evaluation time, the existing input processing and scoring generate each test problem, then the reuse scheme decides whether to return a cached assignment or invoke the solver. That separation allows the experiments to attribute differences in solver use to the changed inference procedure.
Experiments and results
What the experiment measures
To fill the cache, the authors apply the semantic role labeler to 225,000 verb predicates drawn from Gigaword. They evaluate on the standard Penn Treebank test set. In the accompanying account, the unaltered system processes 5127 integer programs and obtains 75.85% F1. The baseline has the same role-labeling pipeline and uses the ordinary solver. The comparison includes the three exact certificates, frequency-based reuse with and without rescoring, and relaxed versions of the first and third certificates.
The experiment reports solver calls as its primary measure of optimization work. Ordinary inference invokes the solver for each problem. Reuse reduces the number of invocations whenever a stored result supplies an answer. The paper expresses this saving as a speedup.
Speedup(A) = N_Base / N_A
The symbol A is an amortized inference scheme. N_Base is the number of calls to the underlying inference procedure in the baseline, and N_A is the number made when scheme A is used. The slash means division. Speedup(A) names the resulting factor, and the equals sign defines it. A larger value means that the scheme relies less often on the underlying solver for the same workload.
Clock speedup is the ratio of baseline elapsed inference time to the elapsed inference time of the system with reuse. It answers a different question from the solver-call metric because checking the cache and running the certificate procedure take real time. The authors time inference itself. Feature extraction and score computation are outside that timing interval. F1 supplies the third measure. It evaluates the predicted roles against the reference by balancing precision and recall. A solution's score under the inference objective and its agreement with the reference are different measurements.
The paper reports its experimental figures as averages over ten trials. The reported counts also have an inconsistency worth keeping in view. The account of the baseline says it processes 5127 integer programs, and the results table lists 5127 instances, but the table prints 5217 baseline solver calls. The definition says that these baseline quantities should coincide. The speedup values below are the paper's reported values.
How often the solver is avoided
Solver-call speedup on the Penn Treebank semantic role labeling test set
The relaxed certificates avoid the most solver calls, and the combined certificate leads among exact schemes.
The numbers
| System or setting | solver-call speedup |
|---|---|
| Baseline | 1.0 |
| Theorem 1 | 2.44 |
| Theorem 2 | 2.18 |
| Theorem 3 | 2.50 |
| Most frequent, Support = 50 | 1.86 |
| Top-10 solutions, Support = 50 | 1.86 |
| Relaxed Theorem 1 | 3.19 |
| Relaxed Theorem 3 (this paper) | 3.25 |
All the exact schemes reduce calls to the baseline solver. The single-objective comparison in Theorem 1 gives a speedup of 2.44, with 2134 solver calls in the test results. The cone check in Theorem 2 gives 2.18, with 2390 calls. The combined check in Theorem 3 reaches 2.50, with 2089 calls. The authors explain the scale of such a saving by noting that a speedup of 2.5 means the solver is called for 40% of examples. The guarantee in these rows is about the optimality of the returned assignment under the existing objective.
Both relaxed variants use a tolerance of 0.3. The authors describe this value as untuned. The relaxed version of Theorem 1 makes 1634 solver calls, and the relaxed version of Theorem 3 makes 1607. Their speedups of 3.19 and 3.25 show the additional coverage gained by permitting score changes that would fail the exact directional checks. The amount of reuse in these rows comes with a different guarantee. Cache hits can accept a feasible answer whose objective score is below the maximum.
The most-frequent and top-10 settings both use a support threshold of 50. Each makes 2812 solver calls on the test set and gives a solver-call speedup of 1.86. These rows show how frequently the system has enough frequency evidence to return a known structure at that threshold. The difference between the methods appears in which structure they return on those hits. Scoring a shortlist provides information that a frequency ranking alone cannot express.
How much elapsed inference time changes
Clock speedup on the Penn Treebank semantic role labeling test set
The relaxed single-objective check is fastest by elapsed inference time.
The numbers
| System or setting | clock speedup |
|---|---|
| Baseline | 1.0 |
| Theorem 1 | 1.54 |
| Theorem 2 | 1.14 |
| Theorem 3 | 1.36 |
| Most frequent, Support = 50 | 1.57 |
| Top-10 solutions, Support = 50 | 1.58 |
| Relaxed Theorem 1 (this paper) | 1.81 |
| Relaxed Theorem 3 | 1.50 |
The clock results put the price of the reuse checks in the foreground. Among the exact methods, Theorem 1 is fastest by elapsed inference time at 1.54. Theorem 3, which leads in call reduction among the exact methods, achieves 1.36 by the clock. Theorem 2 achieves 1.14. The more elaborate certificates are checked through linear feasibility problems. The timing results show that their net benefit on this implementation is smaller than their solver-call savings alone might suggest.
The relaxed versions produce the same kind of reversal in rank. The combined test reaches the greater solver-call speedup, while the relaxed componentwise test reaches the greater clock speedup. The observed clock factors are 1.50 for relaxed Theorem 3 and 1.81 for relaxed Theorem 1. Frequency-based reuse also benefits from its lightweight decision procedure. The most-frequent and top-10 settings reach clock factors of 1.57 and 1.58 at the reported threshold. These are timings for the inference portion of the role labeler.
How the predicted roles score
Semantic role labeling F1 on the Penn Treebank test set
The exact checks and relaxed certificates stay close to baseline F1, while frequency-based selection scores lower.
The numbers
| System or setting | F1 |
|---|---|
| Baseline | 75.85 |
| Theorem 1 (this paper) | 75.90 |
| Theorem 2 | 75.79 |
| Theorem 3 | 75.77 |
| Most frequent, Support = 50 | 62.00 |
| Top-10 solutions, Support = 50 | 70.06 |
| Relaxed Theorem 1 | 75.76 |
| Relaxed Theorem 3 | 75.46 |
The baseline's 75.85 F1 provides the reference for the changes in prediction. The authors attribute the small spread across the exact methods to equally scoring solutions. A cached solution can attain the best objective value and select a different assignment from the one the baseline solver would return. A reference annotation can agree with one of those assignments more closely than with another. The exactness theorems guarantee the objective value, which explains how exact methods can produce slightly different F1 values.
The relaxed variants give 75.76 and 75.46 F1 on the test set. Their results show that accepting additional cache hits under the chosen tolerance comes with a small observed change in task performance on this workload. The lower F1 scores for the frequency-based settings, 62.00 and 70.06, show the limits of using the cache as a direct source of predictions. Scoring the shortlist recovers some of the lost performance. The much closer results for the relaxed certificates suggest that the score relationships checked in those schemes preserve more of the original optimization decision than restricting the answer to a few common structures.
What the ablations show
Why recurring structures make a cache plausible
The paper's analysis of recurrence looks separately at the number of prediction instances and at the number of distinct structures. For part-of-speech tagging, the authors process English Gigaword and group sentences by their length. They then count distinct complete tag sequences within each group. The occurrence count records how many problems of a given size the system faces, including repeats. The distinct-structure count records how many different tag sequences the predictions produce. The plots show many fewer distinct outputs than instances at the same length. A reusable structure can therefore account for many predictions even though the individual sentences differ.
The authors produce plots that allow unlabeled dependency parsing and semantic role labeling to be compared. For parsing, size is the number of tokens, and the distinct structures are link patterns. For role labeling, size is the number of argument candidates for a predicate. These plots show the same qualitative separation between the number of inference instances and the number of different answers. For role labeling, the actual cache lookup also uses the predicate because shared size is only part of the equivalence condition. The plots motivate reuse across tasks, while the certificate for any individual input still depends on its feasible set.
The frequency plots for tag sequences add another observation. The authors examine sentences of five, ten and fifteen tokens and plot the sequence frequencies on a logarithmic scale. A small set of sequences accounts for many occurrences, while many others occur infrequently. The paper reports similar patterns for the other structured tasks it considers. Redundancy says that outputs repeat. Concentration says that some outputs repeat far more than others. That concentration explains why a procedure that initially checks only a few familiar structures can cover a useful portion of the workload.
These descriptive plots are evidence about outputs, while reuse by theorem depends on the objectives as well. Even when an answer recurs, the score vectors for those instances can lie in positions that the implemented tests fail to connect. The charts of actual solver calls supply the separate evidence that many Penn Treebank objectives can be certified from the cached Gigaword objectives. Taken together, the analyses distinguish the availability of repeated answers from a procedure's ability to recognize when one of them applies.
What rescoring frequent answers adds
The most-frequent and top-10 settings give a controlled comparison at support 50. Both use the same cache and record the same number of solver calls. The first returns the class's most frequent qualifying structure, while the second looks at current scores when choosing among several qualifying structures. F1 rises from 62.00 to 70.06 on the Penn Treebank test set. The matched call counts make the comparison informative. The F1 improvement comes from better choices at cache hits, with the amount of fallback to the solver held fixed.
When the top-K method rescores its candidates, it can choose a less frequent member of the shortlist if that member fits the new input better. This addresses a common case in a skewed collection. One structure may be a strong default for its class, yet a particular verb occurrence can provide evidence for a different role assignment. Rescoring gives the current evidence a way to affect the answer. Assignments outside the shortlist are still excluded from the comparison on a hit, which helps explain the remaining gap from the baseline.
The support sweep tests another part of this mechanism. Reducing support lets a structure qualify after fewer observations. The paper's plots show that this can make inference faster and lower F1. The two frequency schemes have the same solver-call speedup curve in the sweep. Their predictive performance can differ because the same availability of cache hits gives them different opportunities to select a structure. Support consequently controls whether the system attempts direct reuse, and rescoring influences how it chooses a prediction once reuse is attempted.
What changes when the certificates are loosened
The exact and relaxed versions of Theorem 1 have the same basic comparison. Both check coefficient changes against a cached assignment. Adding the tolerance changes which changes qualify, and on the test set this raises solver-call speedup from 2.44 to 3.19. The clock speedup also rises, from 1.54 to 1.81, while F1 moves from 75.90 to 75.76. That combination shows the benefit of a relaxation that is cheap to check. More problems are accepted by the same simple type of test.
The corresponding pair for Theorem 3 changes solver-call speedup from 2.50 to 3.25, and clock speedup from 1.36 to 1.50. F1 moves from 75.77 to 75.46. Here relaxation again makes more reuse possible, while the feasibility check continues to contribute to total inference cost. The authors tried the same tolerance of 0.3 for both comparisons. These results establish what happened at that setting, and the study of frequency support supplies a separate view of how an acceptance threshold can trade predictive performance for speed.
The comparison among exact schemes supplies another control. With the objective optimality guarantee held fixed, the method that avoids the most integer optimization is Theorem 3, while the one with the best clock result is Theorem 1. The direct sign check can be sufficient on many inputs, and its cost is lower than doing a feasibility search over mixtures of past objectives. A system that spends more to establish reuse can save additional solver calls and still see a smaller improvement by the clock. The paper reports whole inference times, which establish the net result of these procedures on the tested setup.
What the shorter sequences suggest
The authors also look at redundancy below the sentence level. They count token n-grams, allowing overlap and repeated occurrences, and compare those counts with counts of distinct tag sequences of the corresponding lengths. They consider lengths up to 10. An n-gram is a contiguous sequence of tokens or tags of length n, depending on which inventory is being counted. The token counts measure occurrences, while the tag counts measure the number of distinct structural patterns those spans produce.
The motivation is that part-of-speech decisions often depend on a relatively short context. Repetition within shorter spans could give an inference procedure more opportunities for reuse if a full problem can be divided into suitable smaller ones. The plots establish that short tag patterns recur across many occurrences. Turning that recurrence into savings would require deciding how subproblems interact, particularly where decisions in neighboring spans matter to one another. The measured evidence here is about repetition in the data. It supports the proposed direction for decomposition.
Limitations
Limits the authors identify
The authors emphasize that clock speedup depends on implementation. The cost of retrieval, the amount of work required for a linear feasibility check and the expense of the underlying inference procedure can all affect elapsed time. Counting solver calls isolates one source of computational work and provides a way to compare reuse schemes even when those costs vary. For interpreting practical speed, the two measures belong together. A large reduction in calls is most valuable when the skipped solves are expensive relative to recognizing cache hits.
The timing boundary is also explicit. The paper measures inference after feature extraction and scoring. A service that spends much of its time computing features or scores would see a different overall effect from the one shown in the inference-only chart. The ratios in the paper describe the part of the pipeline modified by amortization. The authors' choice makes the experiment a direct test of that change and leaves elapsed time for the full labeler open.
The authors distinguish exact schemes from approximate ones by the guarantee they offer. The directional and combination conditions prove optimality when their premises hold. The relaxed and frequency-based schemes can return a suboptimal feasible assignment. The approximately preserved F1 for the relaxed certificates is an observation on this evaluation, at a tolerance of 0.3. The paper describes that tolerance as untuned. The frequency support sweep demonstrates explicitly that a more permissive reuse policy can lower predictive performance.
The full speed and quality evaluation is for semantic role labeling. The authors argue for broader applicability on the basis of the general integer-program representation. The recurrence analyses for tagging and parsing motivate that argument by showing repeated structures. A corresponding cache and timing experiment for each of those tasks is left open. The mathematical analysis describes conditions under which reuse is sound, and the semantic role labeling experiment supplies the evidence about how often useful conditions are found at runtime.
Limits visible in the setup
The reported experiment starts with a cache populated by processing 225,000 Gigaword predicates. This is suitable for the authors' aim of simulating a long-running application. It leaves the startup cost and the evolution of hit rates from an empty cache unmeasured. The procedure can fall back and learn from each solve, but the point in the workload at which the savings repay the earlier solves and the cost of retaining their results is a separate question. The paper also leaves open how many cache entries would be needed to reach a particular speedup on a different input collection.
The definition of an equivalence class is mathematical, while identifying one efficiently is specific to the problem. The labeler supplies a practical key through the predicate and candidate count. For inference systems whose constraints change more sharply across inputs, fewer objectives may share a feasible set, or comparing the sets may itself require substantial work. The effectiveness of the method therefore depends on representing decisions consistently across inputs and efficiently finding solved problems to which the theorems apply.
The theorems use information about the optimality of saved answers. Their arguments compare a certified prior optimum with every competitor in the shared feasible set. If an underlying procedure supplies approximate answers, the strength of the reused result depends on what can be established about those prior answers. The exact optimality proofs apply under the stated optimality premise. An implementation with a different underlying procedure would have to interpret the reuse condition alongside that procedure's own guarantees.
The coexistence of tied optima also matters for evaluating equivalence with a baseline. The results show that preserving maximum objective value can produce a different F1 through the choice of assignment. Output stability would require an additional specification of how ties are resolved if the application depends on reproducing a particular answer. The claim tested by the exact schemes is preservation of objective optimality for the cached assignment.
Finally, the solver-call and elapsed-time rankings leave open how each cost changes across problem sizes. A count gives the same weight to every skipped call, even when some integer programs are harder to solve than others. The cache may make an especially large time saving if it avoids hard instances, or a modest one if most hits would have been cheap solves. The table provides aggregate outcomes for this workload. It does not give a size-by-size breakdown of savings or a separate accounting of time spent on retrieval, feasibility checks and integer optimization.
What came after
The paper closes with possible extensions. There are no documented follow-up studies to report here, so these directions describe questions the authors left open.
One direction is to divide a large inference problem into smaller parts and look for reuse within those parts. The tag sequence counts give a reason to expect useful repetition when shorter spans become the unit of comparison. A procedure would still need to account for constraints between spans. Local answers can be reusable while their joint compatibility depends on decisions elsewhere. The proposed extension shifts the practical question from how frequently a whole structure recurs to which parts can be certified independently and which decisions still need a joint search.
Another direction is to use frequent cached structures to initialize a solver. A solver that accepts an external starting point can begin with the prediction of the most-frequent or top-K procedure and continue searching for an exact solution. This would put the approximate result to work on inputs where a certificate is unavailable. The frequency experiments show that the cache can supply plausible assignments with little inference time, and the warm-start proposal asks whether those assignments make the subsequent search easier. The paper leaves that effect unmeasured.
The authors also relate their approach to lifted inference. In the analogy they draw, several instances can be handled through a common abstraction. Their abstraction groups optimization problems by a shared feasible set and uses further conditions to establish a shared optimum. The grouping gives the system a place to look for reusable results, and the certificate tells it when the earlier solution suffices. The paper demonstrates that arrangement for a sequence of complete role-labeling problems. Decomposition and warm starts would extend it to cases where past solutions can help with part of the work even when the new problem still requires a search.
Cite
Cite as Vivek Srikumar, Gourab Kundu and Dan Roth. 2012. On Amortizing Inference Cost for Structured Prediction. Proceedings of the 2012 Joint Conference on Empirical Methods in Natural Language Processing and Computational Natural Language Learning.
@inproceedings{srikumar2012amortizing,
title = {{On Amortizing Inference Cost for Structured Prediction}},
author = {Vivek Srikumar, Gourab Kundu and Dan Roth},
booktitle = {Proceedings of the 2012 Joint Conference on Empirical Methods in Natural Language Processing and Computational Natural Language Learning},
year = {2012},
url = {https://aclanthology.org/D12-1102/}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/srikumar-2012-amortizing-inference-cost-structured-prediction/