TL;DR
This paper introduces a novel method for learning tree edit distances, a powerful way to compare structured data like trees, by allowing individual node deletions and insertions. They adapt the Expectation-Maximization (EM) algorithm to learn these probabilities from data, and demonstrate its effectiveness by applying it to image recognition using a new tree-based image representation.
What Problem Does This Paper Address?
Comparing structured data, especially trees, is crucial in many machine learning tasks. Traditional tree edit distances rely on predefined costs for operations like deleting or inserting subtrees. However, these costs are often hand-tuned and may not capture the true underlying relationships in the data. Furthermore, existing methods often restrict deletions and insertions to entire subtrees, which can be computationally simpler but less general. This paper addresses the need for a more flexible and data-driven approach to tree comparison by learning probabilistic edit distances that allow for individual node operations, and then applying this to the challenging domain of image recognition.
Methods
The core of this paper is the development of a stochastic tree edit distance. Instead of fixed costs, they learn probabilities for each edit operation (deletion, insertion, substitution) from a dataset of tree pairs. This is achieved by adapting the Expectation-Maximization (EM) algorithm.
Here's a breakdown of their approach:
- Generalizing Tree Edit Distance: They extend the standard tree edit distance to allow for the deletion and insertion of single nodes, not just entire subtrees. This makes the metric more expressive.
- Probabilistic Framework: Each edit operation is treated as a random event with an associated probability. The goal is to learn these probabilities.
- EM Algorithm Adaptation:
- Expectation Step: This step estimates the expected number of times each edit operation occurs for transforming an input tree into an output tree, using forward ($\alpha$) and backward ($\beta$) functions. These functions are extensions of the dynamic programming algorithms used for standard tree edit distance.
- Maximization Step: This step updates the probabilities of the edit operations based on the expectations calculated in the previous step, ensuring they form a valid probability distribution.
- Tree Representation for Images: A novel tree-based representation for images is proposed. Images are recursively divided into four quadrants, and characteristic points (based on contrast) are extracted at each level. These points form the nodes of the tree, with labels corresponding to binary masks. This representation aims to capture spatial relationships lost in simpler string-based methods.
Datasets
- Training and Evaluation: The authors use the NIST Special Database 3 for handwritten digit classification. This database contains bitmap images of digits from 0 to 9, written by multiple writers.
- Dataset Split: The data is divided into a learning set (LS) of 6,000 digits and a test set (TS) of 4,000 digits.
- Synthetic Example: A simple synthetic example with a small alphabet is used to illustrate the learning process of the EM algorithm.
Key Insights and Ideas
- Learning Tree Metrics is Powerful: Automatically learning the parameters of a tree edit distance from data significantly outperforms using hand-tuned costs, especially for complex domains like image recognition.
- Node-Level Operations are Crucial: Allowing individual node deletions and insertions makes the tree edit distance more general and expressive, capturing finer-grained structural differences.
- EM is a Suitable Framework: The EM algorithm provides a robust way to learn the probabilistic parameters of the tree edit distance from paired data.
- Trees for Images: A Promising Direction: Representing images as trees, by recursively partitioning them and extracting characteristic points, offers a way to incorporate spatial information and relationships that are missed by simpler string-based representations. This tree representation is shown to be more effective than string representations for image classification.
Key Results
- Image Recognition Performance: The learned stochastic tree edit distance, applied to their novel tree representation of images, achieved significant improvements in handwritten digit classification.
- Compared to a standard string edit distance (SNL), their approach (TWL) showed a +32 percentage point accuracy gain.
- Compared to a non-learned tree edit distance (TNL), their approach (TWL) showed a +21 percentage point accuracy gain.
- Their tree representation itself, compared to string representations, yielded a +11 percentage point accuracy gain.
- Learning Efficiency: The EM algorithm converged to an optimal solution in just 4 iterations on a simple synthetic example.
Limitations and Future Work
- Learning Pair Generation: The authors acknowledge that the method for constructing the learning tree pairs (input-output tree pairs) can be significantly improved and remains an open problem.
- Tree Representation Refinement: The tree representation of images, while promising, needs further study to handle a wider range of image recognition tasks.
- Discriminative Models: The current approach uses a generative model. Adapting it to a discriminative model is suggested as a future direction.
- Handling Small Datasets: The authors plan to adapt their model to handle small datasets more effectively.
- Web Applications: They intend to apply their model to web applications, particularly for XML documents.
Summary updated