The Learning of Parameters for Generating Compound Characterizers for Pattern Recognition
Proceedings of the First International Joint Conference on Artificial Intelligence. Self-organizing Systems. Pages 381-416.
© 1969 International Joint Conferences on Artificial Intelligence
Abstract
This paper presents and describes a pattern recognition program with a relatively simple and general basic structure upon which has been superimposed a rather wide variety of techniques for learning, or self-organization. The program attempts to generalize n-tuple approaches to pattern recognition, in which ann-tuple is a set of individual cells or small pieces of patterns, and each n-tuple is said to characterize an input pattern when these pieces match it, as specified. The program allows n-tuples to match when only some of their parts match, and it allows these parts to match even though they are not precisely positioned (See Uhr, 1969b', for some simple example programs). It further learns, in a variety of ways: It searches for good weights on its characterizers' implications, by re-weighting as a function of feedback. It generates and discovers new characterizers (and can therefore begin with no characterizers at all), and discards characterizers that prove to be poor (See Uhr and Vossler, 1961, and Prather and Uhr, 1964). It also uses a set of characterizers of characterizers, to search for good parameter values that newlygenerated characterizers should have. A detailed flow-chart-like "precis" description of the program is given, along with an actual listing. It is thus possible to examine exactly what the program does, and how it does it, and therefore to see how a wide variety of learning mechanisms have been implemented in a single pattern recognition program. But because it was coded in a · "high-level" patternmatching and list-processing language the program runs too slowly for extensive tests to be practicable. Therefore only a brief listing of output is given, to show that the program, works and begins to learn. Descriptors: Learning, self-organization, induction, discovery, pattern recognition, learning to learn, n-tuple recognition, characterizing characterizers.
Full text extracted automatically from the PDF; figures, tables and equations may differ. The PDF is the version of record.
Introduction
Programs that have used n-tuples as their characterizers appear to perform with the very best of pattern recognition programs (for discus sions, see Uhr, 1963, 1969a; for a good recent example, see Andrews, Atrubin, and Hu, 1968). This is not surprising, for n-tuples are easily handled by the digital computer. And although Programs that use n-tuples either have them designed by human beings and pre-programmed in (e.g., Andrews, Atrubin, and Hu, 1968), or ran domly generate a fixed set of fixed-n-size n tuples (e.g., Bledsoe and Browning, 1959). An interestingly simple generalization of this is the following: Let the program begin with no char acterizers, but have it generate new character izers that are as simple as possible, and only when needed. Thus the program might start by generating one 1-tuple, continue generating more !-tuples as it finds itself continuing to choose wrong names to assign to input patterns, and at some point begin generating n+l-tuples. It further should be assessing how well each characterizer is working, by in effect conducting a running ex periment that examines its successes and failures. This information should be used a) to weight the importance of this characterizer' s implications in combining them for the decisions as to names to choose·, b) to decide whether a characterizer is good and should therefore be used, or is bad and should therefore be discarded, to be replaced by another, and c) to gather information about gen eral ~ of characterizers, so that new charac terizers are generated that are similar in impor tant parameter values to characterizers that have proved themselves good.
This paper describes a program that is a first approximation to this simple, but hazy, scheme of generating as few characterizers as needed, keeping them as simple as possible, but using what has been learned about charac terizers to direct the generation of new charac terizers, so that they will be similar in their characteristics to good characterizers that have
been generated in the past.
The program has a second general purpose - to puch deeper into techniques for learning char acterizers.
The basic structure of this program seems to us extremely simple - the generation, when needed, of the best new specific n-tuple of the best general type possible, and the learning of as much as possible. But when the program is described or given in detail, as in the following pages, it inevitably sounds more complex - for indeed it is more complex when forced to the level of code for a discrete digital computer. In order to get flexibility into our n-tuples so that they need not be precisely positioned and can be considered to match even though all parts do not always match, extra details must be added to the code. These in turn suggest additional learning mechanisms that will search for good values for this allowed wobbling and threshold matching.
There are also several points at which we simply evade quite subtle decisions that should be made by the program: Should the program spend more time adjusting the weights of its present set of characterizers, or should it gen erate one or more new characterizers ? This we handle by having the program generate one new characterizer per pattern, up to a fixed maximum (also discarding characterizers found to be bad, to make room for more). When the program generates a new characterizer, should it be of the same size n, or of size n + 1 ? This we handle by treating n-size as just another para meter, so that, as described below, the program will choose the n for a new tuple as a func tion of the goodness of the tuples of different n-size that have been generated so far. Thus n is initialized to equal 1; the program will keep tabs on the goodness of each n-size and will generate tuples with an n-size that reflects this goodness, but with some probability will occasionally generate a new tuple of size n + I. Thls procedure is used for all parameters of characterizers.
Precursors
As an introduction to the structure of our program, let us consider the Bledsoe-Browning pattern recognition program (1959), which was among the first to use n-tuples randomly se lected from the input grid to recognize typed or handwritten characters. For each n-tuple, the possible pattern names having the same state as the unknown input pattern are added into a comparison tally. After all tuples are consid ered, the name that matches the unknown pat tern most closely (i.e., having the highest sum of same-state n-tuples) is chosen as the name
of the input pattern.
Using the string manipulation language SNOBOL, Uhr (1969b) coded a somewhat extended version of the Bledsoe-Browning program. Uhr's short program uses weighted implications, rather than merely tallying them, and it allows varying sizes for the n-tuples and for the individual
pieces of the n-tuples.
There are several weaknesses in this type of program: It does not learn, so its perform ance remains only as good as the n-tuple characterizers it starts with. . N -~uples are rig idly positioned, and must match exactly and entirely.
A Basic N-Tuple Pattern Recognition and Learning Program
Let's try to generalize the basic n-tuple pro gram. For example, the characterizer tuples will be looked for one part at a time, instead of all at once. Each tuple piece of the character izer n-tuple will contain pertinent information about its expected location within the pattern grid, its size, and the specific configuration that should be found. Optionally, a tuple ·part will have no particular position specified, sig naling the program to look anywhere (presently meaning from its current position on down) for this tuple part. If a characterizer is matched, its implied pattern names are put on a list of found implications. When the same name is im plied by several characterizers, the separate weights of implications are added together. The tuples are allowed to be non-exclusive, so that grid points in important locations (such as, per haps, the left edge of the grid) may reappear in several characterizers.
This basic program will also have the abili ty to learn from its experience, by comparing its chosen answer with the feedback giving the cor rect pattern name. If the program gave the right answer, the memory is left as is, since it pro duced satisfactory results. But a wrong answer calls for reweighting of implications in the char acterizers whose tuple configurations were matched. The weights of implications : of the wrongly chosen name are decreased, and impli cations of the feedback name are increased. If the answer was wrong the program will also gen erate a new characterizer using this wrongly named input pattern. To do this, a random n tuple is extracted (n is chosen to reflect the distribution of weights attached to the generated values of n) from the input and assembled into a characterizer which implies the correct feed back name. Each run has an upper limit to the number of characterizers generated, to prevent saturation of memory or unnecessary slowing of processing time. Poor characterizers are dis carded, making room for new ones, when the weights of all their implications fall below a
minimal acceptable level.
Characterization Over Variations
Presented with only standard, non-varying instances (in a single type font, perhaps) of its repertoire of patterns, it is no great problem for a pattern recognition program to learn to recog nize a set 'of characters. But if patterns can vary, even slightly, in position or shape from time to time, then problems mushroom. Our program tries to handle this in several ways. Wobbly Patterns Each part of a tuple is allowed to wobble a given horizontal distance to either side. (A somewhat more limited capability for handling vertical wobbling is the "anywhere" search men tioned previously, plus the fact that all tuple part addresses are given relative to the last position, wherever that may be. Uhr (I969b) presents programs that also allow vertical wob ble.) In each characterizer tuple part there is an explicitly given wobble which tells the pro gram just how big a hunk of the grid row it can look in for the desired configuration. This al lowable wobble may vary from tuple piece to piece, as learning has indicated was needed for good performance. Thus if a desired configura tion was not found within the specified wobble, but would have been found were the wobble slightly larger, then the program remembers how it almost found this characterizer. When feed back shows it chose the wrong name, if the program finds that this almost-matched charac terizer would have implied the right answer, it increases the wobble allowance to improve per formance.
Threshold Characterizers that Can Partially Match
Suppose that three parts of a 4-tuple were found, but the other part was not. We would like to allow use of the implications of this nearly matched characterizer even though the program did not find a perfect match. In order to do this the program uses threshold matching, where each part of a tuple has its own weight to add into the tuple's sum of ''foundness." Each implication of the characterizer is preceded by a threshold requirement which must be met by the tuple sum before the implication may be merged into the list of possible pattern names. Thus one implication may" require all but one part of the tuple's configuration to be found, where another implication of the same character izer might require a perfect match of all parts.
Compound Characterizers
Besides having a primitive sort of tuple con sisting of a set of 0-I configurations to be looked for at certain points on the pattern grid, our program can also use compound characteri zers, where one or more of the tuple parts is itself the name of another chara cterizer. The program looks in the stated position (or else ''anywhere") for the name of the desired compo nent characterizer and treats this tuple part just as any other. Now the program must add the names of found characterizers to the input that it is processing.
Compound characterizers are currently gen erated from primitive characterizers that are on the list of characterizers found for this input. There must be two or more such component char acterizers in order to generate a compound char acterizer. When the program decides to gener ate a compound characterizer, it chooses the maximum number of parts to give the tuple. Then the parts are pulled off the list of charac terizers found in this input, and the characteri zer is assembled as initially implying only the feedback.
These compound characterizers are more gen eral than primitive characterizers in that a more sophisticated set of pattern characteristics can be represented by one tuple. Indeed, with com pound characterizers we approach a method for learning stroke or feature recognition, where primitive characterizers might represent the vari ous primary curves and lines, and the compound characterizers could form the desired combina tions of strokes to imply the various patterns. For example, if CHARI is the tuple describing a small open-left curve, CHAR2 is a long vertical line, and CHAR3 is a large open-left curve, then CHAR4 compounding CHAR2 and CHARI could imply the pattern "P" and CHAR5 coupling CHAR2 and CHAR3 could imply "D".
Parameters That Characterize Characterizers
An important part of learning in humans is generalization. In order to enable our program to, in effect, "generalize" on what it has learned and thus perform better, we have given it an expandable set of parameters or character izer traits. For each trait (such as the number of parts, or their closeness, or their maximum horizontal spread), a value can be computed for every characterizer. With every characterizer there is associated a list of this characterizer's value for each trait. In addition we keep a common traits list of all traits and all values that have been generated and used for them. A weight is associated with each value for each trait. For example, suppose the program gives a wrong name for an input pattern on the basis of found characterizer N. Then after the im plication weight of the wrong name in CHAR N is decreased, the program goes through the trait list of CHAR N and, for every trait, downweights CHAR N' s value for that trait in the common trait list. In particular, if CHAR N's value for VERTSPRED (vertical point spread) is "I", then our program will look for the value "I" under the trait VERTSPRED in the general characterizer traits list, and decrease the "goodness weight" of the value "I".
When upweighting a good characterizer' s trait values, the program also enters (if not already there) on each trait value list a slightly larger parameter value, In this way it broadens the range of parameter values that will be used to generate new characterizers. The value and goodness weight information in the general traits list is used when a new characterizer is generated. The program tries to generate the new characterizer tuple within the framework of what the program has already learned; currently it uses the three traits necessary to control the basic generation (tuple size, piece size, wob ble) plus a fourth chosen randomly from the other possible traits (currently, these are hori zontal spread, vertical spread, average close ness of parts, number of parts on the edge of the grid, and compound or primitive). A de sired value for the new characterizer is chosen with a probability that reflects the weights as sociated with the various possible values of the trait. The program tries several times to find a randomly positioned tuple which will have this same value. Thus the program generalizes on what it has learned, in that if a value of "6" for VERTSPRED has been upweighted several times, the program may decide that this is a good value to try for in a new characterizer. (For further details, see functions TRAITWT and PROBCHOOSE and the section labeled PRIMITIVE in the precis and the code.)
The Complete Program
The preceding sections describe independent features, any or all of which could be added to a Qasic learning program to create a complete program. The final program containing all the features is described at the end of this section. As might be expected, the characterizers for this final program have become fairly complex. As an example,
CHARO = "D=0.1.1*0-2,5.3.4*01-1, / " "I=3*I.2,1*T.1, / "
"P=CHAR4 ,/T=TR0/ 1=5. 4/ "
means the following:
".Qescription=at row 0, column 1 look in the next 1 position for the string "0" , adding 2 to the tuple sum of weights on success; 5 rows down and 3 cols, over look in the next 4 posi tions for the string "01 ", adding 1 to the tuple sum on success/lmplications=if sum ~ 3 then imply I with weight 2; if sum ~ 1 imply T with weight 1/CHARO is Part of the compound CHAR4/ Trait list na~e=TRO/Last tuple part's absolut; address is row 5, ~ol. 4/ ",
An outline of the program's operation fol lows.
Detailed Description of Program
| *PRECIS FOR NTUPLE LEARNING PROGRAM. | Statement Number |
|---|---|
| INITIZE | 17-31 |
| Initialize MEMORY (can be null), any CHARacterizers and their TRait lists, and the general CHaracterizerTRAITS value list. PAR | 32-38 |
| Initialize PARAMeterS (values for INCrement, DECrement, INitial THRESHold, INITial WeighT, GOOD, BAD, PROBability of COMPOUND characterizer generation), EDGEDOTS to allow "wobbling" room around in | |
| put pattern. IN | 39-50 |
| READ in the matrix, ROW by ROW, putting an EDGE on each side to allow for the maximum current WOBbLe, and maintaining the current CO LumnSIZE • READ in the FeedBacK (marked by '***') and any PARAMeter CHANGE (marked by '$ '), if given. If no more cards, go to END. RECOGNIZE | 51-56 |
| Initialize FOUND implication list, FOUNDCHARacterizerS list, a copy of MEMory, ROWSIZE, GRIDSIZE. | 57 |
| R1 Blank out IMPUST of implications whose threshold requirements are met. Get the next CHARacterizer and | 58- 59 |
| its CNumber from MEM. If no more characterizers, go to DENY. Get the DESCRiption of CHAR, its IMPUED patterns, and the COM | 60-62 |
| R3 POUNDS that CHAR is part of. | 63-65 |
| Pick off THIS piece, its WeighT, and its POSition from DESCR. If no more parts , go to R2 • RR2 | 66-69 |
| If POS includes relativeDROW and DCOL numbers and a MASK size, compute the absolute DROW loca tion and go to RR6 to look for THIS positioned piece. RR3 Otherwise look 'ANYWHERE' for THIS, starting at the current Begin ROW. If find THIS, go to R4R, | 70-72 |
StiHgment
| Number | Number | ||
|---|---|---|---|
| R3R | 73 | DENY | 105-106 |
| If the ANYWHERE search fails, make the next tuple part apply ANYWHERE, too (by erasing its position). Go to R3. R4R | 74 | Erase from FOUNDCHARS any characterizers whose implica tions are DENIED by a compound characterizer. IMPLY | 107-111 |
| Set this Row as the Begin ROW for future search. If THIS is followed by BCOLumn and WeiGhT infonnation at the | 75 | Merge all the remaining implica tions from FOUNDCHARS into a FOUND list. CHOOSE | 112-116 |
| RIGHT, we are working with a compound characterizer; go to RR4. Otherwise compute the BeginCOL for future search and go to R3. | 76 | Choose as HINAME the NAME on FOUND with the Highest WeighT. OUT PRINT out HI NAME. | 117-122 |
| RR4 | 77 | If there was no FeedBacK or if HINAME was right, go to IN. Otherwise, answer was wrong. | 123-124 |
| If the WeiGhT of THIS piece meets the threshold WeighT requirement for this compound characterizer part, add the WeiGhT to the SUM of implica- tions • Go to R3. RR6 | 78-80 | REWEIGHT Pick off the next CHARacterizer from the FCopy of FOUNDCHARS. If no more CHARs, go to ADJust wobbles. | |
| Finish computing the absolute DCOLumn position to look at for THIS piece. Look first for THIS as a compound tuple part with its DColumn and WeiGhT information; | If the wrong HINAME is IMPLIED by this CHAR, downweight the implication or erase it if the reduced weight is BAD. C7 | 125-130 131 | |
| if don't find it, go to RR7. If DC was within the WobBle allow- ance, reset BROW and BCOL, add WGT to SUM, and go to R3. Other- wise, if a little bigger WobBLe | 81-84 | For each trait, give this bad CHARacterizer' s trait value a DECrement on the main TRAITS list. If all implications are erased for | |
| allowance would have given a match, record this NEARMISS. Go | CHaracter this CHAR, erase it from MEMORY and go to REWEIGHT. | 132-134 | |
| to RR8. RR7 Look for THIS positioned primitive tuple part. If no match, see if a little more wobble gives a NEAR- MISS. | 85-91 | C4 If FeedBacK was not IMPLIED by this found CHAR, add it to im- plications and go to REWEIGHT. Otherwise, | 135-136 |
| RR8 Set new BROW and BCOL for next search and go to R3. | 92-93 | C5 upweight the implication of FBK in CHAR. For each trait, give | 137-138 |
| R2 Make IMPLIST of implications whose THReshold weight requirements were met. | 94-95 | this good CHAR's value an INCre ment on the main CHTRAITS list. Go to REWEIGHT. ADJUST | 139-140 |
| R5A Record NEARMISSes on ALMOSTFOUND characterizers list. | 96-97 | Pick off the next CHARacterizer which was ALMOSTFOUND. If no more, go to GENERATE a new | |
| R5 If IMPLIST is not empty put on FOUNDCHARacterizerS this CHAR and its infonnation. If CHAR is part of a larger mark it found in the input matrix and put the COMPOUNDS on MEM to look at later. Go to Rl. | 98 compound, 99-104 | characterizer. If this CHARacterizer IMPLIED FBK but not the wrong HI NAME, enlarge the mask for the parts WHICH would have given a match. Make sure this CHARacterizer's TRait list contains the maximum wobble value of its parts. | 141-150 151-156 |
| Statement Number | Statement Number | ||
|---|---|---|---|
| GENERATE | 157-158 | generation (TUPle size, PieCe | |
| If there are already enough char- acterizers (i.e. no more TOGEN- erate), go to IN. | size, WobBLe). Initialize the new TRait list with these values. | 203 | |
| Get the number of the new charac- terizer and decide if it should be compound. If not, go to PRIMI- TIVE generation. | 159-160 | Get a desired TRYVALue for another TRait, Will TRY to generate a tuple with the same VALue, | 204-207 |
| COMPOUND | 161-169 | GENTUP | 208-210 |
| Choose the number of PARTS the new characterizer should have. Make an FCopy of FOUNDCHARS to choose from. | Create a relatively-ordered random TUP-tuple ordered by rows, and calculate its VALue for the chosen TRait. | ||
| CG1 Get the next found CHaracterizer from FC • If no more, go to CG2. Keep TUP count of how many parts are got from FC. | 170-171 | If VAL equals the TRYVAL, or if 5 TRYs failed, go to G4. Other wise go to GENTUP and TRY again, G4 | 211-212 |
| Get the LASTPART location of CH and insert it in order into the DESCRiption of the new com- pound characterizer. | 172-173 | Assemble the primitive character izer. G6 Complete the new characterizer' s | 213-216 |
| Add to the new IMPlication LIST the denial of this component CHaracterizer' s impt'ications. | 174 | TRait list, computing values for all other traits. Add the new characterizer to | 21 7-218 |
| Keep a list of the PRIMitive PARTS in order to later insert this new characterizer in their COMPOUNDS lists. Keep the largest WoBble value of | 175 176-177 | MEMORY. Go to IN. *Begin routines to calculate the various trait values for the relatively addressed tuple in DESCR. HOROSPRED | 21 9-22 7 |
| any part of the compound ,stored as WBL. Keep the largest Piece size of any part of the compound stored as | 178-180 | calculates the maximum number of columns between the leftmost and rightmost parts of the tuple. VERTSPRED | 228-231 |
| PC. CG2 | 181-182 | calculates the maximum number of rows between the topmost and bottommost parts of the tuple. | |
| If there were less than 2 com- | GRIDEDGE | 232-242 | |
| ponents in FC, go to PRIMITIVE. CG3 Assemble the final DESCRiption with relative positions, noting the LASTPART. | 183-191 | calculates the number of parts in the tuple which lie on the edge of the input pattern. VAL is normalized over 1 0. PROXIM | 243-256 |
| Initialize TRait list for new com- pound characterizer. As semble the characterizer. CG5 | 192-193 194-196 | calculates the sum of absolute differences between corresponding digits in all possible pairs of | |
| Mark each component character izer as part of this compound characterizer. Go to G6. | tuple parts. COMPOUND returns 'YES' or 'NO', according to whether the tuple is a com | 257-259 | |
| PRIMITIVE Make a rearranged COPYTRAITS of CHTRAITS so as to cycle through traits used to influence | 197-199 | pound or primitive characterizer. Discussion paper briefly describes the | |
| primitive tuple generation. According to the value probabili ties in COPYTRAITS, choose the necessary values for characterizer | 200-202 | This various features of -our program. It then gives a de tailed flow-chart-like "precis" that refers b y number to the actual program statements being | |
described. The program itself is given in the Appendix. Thus the reader can examine exactly what has been done to implement any of the aspects of the program about which he is curi ous. This seems to us of crucial importance: if the program can be used to document itself there is no need for lengthy and usually mis leading descriptions and discussions.
The program listing is too long and complex to be followed with ease, even by someone who knows SNOBOL; but it should give an idea of what's going on to the casual observer, and those parts in which the reader is interested enough to make some effort should become un derstandable. SNOBOL is a very simple lan guage in its basic conception, for its programs are built up from sets of production and re placement statements (of the sort "Let A= B; Look for C on A and, if it's found, replace it by B), tied together by labels and gotos. A brief description of SNOBOL is given in the Appendix.
This program was written to exa·mine whether a wide variety of learning methods could be implemented together in a single pat tern recognition program. Using the language SNOBOL allowed us to code a relatively power ful, yet short, program. However, the program runs too slowly to make extensive tests of its abilities to learn and achieve interesting asymp totic performance levels. We therefore give only a brief listing of a short run, to indicate that the program works, and that it at least be gins to learn. The program will be recoded in a faster language if we decide to make more extensive tests.
Further developments might be to have the program try to learn good weights of character izer tuple parts and the thresholds required to imply a pattern name. We would also like it to generate new parameters with which to char acterize its characterizers (see Uhr, 1969b).
Summary
The program described in this paper at tempts to combine a very simple basic pattern recognition scheme with a wide variety of powerful learning mechanisms. The program at tempts 1) to generate its own n-tuple charac terizers as needed, and to adjust their weights as a function of feedback, 2) to decide what type of characterizer to generate, and 3) to learn what are good general characteristics of characterizers. It can further decide 4) whether and how to modify any particular characterizer that it is evaluating. These decisions are all made within the framework of a program that tries to recognize patterns with as small a set of characterizers that are as simple as possible.
It therefore starts out with no characteri:(;ers, and generates other characterizers which are as simple as it has been able to get away with and which fall within the range of what the program conjectures to be optimal values for the charac teristics of characterizers. In terms of charac terizer size, this means the program starts out generating !-tuples and then, to the extent that feedback indicates that it must improve upon its performance, 2-tuples, 3-tuples, and n+ !-tuples.
Acknowledgements
This research has been supported in part by NIH grant MH-12266 and NSF grant GP-7069.
@inproceedings{ijcai1969p37,
title = {The Learning of Parameters for Generating Compound Characterizers for Pattern Recognition},
author = {Uhr, Leonard and Jordan, Sara},
booktitle = {Proceedings of the First International Joint Conference on
Artificial Intelligence, {IJCAI-69}},
publisher = {International Joint Conferences on Artificial Intelligence},
editor = {Donald E. Walker and Lewis M. Norton},
pages = {381--416},
year = {1969},
month = {5},
note = {Self-organizing Systems},
url = {https://ijcai.org/proceedings/1969/37},
}
TY - CPAPER TI - The Learning of Parameters for Generating Compound Characterizers for Pattern Recognition AU - Uhr, Leonard AU - Jordan, Sara T2 - Proceedings of the First International Joint Conference on Artificial Intelligence, IJCAI-69 PB - International Joint Conferences on Artificial Intelligence PY - 1969 SP - 381 EP - 416 UR - https://ijcai.org/proceedings/1969/37 ER -Copied
Machine-readable versions of this paper, for tools and AI agents: