Finite state transducer

From Infogalactic: the planetary knowledge core
(Redirected from Finite-state transducer)
Jump to: navigation, search

Lua error in package.lua at line 80: module 'strict' not found.

A finite state transducer (FST) is a finite state machine with two tapes: an input tape and an output tape. This contrasts with an ordinary finite state automaton (or finite state acceptor), which has a single tape.

Overview

An automaton can be said to recognize a string if we view the content of its tape as input. In other words, the automaton computes a function that maps strings into the set {0,1}. Alternatively, we can say that an automaton generates strings, which means viewing its tape as an output tape. On this view, the automaton generates a formal language, which is a set of strings. The two views of automata are equivalent: the function that the automaton computes is precisely the indicator function of the set of strings it generates. The class of languages generated by finite automata is known as the class of regular languages.

The two tapes of a transducer are typically viewed as an input tape and an output tape. On this view, a transducer is said to transduce (i.e., translate) the contents of its input tape to its output tape, by accepting a string on its input tape and generating another string on its output tape. It may do so nondeterministically and it may produce more than one output for each input string. A transducer may also produce no output for a given input string, in which case it is said to reject the input. In general, a transducer computes a relation between two formal languages.

Each string-to-string finite state transducer relates the input alphabet Σ to the output alphabet Γ. Relations R on Σ*×Γ* that can be implemented as finite state transducers are called rational relations. Rational relations that are partial functions, i.e. that relate every input string from Σ* to at most one Γ*, are called rational functions.

Finite-state transducers are often used for phonological and morphological analysis in natural language processing research and applications. Pioneers in this field include Ronald Kaplan, Lauri Karttunen, Martin Kay and Kimmo Koskenniemi.[1][non-primary source needed] A common way of using transducers is in a so-called "cascade", where transducers for various operations are combined into a single transducer by repeated application of the composition operator (defined below).

Formal construction

Formally, a finite transducer T is a 6-tuple (Q, Σ, Γ, I, F, δ) such that:

  • Q is a finite set, the set of states;
  • Σ is a finite set, called the input alphabet;
  • Γ is a finite set, called the output alphabet;
  • I is a subset of Q, the set of initial states;
  • F is a subset of Q, the set of final states; and
  • \delta \subseteq Q \times (\Sigma\cup\{\epsilon\}) \times (\Gamma\cup\{\epsilon\}) \times Q (where ε is the empty string) is the transition relation.

We can view (Q, δ) as a labeled directed graph, known as the transition graph of T: the set of vertices is Q, and (q,a,b,r)\in\delta means that there is a labeled edge going from vertex q to vertex r. We also say that a is the input label and b the output label of that edge.

NOTE: This definition of finite transducer is also called letter transducer (Roche and Schabes 1997); alternative definitions are possible, but can all be converted into transducers following this one.

Define the extended transition relation \delta^* as the smallest set such that:

  • \delta\subseteq\delta^*;
  • (q,\epsilon,\epsilon,q)\in\delta^* for all q\in Q; and
  • whenever (q,x,y,r) \in \delta^* and (r,a,b,s) \in \delta then (q,xa,yb,s) \in \delta^*.

The extended transition relation is essentially the reflexive transitive closure of the transition graph that has been augmented to take edge labels into account. The elements of \delta^* are known as paths. The edge labels of a path are obtained by concatenating the edge labels of its constituent transitions in order.

The behavior of the transducer T is the rational relation [T] defined as follows: x[T]y if and only if there exists i \in I and f \in F such that (i,x,y,f) \in \delta^*. This is to say that T transduces a string x\in\Sigma^* into a string y\in\Gamma^* if there exists a path from an initial state to a final state whose input label is x and whose output label is y.

Weighted automata

<templatestyles src="Module:Hatnote/styles.css"></templatestyles>

Finite State Transducers can be weighted, where each transition is labelled with a weight in addition to the input and output labels. A Weighted Finite State Transducer (WFST) over a set K of weights can be defined similarly to an unweighted one as an 8-tuple T=(Q, Σ, Γ, I, F, E, λ, ρ), where:

  • Q, Σ, Γ, I, F are defined as above;
  •  E \subseteq Q \times (\Sigma\cup\{\epsilon\}) \times (\Gamma\cup\{\epsilon\}) \times Q \times K (where ε is the empty string) is the finite set of transitions;
  • \lambda:  I \rightarrow K maps initial states to weights;
  • \rho: F \rightarrow K maps final states to weights.

In order to make certain operations on WFSTs well-defined, it is convenient to require the set of weights to form a semiring.[2] Two typical semirings used in practice are the log semiring and tropical semiring: unweighted automata may be regarded as having weights in the Boolean semiring.[3]

Operations on finite state transducers

The following operations defined on finite automata also apply to finite transducers:

  • Union. Given transducers T and S, there exists a transducer T\cup S such that x[T\cup S]y if and only if x[T]y or x[S]y.
  • Concatenation. Given transducers T and S, there exists a transducer T\cdot S such that x[T\cdot S]y if and only if there exist x_1, x_2, y_1, y_2 with x=x_1x_2, y =y_1y_2, x_1[T]y_1 and x_2[S]y_2.
  • Kleene closure. Given a transducer T, there exists a transducer T^* with the following properties: (1) \epsilon[T^*]\epsilon; (2) if w[T^*]y and x[T]z then wx[T^*]yz; and x[T^*]y does not hold unless mandated by (1) or (2).
  • Intersection. Given transducers T and S, there exists a transducer T\cap S such that x[T\cap S]y if and only if x[T]y and x[S]y.
  • Composition. Given a transducer T on alphabets Σ and Γ and a transducer S on alphabets Γ and Δ, there exists a transducer T \circ S on Σ and Δ such that x[T \circ S]z if and only if there exists a string y\in\Gamma^* such that x[T]y and y[S]z. This operation extends to the weighted case.[4]
This definition uses the same notation used in mathematics for relation composition. However, the conventional reading for relation composition is the other way around: given two relations T and S, (x,z)\in T\circ S when there exist some y such that (x,y)\in S and (y,z)\in T.
  • Projection to an automaton. There are two projection functions: \pi_1 preserves the input tape, and \pi_2 preserves the output tape. The first projection, \pi_1 is defined as follows:
Given a transducer T, there exists a finite automaton \pi_1 T such that \pi_1 T accepts x if and only if there exists a string y for which x[T]y.
The second projection, \pi_2 is defined similarly.
  • Determinization. Given a transducer T, we want to build an equivalent transducer that has a unique initial state and such that no two transitions leaving any state share the same input label. The powerset construction can be extended to transducers, or even weighted transducers, but sometimes fails to halt; indeed, some non-deterministic transducers do not admit equivalent deterministic transducers.[5] Characterizations of determinizable transducers have been proposed[6] along with efficient algorithms to test them:[7] they rely on the semiring used in the weighted case as well as a general property on the structure of the transducer (the twins property).
  • Weight pushing for the weighted case.[8]
  • Minimization for the weighted case.[9]

Additional properties of finite state transducers

  • It is decidable whether the relation [T] of a transducer T is empty.
  • It is decidable whether there exists a string y such that x[T]y for a given string x.
  • It is undecidable whether two transducers are equivalent.[10] Equivalence is however decidable in the special case where the relation [T] of a transducer T is a (partial) function.
  • If one defines the alphabet of labels L=(\Sigma\cup\{\epsilon\}) \times (\Gamma\cup\{\epsilon\}), finite state transducers are isomorphic to NDFA over the alphabet L, and may therefore be determinized (turned into deterministic finite automata over the alphabet L=[(\Sigma\cup\{\epsilon\}) \times \Gamma] \cup [\Sigma \times (\Gamma\cup\{\epsilon\})] ) and subsequently minimized so that they have the minimum number of states.[citation needed]

Applications

Context-sensitive rewriting rules of the form a → b / c _ d, used in linguistics to model phonological rules and sound change, are computationally equivalent to finite-state transducers, provided that application is nonrecursive, i.e. the rule is not allowed to rewrite the same substring twice.[11]

Weighted FSTs found applications in natural language processing, including machine translation, and in machine learning.[12][13]

See also

Notes

  1. Koskenniemi 1983
  2. Lua error in package.lua at line 80: module 'strict' not found.
  3. Lua error in package.lua at line 80: module 'strict' not found.
  4. Mohri 2004, pp. 3–5
  5. [1]
  6. Mohri 2004, pp. 5–6
  7. Allauzen 2003
  8. Mohri 2004, pp. 7–9
  9. Mohri 2004, pp. 9–11
  10. Griffiths 1968
  11. Lua error in package.lua at line 80: module 'strict' not found.
  12. Lua error in package.lua at line 80: module 'strict' not found.
  13. http://www.cs.nyu.edu/~mohri/pub/fsmnlp08.pdf

References

  • Lua error in package.lua at line 80: module 'strict' not found.
  • Lua error in package.lua at line 80: module 'strict' not found.
  • Lua error in package.lua at line 80: module 'strict' not found.
  • Lua error in package.lua at line 80: module 'strict' not found.

External links

Further reading

  • Lua error in package.lua at line 80: module 'strict' not found.
  • Lua error in package.lua at line 80: module 'strict' not found.
  • Lua error in package.lua at line 80: module 'strict' not found.
  • Lua error in package.lua at line 80: module 'strict' not found.
  • Lua error in package.lua at line 80: module 'strict' not found.
  • Lua error in package.lua at line 80: module 'strict' not found.. Free PDF version