Probability estimate for K-nearest neighbor

Systems and methods are disclosed that facilitate producing probabilistic outputs also referred to as posterior probabilities. The probabilistic outputs include an estimate of classification strength. The present invention intercepts non-probabilistic classifier output and applies a set of kernel models based on a softmax function to derive the desired probabilistic outputs. Such probabilistic outputs can be employed with handwriting recognition where the probability of a handwriting sample classification is combined with language models to make better classification decisions.

TECHNICAL FIELD

The present invention relates generally to the classification of patterns: more particularly, assigning class probabilities to novel input examples.

BACKGROUND OF THE INVENTION

Computer systems are ever increasingly employed to classify (e.g., recognize) objects. Classifiers or classification systems are typically employed to perform a variety of applications including identifying and/or classifying objects such as handwriting samples, medical images, faces, fingerprints, signals, automatic control phenomena, natural phenomena, nucleotide sequences and the like.

Classification systems often provide non-probabilistic outputs (e.g., object A belongs to class C). Such outputs are sufficient for some applications, but not others. Probabilistic outputs, also referred to as posterior probabilities, are required in many situations such as when combining classifiers with other knowledge sources, such as language models. The probabilistic output provides a probability for a class based on a given object or data point. Typically, this posterior probability is denoted by P(class|input).

One widely utilized, high-performance non-probabilistic classifier is the K nearest neighbor classifier (KNN). The KNN classifier is especially applicable for systems that operate with a relatively large numbers of classes (e.g., Asian handwriting recognition). As with other classifiers, the KNN classifier generates outputs that do not include probabilities. It would be advantageous to convert those outputs into usable probabilities. However, there fails to exist a suitable mechanism for converting the KNN classifier outputs into useful probabilities. Histogramming can sometimes be employed to generate probabilities from classifier outputs. However, there is often insufficient data to generate such probabilities with histogramming.

Another type of non-probabilistic classifier is a support vector machine (SVM). SVMs are a trainable classifier and are generally considered more accurate at classification than other classification methods in certain applications (e.g., text classification). They can also be more accurate than neural networks in certain applications such as reading handwritten characters for example. SVMs generate outputs that are uncalibrated values and do not include probabilities. Conventional approaches do exist to convert non-probabilistic outputs of SVM classifiers into probabilistic outputs. For example, a logistic function has been employed with SVM classifier outputs to convert the outputs into usable probabilities. However, the training speed of SVMs is often prohibitive for a large number of classes, so the KNN classifier is often preferred. However, conventional approaches fail to provide an adequate mechanism that convert non-probabilistic outputs of KNN classifiers into probabilistic outputs.

Probabilistic outputs can be produced by neural networks. A neural network is a multilayered, hierarchical arrangement of identical processing elements, also referred to as neurons. Each neuron can have one or more inputs and one output. The inputs are typically weighted by a coefficient. The output of a neuron is typically a function of the sum of its weighted inputs and a bias value (e.g., an activation function). The coefficients and the activation function generally determine the response or excitability of the neuron to input signals. In a hierarchical arrangement of neurons in a neural network, the output of a neuron in one layer can be an input to one or more neurons in a next layer. An exemplary neural network can include any suitable number of layers such as, an input layer, an intermediary layer and an output layer.

The utilization of neural networks typically involves two successive steps. First the neural network is initialized and trained on known inputs having known output values referred to as classifications. The network can be initialized by setting the weights and biases of neurons to random values, typically obtained via a Gaussian distribution. The neural network is then trained using a succession of inputs having known outputs referred to as classes. As the training inputs are fed to the neural network, the values of the coefficients (weights) and biases are adjusted utilizing a back-propagation technique such that the output of the neural network of each individual training pattern approaches or matches the known output to mitigate errors. Once trained, the neural network becomes a classifier to classify unknown inputs. By selecting a suitable function to specify cost of an error during training, outputs of a neural network classifier can be made to approximate posterior probabilities.

SUMMARY OF THE INVENTION

Systems and methods are disclosed that facilitate producing probabilistic outputs also referred to as posterior probabilities. The probabilistic outputs include an estimate of classification strength. The present invention intercepts non-probabilistic classifier outputs and applies a set of kernel models, based on a softmax function, to derive desired probabilistic outputs. For example, a received data point is analyzed with respect to K-nearest neighbors, and a model is evaluated on the analyzed data. The model is trained via processing example inputs and outputs so as to train the model to provide probabilistic outputs, as compared to conventional schemes which simply provide non-probabilistic outputs. Such probabilistic outputs can be employed with handwriting recognition where the probability of a handwriting sample classification being above or below a given threshold might determine whether the sample is identified as the letter “j”, the letter “i”, or a stray pen mark altogether, for example. Additionally, by integrating with other sources of information, such as language models, the output of probabilities decreases likelihood of errors in handwriting recognition systems.

The present invention results in a probabilistic classification system that is well-informed and well-calibrated. Additionally, the invention maps non-probabilistic outputs to probabilistic outputs by employing a trained parametric model. The parameters of the model are trained via a suitable training set of data to provide probabilistic outputs in accordance with an acceptable test error amount.

To the accomplishment of the foregoing and related ends, certain illustrative aspects of the invention are described herein in connection with the following description and the annexed drawings. These aspects are indicative of various ways in which the invention may be practiced, all of which are intended to be covered by the present invention. Other advantages and novel features of the invention may become apparent from the following detailed description of the invention when considered in conjunction with the drawings.

DETAILED DESCRIPTION OF THE INVENTION

FIG. 1is a block diagram that illustrates a system100in accordance with an aspect of the present invention. The system100facilitates producing probabilistic outputs also referred to as posterior probabilities—the probabilistic outputs include an estimate of classification strength. The present invention intercepts non-probabilistic classifier output and applies a learned parametric model to derive desired probabilistic outputs. For example, received data point(s) are analyzed with respect to K-nearest neighbors, and a model is built with the analyzed data. The model is trained via processing various inputs and outputs so as to train the model to provide probabilistic outputs from within acceptable error thresholds as compared to conventional schemes which provide non-probabilistic outputs. Probabilistic outputs are generated that can be employed in an application such as recognition of handwriting samples, medical images, faces, fingerprints, signals, automatic control phenomena, natural phenomena, nucleotide sequences and the like, for example.

The system100includes a trained classifier102, a mapping component104and an application106and is described at a relatively high level to further illustrate the present invention. The system100can be implemented on a number of suitable devices such as, but not limited to, a personal computer, a personal digital assistant, a cellular telephone, a biometric device, and the like.

The trained classifier102receives a number of inputs and generates classifier outputs. The inputs can be feature vectors of objects to be classified. The classifier102is trained via a suitable training algorithm. A number of types of classifiers can be utilized, however a K nearest neighbor (KNN) type classifier is typically employed. For the KNN type classifier, a class of an input point is determined by measuring or determining distances of points in a database and obtaining the K nearest points (e.g., neighbors). Then, the class of those K nearest points is employed to determine the class of the input point (e.g., by a majority vote). Thus, the KNN classifier can provide as an output a distance of the input to K nearest points, the classes of the K nearest points, and/or the identities of the K nearest points.

The mapping component104converts the outputs from the trained classifier102into posterior probabilities, also referred to as probabilistic outputs. Generally, the mapping component104employs a probability model to convert or map the outputs from the trained classifier102into the posterior probabilities. The respective posterior probabilities are thus a function of a corresponding respective output and substantially all of the other outputs of the trained classifier102.

A parametric model is employed by the mapping component104to perform the mapping. The parametric model has a varying number of parameters that are learned or trained. Once the parameters are trained (e.g., via a second training set disjoint from a first training set used to train classifier102), the parametric model permits the mapping component104to compute probabilities from the classifier outputs. It is appreciated that the parametric model utilizing learned parameters is generally more accurate and efficient than an approach such as majority rule, wherein a posterior probability can be estimated by employing relative frequencies of occurrence(s) of a given class.

The application component106is operative to receive the posterior outputs from the mapping component104. The application component106then employs the posterior outputs to perform a function such as, for example, handwriting recognition, medical image diagnoses (e.g., determining whether an image identifies a tumor), speech recognition, image compression and the like.

Turning now toFIG. 2, a block diagram of a system200that facilitates generation of posterior probabilities is depicted. The system200is similar to that ofFIG. 1, but is described at a more detailed level. The system includes a distance computation component202, a database of stored examples204and a trained probability transducer206. The system200is computationally efficient and adjustable in that speed and accuracy can be traded off. Furthermore, the system200can also be referred to as a probabilistic classifier in that the system200produces probabilistic outputs that include class information. Additionally, the system200can be further referred to as a pattern recognition system.

The distance computation component202is a piecewise constant classifier and is operative to classify inputs without providing probabilities. The distance computation component202employs a K nearest neighbor (KNN) approach. The distance computation component202receives a number of inputs and generates K outputs. The K outputs each comprise a class, a distance, and/or an index of one of the K closest examples stored in database204. The K outputs are sorted or ranked according to increasing distance to the inputs. Additionally, the K outputs are also referred to as a classifier output vector. The inputs are feature vectors of objects to be classified. The classifier and/or the system200is trained via a suitable training mechanism, typically via a P-admissible loss function, such that the outputs meet error requirements for a desired task.

The trained probability transducer206receives the K outputs from the distance computation component202and maps or converts the K outputs into posterior probabilities also referred to probabilistic outputs. The posterior probabilities can then be employed for a suitable application (e.g., such as handwriting analysis). The trained probability transducer206comprises a softmax function208and a parametric model210.

The distance computation component202is generally implemented as a KNN classifier. As discussed with respect toFIG. 1, a KNN type classifier is particularly suitable for implementations involving large numbers of classes. For the KNN type classifier, a class of an input point is determined by measuring or determining distances of points in database204and obtaining the nearest points (e.g., neighbors). Then, the classes of those K nearest points are employed to determine the class of the input point or of a given point. Additionally, the distance computation202component can utilize kernels to transform the distances between test points and stored examples in database204into output values suitable for input to the parametric model210. For example, one suitable kernel takes the exponential of the negative of a scaled Euclidean distance of a test point to a stored example and produces a Gaussian similarity measure between the test point and the stored example. Another such kernel can always produce a value of 1, as long as the stored example is in the K nearest stored examples to the test point.

The parametric model210can be implemented in a number of different embodiments, three of which are further described infra. The parametric models in each of the three embodiments comprise trained or learned parameters. The probability transducer206is trained via a suitable training method (e.g., minimizing a P-admissible loss function). Generally, a number of test points are input and the outputs are compared with expected results. Component parameters such as weights, coefficients and functions are adapted so as to produce outputs within a tolerable amount of error.

The system200is trained and developed such that it is well-informed and well-calibrated. Generally, a well-calibrated classifier is one for which, as the amount of training data increases (e.g., number of training points), the predicted probabilities converge to the measured frequencies. A well-informed classifier is one such that if an algorithm is employed to convert the classifiers outputs to probabilities, then the test error should not increase if the predicted posteriors are employed instead of the original (e.g., expected) outputs. Calibration and informativeness are typically somewhat dependent on each other. Thus, if the modeled or generated posterior probabilities are equal to the true or actuation probabilities, the resulting probabilities are well-informed and well-calibrated.

Another factor to be considered for the training of probability transducer206is P-admissibility, which is correlated with informativeness and calibration. It is desirable that the error metric to train probability transducer206is P-admissible, which generally results in a classifier that is well informed and well calibrated. A P-admissible loss function L(y,y′) is a function which, for any given x, is minimized at y′=E[y|x], where E[y|x] denotes the expectation of y for a fixed, given value of x. Additionally, for the case of a single output variable, if probability transducer206does not have sufficient capacity to learn the true posterior, it still comes relatively close to the solution in the sense that minimizing the expectation of a P-admissible loss function over the joint distribution of x and y is equivalent to first replacing y by E[y|x] and then minimizing the expectation of the loss function over the marginal distribution p(x).

The probability transducer206is trained utilizing a set of training points separate from those stored in the database of stored examples204. This is performed to circumvent an inherent bias that can be present in a trained KNN classifier (for example, if a trained KNN classifier is used to classify the data upon which it was trained, the ‘closest’ point to a given point x will be x itself, with distance zero, which is unlikely to occur on unseen test data). These separate training points are labeled as to correct class. The posterior probabilities generated by the trained probability transducer206, also referred to as posteriors, are modeled utilizing the softmax function208, also referred to as a softmax map, as follows:P⁡(cj|x)=ⅇz⁡(x,cj,α)∑i⁢ⅇz⁡(x,ci,α)(2)

The softmax map is a convenient tool to map the range of {z:−∞ . . . ∞} to [0,1]. The variable cjin the numerator on the right hand side of (2) represents a hypothesized class of an input point, x represents a feature vector generated from the input point, ciin the denominator of the right hand side of (2) represents classes of neighboring points, α represents parametric weights; and z( ) is the output of a trained parametric model210relating distance and class information. Note that the structure of the model resides in the choice of functional dependence of z on the x, ci, and α. A regularized log likelihood of the class labels is employed for the objective function, which is sought to be maximized (note that, dropping α-independent terms, this is equivalent to maximizing the regularized negative cross entropy):F=∑i=1m⁢∑j=1C⁢Pt⁡(cj|xi)⁢log⁢⁢P⁡(cj|xi)-g⁡(α)(3)

where g(α) is a regularization function and Pt(cj|xi) is the true posterior probability. Assuming data is utilized without label noise, permits that Pt(cj|xi)=δcj{overscore (c)}iwhere {overscore (c)}idenotes the true class of point xi, and where δcj{overscore (c)}iis defined to take the value 1 if ci=cjand zero otherwise, and the objective function becomes:F=∑i=1m⁢log⁢⁢P⁡(c_i|xi)-g⁡(α)≡∑i=1m⁢Fi-g⁡(α)(4)

It is additionally appreciated that the data processed by the distance computation component202can be first normalized to further mitigate test errors. The data is normalized such that each point lies on a unit sphere (“unit norming”). This alleviates the problem of a bias that can occur with an ordinary Euclidean norm for handwriting applications, due to the fact that some digits (e.g., 2 and 8) have on average much more ink than others (e.g., digit 1). An example of unit norming is depicted inFIG. 3. With a Euclidean normalization, pattern A is equidistant to B and C. With unit normalization, pattern A is closer to C. Euclidean normalization301and unit normalization302distances are illustrated below the patterns. Experiments with and without unit norming demonstrate an advantage for unit norming.

We now turn to three different approaches for implementing the probability transducer206, which exploit different models as the parametric model210. These approaches of probability transducer206are depicted inFIGS. 4,6, and8. These approaches can be trained via stochastic gradient descent of the objective function in equation (4). The training of the embodiment ofFIG. 4is shown inFIG. 5. The training of the embodiment ofFIG. 6is shown inFIG. 7. The training of the embodiment ofFIG. 8is shown inFIG. 9.

For all three approaches, the probability transducer206accepts K outputs from distance computation202along K rows of theFIGS. 4,6, and8. Thus the Nthrow inFIGS. 4,6, and8corresponds to the Nthnearest neighbor, in rank order, to the input point. Each column inFIGS. 4,6, and8corresponds to a particular hypothesized class for the input point: specifically, each of the C columns (classes) ofFIGS. 4,6, and8computes the output of the parametric model for a particular class. Thus, the three approaches comprise a plurality of rank-class computations, each of which lie on an intersection of a row and a column. A rank-class computation contains a model of how a single ranked output of the distance computation202influences the probability of a single class. The three approaches utilize varied rank-class computations.

Turning now toFIG. 4, a first approach for implementing the trained probability transducer206is illustrated. InFIG. 4, each output from the distance computation component202is depicted as comprising a class label400of the corresponding element in the database204, and a distance410of the test point to the corresponding element in database204. Recall that the distance computation component202can use a kernel to transform the true distance into a form suitable for input to the parametric model210. InFIG. 4, each distance410is multiplied by a weight (a learned parameter) corresponding to its row. This multiplication is carried out by multiplier450.

InFIG. 4, each rank-class computation430first compares the class label400to the class of the column425by component440. Component440produces a+1 if they are the same class, and −1 otherwise. The result of component440is multiplied by the output of multiplier450. This multiplication is performed by multiplier460. The output of multiplier460is added to a partial sum420by adder470. When the rows have contributed to the partial sum420, the result is an output480(zi) of the parametric model210. Outputs for every column are then supplied to the softmax component490to produce a posterior probability for every class495, where Σidenotes sum over index i.

There are alternatives for the initialization of partial sum420. One alternative is to initialize it to zero. The preferred alternative is to initialize each partial sum420to a separate learned parameter, one per column (class).

FIG. 5illustrates an update rule for the trained parameters depicted inFIG. 4. ForFIG. 5, the K outputs are computed by sequentially applying the distance computation202to a second training set, separate from the training set used to create the database of stored examples204.

Posterior probability595is computed by applying the probability transducer inFIG. 4to the same example in the second training set that is providing the K distance outputs. The target probability585is the known probability that the current example in the second training set belongs to the class corresponding to the current column. An error signal is produced by subtracting the target probability585from the computed posterior probability595. This subtraction is performed by subtractor590. The error signal is scaled by a step size575. This scaling is performed by multiplier580. The scaled error signal is then supplied to the rank-class update computations530in the corresponding column. The scaled error is also applied at520to adjust the learned parameter that initializes the partial sum420, if such a learned parameter is used inFIG. 4. For the update of the partial sum initialization parameter, the scaled error rate can be multiplied by an additional constant, to allow for the fact that the number of contributions to an update of the partial sum initialization parameters is different than the number of contributions to an update of the weight parameters, at a given iteration of the training process

Each rank-class update computation530compares the class500of the stored example in database204corresponding to its row to the class525of its column. This comparison is performed by component540. The result of this comparison is +1 if the classes are the same, and −1 if they are different. The result of the comparison is multiplied by the scaled error at multiplier560. Multiplier550then multiplies the result of multiplier560by the distance510of the example in database204to the current example in the second training set. Again, this distance may be modified by a kernel function. Finally, the output of the multipliers550are summed by adders555to produce an update for the weight parameter corresponding to the appropriate row.

It can be appreciated by those skilled in the art thatFIG. 5implements a stochastic gradient descent algorithm. Other suitable optimization algorithms can be also be employed in accordance with the subject invention.FIG. 5can be modified to compute a complete gradient by removing multiplier580and accumulating the updates for the parameters over the second training set. Alternatively, P-admissible error metrics other than shown in equation (4) can be used.

Turning now toFIG. 6, a second approach for implementing the trained probability transducer206is depicted.FIG. 6is analogous toFIG. 4, except that the form of the rank-class computation630is altered, and multiplier450is not utilized. Thus, some description is omitted for brevity. Class label600is analogous to class label400. Distance610is analogous to distance410. Column class label625is analogous to column class label425. Initialization of the partial sum620is analogous to initialization of the partial sum420. Parametric model output680is analogous to parametric model output480. Softmax component690is analogous to softmax component490. Posterior probability output695is analogous to posterior probability output495.

Rank-class computation630uses class label600and column class label625to look up a value in a lookup table640. The values in this lookup table depend on the row of the rank-class computation630. If the number of possible classes is C, then the number of entries in each lookup table is C2. The index set of the lookup table is the Cartesian product between the possible class labels600and column class labels625. The values in lookup table640are trained parameters, and are updated by the process described inFIG. 7.

The value selected by lookup table640is multiplied by the distance610of the corresponding row. This multiplication is performed by multiplier650. Adder660then takes the output of multiplier650and adds it to partial sum620for further computation.

FIG. 7depicts an update rule for the trained parameters depicted inFIG. 6.FIG. 7is similar toFIG. 5, except that the rank-class update computation730is altered, and there is no update of a per-row weight. As such, redundant descriptions are omitted for sake of brevity. Class label700is analogous to class label500. Distance710is analogous to distance510. Column class label725is analogous to column class label525. Update of per-column parameter720is analogous to update of per-column parameter520. Computation of the error signal by entities775,780,785,790, and795are analogous to computation of the error signal by entities575,580,585,590, and595.

Rank-class update computation730multiplies the distance700of its row (ranked output point) by the scaled error of its column (class). This multiplication is performed by multiplier750. The result of the multiplication is provided to the update of the lookup table,740. The lookup table update740will modify one entry of each lookup table640for rank-class update computation(s)730. The index of the modified entry is computed by combining the class label700of the row with the column class label725, in the same manner as the index is computed by lookup table640. The corresponding entry is the adjusted by the output of multiplier750.

FIG. 7computes a stochastic gradient descent of the error metric in equation (4). Analogous toFIG. 5, a different optimization method or a different P-admissible error metric can be used.

Turning now toFIG. 8, a third approach for implementing the trained probability transducer206is depicted. As with the other approaches (FIGS. 4 and 6), each row corresponds to an output from the distance computation component202, sorted by rank, and each column corresponds to a particular class. According to this approach, the trained parametric model210comprises a plurality of rank-class computations830.

For this approach, the distance computation component202is operative to produce, for each rank, an index800which identifies the Nth closest point in the database of stored examples204to the input point, a class label805, which is the class of the Nth closest point in the database of stored examples204; and a distance810, which is the distance of the Nth closest point in the database of stored examples204to the input point. Again, the distance810may be computed via a kernel function. The initialization of the partial sum820is analogous to the initialization of the partial sum420inFIG. 4. The computation of the posterior probability895by softmax component890from the output880of the parametric model is analogous to the computation of the posterior probability495by softmax component490from the output480.

Each rank-class computation830compares the class805of the Nth closest point to the class label825for its column. This comparison is performed by class determination component845. The class determination component845produces a 1 if they are the same class, and a 0 otherwise. The value produced by the determination component845is multiplied by the distance810. This multiplication is performed by multiplier855. The result of this multiplication is multiplied by the output of the lookup table840. The index used by the lookup table is the index800of the Nth closest point. There is a lookup table entry for each example in the database of stored examples204. The multiplication of the lookup table result is performed by multiplier850. The result of multiplier850is then added to the partial sum820by adder860.

It can be appreciated by someone of ordinary skill in the art that if one of the multiplicands used by multiplier855is 0, the output is zero and hence the value added by adder860will also be zero. Therefore, only one of the rank-class computations830per row needs to be performed: the one occuring in the column whose class is equal to class800for the row. All other rank-class computations can be skipped. This approach uses only K rank-class computations830, rather than KC rank-class computations in the other approaches, where K are the number of outputs of the distance computation component202and C is the number of classes.

It can also be appreciated that the rows ofFIG. 9are not distinguished: the same computation occurs on every row. Therefore, for such approach, the output of the distance computation component202need not be ranked.

FIG. 9shows an update rule employed to train the implementation of the probability transducer206depicted inFIG. 8. It is analogous to the training update shown inFIG. 7, except that each output from distance computation202is here an index900of the Nth closest example to a point in the second training set, a class905of the same example, and a distance910of the same example. Analogous to the computation of posterior probability795inFIG. 7, the posterior probability995is computed by the process inFIG. 8from the same point in the second training set that is also supplied to the distance computation component202. The computation of the scaled error signal by components975,980,985, and990is analogous to the computation of the scaled error signal inFIG. 7by components775,780,785, and790. The update of the partial sum920is analogous to the update of the partial sum720. The rank-class update computation930first compares the class905to the class label925for the column. This comparison is performed by determination component945. The determination component945produces a 1 if they are the same, and a 0 otherwise. The result of the determination component945is multiplied by distance910. This multiplication is performed by multiplier955. The result from multiplier955is multiplied by the scaled error. This multiplication is performed by multiplier950. The result of multiplier950is used by component940to update an entry in the lookup table. The index of the updated entry is the index900.

As inFIG. 8, the rank-class update930only needs to be performed if the class905is the same as the class label925for the column. The other rank-class updates for that row can be skipped, because the result of multiplier950will always be zero. Therefore, only one rank-class update930needs to be performed per row.

The three approaches described above and illustrated inFIGS. 4–9can be further illustrated with the following exemplary mathematical description(s). It is to be appreciated that the invention is not limited to such mathematical description(s), and discussion with respect thereto is merely being provided to facilitate understanding of the invention in accordance with specific implementations. The first approach, described byFIGS. 4 and 5is further illustrated via the first model and the second model. The second approach, described byFIGS. 6 and 7is further illustrated via the fourth model. Finally, the third approach, described byFIGS. 8 and 9is further illustrated via the third model. The foregoing discussion with respect toFIGS. 4–9as well as the following discussion is for illustrative purposes and is not intended to limit the present invention. It is appreciated that variations of the below models can be employed in accordance with the present invention.

The first model that can be utilized with the trained probability transducer206as the parametric model208is a “sparse rank ordering model.” This model enforces sparseness by construction as follows. For a kernel K(x,xi), this model depends on the rank ordering of the nearest neighbors, and on the class labels of those nearest neighbors:z⁡(x,c)=∑i∈IN⁡(x)⁢(wri⁢δc_i,c+vri⁡(1-δc_i,c))⁢K⁡(x,xi)(5)

where the parameters wriand vriare weights that are learned by training, and where IN(x) denotes the index set of the N nearest neighbors to the point x, and where the subscript ridenotes the rank of xiin the list of the N nearest neighbors. This model has only N free parameters (further discussed below), thus the additional computation beyond that required to find INis minimal. The regularization function g(α) is set to zero (Eq. 4) since the number of parameters is small. F is then bounded above by zero, and at zero corresponds to the probability one being assigned to the correct class for every training pattern. By assigning a target probability of one for the correct class and zero for other classes, the update rule for the ith pattern is:
Δwrj=εK(xi,xj)(δ{overscore (c)}j{overscore (c)}i−P({overscore (c)}j|xi))=−Δνrj(6)

Note that if Eq. 6 starts with wrj=νrj=0∀j, then νrj=−wrjalways, so the model has just N parameters to learn (corresponding to the weight parameters450inFIG. 4) and Eq. (6) becomes:z⁡(xi,c)=∑j∈IN⁡(x)⁢wrj⁢K⁡(xi,xj)⁢(2⁢δcj_,c-1)(7)

A second model that can be employed with the trained probability transducer206as the parametric model208is an “adding class dependence model.” The first model described supra fails to parameterize per-class dependence; z(x,c) gets positive or negative contributions according to whether the class of the training point under consideration is the same, or not as c. However, such per-class information could be useful, for example, to model easily confused classes. Thus, C parameters bcare added to the model (corresponding to the partial sum initialization parameters420inFIG. 4):z⁡(x,c)=∑i=1N⁢(wri⁢δc_i,c+vri⁡(1-δc_i,c))⁢K⁡(x,xi)+bc(8)

The update rules for the second model are as they are for the first model, but with the addition of Δbc=ε′(δcci−P(c|xi)), where the update to the parameters bcare given their own step size ε′, to allow for the fact that the number of contributions to an update of the bcparameters is different than the number of contributions to an update of the w parameters, at a given iteration of the training process. As with the first model, νrj=−wrj, giving:z⁡(x,c)=∑i=1N⁢wri⁢K⁡(x,xi)⁢(2⁢δci_,c-1)+bc(9)

as a suitable representative equation for the second model.

A third model that can be utilized with the trained probability transducer206as the parametric model208is a “per-point class model.” Here, the equation employed is:z⁡(x,c)=∑j∈IN⁡(x),cj_=c⁢wj⁢K⁡(x,xj)+bc(10)

For this model, one parameter is utilized per training point, which corresponds to an entry in lookup table830ofFIG. 8. The idea is to use the weights to model the value of each training point in predicting its own class. However, it is appreciated that rank information is not required with the third model. The indicator function is defined as, δi(xj) to be a 1 if xiεXN(Xj) (where XN(xj) denotes the set of N points closest to xj), 0 otherwise and the training update rules become ΔWi=εδi(xj)K(xj,xi)(2δ{overscore (c)}i{overscore (c)}j−P({overscore (c)}i|xj)) and Δbc=ε′(δc{overscore (c)}j−P(c|xj)). Note that the bcand wiare again given different learning rates. Since after one training epoch, the mean number of wiupdates per wiparameter is N, and the mean number of bcupdates per bcparameter is m, and assuming that ∂Fj/∂wiand ∂Fj/∂bcare of roughly the same size, requiring that the mean size of the updates also be roughly the same yields ε′=ε(N/m). This is necessary to ensure that choice of a suitable learning rate for the wiresults in a suitable learning rate also for the bc.

Although the number of parameters for the third model is large, in an evaluation phase, only O(N+C) operations are needed. The small number of parameters used to classify a given point permits not using a regularization term for the third model.

A fourth model that can be employed with the trained probability transducer206is a combined “Rank/Class/Class model” (RCC model). If the wrjis permitted to vary based on class as well as rank, then a class-dependent rank ordering can be learned. For example, suppose that N=3 and that a given test point has nearest neighbors of class 1, 1, 3 (rank ordered). If, for handwriting analysis, it is allowed that the probability that the test point is a 1 is different than if the nearest neighbors were 1, 1, 7, since 7's are more often confused with 1s than 3s are, then the proposed model is able to parameterize this information. Therefore, C2N parameters wrjc{overscore (c)}jare introduced, which correspond to the N different lookup tables640, each containing C2entries. The second subscript c in w indexes the hypothesized target class; the third subscript {overscore (c)}jis the class of the jth nearest neighbor. Since the number of parameters can become unwieldy for a large number of classes, a regularization scheme is required to enforce sparcity. Two illustrative examples of such a scheme are to add the L1norm of the weights to the loss function F, so that g=λΣj,c|wjc{overscore (c)}j|, and a batch version, where after training epoch, a fraction (e.g., 90%) of the weights with the smallest values are set to zero. A justification for the latter is that it is closer to estimating the gradient in batch mode and provides better accuracy on a validation set. Thus, for this model:z⁡(x,c)=∑j∈IN⁡(x)⁢wrj⁢c⁢⁢c_j⁢K⁡(x,xj)⁢(2⁢δc⁢⁢c_j-1)+bc(11)

The update rules for the fourth model are, for the ith pattern:

Δwrjc{overscore (c)}j=εδj(xi)K(xi,xj)(2δ{overscore (c)}i{overscore (c)}j−1)(1−P({overscore (c)}i|xi)) for c={overscore (c)}iand Δwrjc{overscore (c)}j=−εδj(xi)K(xi,xj)(2δc{overscore (c)}j−1)(1−P(c|xi)) for c≠{overscore (c)}i. The update rule for the priors bcis as before. The learning rate for the bcis chose to be 1/C times that for the wjccj, for the same reasons described for the previous three models.

It is appreciated that other implementations and/or suitable trained parametric models in addition to or instead of the four described above can be employed for the trained probability transducer206and still be in accordance with the present invention. Further, it also appreciated that some parametric models do not require ranking and thus, the distance computation component202can be configured so as to not provide ranking information in order to increase computational efficiency.

In view of the foregoing structural and functional features described above, methodologies in accordance with various aspects of the present invention will be better appreciated with reference toFIGS. 10–11. While, for purposes of simplicity of explanation, the methodologies ofFIGS. 10–11is depicted and described as executing serially, it is to be understood and appreciated that the present invention is not limited by the illustrated order, as some aspects could, in accordance with the present invention, occur in different orders and/or concurrently with other aspects from that depicted and described herein. Moreover, not all illustrated features may be required to implement a methodology in accordance with an aspect the present invention.

FIG. 10illustrates a flow diagram of a method1000that facilitates generation of posterior probabilities in accordance with an aspect of the present invention. The method1000employs a trained classifier and a trained probability transducer (e.g., a mapping component) to generate probabilistic outputs (e.g., posterior probabilities) which can then be employed for a pattern recognition application such as handwriting analysis.

The method begins at1002, where data point(s) are received. The data point(s) comprise information such as, but not limited to, image data, measurements, audio data, database information and the like. The data point(s) are then processed individually to obtain a vector of ranked outputs at1004, also referred to as classifier outputs. A given output respectively comprises a class label, an index identifying a particular element in the database used to train the classifier, a distance measure, and a ranking for K nearest neighbors. Generally, a KNN classifier is employed to generate the ranked outputs. The vector of ranked outputs does not include probabilistic information.

Subsequent to obtaining a vector of ranked outputs for respective data point(s), mapping or converting the outputs into probabilistic outputs (e.g., posterior probabilities) at1006via a suitable mapping mechanism (e.g., a trained parametric model). A suitable mechanism can be one of the models described with respect toFIG. 2. Then, the posterior probabilities are employed to perform an application such as handwriting analysis at1008.

It is appreciated that sufficient training should be performed prior to utilizing the method1000for a pattern recognition application.

FIG. 11is a flow diagram of a method1100of training a probability transducer in accordance with an aspect of the present invention. The probability transducer can be utilized in a system such as system200ofFIG. 2. Generally, the method involves training a non-probabilistic classifier and subsequently utilizing the trained non-probabilistic classifier to train the probability transducer.

The method1100begins at block1102, where a data set is split or segmented into a first training subset and a second training subset. The second training subset and the first training subset are disjoint. The data set comprises examples, and each example comprises an input data point and a class label. The split between the first and the second training subsets can be performed via a stochastic process. For example, 70% of the data set can be assigned at random to the first training subset, while the remaining 30% can be assigned to the second training set. At block1104, the non-probabilistic classifier is trained using the first training set via a suitable training algorithm for non-probabilistic classifiers. For example, the training of a KNN classifier can be accomplished by loading the training set into a database of stored examples. Alternatively, other known methods, such as “reduced nearest neighbor”, can be employed wherein a subset of the training set can be selected for storage.

Continuing with block1106, an example from the second training set is selected. Such selection can be accomplished by drawing an example at random, or by sequentially sweeping through a random permutation of the second training set. Alternatively, more sophisticated algorithms such a leave-one-out can be used in conjunction with block1106. Block1108then applies the example selected at block1106to the non-probabilistic classifier. The output of the non-probabilistic classifier is then processed by the probability transducer to yield an output at block1110. Depending on the implementation, block1110will execute the approaches described with respect toFIG. 4,FIG. 6,FIG. 8, and/or a similar method. Block1112then updates the parameters of the parametric model by comparing the output at block1110with the true class label of the example chosen at block1106. Block1112uses an update rule, such as described with respect toFIG. 5,FIG. 7,FIG. 9and/or suitable variations thereof, that is appropriate for the chosen implementation of the probability transducer. Alternatively, block1112can use a similar process to the update rule to compute the gradient of an error metric with respect to the parameters, and then periodically update the parameters based on the gradient or other information (e.g., such as the Hessian of the error metric).

Block1114then determines whether the training of the probability transducer is complete. The training may be complete when a pre-determined number of examples have been applied to the probability transducer206, or when the rate of decrease of the error metric has reduced below a pre-determined threshold.

According to an alternate aspect of method1100, the original data set at block1102is split into three subsets: a first training set, a second training set, and a validation set. After a pre-determined number of applications of examples to the probability transducer, all of the examples in the validation set may be applied to the system and the error metric can be used to measure the error on the validation set. If the error on the validation set has reached a minimum, the training may be stopped and the parameters of the parametric model that yielded the minimum error can be saved and used to evaluate new test points.

If the method1100determines that training is not finished at block1114, then control flows back to block1106, where another example is selected from the second training subset. Otherwise, training of the parametric model is complete and the probability transducer can be utilized (e.g., in a pattern recognition system) and/or a method that facilitates generating posterior probabilities (e.g., method1000ofFIG. 10).

FIG. 12illustrates one possible hardware configuration to support the systems and methods described herein. It is to be appreciated that although a standalone architecture is illustrated, that any suitable computing environment can be employed in accordance with the present invention. For example, computing architectures including, but not limited to, stand alone, multiprocessor, distributed, client/server, minicomputer, mainframe, supercomputer, digital and analog can be employed in accordance with the present invention.

With reference toFIG. 12, an exemplary environment1210for implementing various aspects of the invention includes a computer1212, including a processing unit1214, a system memory1216, and a system bus1218that couples various system components including the system, memory to the processing unit1214. The processing unit1214may be any of various commercially available processors. Dual microprocessors and other multi-processor architectures also can be used as the processing unit1214.

The system bus1218may be any of several types of bus structure including a memory bus or memory controller, a peripheral bus, and a local bus using any of a variety of commercially available bus architectures. The computer memory1216includes read only memory (ROM)1220and random access memory (RAM)1222. A basic input/output system (BIOS), containing the basic routines that help to transfer information between elements within the computer1212, such as during start-up, is stored in ROM1220.

The computer1212may further include a hard disk drive1224, a magnetic disk drive1226, e.g., to read from or write to a removable disk1228, and an optical disk drive1230, e.g., for reading a CD-ROM disk1232or to read from or write to other optical media. The hard disk drive1224, magnetic disk drive1226, and optical disk drive1230are connected to the system bus1218by a hard disk drive interface1234, a magnetic disk drive interface1236, and an optical drive interface1238, respectively. The computer1212typically includes at least some form of computer readable media. Computer readable media can be any available media that can be accessed by the computer1212. By way of example, and not limitation, computer readable media may comprise computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by the computer1212. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. The term “modulated data signal” means a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media includes wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, RF, infrared and other wireless media. Combinations of any of the above should also be included within the scope of computer readable media.

A number of program modules may be stored in the drives and RAM1222, including an operating system1240, one or more application programs1242, other program modules1244, and program non-interrupt data1246. The operating system1240in the computer1212can be any of a number of commercially available operating systems.

A user may enter commands and information into the computer1212through a keyboard1248and a pointing device, such as a mouse1250. Other input devices (not shown) may include a microphone, an IR remote control, a joystick, a game pad, a satellite dish, a scanner, or the like. These and other input devices are often connected to the processing unit1214through a serial port interface1252that is coupled to the system bus1218, but may be connected by other interfaces, such as a parallel port, a game port, a universal serial bus (“USB”), an IR interface, etc. A monitor1254, or other type of display device, is also connected to the system bus1218via an interface, such as a video adapter1256. In addition to the monitor, a computer typically includes other peripheral output devices (not shown), such as speakers, printers etc.

The computer1212may operate in a networked environment using logical and/or physical connections to one or more remote computers, such as a remote computer(s)1258. The remote computer(s)1258may be a workstation, a server computer, a router, a personal computer, microprocessor based entertainment appliance, a peer device or other common network node, and typically includes many or all of the elements described relative to the computer1212, although, for purposes of brevity, only a memory storage device1260is illustrated. The logical connections depicted include a local area network (LAN)1262and a wide area network (WAN)1264. Such networking environments are commonplace in offices, enterprise-wide computer networks, intranets and the Internet.

When used in a LAN networking environment, the computer1212is connected to the local network1262through a network interface or adapter1266. When used in a WAN networking environment, the computer1212typically includes a modem1268, or is connected to a communications server on the LAN, or has other means for establishing communications over the WAN1264, such as the Internet. The modem1268, which may be internal or external, is connected to the system bus1218via the serial port interface1252. In a networked environment, program modules depicted relative to the computer1212, or portions thereof, may be stored in the remote memory storage device1260. It will be appreciated that the network connections shown are exemplary and other means of establishing a communications link between the computers may be used.

FIG. 13is a schematic block diagram of a sample-computing environment1300with which the present invention can interact. The system1300includes one or more client(s)1310. The client(s)1310can be hardware and/or software (e.g., threads, processes, computing devices). The system1300also includes one or more server(s)1330. The server(s)1330can also be hardware and/or software (e.g., threads, processes, computing devices). The servers1330can house threads to perform transformations by employing the present invention, for example. One possible communication between a client1310and a server1330may be in the form of a data packet adapted to be transmitted between two or more computer processes. The system1300includes a communication framework1350that can be employed to facilitate communications between the client(s)1310and the server(s)1330. The client(s)1310are operably connected to one or more client data store(s)1360that can be employed to store information local to the client(s)1310. Similarly, the server(s)1330are operably connected to one or more server data store(s)1340that can be employed to store information local to the servers1330.

It is to be appreciated that, for purposes of the present invention, any or all of the functionality associated with modules, systems and/or components discussed herein can be achieved in any of a variety of ways (e.g. combination or individual implementations of active server pages (ASPs), common gateway interfaces (CGIs), application programming interfaces (API's), structured query language (SQL), component object model (COM), distributed COM (DCOM), system object model (SOM), distributed SOM (DSOM), ActiveX, common object request broker architecture (CORBA), database management systems (DBMSs), relational database management systems (RDBMSs), object-oriented database management system (ODBMSs), object-relational database management systems (ORDBMS), remote method invocation (RMI), C, C++, practical extraction and reporting language (PERL), applets, HTML, dynamic HTML, server side includes (SSIs), extensible markup language (XML), portable document format (PDF), wireless markup language (WML), standard generalized markup language (SGML), handheld device markup language (HDML), graphics interchange format (GIF), joint photographic experts group (JPEG), binary large object (BLOB), other script or executable components).