Pairwise Neural Network Classifiers with Probabilistic Outputs

David Price, Stefan Knerr, Léon Personnaz, Gérard DreyfusNeurIPS 1994

TL;DR

This paper introduces a "divide and conquer" approach to multi-class classification by training many small, pairwise neural networks instead of relying on one large global model. The authors provide a robust mathematical framework to fuse these local pairwise decisions into global posterior probabilities. The resulting system is over ten times faster to train and significantly easier to modularize than standard multi-layer perceptrons (MLPs).

What Problem Does This Paper Address?

Multi-class classification—such as identifying one of 27 different handwritten characters—is traditionally handled by a single, large neural network with many output units. However, these "monolithic" models suffer from long training times and opaque architectures. Furthermore, many real-world applications like handwriting or speech recognition don't just need a "best guess"; they require probabilistic outputs to feed into higher-level models (like Hidden Markov Models) that consider broader context.

While "pairwise" classification (training a distinct model for every possible pair of classes) was known to be computationally efficient, there wasn't a standard, robust way to combine those $K(K-1)/2$ local decisions into a single, valid probability distribution across all $K$ classes.

Methods

The authors propose a two-step process to transform pairwise outputs into global probabilities:

Architecture of the pairwise neural network classifier showing K(K-1)/2 two-class networks.
  1. Pairwise Training & Density Estimation: For every pair of classes $(\omega_i, \omega_j)$, they train a single-neuron classifier. Instead of taking the raw sigmoidal output, they look at the linear sum (the input to the sigmoid) and fit a Gaussian probability density to it. Using Bayes' rule, they calculate the local probability $P_{ij}$ (the probability the input is class $i$ given that it is either $i$ or $j$).
  2. Probabilistic Fusion: This is the core innovation. The authors derive a closed-form expression to combine all these local $P_{ij}$ values into a global posterior probability $Pr(\omega_i | x)$. Unlike previous methods that relied on a subset of pairs, this approach uses the entire set of pairwise information, making it more stable and less sensitive to the choice of pairs.

Datasets

The approach was tested on a challenging real-world task: Cursive Handwriting Recognition from French postal checks.

Example of cursive handwriting segmentation from French postal checks, highlighting the challenge of isolating individual characters and ligatures.
  • Source: ~3,300 literal amounts from live postal checks (~16,000 words).
  • Scale: Approximately 55,000 pre-segmented characters.
  • Classes: 27 classes, including standard letters and common "ligatures" (joined letters like "fr" or "tr") that are notoriously difficult to segment.
  • Quality: The data was used "as-is" without cleaning, meaning many samples were ambiguous or of very poor quality, mimicking real-world conditions.

Key Insights and Ideas

  • Efficiency through Simplicity: Training hundreds of single neurons is significantly faster than training one large MLP. Because each pairwise model only sees a fraction of the data (only the examples from its two specific classes), the total computational load drops by more than an order of magnitude.
  • The "Aha" Moment on Information: The authors assume that the linear output of a pairwise neuron is "as informative" as the entire high-dimensional input vector for the purpose of distinguishing those two classes. This dimensionality reduction makes the subsequent probability estimation much simpler.
  • Modular Architecture: This system is highly flexible. If you want to add a 28th class, you don't need to retrain the entire system. You only need to train 27 new pairwise neurons to compare the new class against the existing ones.

Key Results

  • Speed: Training was more than 10 times faster than standard MLPs.
  • Accuracy: On the test set (with equal priors), the Pairwise Classifier achieved a 48.9% first-position recognition rate, identical to a standard 100-hidden-unit MLP. While a "Softmax" trained MLP performed slightly better (54.9%), the pairwise model provided a superior balance of speed, modularity, and insight.
  • System Performance: When integrated into a full check-reading chain (including word-level context), the system achieved an 83.3% word recognition rate and could correctly recognize 80% of full checks with only a 1% error rate.

Limitations and Future Work

  • Scaling Complexity: While highly efficient for $K=27$, the number of networks grows quadratically ($K^2$). For problems with thousands of classes (like Chinese characters), managing hundreds of thousands of mini-networks might become a logistical challenge.
  • Raw Accuracy Gap: The Softmax MLP still outperformed the pairwise approach in raw accuracy. The authors suggest that future work could involve experimenting with different pattern representations to close this gap.
  • Gaussian Assumption: The first step of the probability estimation assumes Gaussian distributions for the linear outputs. The authors note that while this works well in practice, real-world data is rarely perfectly Gaussian, which could introduce slight estimation errors.

Summary updated

BibTeX
@inproceedings{price1994pairwise,
  author = {David Price and Stefan Knerr and Léon Personnaz and Gérard Dreyfus},
  title = {{Pairwise Neural Network Classifiers with Probabilistic Outputs}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {1994},
}
Figure