ResearchTrend.AI
  • Papers
  • Communities
  • Events
  • Blog
  • Pricing
Papers
Communities
Social Events
Terms and Conditions
Pricing
Parameter LabParameter LabTwitterGitHubLinkedInBlueskyYoutube

© 2025 ResearchTrend.AI, All rights reserved.

  1. Home
  2. Papers
  3. 2301.06862
22
1

Algorithms for Acyclic Weighted Finite-State Automata with Failure Arcs

17 January 2023
Anej Svete
Benjamin Dayan
Tim Vieira
Ryan Cotterell
Jason Eisner
ArXivPDFHTML
Abstract

Weighted finite-state automata (WSFAs) are commonly used in NLP. Failure transitions are a useful extension for compactly representing backoffs or interpolation in nnn-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∣)O(|E|)O(∣E∣), where EEE is the set of transitions. However, this does not allow failure transitions, and preprocessing the WFSA to eliminate failure transitions could greatly increase ∣E∣|E|∣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≪1s \ll 1s≪1 of the alphabet Σ\SigmaΣ. We propose an algorithm for general acyclic WFSAs which runs in O(∣E∣+s∣Σ∣∣Q∣Tmaxlog⁡∣Σ∣)O{\left(|E| + s |\Sigma| |Q| T_\text{max} \log{|\Sigma|}\right)}O(∣E∣+s∣Σ∣∣Q∣Tmax​log∣Σ∣), where QQQ is the set of states and TmaxT_\text{max}Tmax​ is the size of the largest connected component of failure transitions. When the failure transition topology satisfies a condition exemplified by CRFs, the TmaxT_\text{max}Tmax​ factor can be dropped, and when the weight semiring is a ring, the log⁡∣Σ∣\log{|\Sigma|}log∣Σ∣ factor can be dropped. In the latter case (ring-weighted acyclic WFSAs), we also give an alternative algorithm with complexity O(∣E∣+∣Σ∣∣Q∣min⁡(1,sπmax))\displaystyle O{\left(|E| + |\Sigma| |Q| \min(1,s\pi_\text{max}) \right)}O(∣E∣+∣Σ∣∣Q∣min(1,sπmax​)), where πmax\pi_\text{max}πmax​ is the size of the longest failure path.

View on arXiv
Comments on this paper