Docsity

New Approach for Learning Languages through Linear Separation in High-Dimensional Spaces, Exams of Construction

Toggle sidebar
bg1
Learning Linearly Separable Languages
Leonid Kontorovich1, Corinna Cortes2, and Mehryar Mohri3,2
1Carnegie Mellon University
5000 Forbes Avenue, Pittsburgh, PA 15213.
2Google Research,
1440 Broadway, New York, NY 10018.
3Courant Institute of Mathematical Sciences,
251 Mercer Street, New York, NY 10012.
Abstract. This paper presents a novel paradigm for learning languages
that consists of mapping strings to an appropriate high-dimensional fea-
ture space and learning a separating hyperplane in that space. It initi-
ates the study of the linear separability of automata and languages by
examining the rich class of piecewise-testable languages. It introduces
a high-dimensional feature map and proves piecewise-testable languages
to be linearly separable in that space. The proof makes use of word
combinatorial results relating to subsequences. It also shows that the
positive definite kernel associated to this embedding can be computed in
quadratic time. It examines the use of support vector machines in com-
bination with this kernel to determine a separating hyperplane and the
corresponding learning guarantees. It also proves that all languages lin-
early separable under a regular finite cover embedding, a generalization
of the embedding we used, are regular.
1 Motivation
The problem of learning regular languages, or, equivalently, finite automata, has
been extensively studied over the last few decades.
Finding the smallest automaton consistent with a set of accepted and re-
jected strings was shown to be NP-complete by Angluin [1] and Gold [12]. Pitt
and Warmuth [21] further strengthened these results by showing that even an ap-
proximation within a polynomial function of the size of the smallest automaton
is NP-hard. These results imply the computational intractability of the general
problem of passively learning finite automata within many learning models, in-
cluding the mistake bound model of Haussler et al. [14] or the PAC-learning
model of Valiant [16]. This last negative result can also be directly derived from
the fact that the VC-dimension of finite automata is infinite.
On the positive side, Trakhtenbrot and Barzdin [24] showed that the smallest
finite automaton consistent with the input data can be learned exactly provided
that a uniform complete sample is provided, whose size is exponential in that of
the automaton. The worst case complexity of their algorithm is exponential but
a better average-case complexity can be obtained assuming that the topology
and the labeling are selected randomly [24] or even that the topology is selected
adversarially [9].
The model of identification in the limit of automata was introduced and
discussed by Gold [11]. Deterministic finite automata were shown not to be
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download New Approach for Learning Languages through Linear Separation in High-Dimensional Spaces and more Exams Construction in PDF only on Docsity!

Learning Linearly Separable Languages

Leonid Kontorovich^1 , Corinna Cortes^2 , and Mehryar Mohri^3 ,^2 (^1) Carnegie Mellon University 5000 Forbes Avenue, Pittsburgh, PA 15213. (^2) Google Research, 1440 Broadway, New York, NY 10018. (^3) Courant Institute of Mathematical Sciences, 251 Mercer Street, New York, NY 10012.

Abstract. This paper presents a novel paradigm for learning languages that consists of mapping strings to an appropriate high-dimensional fea- ture space and learning a separating hyperplane in that space. It initi- ates the study of the linear separability of automata and languages by examining the rich class of piecewise-testable languages. It introduces a high-dimensional feature map and proves piecewise-testable languages to be linearly separable in that space. The proof makes use of word combinatorial results relating to subsequences. It also shows that the positive definite kernel associated to this embedding can be computed in quadratic time. It examines the use of support vector machines in com- bination with this kernel to determine a separating hyperplane and the corresponding learning guarantees. It also proves that all languages lin- early separable under a regular finite cover embedding, a generalization of the embedding we used, are regular.

1 Motivation

The problem of learning regular languages, or, equivalently, finite automata, has been extensively studied over the last few decades. Finding the smallest automaton consistent with a set of accepted and re- jected strings was shown to be NP-complete by Angluin [1] and Gold [12]. Pitt and Warmuth [21] further strengthened these results by showing that even an ap- proximation within a polynomial function of the size of the smallest automaton is NP-hard. These results imply the computational intractability of the general problem of passively learning finite automata within many learning models, in- cluding the mistake bound model of Haussler et al. [14] or the PAC-learning model of Valiant [16]. This last negative result can also be directly derived from the fact that the VC-dimension of finite automata is infinite. On the positive side, Trakhtenbrot and Barzdin [24] showed that the smallest finite automaton consistent with the input data can be learned exactly provided that a uniform complete sample is provided, whose size is exponential in that of the automaton. The worst case complexity of their algorithm is exponential but a better average-case complexity can be obtained assuming that the topology and the labeling are selected randomly [24] or even that the topology is selected adversarially [9]. The model of identification in the limit of automata was introduced and discussed by Gold [11]. Deterministic finite automata were shown not to be

identifiable in the limit from positive examples [11]. But positive results were given for the identification in the limit of the families of k-reversible languages [2] and subsequential transducers [20]. Some restricted classes of probabilistic automata such as acyclic probabilistic automata were also shown by Ron et al. to be efficiently learnable [22]. There is a wide literature dealing with the problem of learning automata and we cannot survey all these results in such a short space. Let us mention however that the algorithms suggested for learning automata are typically based on a state-merging idea. An initial automaton or prefix tree accepting the sample strings is first created. Then, starting with the trivial partition with one state per equivalence class, classes are merged while preserving an invariant congruence property. The automaton learned is obtained by merging states according to the resulting classes. Thus, the choice of the congruence determines the algorithm. This work departs from this established paradigm in that it does not use the state-merging technique. Instead, it initiates the study of the linear separation of automata or languages by mapping strings to an appropriate high-dimensional feature space and learning a separating hyperplane, starting with the rich class of piecewise-testable languages. Piecewise-testable languages form a non-trivial family of regular languages. They have been extensively studied in formal language theory [18] starting with the work of Imre Simon [23]. A language L is said to be n-piecewise-testable, n ∈ N, if whenever u and v have the same subsequences of length at most n and u is in L, then v is also in L. A language L is said to be piecewise testable if it is n-piecewise-testable for some n ∈ N. For a fixed n, n-piecewise-testable languages were shown to be identifiable in the limit by Garc´ıa and Ruiz [10]. The class of n-piecewise-testable languages is finite and thus has finite VC-dimension. To the best of our knowledge, there has been no learning result related to the full class of piecewise-testable languages. This paper introduces an embedding of all strings in a high-dimensional fea- ture space and proves that piecewise-testable languages are finitely linearly sep- arable in that space, that is linearly separable with a finite-dimensional weight vector. The proof is non-trivial and makes use of deep word combinatorial results relating to subsequences. It also shows that the positive definite kernel associ- ated to this embedding can be computed in quadratic time. Thus, the use of support vector machines in combination with this kernel and the correspond- ing learning guarantees are examined. Since the VC-dimension of the class of piecewise-testable languages is infinite, it is not PAC-learnable and we cannot hope to derive PAC-style bounds for this learning scheme. But, the finite linear separability of piecewise-testable helps us derive weaker bounds based on the concept of the margin. The linear separability proof is strong in the sense that the dimension of the weight vector associated with the separating hyperplane is finite. This is related to the fact that a regular finite cover is used for the separability of piecewise testable languages. This leads us to study the general problem of separability with other finite regular covers. We prove that languages separated with such regular finite covers are necessarily regular. The paper is organized as follows. Section 2 introduces some preliminary def- initions and notations related to strings, automata, and piecewise-testable lan- guages. Section 3 presents the proof of the finite linear separability of piecewise-

Lemma 1 (Decisive strings). Let L ⊆ Σ∗^ be a piecewise-testable language, then there exists a decisive string u ∈ Σ∗^ for L.

Proof. We will prove that this property (existence of a decisive string) holds for shuffle ideals and that it is preserved under the Boolean operations (nega- tion, intersection, union). This will imply that it holds for all finite Boolean combinations of shuffle ideals, i.e., for all PT languages. By definition, a shuffle ideal

(u) admits u as a decisive string. It is also clear that if u is decisive for some PT language L, then u is also decisive for L. Thus, the existence of a decisive string is preserved under negation. For the remainder of the proof, L 1 and L 2 will denote two PT languages over Σ. If u 1 is positive-decisive for L 1 and u 2 is positive-decisive for L 2 ,

(u^1 )^ ∩ (u 2 ) ⊆ L = L 1 ∩L 2.

(u 1 )∩

(u 2 ) is not empty since it contains, for example, u 1 u 2. For any string u ∈

(u 1 ) ∩

(u 2 ),

(u) ⊆

(u 1 ) ∩

(u 2 ), thus any such u is positive-decisive for L. Similarly, when u 1 is negative-decisive for L 1 and u 2 negative-decisive for L 2 any u ∈

(u 1 ) ∪

(u 2 ) is negative-decisive for L = L 1 ∩ L 2. Finally, if u 1 is positive-decisive for L 1 and u 2 negative-decisive for L 2 then any u ∈

(u 2 ) is negative-decisive for L = L 1 ∩ L 2 ⊆ L 1. This shows that the existence of a decisive string is preserved under intersection. The existence of a decisive string is also preserved under union. If u 1 is positive-decisive for L 1 and u 2 positive-decisive for L 2 , then any u ∈

^ (u^1 )^ ∪ (u 2 ) is positive-decisive for L = L 1 ∪ L 2. Similarly, when u 1 is negative- decisive for L 1 and u 2 negative-decisive for L 2 , any u ∈

(u 1 ) ∩

(u 2 ) 6 = ∅ is negative-decisive for L = L 1 ∪ L 2. Lastly, if u 1 is positive-decisive for L 1 and u 2 is negative-decisive for L 2 then any u ∈

(u 1 ) is positive-decisive for L = L 1 ∪ L 2. ut

We say that u is minimally decisive for L if it admits no proper subsequence v v u that is decisive for L.

Lemma 2 (Finiteness of the set of minimally-decisive strings). Let L ⊆ Σ∗^ be a PT language and let D ⊆ Σ∗^ be the set of all minimally decisive strings for L, then D is a finite set.

Proof. Observe that D is a subsequence-free subset of Σ∗: no element of D is a proper subsequence of another. Thus, the finiteness of D follows directly from Theorem 1 below. ut

The following result, on which Lemma 2 is based, is a non-trivial theorem of word combinatorics which was originally discovered, in different forms, by Higman [15] in 1952 and Haines [13] in 1969. The interested reader could refer to [19, Theorem 2.6] for a modern presentation.

Theorem 1 ([13, 15]). Let Σ be a finite alphabet and L ⊆ Σ∗^ a language containing no two distinct strings x and y such that x v y. Then L is finite.

The definitions and the results just presented can be generalized to decisive- ness modulo a set V : we will say that a string u is decisive modulo some V ⊆ Σ∗ if V ∩

(u) ⊆ L or V ∩

(u) ⊆ L. As before, we will refer to the two cases as positive- and negative-decisiveness modulo V and similarly define minimally decisive strings modulo V. These definitions coincide with ordinary decisiveness when V = Σ∗.

Lemma 3 (Finiteness of the set of minimally-decisive strings modulo V ). Let L, V ⊆ Σ∗^ be two PT languages and let D ⊆ Σ∗^ be the set of all minimally decisive strings for L modulo V , then D is a non-empty finite set.

Proof. Lemma 1 on the existence of decisive strings can be generalized straight- forwardly to the case of decisiveness modulo a PT language V : if L, V ⊆ Σ∗ are PT and V 6 = ∅, then there exists u ∈ V such that u is decisive modulo V for L. Indeed, by Lemma 1, for any language of the form

(s) there exists a decisive string u ∈ V ∩

(s). The generalization follows by replacing

(X) with V ∩

(X) in the proof of Lemma 1. Similarly, in view of Lemma 2, it is clear that there can only be finitely many minimally decisive strings for L modulo V. ut

Theorem 2 (PT decision list). If L ⊆ Σ∗^ is PT then L is equivalent to some finite decision list ∆ over shuffle ideals.

Proof. Consider the sequence of PT languages V 1 , V 2 ,... defined according to the following process:

  • V 1 = Σ∗.
  • When Vi 6 = ∅, Vi+1 is constructed from Vi in the following way. Let Di ⊆ Vi be the nonempty and finite set of minimally decisive strings u for L modulo Vi. The strings in Di are either all positive-decisive modulo Vi or all negative- decisive modulo Vi. Indeed, if u ∈ Di is positive-decisive and v ∈ Di is negative-decisive then uv ∈

(u) ∩

(v), which generates a contradiction. Define σi as σi = 1 when all strings of Di are positive-decisive, σi = 0 when they are negative-decisive modulo Vi and define Vi+1 by:

Vi+1 = Vi \

(Di), (3)

with

(Di) =

u∈Di

(u).

We show that this process terminates, that is VN +1 = ∅ for some N > 0. As- sume the contrary. Then, the process generates an infinite sequence D 1 , D 2 ,.. .. Construct an infinite sequence X = (xn)n∈N by selecting a string xn ∈ Dn for

any n ∈ N. By construction, Dn+1 ⊆

(Dn) for all n ∈ N, thus all strings xn are necessarily distinct. Define a new sequence (yn)n∈N by: y 1 = x 1 and yn+1 = xψ(n), where ψ : N → N is defined for all n ∈ N by:

ψ(n) =

min{k ∈ N : {y 1 ,... , yn, xk} is subsequence-free}, if such a k exists, ∞ otherwise. (4) We cannot have ψ(n) 6 = ∞ for all n > 0 since the set Y = {y 1 , y 2 ,.. .} would then be (by construction) subsequence-free and infinite. Thus, ψ(n) = ∞ for some n > 0. But then any xk , k ∈ N, is a subsequence of an element of {y 1 ,... , yn}. Since the set of subsequences of {y 1 ,... , yn} is finite, this would imply that X is finite and lead to a contradiction. Thus, there exists an integer N > 0 such that VN +1 = ∅ and the process described generates a finite sequence D = (D 1 ,... , DN ) of nonempty sets as well as a sequence σ = (σi) ∈ { 0 , 1 }N^. Let ∆ be the decision list

(

(D 1 ), σ 1 ),... , (

(DN ), σN ). (5)

where [[P ]] represents the 0-1 truth value of the predicate P. Thus, K(x, y) counts the number of subsequences common to x and y, without multiplicity. This subsequence kernel is closely related to but distinct from the one de- fined by Lodhi et al. [17]. Indeed, the kernel of Lodhi et al. counts the num- ber of occurrences of subsequences common to x and y. Thus, for example K(abc, acbc) = 8, since the cardinal of the set of common subsequences of abc and acbc, {, a, b, c, ab, ac, bc, abc}, is 8. But, the kernel of Lodhi et al. (without penalty factor) would instead associate the value 9 to the pair (abc, acbc). A string with n distinct symbols has at least 2n^ possible subsequences, so a naive computation of K(x, y) based on the enumeration of the subsequences of x and y is inefficient. We will show however that K(x, y) can be computed in quadratic time, O(|Σ||x||y|), using a method suggested by Derryberry [8] which turns out to be somewhat similar to that of Lodhi et al. For any symbol a ∈ Σ and a string u ∈ Σ∗, define lasta(u) to be 0 if a does not occur in u and the largest index i such that u[i] = a otherwise. For x, y ∈ Σ∗, define K′^ by:

∀x, y ∈ Σ∗, K′(x, y) =

u∈Σ+

[[u v x]] [[u v y]]. (11)

Thus, K′(x, y) is the number of nonempty subsequences without multiplicity common to x and y. For any a ∈ Σ, define Ka by:

∀x, y ∈ Σ∗, Ka(x, y) =

u∈Σ∗a

[[u v x]] [[u v y]] (12)

be the number of such subsequences ending in a. Then, by definition of K′,

∀x, y ∈ Σ∗, K′(x, y) =

a∈Σ

Ka(x, y). (13)

By definition, if a does not appear in x and or y, then Ka(x, y) = 0. Otherwise, let ua be a common subsequence of x and y with u 6 = ∅, then u is a non-empty subsequence of x and y. Thus,

Ka(x, y) =

0 if lasta(x) = 0 or lasta(y) = 0 1 + K′(x[1 : lasta(x) − 1], y[1 : lasta(y) − 1]) otherwise, (14)

where the addition of 1 in the last equation accounts for the common subse- quence ua = a with u =  which is not computed by K′. The subsequence kernel K, which does count the empty string  as a common subsequence, is given by K(x, y) = K′(x, y) + 1. A straightforward recursive algorithm based on Equa- tion 14 can be used to compute K in time O(|Σ′||x||y|), where Σ′^ ⊆ Σ is the alphabet reduced to the symbols appearing in x and y. The kernel of Lodhi et al. [17] was shown to be a specific instance of a rational kernel over the (+, ×) semiring [6]. Similarly, it can be shown that the subsequence kernel just examined is related to rational kernels over the (+, ×) semiring.

5 Learning Linearly Separable Languages

This section deals with the problem of learning PT languages. In previous sec- tions, we showed that using the subsequence feature mapping φ, or equivalently a subsequence kernel K that can be computed efficiently, PT languages are finitely linearly separable. These results suggest the use of a linear separation learning technique such as support vector machines (SVM) combined with the subsequence kernel K for learning PT languages [5, 7, 25]. In view of the estimate of the complexity of the subsequence kernel computation presented in the previous section, the complexity of the algorithm for a sample of size m where xmax is the longest string is in O(QP(m)) + m^2 |xmax|^2 |Σ|), where QP(m) is the cost of solving a quadratic programming problem of size m, which is at most O(m^3 ). We will use the standard margin bound to analyze the behavior of that al- gorithm. Note however that since the VC-dimension of the set of PT languages is infinite, PAC-learning is not possible and we need to resort to a weaker guar- antee. Let (x 1 , y 1 ),... , (xm, ym) ∈ X × {− 1 , +1} be a sample extracted from a set X (X = Σ∗^ when learning languages). The margin ρ of a hyperplane with weight vector w ∈ RN^ over this sample is defined by:

ρ = inf i=1,...,m

yi 〈w, φ(xi)〉 ‖w‖

The sample is linearly separated by w iff ρ > 0. Note that our definition holds even for infinite-size samples. The linear separation result shown for the class of PT languages is in fact strong. Indeed, for any weight vector w ∈ RN, let supp(w) = {i : wi 6 = 0} denote the support of w, then the following property holds for PT languages.

Definition 1. Let C be a concept class defined over a set X. We will say that a concept c ∈ C is finitely linearly separable, if there exists a mapping φ : X → { 0 , 1 }N^ and a weight vector w ∈ RN^ with finite support, | supp(w)| < ∞, such that

c = {x ∈ X : 〈w, φ(x)〉 > 0 }. (15)

The concept class C is said to be finitely linearly separable if all c ∈ C are finitely linearly separable for the same mapping φ.

Note that in general a linear separation in an infinite-dimensional space does not guarantee a strictly positive margin ρ. Points in an infinite-dimensional space may be arbitrarily close to the separating hyperplane and their infimum distance could be zero. However, finitely linear separation does guarantee a strictly posi- tive margin.

Proposition 1. Let C be a class of concepts defined over a set X that is finitely linearly separable using the mapping φ : X → { 0 , 1 }N^ and a weight vector w ∈ RN. Then, the margin ρ of the hyperplane defined by w is strictly positive, ρ > 0.

Proof. Fix a concept c ∈ C. By assumption, c is finitely linearly separable by some hyperplane. By Proposition 1, the corresponding margin ρ 0 is strictly pos- itive, ρ 0 > 0. ρ 0 is less than or equal to the margin of the optimal hyperplane ρ separating c from X \ c based on the m examples. Since the full sample X is linearly separable, so is any subsample of size m. Let f ∈ F be the linear function corresponding to the optimal hyperplane over a sample of size m drawn according to D. Then, the margin of f is at least as large as ρ since not all points of X are used to define f. Thus, the margin of f is greater than or equal to ρ 0 and the statement follows Theorem 3. ut

Theorem 4 applies directly to the case of PT languages. Observe that in the statement of the theorem, ρ 0 depends on the particular concept c learned but does not depend on the sample size m. Note that the linear separating hyperplane with finite-support weight vector is not necessarily an optimal hyperplane. The following proposition shows how- ever that when the mapping φ is surjective the optimal hyperplane has the same property.

Proposition 2. Let c ∈ C be a finitely linearly separable concept with the feature mapping φ : X → { 0 , 1 }N^ and weight vector w with finite support, | supp(w)| < ∞, such that φ(X) = RN. Assume that φ is surjective, then the weight vector w ˆ corresponding to the optimal hyperplane for c has also a finite support and supp( ˆw) ⊆ supp(w).

Proof. Assume that ˆwi 6 = 0 for some i 6 ∈ supp(w). We first show that this implies the existence of two points x− 6 ∈ c and x+ ∈ c such that φ(x−) and φ(x+) differ only by their ith coordinate. Let φ′^ be the mapping such that for all x ∈ X, φ′(x) differs from φ(x) only by the ith coordinate and let wˆ′^ be the vector derived from wˆ by setting the ith coordinate to zero. Since φ is surjective, thus φ−^1 (φ′(x)) 6 = ∅. If x and any x′^ ∈ φ−^1 (φ′(x)) are in the same class for all x ∈ X, then

sgn(〈 w, φˆ (x)〉) = sgn(〈 w, φˆ ′(x)〉). (21)

Fix x ∈ X. Assume for example that [φ′(x)]i = 0 and [φ(x)]i = 1, then 〈 w, φˆ ′(x)〉 = 〈 wˆ′, φ(x)〉. Thus, in view of Equation 21,

sgn(〈 w, φˆ (x)〉) = sgn(〈 w, φˆ ′(x)〉) = sgn(〈 wˆ′, φ(x)〉). (22)

We obtain similarly that sgn(〈 w, φˆ (x)〉) = sgn(〈 wˆ′, φ(x)〉) when [φ′(x)]i = 1 and [φ(x)]i = 0. Thus, for all x ∈ X, sgn(〈 w, φˆ (x)〉) = sgn(〈 wˆ′, φ(x)〉). This leads to a contradiction, since the norm of the weight vector for the optimal hyperplane is the smallest among all weight vectors of separating hyperplanes. This proves the existence of the x− 6 ∈ c and x+ ∈ c with φ(x− ) and φ(x+ ) differing only by their ith coordinate. But, since i 6 ∈ supp(w), for two such points x− 6 ∈ c and x+ ∈ c, 〈w, φ(x− )〉 = 〈w, φ(x+ )〉. This contradicts the status of sgn(〈w, φ(x)〉) as a linear separator. Thus, our original hypothesis cannot hold: there exists no i 6 ∈ supp(w) such that wˆi 6 = 0 and the support of ˆw is included in that of w. ut

In the following, we will give another analysis of the generalization error of SVMs for finitely separable hyperplanes using the following bound of Vapnik based on the number of essential support vectors:

E[error(hm )] ≤

E[( R ρmm+1+1 )^2 ] m + 1

where hm is the optimal hyperplane hypothesis based on a sample of m points, error(hm ) the generalization error of that hypothesis, Rm+1 the smallest radius of a set of essential support vectors of an optimal hyperplane defined over a set of m + 1 points, and ρm+1 its margin. Let c be a finitely separable concept. When the mapping φ is surjective, by Proposition 2, the weight vector ˆw of the optimal separating hyperplane for c has finite support and the margin ρ 0 is positive ρ 0 > 0. Thus, the smallest radius of a set of essential support vectors for that hyperplane is R =

N (c) where N (c) = | supp( ˆw)|. If Rm+1 tends to R when m tends to infinity, then for all  > 0, there exists M such that for m > M, R^2 (m) ≤ N (c) + . In view of Equation 23 the expectation of the generalization error of the optimal hyperplane based on a sample of size m is bounded by

E[error(hm )] ≤

E[( R ρmm+1+1 )^2 ] m + 1

N (c) +  ρ^20 (m + 1)

This upper bound varies as (^) m^1.

6 Finite Cover with Regular Languages

In previous sections, we introduced a feature mapping φ, the subsequence map- ping, for which PT languages are finitely linearly separable. The subsequence mapping can be defined in terms of the set of shuffle ideals of all strings, Uu =

(u), u ∈ Σ∗. A string x can belong only to a finite number of shuf- fle ideals Uu, which determine the non-zero coordinates of φ(x). This leads us to consider other such mappings based on other regular sets Uu and investigate the properties of languages linearly separated for such mappings. The main result of this section is that all such linearly separated languages are regular.

6.1 Definitions

Let Un ⊆ Σ∗, n ∈ N, be a countable family of sets, such any string x ∈ Σ∗^ lies in at least one and at most finitely many Un. Thus, for all x ∈ Σ∗,

n

ψn(x) < ∞,

where ψn is the characteristic function of Un:

ψn(x) =

1 if x ∈ Un 0 otherwise.

Theorem 5 provides a representation of regular languages in terms of some sub- sets of RN. Although we present a construction for converting this represen- tation to a more familiar one such as a finite automaton, our construction is not necessarily efficient. Indeed, for some rk there may be exponentially many rk-acceptable LI s. This underscores the specific feature of our method. Our ob- jective is to learn regular languages efficiently using some representation, not necessarily automata.

6.3 Representer Theorem

Let S = {xj : j = 1,... , m} ⊆ Σ∗^ be a finite set of strings and α ∈ Rm. The pair (S, α) defines a language L(S, α) given by:

L(S, α) = {x ∈ Σ∗^ :

∑^ m

j=

αj K(x, xj ) > 0 }. (27)

Let w =

∑m j=1 αj^ ψ(xj^ ). Since each^ ψ(xj^ ) has only a finite number of non-zero components, the support of w is finite and by Theorem 5, L(S, α) can be seen to be regular. Conversely, the following result holds.

Theorem 6. Let ψ : Σ∗^ → { 0 , 1 }N^ be an RFC-induced embedding and let w ∈ RN^ be a finitely supported weight vector. Let L(w) be defined by L(w) = {x ∈ Σ∗^ : 〈w, ψ(x)〉 > 0 }. Then, there exist (xj ), j = 1,... , m, and α ∈ Rm^ such that L(w) = L(S, α) = {x ∈ Σ∗^ :

∑m j=1 αj^ K(x, xj^ )^ >^0 }.

Proof. Without loss of generality, we can assume that no cover set Un 6 = Σ∗, Un is fully contained in a finite union of the other cover sets Un′ , Un′ 6 = Σ∗. Other- wise, the corresponding feature component can be omitted for linear separation. Now, for any Un 6 = Σ∗, let xn ∈ Un be a string that does not belong to any finite union of Un′^ , Un′^6 = Σ∗. For Un = Σ∗, choose an arbitrary string xn ∈ Σ∗. Then, by definition of the xn,

〈w, ψ(x)〉 =

∑^ m

j=

wj K(x, xj ). (28)

This proves the claim. ut

This result shows that any finitely linearly separable language can be inferred from a finite sample.

6.4 Further Characterization

It is natural to ask what property of finitely supported hyperplanes is responsible for their inducing regular languages. In fact, Theorem 5 is readily generalized:

Theorem 7. Let f : Σ∗^ → R be a function such that there exist an integer N ∈ N and a function g : { 0 , 1 }N^ → R such that

∀x ∈ Σ∗, f (x) = g(ψ 1 (x), ψ 2 (x),... , ψN (x)), (29)

Thus, the value of f depends on a fixed finite number of components of ψ. Then, for any r ∈ R, the language L = {x ∈ Σ∗^ : f (x) = r} is regular.

Proof. Since f is a function of finitely many binary variables, its range is finite. From here, the proof proceeds exactly as in the proof of Theorem 5, with identical definitions for {rk} and Lrk. ut

This leads to the following corollary.

Corollary 2. Let f : Σ∗^ → R be a function satisfying the conditions of The- orem 7. Then, for any r ∈ R, the languages L 1 = {x ∈ Σ∗^ : f (x) > r} and L 2 = {x ∈ Σ∗^ : f (x) < r} are regular.

7 Conclusion

We introduced a new framework for learning languages that consists of mapping strings to a high-dimensional feature space and seeking linear separation in that space. We applied this technique to the non-trivial case of PT languages and showed that this class of languages is indeed linearly separable and that the corresponding subsequence kernel can be computed efficiently. Many other classes of languages could be studied following the same ideas. This could lead to new results related to the problem of learning families of languages or classes of automata.

Acknowledgments

Much of the work by Leonid Kontorovich was done while visiting the Hebrew Uni- versity, in Jerusalem, Israel, in the summer of 2003. Many thanks to Yoram Singer for providing hosting and guidance at the Hebrew University. Thanks also to Daniel Neill and Martin Zinkevich for helpful discussions. This work was supported in part by the IST Programme of the European Community, under the PASCAL Network of Excellence, IST-2002-506778. The research at CMU was supported in part by NSF ITR grant IIS-0205456. This publication only reflects the authors’ views. Mehryar Mohri’s work was partially funded by the New York State Office of Science Technology and Academic Research (NYSTAR).

References

  1. Dana Angluin. On the complexity of minimum inference of regular sets. Informa- tion and Control, 3(39):337–350, 1978.
  2. Dana Angluin. Inference of reversible languages. Journal of the ACM (JACM), 3(29):741–765, 1982.
  3. Martin Anthony. Threshold Functions, Decision Lists, and the Representation of Boolean Functions. Neurocolt Technical report Series NC-TR-96-028, Royal Holloway, University of London, 1996.
  4. Peter Bartlett and John Shawe-Taylor. Generalization performance of support vector machines and other pattern classifiers. In Advances in kernel methods: support vector learning, pages 43–54. MIT Press, Cambridge, MA, USA, 1999.
  5. Bernhard E. Boser, Isabelle Guyon, and Vladimir N. Vapnik. A training algorithm for optimal margin classifiers. In Proceedings of the Fifth Annual Workshop of Computational Learning Theory, volume 5, pages 144–152, Pittsburg, 1992. ACM.