Efficient Semiring-Weighted Earley Parsing
- URL: http://arxiv.org/abs/2307.02982v1
- Date: Thu, 6 Jul 2023 13:33:59 GMT
- Title: Efficient Semiring-Weighted Earley Parsing
- Authors: Andreas Opedal, Ran Zmigrod, Tim Vieira, Ryan Cotterell, Jason Eisner
- Abstract summary: This paper provides a reference description, in the form of a deduction system, of Earley's (1970) context-free parsing algorithm with various speed-ups.
Our presentation includes a known worst-case runtime improvement from Earley's $O (N3|GR|)$, which is unworkable for the large grammars that arise in natural language processing.
We treat the generalization to semiring-weighted deduction, preprocessing the grammar like Stolcke (1995) to eliminate deduction cycles, and further generalize Stolcke's method to compute the weights of sentence prefixes.
- Score: 71.77514972816347
- License: http://creativecommons.org/licenses/by-sa/4.0/
- Abstract: This paper provides a reference description, in the form of a deduction
system, of Earley's (1970) context-free parsing algorithm with various
speed-ups. Our presentation includes a known worst-case runtime improvement
from Earley's $O (N^3|G||R|)$, which is unworkable for the large grammars that
arise in natural language processing, to $O (N^3|G|)$, which matches the
runtime of CKY on a binarized version of the grammar $G$. Here $N$ is the
length of the sentence, $|R|$ is the number of productions in $G$, and $|G|$ is
the total length of those productions. We also provide a version that achieves
runtime of $O (N^3|M|)$ with $|M| \leq |G|$ when the grammar is represented
compactly as a single finite-state automaton $M$ (this is partly novel). We
carefully treat the generalization to semiring-weighted deduction,
preprocessing the grammar like Stolcke (1995) to eliminate deduction cycles,
and further generalize Stolcke's method to compute the weights of sentence
prefixes. We also provide implementation details for efficient execution,
ensuring that on a preprocessed grammar, the semiring-weighted versions of our
methods have the same asymptotic runtime and space requirements as the
unweighted methods, including sub-cubic runtime on some grammars.
Related papers
- Superposed Decoding: Multiple Generations from a Single Autoregressive Inference Pass [72.07642648108849]
Superposed Decoding is a new decoding algorithm that generates $k$ drafts at the cost of one autoregressive inference pass.
Superposed Decoding can be combined with other decoding strategies, resulting in universal coverage gains when scaling inference time compute.
arXiv Detail & Related papers (2024-05-28T17:40:48Z) - Efficient Algorithms for Recognizing Weighted Tree-Adjoining Languages [104.90415092306219]
Four formalisms are equivalent to tree-adjoining grammars (TAG), linear indexed grammars (LIG), pushdown-adjoining automata (PAA) and embedded pushdown automata (EPDA)
We design new algorithms for computing their stringsum derivations (the weight of all automatons of a string) and allsums (the weight of all derivations)
For EPDA, our algorithm is both more space-efficient and time-efficient than the algorithm of Alonso et al. (2001) by factors of $mathcalO(|Gamma|2)$ and $
arXiv Detail & Related papers (2023-10-23T18:26:00Z) - Breaking the cubic barrier in the Solovay-Kitaev algorithm [0.0]
We improve the Solovay-Kitaev theorem and algorithm for a general finite, inverse-closed generating set acting on a qudit.
Our result holds more generally for any finite set that densely generates any connected, semisimple real Lie group.
arXiv Detail & Related papers (2023-06-22T18:35:06Z) - Projection-free Online Exp-concave Optimization [21.30065439295409]
We present an LOO-based ONS-style algorithm, which using overall $O(T)$ calls to a LOO, guarantees in worst case regret bounded by $widetildeO(n2/3T2/3)$.
Our algorithm is most interesting in an important and plausible low-dimensional data scenario.
arXiv Detail & Related papers (2023-02-09T18:58:05Z) - Scalable Differentially Private Clustering via Hierarchically Separated
Trees [82.69664595378869]
We show that our method computes a solution with cost at most $O(d3/2log n)cdot OPT + O(k d2 log2 n / epsilon2)$, where $epsilon$ is the privacy guarantee.
Although the worst-case guarantee is worse than that of state of the art private clustering methods, the algorithm we propose is practical.
arXiv Detail & Related papers (2022-06-17T09:24:41Z) - Nearly Optimal Policy Optimization with Stable at Any Time Guarantee [53.155554415415445]
Policy-based method in citetshani 2020optimistic is only $tildeO(sqrtSAH3K + sqrtAH4K)$ where $S$ is the number of states, $A$ is the number of actions, $H$ is the horizon, and $K$ is the number of episodes, and there is a $sqrtSH$ gap compared with the information theoretic lower bound $tildeOmega(sqrtSAH
arXiv Detail & Related papers (2021-12-21T01:54:17Z) - Higher-order Derivatives of Weighted Finite-state Machines [68.43084108204741]
This work examines the computation of higher-order derivatives with respect to the normalization constant for weighted finite-state machines.
We provide a general algorithm for evaluating derivatives of all orders, which has not been previously described in the literature.
Our algorithm is significantly faster than prior algorithms.
arXiv Detail & Related papers (2021-06-01T19:51:55Z) - The Trimmed Lasso: Sparse Recovery Guarantees and Practical Optimization
by the Generalized Soft-Min Penalty [14.85926834924458]
We present a new approach to solve the sparse approximation or best subset it interpolates between the classical lasso and general patterns.
We derive a sparse-time to compute the general soft-min penalty.
arXiv Detail & Related papers (2020-05-18T18:43:06Z) - Efficient and Robust Algorithms for Adversarial Linear Contextual
Bandits [13.32560004325655]
We consider an adversarial variant of the classic $K$-armed linear contextual bandit problem.
Under the assumption that the $d$-dimensional contexts are generated i.i.d.at random, we develop efficient algorithms based on the classic Exp3 algorithm.
arXiv Detail & Related papers (2020-02-01T22:49:46Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.