# Good machine learning models for confusable categories

I'm using the word confusable to represent similar looking glyphs in text.

I'm building an optical character recognition tool with the primary goal of experimenting with machine learning – especially neural nets, which I already have some knowledge about. There is one issue that I just can't get my head around: Representing confusables.

As an example I (capital I) and l (small L) looks the same in sans-serif fonts. If you extend it to the complete Unicode range, there are a lot of glyphs that look more or less the same. If I'm using supervised learning naïvely, I'm afraid that the training algorithm won't be effective because of these confusables.

Maybe I need unsupervised learning. I could use pretraining on RBMs or stacked auto-encoders, but I'm not sure you can assume that all confusables are close in the output space. They might be. The task still remains to detect these areas and make a good representation.

I'm basically looking for a good model to cluster confusables, which I can use to create an improved supervised learning model. I expect to do some post-analyses on the output of the classifier in order to resolve each confusable to a real Unicode character.

I don't think the "confusables" problem is as big as you think it is. Supervized learning algorithms are designed to find the differences between classes, even if the classes have resembling symbols. For instance, the MNIST data, a standard optical recognition dataset used to test many techniques, contains handwritten digits, and to my knowledge none of the standard methods (random forests, boosting, SVM, MLP, deep networks...) require any specific pre-treatment because of the fact that handwritten "6" resemble "8". Or "1" and "7", for that matter.

You might get a problem if your classes are of uneven sizes : if you have much more "7" than "1" in your training data, the model might be tempted to class all 7s and 1s as "7" to reduce error. But that is a different question, not directly related to the problem you raised.

• I think the difference to MNIST is scaling up the number of classes. Unicode does have a lot of confusables. I was just googling and found this table of Unicode confusables. I could possibly use this list to create the categories for supervised learning. But maybe, as you suggest, it is not a big problem in the end. I will have to try it out. Regarding training data, I'm creating it automatically. I want to solve OCR of screen dumps, and it is possible to auto-generate a lot of training/validation data. Jul 23, 2014 at 19:01

This problem can be solved on the higher level - when you move from symbols to the words and pick not the all most probable symbols, but the most probable symbol combination based on vocabulary and context.

• I totally agree that it can be solved on a higher level. I want to get the best data for this level. As an example, my classifier could output: l (48%), I (47%), 1 (5%). And the higher level would have a better chance at getting it right. Jul 23, 2014 at 18:54