Algorithms for Acyclic Weighted Finite-State Automata with Failure Arcs

要約

重み付き有限状態オートマトン (WSFA) は、NLP でよく使用されます。
障害遷移は、WFSA の特殊なケースである $n$-gram モデルおよび CRF におけるバックオフまたは補間をコンパクトに表現するための便利な拡張機能です。
通常の非周期 WFSA のパスサムは、時間 $O(|E|)$ の逆方向アルゴリズムによって効率的に計算されます。ここで、$E$ は遷移のセットです。
ただし、これでは障害遷移は許可されず、WFSA を前処理して障害遷移を排除すると、$|E|$ が大幅に増加する可能性があります。
障害遷移を直接処理するために、後方アルゴリズムを拡張します。
私たちのアプローチは、平均状態がアルファベット $\Sigma$ のごく一部 $s \ll 1$ に対してのみ出ていくアークを持っている場合に効率的です。
$O{\left(|E| + s |\Sigma| |Q| T_\text{max} \log{|\Sigma|}\right)}$ で実行される一般的な非周期 WFSA のアルゴリズムを提案します。
$Q$ は状態のセット、$T_\text{max}$ は障害遷移の最大接続コンポーネントのサイズです。
障害遷移トポロジが CRF で例示される条件を満たす場合、$T_\text{max}$ 因子を削除でき、重みセミリングがリングの場合、$\log{|\Sigma|}$ 因子を削除できます。

後者の場合 (リング重み付け非巡回 WFSA) では、複雑度 $\displaystyle O{\left(|E| + |\Sigma| |Q| \min(1,s\pi_\text{
max}) \right)}$、ここで $\pi_\text{max}$ は最長の障害パスのサイズです。

要約(オリジナル)

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 $\Sigma$. We propose an algorithm for general acyclic WFSAs which runs in $O{\left(|E| + s |\Sigma| |Q| T_\text{max} \log{|\Sigma|}\right)}$, where $Q$ is the set of states and $T_\text{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_\text{max}$ factor can be dropped, and when the weight semiring is a ring, the $\log{|\Sigma|}$ factor can be dropped. In the latter case (ring-weighted acyclic WFSAs), we also give an alternative algorithm with complexity $\displaystyle O{\left(|E| + |\Sigma| |Q| \min(1,s\pi_\text{max}) \right)}$, where $\pi_\text{max}$ is the size of the longest failure path.

arxiv情報

著者 Anej Svete,Benjamin Dayan,Tim Vieira,Ryan Cotterell,Jason Eisner
発行日 2023-07-11 09:08:33+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CL, cs.DS パーマリンク