Viterbi Algorithm Generalized for n-Tape Best-Path Search
André Kempe
Abstract
We present a generalization of the Viterbi algorithm for identifying the path with minimal (resp. maximal) weight in a n-tape weighted finite-state machine (n-WFSM), that accepts a given n-tuple of input strings (s1,... sn). It also allows us to compile the best transduction of a given input n-tuple by a weighted (n+m)-WFSM (transducer) with n input and m output tapes. Our algorithm has a worst-case time complexity of O(|s|n |E| log (|s|n |Q|)), where n and |s| are the number and average length of the strings in the n-tuple, and |Q| and |E| the number of states and transitions in the n-WFSM, respectively. A straight forward alternative, consisting in intersection followed by classical shortest-distance search, operates in O(|s|n (|E|+|Q|) log (|s|n |Q|)) time.
Create a lesson
Related papers
CritICL: Inference-Time Weak-to-Strong Generalization from Small Language Model Failure Modes
Yufan Wu, Yinghui He, Zhengyi Hu et al.
TTPO: Test-Time Policy Optimization
Aozhe Wang, Zhengxi Lu, Jianze Wang et al.
Stochastic Estimation of Transduced Language Models
Vésteinn Snæbjarnarson, Samuel Kiegeland, Manuel de Prada Corral et al.
Boosting LLM Exploration via Weak-Model Guidance in RLVR
Xingyu Shen, Huishuai Zhang, Peng Li et al.
Consolidating RLVR Capabilities Across Domains: A Deep Dive into Fusion Paradigms
Siye Wu, Kai Yang, Yuchen Cai et al.
How Language Models Organize and Structure Moral Knowledge
Orion Reblitz-Richardson