Flexible Matching for Noisy Structural Descriptions
Proceedings of the Twelfth International Joint Conference on Artificial Intelligence. Learning Be Knowledge Acquisition. Pages 658-663.
© 1991 International Joint Conferences on Artificial Intelligence
Abstract
Uncertaintyondataoftenmakesthetaskofperfectlymatching two descriptions quite ineffective. In this case, a flexible matching, measuring the similarity of two descriptions rather than their equality, is more useful. According to the convention of connecting similarity to the most common concept of distance, we present a definition of distance measure, based on a probabilistic interpretation of the matching predicate, which can cope with structural deformations. As the problem of matching two formulas of the FOPL is NP-complete, two methods are presented in order to cope with complexity: firstly, a branch-and-bound algorithm, and secondly, a heuristic method. These ideas are applied to the problem of recognizing office documents in digital form according to their page layout.
- [Bergadano et al., 1988] Francesco Bergadano, Stan Matwin Ryszard S. Michalski, and Jianping Zhang. Representing and Acquiring Imprecise and Context -dependent Concepts in Knowledge-based Systems. In Zbigniew.R. Ras, and Lorenza Saitta, (Eds.) Methodologies for Intelligent Systems, 3, pages 270-280, Amsterdam, The Netherlands, Elsevier Science Publishers B. V., 1988.
- [Chandrasekaran and Keuneke, 1987] BruceChandrasekaran, and Anne Keuneke. Classification problem solving:A tutorial from an AI perspective. In Pierre A.Devijver, and Josef Kittler (Eds.) Pattern Recognition Theory and Applications, Berlin, Germany, Springer-Verlag, 1987.
- [Clancey, 1985] William J. Clancey. Heuristic Classification. Artificial Intelligence. 27(4):289-350, 1985.
- [Dubois and Prade, 1988] Didier Dubois, and Henry Prade. An Introduction to Possibilistic and Fuzzy Logics. In Philippe Smets, E. H. Mamdani, Didier Dubois, and Henry Prade (Eds.) Non-Standard Logics for Automated Reasoning, pages 315-316, London, England, Academic Press, 1988.
- [Esposito et al., 1990] Floriana Esposito, Donato Malerba, Giovanni Semeraro, Enrico Annese, and Giovanna Scafuro. Empirical Learning Methods for Digitized Document Recognition: an Integrated Approach to Inductive Generalization. In Proceedings of the Sixth IEEE Conference on Artificial Intelligence Applications, pages 37-45, Santa Barbara, California, March 1990.
- [Esposito et al., 1991a] Floriana Esposito, Donato Malerba, and Giovanni Semeraro. Classification of incomplete structural descriptions using a probabilistic distance measure. To appear in Proceedings of the International Conference on Symbolic-Numeric Data Analysis and Learning, Paris, France, September 1991.
- Esposito et al., 1991b in press] Floriana Esposito, Donato 664 Learning and Knowledge Acquisition Malerba, and Giovanni Semeraro. Classification in Noisy Environments Using a Distance Measure Between Structural Symbolic Descriptions. To appear iniEEETrans. on Pattern Analysis and Machine Intelligence, 1991.
- [Garey and Johnson, 1979] Michael R. Garey, and DavidS. Johnson. Computers and Intractability, page 252, San Francisco, California, W.H. Freeman & Co., 1979.
- [Horak, 1985] Wolfgang Horak. Office Document Architecture and Office Document Interchange Formats: CurrentS tatus of International Standardization. In IEEE Computer, 18(10):50-60, October 1985.
- [Kodratoff and Tecuci, 1988] Yves Kodratoff, and Gheorghe Tecuci, Learning Based on Conceptual Distance. IEEE Transactions onPatternAnalysis andM achine Intelligence, PAMI-10(6):897-909, November 1988.
- [Larson, 1977] James B. Larson, Inductive Inference in the Variable Valued Predicate Logic System VL 21 : Methodology and Computer Implementation. Doctoral dissertation, Dept of Computer Science, University of Illinois, Urbana, Illinois, May 1977.
- [Michalski, 1980] Ryszard S. Michalski. Pattern Recognition as Rule-Guided Inductive Inference. IEEE Transactions on Pattern Analysis and Machine Intelligence, PAMI- 2(4):349-361, July 1980. •
- [Michalski et al., 1986] Ryszard S. Michalski, Ivan Mozetic, J. Hong, and Nada Lavrac. The AQ15 Inductive Learning System: An Overview and Experiments. Intelligent Systems Group, Dept. of Computer Science, University of Illinois, Urbana, Illinois, 1986.
- [Quinlan, 1986] J. Ross Quinlan. Induction ofDecision Trees. Machine Learning, 1(1):81-106, 1986.
- [Sanfeliu and Fu, 1983] Alberto Sanfeliu, and King Sun Fu. A distance measure between attributed relational graphs for Pattern Recognition. IEEE Trans. on Systems, Man , and Cybernetics, SMC-13(5):353-362, May-June 1983.
- [ShapiroandHaralick, 1985] Linda G. Shapiro, and Robert H. Haralick. Structural descriptions and inexact matching. IEEE Transactions Pattern Analysis and Machine Intelligence, PAMI-3(5):504-519, September 1981.
- [Siekmann, 1990] Jorg H. Siekmann. An Introduction to Unification Theory. In Ranan B. Banerji (Ed.) Formal Techniques in Artificial Intelligence: A Sourcebook, pages 369-424, Amsterdan, The Netherlands, Elsevier Science Publishers B. V., 1990.
- [Stepp, 1987] Robert E. Stepp, Machine Learning from Structured Objects. Proceedings of the F ourthi nternational Workshop on Machine Learning, pages 353-363, Irvine, California, 1987.
- [Weiss and Kulikowski, 1984] Sholom M. Weiss, and Casimir Kulikowski. A Practical Guide to Designing Expert Systems. Totowa, New Jersey, Rowman and Allanheld, 1984.
- [Winston, 1984] Patrick Henry Winston, Artificialintelligence (2nd Ed.), pages 391-414, Reading, Massachusetts, Addison-Wesley, 1984.
- [Wong and You, 1985] AndrewK.C. Wong,andManlai You. Entropy and distance of random graphs with application to structural pattern recognition. IEEE Trans. PatternAnalysis and Machine Intelligence, PAMI-7(5):599-609, 1985.
References were extracted automatically from the PDF and may contain errors.
Full text extracted automatically from the PDF; figures, tables and equations may differ. The PDF is the version of record.
1 Introduction
The nature of the problem solving task performed by most expert systems is classification, that is, mapping entities of the world into a set of predetermined solutions or recommendations [Clancey, 1985; Weiss and Kulikowski, 1984]. Typically, . expert systems for diagnosis are concerned with selecting an answer from an existing set of diagnoses (solution elements) given the description of a situation. Classification is equally fundamental in nearly all know ledge-based pattern recognition systems, which have to assign appropriate interpretations to objects within a scene [Chandrasekaran and Keuneke, 1987]. Independently from the direction of reasoning, either forward or backward, such systems operate with a description of the current state in the working memory and a description of the conditions to be satisfied in order to select the rule.
Unfortunately, in real applications the descriptions may be both incomplete and also affected by noise. The latter problem is especially felt in those applications in which data are directly detected through sensors or transducers. A scribble on a document or a voice in the background are two common forms of noise. In addition, humans can also introduce errors in the data due to misunderstanding or lack of attention. Another form of noise in a measurement occurs when the measuring instrument shows a poor accuracy. Finally, information may be incomplete due to either human inadequacy or malfunctioning equipment.
When acquiring knowledge from humans, the problem could be solved by multi-expert knowledge acquisition and by applying a cross-validation technique to the rules provided by the experts. In automatic knowledge acquisition the problem is approached by making the machine learning techniques more robust as regards noisy and/or incomplete data [Quinlan, 1986].
Bergadano et al. [1988] proposed an approach to learning human concepts which are inherently imprecise and context dependent. The method uses a two-tiered representation of learned concepts and a flexible matching, based on a numerical estimation of the typicality or certainty that an instance is a member of a concept, so providing a form of probabilistic inferential extension of a concept In this case, both concept metaknowledgeconcerning the importance of concept attributes as well as the (joint) probability distributions of these attributes are essential.
To sum up, noisy, imprecise, context-dependent and incomplete descriptions demand a more flexible matching process, also called partial matching in [Hayes-Roth, 1979], where two descriptions are compared in order to identify their similarities rather than their equality. Generally, the term best match is also used when the rule which maximizes the similarities and minimizes the differences against the current state is selected. The result of a flexible matching should produce a number indicating how well two descriptions match. The number can be a value in the unit interval [0,1] such that 1 indicates a perfect match, 0 no match at all, and any real number r, re (0,1), denotes our confidence in matching. The definition of such a similarity measure is strictly connected to the most common concept of distance, as the more distant two objects are, the less similar they can be considered.
Several distance measures, or conversely, several similarity measures, have been proposed in the fields of pattern recognition [Sanfeliu and Fu, 1983; Wong and You, 1985; Shapiro and Haralick, 1981] and machine learning [Michalski et al., 1984; Kodratoff and Tecuci, 1988]. They differ in a variety of respects:
- representation language: propositional logic, first-order predicate logic, feature vectors, attributed relational graphs;
- type of problem the distance measures are applied to: pattern matching in knowledge-based systems, concept acquisition, pattern classification, discriminant analysis, conceptual clustering, numerical taxonomy;
- theoretical approach: geometrical, syntactical, probabilistic, entropical, fuzzy, hybrid;
- type of corrected deformations: local or structural. This last point requires further explanation. Generally, an object (or situation) can be decomposed by successive
refmements until atomic parts, called primitives, are defmed. Once these subparts and their mutual relationships are identified, the structure is obtained [Stepp, 1987]. The complete description of the object is given by:
- the attributes of the entire structure (global attributes);
- the attributes of some subpart (local attributes);
- the attributes of the interrelationships between parts (relations).
When the differences between the two matching descriptions concern the global/local attributes it is said that local deformations occur, while when the differences are at the level of relations then deformations are called structural. Not all distance measures take into accountstructwal deformations, particularly those adopting a representation language which does not allow us to represent structwal descriptions.
This paper introduces a definition of distance measure suitable for dealing with structural deformations which is based on a probabilistic interpretation of the matching predicate. The three basic characteristics of our definition_ are: 1) the possibility of dealing with rules whose conditions are not stated as exact descriptions of a particular situation but describe (complex) properties that the situations must have; 2) the necessity to defme, objective! y or subjectively, the probability density functions of the features (attributes or relations) used to describe a situation; 3)the possibility of dealing with rules whose conditions are incomplete structural descriptions.
In the following, Section 2 introduces the definition of a flexible matching function for evaluating the goodness of any match between noise-affected structural descriptions. The problem of matching (or unifying) two expressions with commutative andassociativeoperators is NP-<:omplete [Garey and Johnson, 1979; Siekmann, 1990], moreover the computational cost of a flexible matching procedure increases with the need to calculate the similarity measure. Consequently, we can either try to find algorithms that perform quickly on average or try to find approximate algorithms that produce acceptable answers in an acceptable amount of time. In Section 3 we describe how a branch-and-bound algorithm can be used for reducing the average computational time of the actual similarity between two structural descriptions. Furthermore, for those applications involving complex descriptions and requiring an answer in relatively short time, we discuss the possibility ofintroducing a heuristic rule which allows us to find an approximate value of similarity. Finally, in Section 4, an application of the proposed distance measure to the recognition of office documents in digital form according to their page layout is illustrated.
2 A distance measure for flexible matching between wff' s
Let ii denote the space of all the possible descriptions (or well formed formulas (wff's)), complying with the syntax of the representation language and built according to a given vocabulary of attributes and relations. Here we are interested in defining a flexible matching function:
which could be considered as an extension of the canonical (strict) matching predicate:
By extension we mean that
The function Flex_Match(s,t) represents a degree of similarity between two descriptions s,tE ii, or even the degree of fitness of son t. The definition of such a function should be based on a theory which is able to quantify the degree of similarity between two descriptions. As probability theory fulflls such requirements, we can assign to each pair of wff 's in 6 the probability of precisely matching the two formulas provided that a change is made in the description t; formally:
Such a definition marks the transition from syntactic to probabilistic matching. Consequently, it is possible to defme a probabilistic distance measure, .:1, between s and t as follows:
A more detailed definition of distance measure requires a rather more specific description of the representation language than we have given up to now. In particular, the representation formalism we have chosen is inspired to VL 21 [Michalski, 1980]. The basic component of the VL 21 is the selector or relational statement, written as:
where:
- L, called referee, is a function symbol with its arguments;
- R, called reference, is a set of values of the referee's domain;
Function symbols, called descriptors, are n-adic functions (n2:1) mapping onto one of three different kinds of domains: nominal,linear and tree-structured.
Selectors can be combined by applying different operators, such as AND (A), OR (v) and decision operator(::>) in order to define wff 's like:
where d-formula is a disjunction of or-atoms (selector conjunctions), while c-formula is a conjunction of selectors. This formalism is adequate to express classification rules in many knowledge-based pattern recognition systems dealing with structural descriptions.
Since the main application of the proposed distance measure is noise-affected concept recognition, from now on s will denote the description of a concept and t the observation to be classified. Moreover, the specializing isomorphism (s isomorphism) [Larson, 1977] rather than the simple isomorphism is used in concept recognition, therefore the match of s and t consists in searching for a substitution a such that
Flex_match is computed according to the following top down evaluation scheme:
I) sis a disjunction of conjuncts: s = Or_atom 1 v Or_atom 2 v ... v Or_atom 0 · Then the formulation of the flexible matching is given as follows:
This definition corresponds to the idea that when a concept is polymorphic (i> 1 ), we are usually interested in finding the "best" matching between one of its morphisms and the observation t. For instance, if s = [length(s1)=10 .. 100] v [width(s2)=5 . .30] and t = [length(s1)=9]" [width(s1)=45], we say that t "nearly" satisfies s simply because it is "near" to the first morphism of s. When correlations occur among the different morphisms expressed by s, the definition above has to be extended so as to take them into account.
m sis a conjunction of selectors: s = SellASel:l' ... ASelk(k>O). Thus the computation of the flexible matching is affected by the consistent substitution cr. of the variables ins. As we are looking for the best matching between s and t, we define:
where Flex Match. denotes the flexible matching function with the tie of the shbstitutions fixed by CJ ..
lll) sis a selector: s = [f(v 1 ,v 2 , ··· , v 1 )= g 1 , ~ ···· , gM], wheref is a 1-adic descriptor and {gl' ~· ... , gM} is a subset of the domain Doff. Flex_Match.(SeV) is determined by evaluating the degree o_f similarity be~een the selector CJ/s) = Sel, and the correspondmg selector oft, Sel,= [J(w 1 ,w 2 , · ·· , w 1 )= e 1 , e 2 , · · · , em], which has the same referee as Sel,. Consequently:
Flex_Match.(s,t) = Flex_Match(Sel,,Sel,) (3) and Flex_Matcb(Sel,,Sel,) computes the degree of similarity between the references of Sel, and Sel 1 ·
Since we are searching for an s-isomorphism, the similarity between the references of Sel, and Sel, is equal to 1 if and only if the reference of Sel, is more specific than that of Sel,. The notion of specialization is intended as set inclusion, if the descriptor f is a nominal or linear one. This interpretation can be easily extended to tree-structured descriptors: each single element in the reference of two selectors is replaced by all the values representing the leaves of the subtree having that particular element as its root
The presence of multiple values in the reference of Sel, actually means that the value of an attribute is not known exactly, but it ranges over a subset of the attribute domain. This is a form of uncertainty in data [Dubois and Prade, 1988] and its management, together with the problem of incomplete descriptions, has been extensively described in [Esposito et al., 1991a]. Henceforth, we will assume that m=l, that is we are sure about the value e taken by f in Sel,.
Let EQUAL(x,y) denote the matching predicate defined on any two values x and y of the same domain. Since we are looking for the best mapping from { e} into {g 1 , g 2 , ··· , gM}, then the definition of flexible matching depends on the maximum probability of two matching selectors computed over the set of all possible correspondences between the elements of { e} and { gl' ~· ... , gM}, that is:
Such a defmition takes into account the goal of classification by means of event covering, thus when e e {gl' ~· ... , gM} then MF(Sel,, Sel 1 ) = 1 because there is a perfect match, otherwise MF(Sel,, Sel,) represents the maxim urn probability that the value in the reference of Sel, equals one of the M values in the reference of Sel,.
The probability of the event EQUAL(g 1 ,e) can be defined as the probability that an observation e could be a distortion of gi, that is:
where:
- X is a random variable assuming values in the domain D of f;
- ~ is a distance defined on the domain itself.
In other words, the probability that any two values of the domain D match is defined as the probability that a random variable X defined on D takes a value farther than e from ~· given that gi is the centroid. In Figure 1, a geometrical interpretation of this definition is provided.
The defmition of o must take into account the type ofVL 21 descriptor. In particular we propose the discrete metrics for nominal descriptors:
for linear not numerical descriptors:
where ord( x) denotes the ordinal number given to xeD, and for linear numerical descriptors:
It should be observed that other reasonable choices of o are possible; nevertheless the value ofP(EQUAL(gi,e)) does not change since we compute the probability over distance and not merely geometrical distance. This key point also allows us to ignore problems with scaling when the similarity is computed over the whole set of features.
Of course, the computation ofP(EQUAL(gi,e)) must take into account the probability density function of X. When no information is available on the probability distribution of X we assume X to have a uniform probability distribution, that is:
for the descriptors with a finite domain (here Cis the cardinality ofD), while
if the domain Dis an interval [a,b] (here f 0 denotes the density function).
Having made such assumptions it can be proved that for nominal descriptors we have:
while for linear not-numerical descriptors we get:

where:

A proof of fonnulas (9) and (10) is given in Appendix A. For the descriptors with tree-structured domain the computation of P(EQUAL(gi,e)) makes use of the previous fonnulas. Each element in the references of Sel and Se~ is replaced by the values representing the leaves ol the subtree which has that element as its root. The fonnulas (9) and (10) are adopted, depending on whether the generalization hierarchy for the descriptor is unordered or ordered, respectively. The only changes to be made both in (9) and (10) consist in replacing C with the number of leaves of the tree-structured domain.
3 Coping with complexity of matching
The computation of the flexible matching when s is a conjunction of selectors requires the evaluation of the maximum conditional probability as in fonnula (2) as cr. varies. Unfortunately, if p and q (p~ q) are the number of vaHables in s and t respectively, the number of possible substitutions cr. is given by the pennutation of p elements taken from a set cif q elements, i.e. P(q,p). Consequently, the computation of Flex_Match(s,t) has a combinatorial cost which should be reduced in some way, particularly when P(q,p) is very large.
In order to prevent an exponential growth of the computational time, two alternative techniques are presented in the following. Each of them requires that s and t were connected conjunctions of selectors (for a definition of connected fonnulas see [Larson, 1977]).
Firstly, we can make use of a branch-and-bound algorithm which perfonns quickly on average. The search space can be represented by a tree where:
- the nodes are variable pairs, (vi,wJr.), representing the substitution vi+-- wJr. of a variable vi appearing ins with a variable w appearing in t;
- a branch from a node N1 to a node N2 represents the instantiation of a variable of s which has not yet been instantiated in any node along the path from the root to Nl.
When all the variables ins have been instantiated, the node of the tree representing the last instantiation can by no means branch (i.e. it is a leaf), and the set of the substitutions along the path from the root represents one possible substitution cr. (see Figure 2). J
Each node of the tree can be labeled with a pair of numbers. The fiCSt number represents the partial measure of fitness computed only on those selectors of s whose variables have already been instantiated along the path to the node. The second number represents the exact number of selectors ins which gave a contribution to the computation of the partial measure offitness.lf there is a branch from a node N1 to a node N2 then the value of the partial measure of fitness in N2 must be less or equal to that associated with N 1, due to the definition of flexible matching. In other words, walking along a path from the root towards a leaf of the tree, the partial distance measure associated with each node can only decrease or remain the same. A similar (but increasing) monotonic property is also true for the second value reported in node labels. These considerations suggest how a branch-and-bound algorithm can help in finding the best substitution more quickly. In fact, it is sufficient to consider a function cost composed by the partial distance measure and the opposite of the number of selectors in s which contributed to the computation of the partial distance. Minimizing the function cost while the tree is extended allows us to find the best substitution without necessarily exploring all the possible alternatives. When sis a disjunction of or-atoms, the algorithm proceeds exploring alternative consistent instantiations of variables belonging to all the or-atoms, otherwise it could spend too much time trying to evaluate the distance measure concerning a single "bad" or atom.

As second alternative, it is possible to decomposes into two parts:
- s' = Sel 1 ASe~A ... ASel,, r ~ k, is a conjunction of selectors such that the referee of Seli, i = 2, 3, ... , r, contains the maximum non-null number of variables not appearing in the referees of Sell' Se~ ·... ,Seli- 1 ;
so that:
- s" is a conjunction of the remaining selectors in s.
The constraint of connection upon s ensures that all the distinct variables in s were ins'. As a consequence, the search for a substitution cr such that t =>cr(s) can be weakened into:
Under such a hypothesis the events Flex_Match.(SeV ), i=r+ 1, r+ 2, ... , k, become independent since the subsrltution cr that verifies ( 11) has already bounded the variables ins'. As a result, we have:

This fonnula must be interpreted as follows: while varying the considered substitution cr., the flexible matching between s and t is computed as thd highest value given by the product of the degree of similarity between each selector of s" and t.
When it is not possible to find a substitution satisfying ( 11) then we can set Flex_Match(s,t) = 0, since s and t have no similarities, not even at a level of variables (components). This interpretation corresponds to the heuristic thats' is a conjunction of Must-relations [Winston, 1984], thus the computation of (12) is perfonned only if a perfect matching can be detected between s' and t Sometimes the choice of s' is not unique, in that case a simple preference criterion based on the sum of weights of the selectors in s' may help to select the best alternative.
4 Application to Document Recognition
The flexible matching algorithm has been employed and tested as a partofPLRS,a system for digitized office document recognition based upon the page layout [Esposito et al., 1990]. Within the scope of the ODNODIF standards [Horak, 1985], a document presents two hierarchical structures: both the layout (or geometric) and the logical structure. The former concerns the internal organization of the document, i.e. the areas containing text and images, and some components are: set of pages, pages, frames and basic blocks. The logical struc~ associates the content of a document with a hierarchy of logtcal components, such as articles, summaries, sections, paragraphs, page numbers, logotypes, and so on. Furthermore, documents can be grouped into classes according to a specific criterion, such as the kind of processing or the common subject.
PLRS classifies single page documents using only on the page layout structure, i.e. the invariant geometrical characteristics shared by documents belonging to the same class, due to underlying printing standards or writing style. An extension of PLRS exploits the results of the document classification process in order to identify the logical components of a document again using the page layout structure. However, this problem, named document understanding, is still under study and it will not be dealt with in this paper.
The rules used for the page layout recognition are produced by means of a process of inductive learning, in which some meaningful examples of document classes, relevant for a specific office, are used to train the system. This allows the "in field" customization of the system, thus avoiding the definition of user-handwritten classification rules for a specific office. The form of a recognition rule is:
<condition> ::> <decision>
where:
- <condition> is a VL 21 wff in disjunctive normal form;
- <decision> refers to a document class.
. The ~ge layout of a document is automatically described m symbolic form, as a VL 21 conjunctive formula, by a document processing system performing the following steps:
- preprocessing of the digitized document;
- segmentation into basic blocks through the Run Length Smoothing Algorithm (RLSA);
- layout analysis, that groups together blocks satisfying some predefined requirements, such as closeness, alignment, and so on, into larger blocks, called frames, and produces numerical tables describing each frame;
- tran~lation of the numerical tables produced by the previous step mto VL 21 symbolic descriptions.
The descriptors used in the document description are:
CONT AIN_IN_POS(Doc,Block), WIDTH(Block), HEIGHT(Block), TO _RIGHT(Blockl,Block2),
ON_ TOP(Blockl,Block2), ALIGN (Block l,Block2) and a page layout description of a training document is reported in the following:
[contain_in_pos(xl,x2)=north] 1\
[ contain_in_pos(x l,x3)=north_ west] 1\
[contain_in_pos(xl,x4)=centre] 1\ [width(x2)=large] 1\
[ wi?th(x3)=medium] 1\ [ width(x4 )=medium_large) 1\ [hetght(x2)=medium] A [height(x3)=medium_small] 1\ [height(x4)=very_very_large] 1\ [on_top(x2,x3)] 1\ [on_top(x2,x4)] A [to_right(x3,x4)] 1\ [align( x2,x3)=beginning_ column] 1\ [align(x2,x4)=last_column] 1\ [align(x3,x4)=beginning_row] ::> [class=three]
The classification of a new document consists of two steps. Firstly ~e conditio~ part of each recognition rule generated by the learnmg system ts matched against the symbolic description of the new document. Secondly, the document is assigned to the class specified in the decision part of the matching rule. Due to the presence of noise affecting the VL descriptions of documents, such as a scribble on a docJ:.Oent or sensing problems, it is not possible to use a canonical (strict) matching procedure for classifying test documents, therefore the proposed flexible matching is adopted.
. In ?rder to tes.t our approaches to coping with complexity m flextble matchmg, we organized an experiment in which a set of 72 single page documents, belonging to nine different classes, has been considered. Four classes are letters, each cla~s containing generic printed letters of the same company, whtle other four classes are magazine indexes; the ninth class ~s a reject class, representing the rest of the world. Fifty ms~c~s were selected as training examples, leaving the remammg 22 documents for the testing process.
The results of the application of both branch-and-bound algorithm and the heuristic method in the flexible matching procedure applied to the test documents are reported in Table 1 and 2, respectively. In Table 1 entries containing a"*" mean that the value of the flexible matching (FM) is not known since the search has been interrupted. This happens when the partial similarity measure becomes lower than a fixed threshold (0.3 in our experiment). In Table 2 null "FM" values indicate that a strict matching on s' is not possible (see formula (12) ). In ~t? tables, an FM value 1.0 in the column denoted by rulei mdtcates the presence of a perfect matching between the test document and the rule generated for the i-th class. The results concerning a full comparison between the canonical matching procedure and the flexible matching have been reported in [Esposito et al., 199lb in press].
As we could theoretically expect, entries in Table 1 are never less than the corresponding ones in Table 2, since the branch-and-bound algorithm fmds the highest similarity. It should be observed that the classification results do not change at all if the heuristic method is used and the class corresponding to the highest value of similarity is taken as the membership class. The correct class is reported in the first column of Table ~· Both the tables also present the throughput time, expressed m seconds, for each flexible matching and the total time per document(lastcolumn)orperclass(lastrow). We can conclude from a comparison of these time entries that the branch-and bound method needs much more time than the heuristic method, and this is a great limitation for a real-time document handling system.
5 Conclusions
. ~n the paper a definition of a flexible matching is presented: tt ts ~ased on a probabilistic interpretation of the matching predtcate and proves useful to cope both with noisy data and with structural deformations. Unfortunately, computing the similarity of two descriptions is computationally impractical, therefore two distinct methods are adopted to reduce the complexity: frrstly, branch-and-bound algorithm, and secondly, a heuristic method. The flexible matching has been applied to the recognition of digitized office documents and the results of both the algorithms are presented.
| Ex | rule 1 | rule 2 | rule 3 | rule 4 | rule 5 | rule 6 | rule 7 | rule 1 tot | |
|---|---|---|---|---|---|---|---|---|---|
| 1 | T FM | 1 1.0 | 2 0.409 | 4 * | 1 0.80 | 0 0.45 | 9 * | 25 12 0.490 * | 49 |
| 2 | T FM | 1 1.0 | 1 0.431 | 4 * | 1 o.ifi | 2 0.45 | 7 0.28 | 13 2 0.490 * | 32 |
| 3 | T FM | 6 0.45 | 1 1.0 | 2 | 1 0.8 | 1 0.45 | 8 0.3 | 16 3 0.490 * | 39 |
| 4 | T FM | 1 0.40 | 1 1.0 | * 2 0.09 | 1 0.72 | 1 0.5 | 2 * | 7 2 0.72 * | 19 |
| 5 | T | 2 0.8 | 0 | 1 | 1 | 1 0.5 | 0 | 1 1 0.9 * | 8 |
| 6 | FM T FM | 3 0.8 | * 1 0.4 | 1.0 0 0.90 | 0.8 1 o.ifi | 0 0.5 | * 2 0.28 | 0 1 0.9 | 9 0.36 |
| 7 | T FM | 3 0.58i | 0 0.8 | 4 0.09 | 1 o.ifi | 0 0.90 | 10 0.45 | 35 0.72 | 4 59 0.32 |
| 8 | T | 3 | 2 | 10 | 0 | 2 1.0 | 17 0.45 | 2 0.90 | 15 53 |
| 9 | FM0.58 | 0.8 | 0.29 | 1.0 1 | 1 | 2 | 4 | * 8 | |
| 10 | T FM T | 5 0.64 4 | 5 0.45 1 | 22 * 7 | 0.90 1 | 1.0 0 | 1.0 10 | 0.88 24 | 50 0.81 22 71 |
| 11 | FM T | 1.0 6 | 0.409 3 | 0.826 10 | 0.90 1 | 1.0 0 | 0.5 5 | o.ifi 25 | 0.45 13 65 |
| 12 | FM T | 0.5 6 | 0.409 3 | * 5 | 1.0 2 | 1.0 1 | 0.8 1 | 0.72 21 5 | 0.45 46 |
| 13 | FM T | o.n 7 0.436 | 0.72 1 0.72 | * 4 | 0.72 2 | 0.5 1 | 1.0 1 | o.ifi 31 | 0.72 18 67 |
| 14 | FM T | 6 0.88 | 2 0.48 | * 3 | 0.72 0 | 0.45 1 | 1.0 2 | 0.64 1 2 | 0.40 19 |
| 15 | FM T FM | 6 o.72 | 0 0.32 | * 2 0.36 | 0.6 1 o.72 | 0.5 1 0.5 | 0.5 1 0.32 | 0.90 2 1 0.9 | 0.72 15 0.4 |
| 16 | T FM | 5 0.80 | 2 | 2 | 1 | 2 | 3 | 5 3 | 25 0.36 |
| 17 | T | 8 | 0.81 3 | * 4 | o.72 3 | 0.5 2 | 0.25 3 | 1.0 4 1 | 29 |
| 18 | FM T | 0.80 9 | 0.45 | * | o.72 2 | 0.54 1 | 0.45 5 | 1.0 33 | 0.36 17 72 |
| FM T | 0.90 13 | 3 0.72 | 7 * | o.72 3 | 0.90 0 | 0.44 10 | 0.581 25 0.581 | 1.0 9 | |
| 19 | FM | 0.90 | 4 o.72 | 9 * | 0.12 | 0.90 | 0.44 | 75 1.0 | |
| 20 21 | T FM T | 15 1.0 | 4 0.72 | 5 * 4 | 4 0.8 | 1 0.45 | 7 0.40 2 | 11 7 0.58 6 2 | 55 1.0 36 |
| 22 | FM T | 13 0.60 8 0.72 | 2 0.8 2 o.72 | * 1 * | 5 0.581 4 0.6 | 1 0.54 1 0.5 | 0.45 1 0.44 | 0.327 10 7 0.327 | 0.45 35 0.72 |
| FM Tot | 133 | 45 | 115 | 39 | 22 | 112 | 304 | 158 928 | |
A Proof of formulas (9) and (10)
| Let us recall the definition (5) given above: |
| P(EQUAL(gi,e)) = P(~i.X);::: ~(gi,e)) (lB) |
| Henceforth, in order to simplify our notation, we will use |
| Cl. | rule 1 rule 2 rule 3 | rule 4 | rule 5 | rule 6 | rule rule tot | 1 | ||||
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | T FM | 0 1.0 | 0 0.387 | 1 0.0 | 0 0.80 | 0 0.45 | 0 0.0 | 7 1 0 0.490 0.0 | 4 | |
| 1 | T | 0 | 0 | 0 | 0 | 0 | 0 | 1 0 | 2 | |
| FM | 1.0 | 0.431 | 0.0 | 0.0 | 0.45 | 0.0 | 0.490 | 0.0 | ||
| 2 2 | T FM | 0 0.0 0 | 0 1.0 0 | 2 0.0 0 | 0 0.60 | 1 0.45 | 1 0.0 | 0 0.4900.0 0 | 2 8 0 3 | |
| T FM | 0.0 | 1.0 | 0.0 | 1 0.0 | 0 0.27 | 0 0.0 | 0.163 | 0.0 | ||
| 3 | T | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 1 | |
| 3 | FM T | 0.0 0 | 0.258 0 | 1.0 0 | 0.40 1 | 0.45 0 | 0.0 0 | 0.9 0 | 0.0 1 4 | |
| 4 | FM T | 0.0 1 | 0.4 0 | 0.90 3 | 0.44 1 | 0.45 0 | 0.0 | 0.9 1 | 0.0 9 | |
| FM T | 0.0 2 | 0.8 0 | 0.054 | 0.0 | 0.90 0 | 2 0.0 | o.72 | 1 0.0 | ||
| 4 | FM | 0.08 | 0.8 | 4 0.036 | 0 1.0 | 1.0 | 1 0.0 | 2 0.90 | 1 11 0.0 | |
| 5 | T FM | 2 0.64 | 1 0.32 | 4 0.36 | 0 0.90 | 0 1.0 | 1 1.0 | 2 0.65 | 2 12 0.0 | |
| 5 | T FM | 0 1.0 | 0 0.387 | 3 0.826 | 1 0.90 | 0 1.0 | 2 0.0 | 2 o.!TI | 2 11 0.225 | |
| 5 | T | 1 | 0 | 2 | 0 | 0 | 2 | 1 | 2 9 | |
| 6 | FM T FM | 0.48 1 0.36 | 0.36 0 0.72 | 0.198 3 0.198 | 1.0 0 0.48 | 1.0 0 0.36 | 0.88 0 1.0 | 0.65 1 o.iiT | 0.0 1 6 0.0 | |
| 6 | T FM | 1 0.36 | 0 0.72 | 2 0.198 | 0 0.48 | 0 o.i8 | 1 1.0 | 1 0.245 | 1 7 0.0 | |
| 6 | T | 0 | 0 | 0 | 0 0.0 | 0 0.45 | 1 0.0 | 0 | 1 3 0.0 | |
| 7 | FM T | 0.88 0 | 0.48 0 0.32 | 0.09 0 | 0 | 0 | 0 | 0.90 0 0.9 | 0 1 0.0 | |
| 7 | FM T | 0.0 0 | 0.0 | 0.0 0 | 0.36 0 | 0.0 1 | 0 | 1 3 | ||
| FM | 0.80 | 0 o.8i | 0 0.129 0 | 0.60 | 0.36 | 0.0 | 1.0 | 0.0 | ||
| 7 | T | 0 | 0 | 0 | 0 | 1 | 0 | 1 3 0.0 | ||
| 8 | FM T FM | 0.80 1 0.90 | 0.32 0 0.72 | 0.162 2 0.297 | 0.72 0 0.64 | 0.54 0 0.90 | 0.0 2 0.0 | 1.0 1 0.245 | 1 8 1.0 | |
| 8 8 | T FM | 1 0.90 | 1 0.72 | 2 0.297 | 0 0.64 0 | 0 0.90 | 2 0.0 1 | 2 0.245 | 1 10 1.0 | |
| T FM | 0 1.0 | 1 0.72 | 0 | 0.40 | 0 0.45 | 0.0 | 0 0.245 | 1 4 | ||
| 0.297 | 1.0 | |||||||||
| RT | 2 | 1 | 0 0.54 | 1 | 2 | 2 13 0.0 | ||||
| R | FM T | 0.60 0 | 0 0.8 0 | 4 0.240 0 | 0.54 0 | 0 - | 0.0 0 | 0.327 0 | 0 1 0.0 | |
| FM | {).0 | 0.48 | 0.148 | 0.0 | 0.36 | 0.0 | 0.0 | |||
| 35 | 24 | |||||||||
| Tot. | 15 | 6 | 8 | 3 | 22 | 20 | 133 | |||
g instead of gr As already said, formula (IB) takes into account both the type of domain which g and e belong to and the probability distribution of the domain values.
By assuming that the probability distribution is uniform, and remembering the defmition of~ for nominal domains, we have:

where C is the number of elements of the domain. For ordinal domains, (IB) becomes:
P(EQUAL(g,e)) = P(lord(g)-ord(X)I2: l<>rd(g)-ord(e)l) = which can be rewritten in a simpler form by denoting ord(g), ord(e) and ord(X) with g,e, and X, respectively:
2nd case: g > e
P(lg-XI ~ lg-el) = P( g-X<e-g u g-X=g-e u g-X>g-e u g-X=e-g )=
= P(g-X<e-g) + P(g-X=g-e) + P(g-X=e-g) + P(g-X>g-e) =
= P(X>2g-e) + P(X=e) + P(X=2g-e) + P( X<e) =
= P(X2:2g-e) + P(X~) =
3rd case: g < e
P(lg-XI ~ lg-ej) = P( g-X<g-e u g-X=e-g u g-X>e-g u g-X=g-e )= = P(g-X<g-e) + P(g-X=e-g)+ P(g-X>e-g) + P(g-X=g-e) =
= P( X>e) + P(X=2g-e) + P(X<2g-e) + P(X=e) =
= P(~2g-e) + P(X2:e) =
= [(2g-e+ 1)·step(2g-e) + C- e]/C (6B)
where step(x) is the following function:
Finally, resubstistuting ord(g) and ord(e) to g and e, respectively, we have formula (10).
@inproceedings{ijcai1991p96,
title = {Flexible Matching for Noisy Structural Descriptions},
author = {Esposito, Floriana and Malerba, Donato and Semeraro, Giovanni},
booktitle = {Proceedings of the Twelfth International Joint Conference on
Artificial Intelligence, {IJCAI-91}},
publisher = {International Joint Conferences on Artificial Intelligence},
editor = {John Mylopoulos and Ray Reiter},
pages = {658--663},
year = {1991},
month = {8},
note = {Learning Be Knowledge Acquisition},
url = {https://ijcai.org/proceedings/1991/96},
}
TY - CPAPER TI - Flexible Matching for Noisy Structural Descriptions AU - Esposito, Floriana AU - Malerba, Donato AU - Semeraro, Giovanni T2 - Proceedings of the Twelfth International Joint Conference on Artificial Intelligence, IJCAI-91 PB - International Joint Conferences on Artificial Intelligence PY - 1991 SP - 658 EP - 663 UR - https://ijcai.org/proceedings/1991/96 ER -Copied
Machine-readable versions of this paper, for tools and AI agents: