publicité

2004s-32 Efficient Non-Parametric Function Induction in SemiSupervised Learning Yoshua Bengio, Olivier Delalleau, Nicolas Le Roux Série Scientifique Scientific Series Montréal Mai 2004 © 2004 Yoshua Bengio, Olivier Delalleau, Nicolas Le Roux. Tous droits réservés. All rights reserved. Reproduction partielle permise avec citation du document source, incluant la notice ©. Short sections may be quoted without explicit permission, if full credit, including © notice, is given to the source. CIRANO Le CIRANO est un organisme sans but lucratif constitué en vertu de la Loi des compagnies du Québec. Le financement de son infrastructure et de ses activités de recherche provient des cotisations de ses organisations-membres, d’une subvention d’infrastructure du ministère de la Recherche, de la Science et de la Technologie, de même que des subventions et mandats obtenus par ses équipes de recherche. CIRANO is a private non-profit organization incorporated under the Québec Companies Act. Its infrastructure and research activities are funded through fees paid by member organizations, an infrastructure grant from the Ministère de la Recherche, de la Science et de la Technologie, and grants and research mandates obtained by its research teams. Les organisations-partenaires / The Partner Organizations PARTENAIRE MAJEUR . Ministère du développement économique et régional et de la recherche [MDERR] PARTENAIRES . Alcan inc. . Axa Canada . Banque du Canada . Banque Laurentienne du Canada . Banque Nationale du Canada . Banque Royale du Canada . Bell Canada . BMO Groupe Financier . Bombardier . Bourse de Montréal . Caisse de dépôt et placement du Québec . Développement des ressources humaines Canada [DRHC] . Fédération des caisses Desjardins du Québec . GazMétro . Hydro-Québec . Industrie Canada . Ministère des Finances du Québec . Pratt & Whitney Canada Inc. . Raymond Chabot Grant Thornton . Ville de Montréal . École Polytechnique de Montréal . HEC Montréal . Université Concordia . Université de Montréal . Université du Québec à Montréal . Université Laval . Université McGill . Université de Sherbrooke ASSOCIE A : . Institut de Finance Mathématique de Montréal (IFM2) . Laboratoires universitaires Bell Canada . Réseau de calcul et de modélisation mathématique [RCM2] . Réseau de centres d’excellence MITACS (Les mathématiques des technologies de l’information et des systèmes complexes) Les cahiers de la série scientifique (CS) visent à rendre accessibles des résultats de recherche effectuée au CIRANO afin de susciter échanges et commentaires. Ces cahiers sont écrits dans le style des publications scientifiques. Les idées et les opinions émises sont sous l’unique responsabilité des auteurs et ne représentent pas nécessairement les positions du CIRANO ou de ses partenaires. This paper presents research carried out at CIRANO and aims at encouraging discussion and comment. The observations and viewpoints expressed are the sole responsibility of the authors. They do not necessarily represent positions of CIRANO or its partners. ISSN 1198-8177 Efficient Non-Parametric Function Induction in Semi-Supervised Learning Yoshua Bengio*, Olivier Delalleau†, Nicolas Le Roux ‡ Résumé / Abstract Il y a eu un regain d'intérêt récemment pour l'apprentissage semi-supervisé, à cause du grand nombre de bases de données comportant de très nombreux exemples non étiquetés et seulement quelques exemples étiquetés. Cet article poursuit le travail fait sur les algorithmes non paramétriques qui fournissent une étiquette continue estimée pour les exemples non-étiquetés. Il les étend à des algorithmes d'induction fonctionnelle qui correspondent à la minimisation d'un critère de régularisation appliqué à un exemple hors-échantillon, et qui ont la forme d'un régresseur à fenêtre de Parzen. L'avantage de cette extension est qu'elle permet de prédire l'étiquette d'un nouvel exemple sans avoir à résoudre de nouveau un système de dimension 'n' (le nombre d'exemples d'entraînement total), qui peut être de l'ordre de O(n^3). Les expériences montrent que l'extension fonctionne bien, en ce sens que l'étiquette prédite est proche de celle qui aurait été obtenue si l'exemple de test avait fait partie de l'ensemble non étiqueté. Cette procédure d'induction fonctionnelle relativement efficace peut également être utilisée, lorsque 'n' est grand, pour estimer la solution en l'écrivant seulement en fonction d'une expansion à noyau avec 'm' << 'n', et en la réduisant à un système linéaire avec 'm' équations et 'm' inconnues. Mots clés : modèles non paramétriques, classification, régression, apprentissage semi-supervisé There has been an increase of interest for semi-supervised learning recently, because of the many datasets with large amounts of unlabeled examples and only a few labeled ones. This paper follows up on proposed non-parametric algorithms which provide an estimated continuous label for the given unlabeled examples. It extends them to function induction algorithms that correspond to the minimization of a regularization criterion applied to an out-of-sample example, and happens to have the form of a Parzen windows regressor. The advantage of the extension is that it allows predicting the label for a new example without having to solve again a linear system of dimension 'n' (the number of unlabeled and labeled training examples), which can cost O(n^3). Experiments show that the extension works well, in the sense of predicting a label close to the one that would have been obtained if the test example had been included in the unlabeled set. This relatively efficient function induction procedure can also be used when 'n' is large to approximate the solution by writing it only in terms of a kernel expansion with 'm' << 'n' terms, and reducing the linear system to 'm' equations in 'm' unknowns. Keywords: non-parametric models, classification, regression, semi-supervised learning. * Yoshua Bengio, Université de Montréal et CIRANO, tél. : (514) 343-6804, [email protected] Olivier Delalleau, Université de Montréal, [email protected] ‡ Nicolas Le Roux, Université de Montréal, [email protected] † 1. Introduction In many applications of machine learning, the labeled examples only represent a small fraction of all the available data. This situation has created a spur of research activity in the area of semi-supervised learning algorithms, that can take advantage of both types of examples. We refer to (Seeger, 2001) for a good overview of the issues involved. Most approaches to semi-supervised learning make some implicit or explicit assumption about the joint distribution of the input and output variables. An exception is the set of regularization methods (e.g. as in (Schuurmans & Southey, 2002)) that use the unlabeled data to discover overfitting. Among the other approaches one would traditionally characterize the methods as parametric or non-parametric, and as using an explicit generative model (e.g. considering the labels as hidden variables in a graphical model, see (McCallum & Nigam, 1998)) or not. Interestingly, with explicit parametric assumptions of the class-conditional input distribution (Cozman et al., 2003), one can show that these assumptions (if not perfectly valid) yield both a decrease in variance and an increase in bias, and the more so when the relative amount of unlabeled data increases. To us this strongly suggests that good results could be obtained with non-parametric methods when the amount of unlabeled data is large and little prior information on the input distribution is available. Fortunately, in the very recent past, several nonparametric approaches to semi-supervised learning have been introduced, e.g. in (Szummer & Jaakkola, 2002; Chapelle et al., 2003; Belkin & Niyogi, 2003; Zhu et al., 2003a; Zhu et al., 2003b; Zhou et al., 2004). They rely on weak implicit assumptions on the generating data ditribution, e.g. smoothness of the target function with respect to a given notion of similarity between examples (represented by a kernel function)1 . For classification tasks this amounts to assuming that the target function is constant within the region of input space (or “cluster” (Chapelle et al., 2003)) associated with a particular class. All of these previous non-parametric approaches exploit the idea of building and smoothing a graph in which each example is associated with a node, and arcs betweeen two nodes are associated with a similarity function applied on the input part of the corresponding two examples. For some of these methods one first builds a representation (e.g. (Belkin & Niyogi, 2003)) or a kernel (Chapelle et al., 2003) using the input part of the data (of both labeled and unlabeled cases), and then trains a super1 See also (Kemp et al., 2004) for a hierarchically structured notion of a priori similarity. vised learning algorithm with the labeled examples but relying on the representation or kernel induced using the unlabeled examples. In the other methods (Szummer & Jaakkola, 2002; Zhu et al., 2003a; Zhu et al., 2003b; Zhou et al., 2004) one solves an optimization problem in which both the labeled and unlabeled cases intervene: the idea is to propagate the label information from the labeled cases in the graph, with stronger propagation between similar examples. It is not always clear with these graph-based kernel methods for semi-supervised learning how to generalize to previously unseen test examples. In (Zhu et al., 2003b) it is proposed to assign to the test case the label (or inferred label) of the nearest neighbor from the training set (labeled or unlabeled). In this paper we derive from the training criterion an inductive formula that is in fact a cousin of the nearest neighbor solution. In general the above graph-based approaches have been designed for the transductive setting, in which the input part of the test examples must be provided before doing the expensive part of training. This typically requires solving a linear system with n equations and n parameters, where n is the number of labeled and unlabeled examples. In a truly inductive setting where new examples are given one after the other and a prediction must be given after each example, it can be very computationally costly to solve such a system anew for each of these test examples. This paper starts from this problem and proposes a natural generalization of the graph-based semi-supervised learning algorithms that allows one to cheaply perform function induction, i.e. for a computational cost that is O(n). The main idea is to apply the same smoothness criterion that is behind the original semisupervised algorithm, adding the terms corresponding to the new example, but keeping the predictions fixed for the training examples (both the labeled and unlabeled ones). In addition to providing a cheap alternative for doing function induction, the proposed approach opens the door to efficient approximations even in the transductive setting. Since we know the analytic functional form of the prediction at a point x in terms of the predictions at a set of training points (it turns out to be a Parzen windows predictor) we can use it to express all the predictions in terms of a small subset of m n examples (i.e. a low-rank approximation) and solve a linear system with O(m) variables and equations. In the next section we formalize a family of smoothness criteria giving rise to already proposed non-parametric semi-supervised learning algorithms. In section 3 we justify and derive the function induction formula. In section 4.2.1 we show in experiments that the outof-sample induction is very close to the transductive prediction. In section 4.2.2 we compare variants of the proposed semi-supervised algorithm with two very closely related previously proposed ones (Zhu et al., 2003a; Zhou et al., 2004). Finally, in section 5 we present an approximation method to reduce the computational time and the memory requirements by solving a smaller linear system. 2. Non-Parametric Smoothness Criteria Among the previously proposed approaches, several can be cast as the minimization of a criterion (often a quadratic form) in terms of the function values f (xi ) at the labeled and unlabeled examples xi , as follows: CK,D,D0 ,λ (f ) = + 1 2 λ X K(xi , xj )D(f (xi ), f (xj )) i,j∈U ∪L X D0 (f (xi ), yi ) + R(f ) (1) i∈L where U is the unlabeled set, L the labeled set, xi the input part of the i-th example, yi the target label, K(·, ·) is a positive similarity function (e.g. a Gaussian kernel) applied on a pair of inputs, and D(·, ·) and D 0 (·, ·) are lower-bounded dissimilarity functions applied on a pair of output values. R(f ) is an optional additional regularization term of the values of f at xi . In particular, in (Zhou et al., P 2004), the proposed criterion amounts to R(f ) = λ i∈U f (xi )2 . To obtain a quadratic form in f (xi ) one typically chooses D and D0 to be quadratic, e.g. def D(y, y 0 ) = D0 (y, y 0 ) = (y − y 0 )2 = D∗ (y, y 0 ). When D, D 0 and R are quadratic, this criterion can be minimized exactly for the n function values f (xi ). In general this could cost O(n3 ) operations, possibly less if the input similarity function K(·, ·) is sparse. A quadratic dissimilarity function makes a lot of sense in regression problems but has also been used successfully in classification problems (where f (·) is not constrained to be discrete). In this paper, we only consider binary classification, but note that all the algorithms proposed extend naturally to multiclass problems. The first term of equation 1 says that we want to penalize the dissimilarity between f (xi ) and f (xj ) when xi and xj are similar. The second term says we want to penalize f (xi ) for being far from the observed target value yi (for i ∈ L). The hyperparameter λ controls the trade-off between the smoothness of f and achieving the observed values on the labeled cases. It should depend on the amount of noise in the observed values yi , i.e. on the particular data distribution (although for example (Zhu et al., 2003a) consider forcing f (xi ) = yi ). The optional extra regularization term R(f ) controls how much we penalize the high values of f on the unlabeled data. Adding it may give better results when very few labels are available. Two methods using a criterion of the form given by eq. 1 have already been proposed. In (Zhu et al., 2003a), λ = ∞, R(f ) = 0 and D = D 0 = D∗ . In (Zhou et al., 2004), the cost function can be represented as in eq. 1 with λ > 0, D 0 = D∗ but D(f (xi ), f (xj )) = where def ai = X f (xi ) f (xj ) √ − √ ai aj K(xi , xj ). 2 (2) (3) j∈U ∪L,j6=i In this paper we mostly study the case in which D = D0 = D∗ and R(f ) = 0. The minimization of the criterion with respect to all the f (xi ) for i ∈ L ∪ U gives rise to the following linear system: Af~ = b (4) where f~i = f (xi ), whose first l elements are in L and the remaining n − l in U . Using the matrix notation Wij = K(xi , xj ), the system matrix A can be written as follows: A = λ∆L + Diag(W 1n ) − W (5) where ∆L (n × n) has entries ∆L,ij = δij δi∈L , Diag(v) is the matrix containing the vector v in its diagonal, and 1n is the vector of n ones. The right hand side vector b is as follows: bi = δi∈L λyi . (6) In the non-parametric setting, which is the one studied by the above authors, the criterion is directly optimized with respect to the function values. This has the disadvantage of providing no obvious prediction for new examples, and the method is therefore used in the transductive setting (the test examples are included in the unlabeled set). To obtain function induction from the transductive learner, one can of course add the test point x to the unlabeled set and solve again the system, but it is a costly procedure (e.g. O(n3 ) for solving a linear system when D and D 0 are quadratic). One alternative – which should be further explored – is to parameterize f (x) with a flexible form such as a neural network or a linear combination of non-linear bases (see also (Belkin & Niyogi, 2003)). Another is the induction formula proposed below. As we will see in section 5 the two alternatives can be combined to yield an efficient approximation to the non-parametric semi-supervised learning problem. 3. Function Induction Formula In order to transform the above transductive algorithms (for different choices of K, D and D 0 in eq. 1) into function induction algorithms we will do two things: • apply the same type of smoothness constraint as in eq. 1 to the new example x, • as in ordinary function induction (by opposition to transduction), require that the f (xi ) remain fixed even though the knowledge of x has been added. and the spectral clustering adaptive kernel (Ng et al., 2002), obtained from Gσ by the normalization Hσ (xi , xj ) = Gσ (xi , xj ) √ a i aj (8) with the ai defined as in eq. 3 with K = Gσ . As we will see, this kernel tends to yield better results than the fixed Gaussian kernel. We denote by SS(λ, K) the algorithm that consists in minimizing the criterion CK,D∗,D∗,λ of eq. 1. The algorithm proposed in (Zhu et al., 2003a) can thus be written SS(+∞, Gσ ). Similarly, we note SS 0 (α, σ) the algorithm that minimizes the regularized version of the 1 − α)α−1 criterion of eq. 1, with the P kernel G2σ , λ0 = 2 (1 ∗ (0 < α < 1), R(f ) = λ i∈U f (xi ) , D = D , and the distance D defined in eq. 2: this is the algorithm from (Zhou et al., 2004). 4.1. Toy data Therefore we will minimize the criterion of eq. 1 when we add terms for the new unlabeled example x, but only with respect to f (x). Since the terms of the criterion depending on f (x) are X K(x, xj )D(f (x), f (xj )) j∈U ∪L by minimizing them (taking D = D 0 = D∗ ) we readily obtain the solution Pn j=1 K(x, xj )f (xj ) ˜ Pn . (7) f (x) = j=1 K(x, xj ) Interestingly this is exactly the formula for Parzen windows or Nadaraya-Watson non-parametric regression (Nadaraya, 1964; Watson, 1964) when K is the Gaussian kernel. An interesting question to consider is whether f˜(xi ) as defined above approaches f (xi ) (the solution of eq. 4) for i ∈ L ∪ U . Plugging x = xi in the above formula and applying the linear equations of eq. 4 yields λ(yi − f (xi )) f˜(xi ) = f (xi ) − δi∈L P . j∈L∪U K(xi , xj ) Hence f˜(xi ) = f (xi ) for i ∈ U , but on labeled examples the induction formula chooses a value f˜(xi ) that is “smoother” than f (xi ), i.e. not as close to yi . 4. Experiments In our experiments, we have used both the Gaussian kernel ||x−y||2 Gσ (x, y) = e− σ2 2.5 2 1.5 1 0.5 0 −0.5 −1 −1.5 −2 −2.5 −2 −1.5 −1 −0.5 0 0.5 1 1.5 2 Figure 1. Toy example of the classification obtained from 5 labeled examples (in circles), and 495 unlabeled. In squares are a few test points, whose class (symbol or color) is obtained by the induction formula of eq. 7. We first validate our generalization formula on a toy dataset, the classical two-moon problem. Figure 1 shows an example where 500 unlabeled examples are classified from only 5 labeled ones. Equation 7 is then used to predict the class of 10000 new test examples sampled from the same density, yielding an error rate of 1, 76%. Note that, obviously, any supervised algorithm taking into account only the labeled examples would have achieved a much worse performance. This error rate is similar to the one obtained when we add each test point x to the training set, then minimize the cost of eq. 1 to get the class of x, repeating this operation for each x in the test set: by doing so, we obtain a 1, 7% classification error. In both cases, we use the same learning algorithm SS(λ = 5, K = G0.1 ). 4.2. Handwritten character recognition We evaluate our method on real data, using the Letters dataset of the UCI Machine Learning repository. There are 26 handwritten characters classes, to be discriminated using 16 geometric features. However, in our experiments, we reduced to a binary problem by considering only the class formed by the characters ’I’ and ’O’ and the one formed by ’J’ and ’Q’ (to make the problem harder than a simple two-character classification). This yields a dataset of 3038 samples, that we divide into a train set D and a test set T , with respectively 2038 and 1000 samples. 4.2.1. Generalization performance −3 2.5 x 10 model on V ∪ V1 , and use eq. 7 to compute f˜(x) for all x ∈ T . We also compute f1∗ (x) by minimizing the criterion (eq. 1) over V ∪ V1 ∪ {x}, and f2∗ (x) by doing it over V ∪ V2 ∪ {x}. We then compare the difference between f and f1∗ to the difference between f1∗ and f2∗ : δ= 1 X ˜ (f (x) − f1∗ (x))2 − (f1∗ (x) − f2∗ (x))2 . |T | x∈T (9) We average δ over 10 random splits of D\V for V1 and V2 , which yields the value plotted on figure 2 for different sizes of V . It appears the average error we make by not including x in the training set is of the same order of magnitude as the perturbation induced by a small substitution of about 3% of the training samples. Here, the algorithm SS(λ = 1, K = G1 ) is used, and the first 10% examples of our dataset D are labeled. 4.2.2. Comparison with existing algorithms 2 Here, we compare the classification performance of various algorithms on the unlabeled part U of the dataset D, when we vary the fraction pl of labeled data L in D. The algorithms tested are SS(λ = +∞, K = Gσ ), from (Zhu et al., 2003a), SS 0 (α, σ), from (Zhou et al., 2004), an alternative SS(λ = +∞, K = Hσ ) derived from our general framework, and, as a baseline, a Parzen windows classifier trained only the labeled examples, using a Gaussian kernel Gσ (algorithm written P W (σ) in the figures). 1.5 1 0.5 0 −0.5 −1 0.005 SS(λ = ∞,K = G1) SS(λ = ∞,K = H ) 0.3 0.01 0.015 0.02 0.025 0.03 0.035 0.04 0.045 Figure 2. The horizontal axis is the fraction of substituted data in the training set, which induces a variance in the transductive predictions. The vertical axis gives the difference (δ in eq. 9) between the average difference between the transductive and inductive predictions and the variance in transductive predictions. The graph shows that around 3% perturbation in the training set induces as much variance in the predictions as the difference between transductive and inductive predictions. To assess the validity of our generalization formula, we compare f˜(x) given by eq. 7 with its value f ∗ (x) that would have been found if x had been included in the training set. We also study the intrinsic stability of f ∗ (x) when samples from the training set are substituted: this gives us an idea of the uncertainty around f ∗ (x). More precisely, the following experiment is made. We take V = the first m samples from our training set D, and split the remaining n − m samples randomly into two sets of equal size, V1 and V2 . We train our 1 SS’(α = 0.99, σ = 1) SS’(α = 0.5, σ = 1) PW(σ = 1) 0.25 0.2 0.15 0.1 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 Figure 3. Classification error on the unlabeled training data for 0.01 ≤ pl ≤ 0.1. Throughout the experiments, we keep σ = 1, which seems to be an adequate value for this dataset. We compute the classification error of each of the algorithms on 100 random shuffles of the whole dataset D ∪ T (thus using each time a different D and T , while 0.1 of the smoothness of the solution when very few la0 bels P are given.2 Indeed, in SS , the regularization term λ i∈U f (xi ) encourages this smoothness, and thus yields a better classification than SS, where there is no such regularization. SS(λ = ∞,K = G ) 1 SS(λ = ∞,K = H1) 0.09 SS’(α = 0.99, σ = 1) SS’(α = 0.5, σ = 1) PW(σ = 1) 0.08 0.07 5. Efficient Approximation 0.06 5.1. Algorithm 0.05 0.04 0.03 0.02 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 Figure 4. Classification error on the unlabeled training data for 0.1 ≤ pl ≤ 0.9. keeping their size fixed). The average error is plotted on figure 3 for the fraction of labeled samples pl ≤ 0.1, and on figure 4 for pl ≥ 0.1. We do not show results of the algorithm SS for λ < +∞ because they are, on average, worse than those obtained with an infinite λ (for this dataset). Note however that, when using K = Gσ , for a given D and T , a lower λ may sometimes give better results when pl is low (5% or less). This is probably because when less labels are available, the smoothness of the solution becomes more important. The best overall results are obtained by SS(λ = +∞, K = Hσ ) and SS 0 (α = 0.5, σ). The reason why they outperform SS(λ = +∞, K = Gσ ) probably resides in the normalization of eq. 8 (though SS 0 does not use exactly the same normalization, but a very close one given by eq. 2). This normalization tends to give higher weights to isolated points, which enforces the smoothness of the function in the regions where the data is sparser, compared to the unnormalized kernel Gσ . As illustrated on the plots, this property has a very positive effect on the overall performance of the algorithm. Note that, for pl ≤ 3%, SS 0 (α = 0.99) yields the best performance, but this value of α also penalizes the algorithm for higher values of pl . The same phenomenon was pointed out in (Zhou et al., 2004), where it was noted that SS 0 (α = 0.99) was less efficient than SS(λ = +∞, K = Gσ ) when pl grew. If we remember that a value of α close to 1 means a low λ in eq. 1, this is explained by the fact the given label values are not necessarily preserved when λ is low. As for the good results obtained by SS 0 (α = 0.99) for a very low pl , they can be explained again by the importance A simple way to reduce the cubic computational requirement and quadratic memory requirement for ’training’ the above non-parametric semi-supervised algorithms is to force the solutions to be expressed in terms of a subset of the examples. This idea has already been exploited successfully in a different form for other kernel algorithms, in particular for Gaussian processes (Williams & Seeger, 2001). Here we will take advantage of the induction formula (eq. 7) to simplify the linear system to m < n equations and variables, where m is the size of a subset of examples that will form a basis for expressing all the other function values. Let S ⊂ L ∪ U with L ⊂ S be such a subset, with |S| = m. Define R = U \S. The idea is thus to force f (xi ) for i ∈ R to be expressed as a linear combination of the f (xj ) with j ∈ S: P j∈S K(xi , xj )f (xj ) P . ∀i ∈ R, f (xi ) = j∈S K(xi , xj ) Plugging this formula in eq. 1 (using the simple squared difference for D and D 0 ), the total cost can be separated in four terms, CLL + CSS + CRR + CRS : • the labeled data error: X CLL = λ (f (xi ) − yi )2 i∈L • the smoothness within the selected subset S: 1 X 2 K(xi , xj ) (f (xi ) − f (xj )) CSS = 2 i,j∈S • the smoothness within the rest of the unlabeled examples R: CRR = 1 X 2 K(xi , xj ) (f (xi ) − f (xj )) 2 i,j∈R • the two cross-terms between elements of S and elements of R: 1 X 2 CRS = 2 K(xi , xj ) (f (xi ) − f (xj )) . 2 i∈R,j∈S Let f~ denote now the vector with entries f (xi ), only for i ∈ S (they are the values to identify). To simplify the notation, also define W the matrix with entries K(xi , xj ), and sub-matrices WSS when i, j ∈ S, WRS when i ∈ R and j ∈ S, WRR when i, j ∈ R. Define W W the matrix with entries P ijWik , and the correspondk∈S ing submatrix W RS with entries (i, j) such that i ∈ R and j ∈ S. Using this notation, the gradients with respect to the above cost components can be written as follows: ∂CLL = 2λ∆L (f~ − y) ∂ f~ where ∆L is the same as in eq. 5, except it is of size (m × m), and y is a vector with elements yi for i ∈ L and arbitrary elsewhere (these values are multiplied by zeros in ∆L ). The other gradients are as follows: i h 0 ∂CRR = 2 W RS (Diag(WRR 1r ) − WRR ) W RS f~ ∂ f~ i h ∂CRS 0 = 2 Diag(WSR 1r ) − W RS WRS f~ ∂ f~ ∂CSS = [2 (Diag(WSS 1m ) − WSS )] f~ ∂ f~ The linear system to be solved can thus be written: Af~ = b with A = λ∆L + + + 0 W RS (Diag(WRR 1r ) − WRR ) W RS 0 Diag(WSR 1r ) − W RS WRS Diag(WSS 1m ) − WSS and b defined as before in eq. 6 (but with size m). c RR because it is We denote the above algorithm SS an approximation based on a subset vs subset linear system (the RR comes from the use of CRR , which will be discussed below). 5.2. Variants Further improvement can be obtained by observing . that the main computational cost comes from ∂C∂RR f~ If we choose to ignore CRR in the total cost, then the matrix A can be computed in O(m2 (n − m)) time, using only O(m2 ) memory (instead of respectively O(m(n − m)2 ) time and O(m(n − m)) memory when using CRR .). Of course, by doing so we lessen the smoothness constraint on f , since we do not take into account the part of the cost enforcing the smoothness on the rest R of the unlabeled set. However, this may have a beneficial effect when the dataset is large. Indeed, the costs CRS and CRR can be seen as regularizers encouraging the smoothness of f~. In particular, when R is very large, the regularization induced by CRR (containing (n − m)2 terms) can constrain f~ too much, thus penalizing the classification performance. In this case, discarding CRR , in addition to speeding up the computation significantly, also yields better rec RR that does not sults. We denote the variant of SS c take CRR into account SS. Training with only a subset S of size m n, however, usually won’t perform as well as training with the full unlabeled set (even when including CRR and CRS ). In order to get closer to this “optimal” performance, one may use the following ensemble method: • Choose k disjoint subsets (Sj0 )1≤j≤k of size m−|L| in U • For each j ≤ k, get fk (xi ) for i ∈ U by running the above algorithm with the subset Sj = L ∪ Sj0 and the rest Rj = U \Sj (with or without taking into account CRR ) Pk • ∀i ∈ U , take f (xi ) = k1 j=1 fk (xi ). As seen in the experiments, this procedure can help reducing the classification error, on the unlabeled training examples as well as on new test data (using the induction formula). Note that even though the computational time requirements are multiplied by a factor k, they may be taken back to their original value if one can perform parallel computation, in order to train simultaneously on the different subsets. We denote by SS k,RR and SS k the above algorithm, with and without the CRR cost. In table 1, we summarize the time and memory requirements of the various algorithms presented in this paper. The approximation methods described in this section improve the computation time and memory c RR consumption by a factor approximately n/m for SS c and with parallelization, the same and (n/m)2 for SS, improvements can be maintained while averaging the results of k experiments on k different subsets. 5.3. Experiments Here, we apply the SS k,RR and SS k algorithms described above to the handwritten character recognition problem of section 4.2. We take k = 10, and for each fraction pl ofSlabeled examples, we take 10 subsets Sj0 so that U = 1≤j≤10 Sj0 . For comparison purpose, we denote by SSk the algorithm that consists in running Table 1. Comparative computational requirements of the c RR original algorithm SS (or SS 0 ), the approximation SS c discarding CRR , and the enusing CRR , its variant SS semble variant over k subsets, with or without CRR in the cost, denoted respectively by SS k,RR and SS k . The brackets around the factor k mean it can be taken out if the computation is parallelized. 0.16 0.14 SS k SS k,RR SS SSk 0.12 0.1 0.08 Time SS or SS 0 c RR SS c SS SS k,RR SSk Memory O(n3 ) O(m(n − m)2 ) O(m2 (n − m)) O((m(n − m)2 )[k]) O((m2 (n − m))[k]) 0.06 O(n2 ) PSfrag replacements O(m(n − m)) 0.04 O(m2 ) 0.1 0.2 0.3 0.4 0.5 0.6 0.7 O(m(n − m)) Figure 6. Test set classification error, for 0.1 ≤ pl ≤ 0.7. O(m2 ) 0.4 trained on the whole set U when pl is low. This is coherent with our previous observations, which showed that encouraging the smoothness of the solution for such pl could improve the robustness of the classifier. SS k SS k,RR SS SSk 0.35 0.3 Note that here, the dataset is still rather small, and including CRR in the cost systematically helps. However, other experiments performed on the same handwritten character database, but using a larger dataset (10000 training and test examples) have given better c than with SS c RR (both still doing betresults with SS ter than simply training over the subset S, discarding completely the rest R). 0.25 0.2 0.15 PSfrag replacements 0.1 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 6. Conclusion Figure 5. Test set classification error, for 0.01 ≤ pl ≤ 0.1. Sj0 , SS on each L ∪ then averaging the outputs of the resulting regressors when computing the output for a new point x. We compare the performance of SS k,RR and SS k with (i) the algorithm SS using the whole unlabeled set U , and (ii) the algorithm SSk . This last algorithm is shown to demonstrate the gain induced by incorporating CRS (and possibly CRR ) in the cost optimized. Figures 5 (for low pl ) and 6 (for high pl ) show the average classification error on the test set (the average is done over 10 fixed (train,test) pairs (Di , Ti )1≤i≤10 of respectively 2038 and 1000 characters, taken randomly from the original dataset). We take K = G1 , and λ = +∞. Note that plotting the error on the unlabeled part of the training set would have given similar results. Also, the average errors c RR and SS c (the approximation algorithms withof SS out averaging), not shown on the figures, are slightly higher than the ones of respectively SS k,RR and SS k , but still (far) below the one of SSk . Interestingly, SS k,RR and SS k can outperform SS The main contribution of this paper is an extension of previously proposed non-parametric (graph-based) semi-supervised learning algorithms, that allows one to efficiently perform function induction (i.e. cheaply compute a prediction for a new example, in time O(n) instead of O(n3 )). The extension is justified by the minimization of the same smoothness criterion that was used to obtain the original algorithms in the first place. We showed that the function induction formula is robust and yields predictions that are close to the transductive (expensive) predictions (in the sense that the difference is of the same order as the average change in transductive prediction when a small fraction of the training examples are substituted by others from the same distribution). The paper compares empirically on real data a variety of semi-supervised learning algorithms that fit under this framework, helping to understand the effect of the different components of the training criterion. Finally, the induction formula is used to define several approximation variants (either for transduction or for function induction) that yield important reductions in computational and memory complexity at a small cost in classification performance. References Belkin, M., & Niyogi, P. (2003). Using manifold structure for partially labeled classification. Advances in Neural Information Processing Systems 15. Cambridge, MA: MIT Press. Chapelle, O., Weston, J., & Scholkopf, B. (2003). Cluster kernels for semi-supervised learning. Advances in Neural Information Processing Systems 15. Cambridge, MA: MIT Press. Cozman, F., Cohen, I., & Cirelo, M. (2003). Semisupervised learning of mixture models. ICML’2003. Kemp, C., Griffiths, T., Stromsten, S., & Tenembaum, J. (2004). Semi-supervised learning with trees. Advances in Neural Information Processing Systems 16. Cambridge, MA: MIT Press. McCallum, A., & Nigam, K. (1998). Employing EM and pool-based active learning for text classification. ICML’1998. Nadaraya, E. (1964). On estimating regression. Theory of Probability and its Applications, 9, 141–142. Ng, A. Y., Jordan, M. I., & Weiss, Y. (2002). On spectral clustering: analysis and an algorithm. Advances in Neural Information Processing Systems 14. Cambridge, MA: MIT Press. Schuurmans, D., & Southey, F. (2002). Metric-based methods for adaptive model selection and regularization. Machine Learning, 48, 51–84. Seeger, M. (2001). Learning with labeled and unlabeled data (Technical Report). Edinburgh University. Szummer, M., & Jaakkola, T. (2002). Partially labeled classification with markov random walks. Advances in Neural Information Processing Systems 14. Cambridge, MA: MIT Press. Watson, G. (1964). Smooth regression analysis. Sankhya The Indian Journal of Statistics, 26, 359–372. Williams, C. K. I., & Seeger, M. (2001). Using the Nyström method to speed up kernel machines. Advances in Neural Information Processing Systems 13 (pp. 682–688). Cambridge, MA: MIT Press. Zhou, D., Bousquet, O., Navin Lal, T., Weston, J., & Schölkopf, B. (2004). Learning with local and global consistency. Advances in Neural Information Processing Systems 16. Cambridge, MA: MIT Press. Zhu, X., Ghahramani, Z., & Lafferty, J. (2003a). Semisupervised learning using gaussian fields and harmonic functions. ICML’2003. Zhu, X., Lafferty, J., & Ghahramani, Z. (2003b). Semisupervised learning: From gaussian fields to gaussian processes (Technical Report CMU-CS-03-175). CMU.