Skip to main content

Algorithms for Weighted Finite Automata with Failure Transitions

  • Conference paper
  • First Online:
Implementation and Application of Automata (CIAA 2018)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 10977))

Included in the following conference series:

Abstract

In this paper we extend several weighted finite automata (WFA) algorithms to automata with failure transitions (\(\varphi \)-WFAs). Failure transitions, which are taken only when no immediate match is possible at a given state, are used to compactly represent automata and have many applications. Efficient algorithms to intersect two \(\varphi \)-WFAs, to remove failure transitions, to trim, and to compute (over \(\mathbb {R}_+\)) the shortest distance in a \(\varphi \)-WFA are presented.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    A metric \(\varDelta :\mathbb {K}\times \mathbb {K}\rightarrow \mathbb {R}_+\) satisfies (1) \(\varDelta (x,y) = \varDelta (y,x)\), (2) \(\varDelta (x,y) = 0\) iff \(x = y\), and (3) \(\varDelta (x,y) \le \varDelta (x,z) + \varDelta (y,z)\) for all \(x,y,z \in \mathbb {K}\).

  2. 2.

    The condition that a successful path cannot end in a \(\varphi \)-labeled transition simplifies the presentation without loss of generality since there is an equivalent \(\varphi \)-WFA with the final weights propagated to the \(\varphi \) sources.

  3. 3.

    Label multiplicity at state q is the maximum number of outgoing transitions in q sharing the same label.

  4. 4.

    Such as Dijkstra or Bellman-Ford with the appropriate queue disciplines on S.

  5. 5.

    Semiring K is k-closed if for all a in \(\mathbb {K}\), \(\bigoplus _{i=0}^{k+1} a^i = \bigoplus _{i=0}^{k} a^i\). It is k-closed for \(A\) if the weight a of each cycle in \(A\) verifies \(\bigoplus _{n=0}^{k+1} a^n = \bigoplus _{n=0}^{k} a^n\). The tropical semiring is 0-closed [17].

  6. 6.

    We could also add logic so that when line 12 of the shortest distance algorithm is executed for a disallowed transition then it is also always executed for any negative compensating transition in case \(\left| r[q+|Q|]\nu \right|< \epsilon < \left| r[q']\nu \right| \). This however is an unneeded precaution since with small enough \(\epsilon \) any discrepancy is insignificant compared to the floating-point precision of \(d[q'']\).

  7. 7.

    The real numbers can be defined axiomatically as a field with a complete, monotonic total order [24].

References

  1. Aho, A.V., Corasick, M.J.: Efficient string matching: an aid to bibliographic search. Commun. ACM 18(6), 333–340 (1975)

    Article  MathSciNet  Google Scholar 

  2. Albert, J., Kari, J.: Digital image compression. In: Droste, M., Kuich, W., Vogler, H. (eds.) Handbook of Weighted Automata. Monographs in Theoretical Computer Science. An EATCS Series, pp. 453–479. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-01492-5_11

    Chapter  Google Scholar 

  3. Allauzen, C., Mohri, M., Roark, B.: Generalized algorithms for constructing language models. In: Proceedings of ACL, pp. 40–47 (2003)

    Google Scholar 

  4. Allauzen, C., Riley, M.: SFST: Stochastic FST Library (2017). http://sfst.opengrm.org

  5. Berstel, J., Reutenauer, C.: Rational Series and Their Languages. Springer, Heidelberg (1988)

    Book  Google Scholar 

  6. Björklund, H., Björklund, J., Zechner, N.: Compact representation of finite automata with failure transitions. Technical report, UMINF 13.11, Umeå University (2013)

    Google Scholar 

  7. Breuel, T.M.: The OCRopus open source OCR system. In: Proceedings of IS&T/SPIE 20th Annual Symposium (2008)

    Google Scholar 

  8. Chen, S., Goodman, J.: An empirical study of smoothing techniques for language modeling. Technical report, TR-10-98, Harvard University (1998)

    Google Scholar 

  9. Cormen, T., Leiserson, C., Rivest, R.: Introduction to Algorithms. MITP (1992)

    Google Scholar 

  10. Durbin, R., Eddy, S.R., Krogh, A., Mitchison, G.J.: Biological Sequence Analysis: Probabilistic Models of Proteins and Nucleic Acids. Cambridge University Press, London (1998)

    Book  Google Scholar 

  11. Ebden, P., Sproat, R.: The Kestrel TTS text normalization system. Nat. Lang. Eng. 21(3), 333–353 (2015)

    Article  Google Scholar 

  12. Hellsten, L., Roark, B., Goyal, P., Allauzen, C., Beaufays, F., Ouyang, T., Riley, M., Rybach, D.: Transliterated mobile keyboard input via weighted finite-state transducers. In: FSMNLP 2017, pp. 10–19 (2017)

    Google Scholar 

  13. Iglesias, G., Allauzen, C., Byrne, W., de Gispert, A., Riley, M.: Hierarchical phrase-based translation representations. In: EMNLP 2011, pp. 1373–1383 (2011)

    Google Scholar 

  14. Katz, S.M.: Estimation of probabilities from sparse data for the language model component of a speech recogniser. IEEE Trans. Acoust. Speech Signal Process. 35(3), 400–401 (1987)

    Article  Google Scholar 

  15. Kourie, D.G., Watson, B.W., Cleophas, L.G., Venter, F.: Failure deterministic finite automata. In: Stringology, pp. 28–41 (2012)

    Google Scholar 

  16. Mohri, M.: String-matching with automata. Nord. J. Comput. 4(2), 217–231 (1997)

    MathSciNet  MATH  Google Scholar 

  17. Mohri, M.: Semiring frameworks and algorithms for shortest-distance problems. J. Automata Lang. Comb. 7(3), 321–350 (2002)

    MathSciNet  MATH  Google Scholar 

  18. Mohri, M.: Weighted automata algorithms. In: Droste, M., Kuich, W., Vogler, H. (eds.) Handbook of Weighted Automata. Monographs in Theoretical Computer Science. An EATCS Series, pp. 213–254. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-01492-5_6

    Chapter  Google Scholar 

  19. Mohri, M., Pereira, F., Riley, M.: Speech recognition with weighted finite-state transducers. In: Benesty, J., Sondhi, M.M., Huang, Y.A. (eds.) Springer Handbook of Speech Processing. SH, pp. 559–584. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-49127-9_28

    Chapter  Google Scholar 

  20. Mohri, M., Yang, S.: Competing with automata-based expert sequences. In: Proceedings of AISTATS (2018)

    Google Scholar 

  21. Novak, J.R., Minematsu, N., Hirose, K.: Failure transitions for joint n-gram models and G2P conversion. In: INTERSPEECH, pp. 1821–1825 (2013)

    Google Scholar 

  22. Nxumalo, M., Kourie, D.G., Cleophas, L., Watson, B.W.: An assessment of algorithms for deriving failure deterministic finite automata. S. Afr. Comput. J. 29(1), 43–68 (2017)

    Google Scholar 

  23. Roark, B., Allauzen, C., Riley, M.: Smoothed marginal distribution constraints for language modeling. In: ACL 2013, vol. 1, pp. 43–52 (2013)

    Google Scholar 

  24. Rudin, W.: Principles of Mathematical Analysis, vol. 3. McGraw-Hill, New York (1964)

    MATH  Google Scholar 

  25. Sakarovich, J.: Rational and recognizable power series. In: Droste, M., Kuich, W., Vogler, H. (eds.) Handbook of Weighted Automata. Monographs in Theoretical Computer Science. An EATCS Series, pp. 105–174. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-01492-5_4

    Chapter  Google Scholar 

  26. Schaefer, P.: Sum-preserving rearrangements of infinite series. Am. Math. Monthly 88(1), 33–40 (1981)

    Article  MathSciNet  Google Scholar 

  27. Velikovich, L.: Semantic model for fast tagging of word lattices. In: 2016 IEEE Spoken Language Technology Workshop (SLT), pp. 398–405. IEEE (2016)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Cyril Allauzen .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Springer International Publishing AG, part of Springer Nature

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Allauzen, C., Riley, M.D. (2018). Algorithms for Weighted Finite Automata with Failure Transitions. In: Câmpeanu, C. (eds) Implementation and Application of Automata. CIAA 2018. Lecture Notes in Computer Science(), vol 10977. Springer, Cham. https://doi.org/10.1007/978-3-319-94812-6_5

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-94812-6_5

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-94811-9

  • Online ISBN: 978-3-319-94812-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics