Papers
arxiv:2301.06862

Algorithms for Acyclic Weighted Finite-State Automata with Failure Arcs

Published on Jul 11, 2023
Authors:
,
,
,

Abstract

Weighted finite-state automata (WSFAs) are commonly used in NLP. Failure transitions are a useful extension for compactly representing backoffs or interpolation in n-gram models and CRFs, which are special cases of WFSAs. The pathsum in ordinary acyclic WFSAs is efficiently computed by the backward algorithm in time O(|E|), where E is the set of transitions. However, this does not allow failure transitions, and preprocessing the WFSA to eliminate failure transitions could greatly increase |E|. We extend the backward algorithm to handle failure transitions directly. Our approach is efficient when the average state has outgoing arcs for only a small fraction s ll 1 of the alphabet Σ. We propose an algorithm for general acyclic WFSAs which runs in O{left(|E| + s |Σ| |Q| T_max |Σ|right)}, where Q is the set of states and T_max is the size of the largest connected component of failure transitions. When the failure transition topology satisfies a condition exemplified by CRFs, the T_max factor can be dropped, and when the weight semiring is a ring, the |Σ| factor can be dropped. In the latter case (ring-weighted acyclic WFSAs), we also give an alternative algorithm with complexity displaystyle O{left(|E| + |Σ| |Q| min(1,sπ_max) right)}, where π_max is the size of the longest failure path.

Community

Sign up or log in to comment

Get this paper in your agent:

hf papers read 2301.06862
Don't have the latest CLI?
curl -LsSf https://hf.co/cli/install.sh | bash

Models citing this paper 0

No model linking this paper

Cite arxiv.org/abs/2301.06862 in a model README.md to link it from this page.

Datasets citing this paper 0

No dataset linking this paper

Cite arxiv.org/abs/2301.06862 in a dataset README.md to link it from this page.

Spaces citing this paper 0

No Space linking this paper

Cite arxiv.org/abs/2301.06862 in a Space README.md to link it from this page.

Collections including this paper 0

No Collection including this paper

Add this paper to a collection to link it from this page.