Your browser is not supported. Please update it.

19 October 2018

AI drives documents from burden to dollars, Dropbox takes note

AI promises to take the biggest step forward in document management since the advent of digitization and word processing around 40 years ago. It’s an area that is foundational to many business processes, if admittedly, not particularly exciting. As PCs became more ubiquitous, it became possible to make documents, such as user manuals, available online and keep them in step with product updates through iterative changes – rather than requiring complete rewrites.

Enhancements such as spellchecking and later predictive text came along to reduce costs and improve productivity, but still document production and management remained necessary costs for enterprises rather than benefits adding value. The quality of their content often reflected the view that they added little to a product or service, often being translated into target languages by non-native speakers with all too obvious results. The same applied to the related area of online help, even where call centers staffed by humans provided second line support.

However, that is changing in the current era of AI and machine learning with some benefits already evident. This is not coming as a revolution but more reviving progress in areas where it had stalled somewhat. Examples include spell checking and predictive text where machine learning can personalize the services more readily and quickly than was possible before so that a given app or productivity tool will adapt to its user or owner. More profoundly, conversational AI techniques are changing the help manual into a tool that can enrich the service and increase stickiness by leading users towards features or aspects they might not have considered.

One of the most advanced widespread deployments is the Ask Mercedes function, developed by Daimler with the help of IBM Watson for conversational technology. It allows vehicle owners to submit questions by smartphone and the system can follow up with dialogue for clarification if necessary. This allows a rudimentary conversation with the ability to lead the user on to new features. Via the IBM Cloud, this allows users to access via various channels including Facebook and other social media outlets, while the software is also being embedded in the vehicle itself.

Daimler points out that the system is aware of its limits and will defer to a call center rather than pursuing endless dialogue which would irritate the user. It is important that the chatbot should not be perceived as a buffer, deterring customers from contacting a human agent if they want. However, the system has added the ability for users to take pictures of items within the car or part of the dashboard on which they would like further information, using image recognition software to identify the components form the uploaded picture.

Recognition of text within existing documents is perhaps a more surprising area where there is an upsurge in activity around AI, given that OCR (Optical Character Recognition) systems have been around for several decades, with a history dating back over a century to the days of telegraphs.  It was in 1974 when Ray Kurzweil developed the first omni-font OCR capable of recognizing text in virtually any font.

But rather like early speech recognition systems this proved a false dawn in the sense that the algorithms would only work with high quality input in a given language. The challenge of recognizing text given any crumpled-up piece of paper that could be presented in any language is harder by an astronomical factor. Yet demand for such capabilities has grown with the proliferation of smartphones having in-built cameras and scanning software capable of capturing and uploading images of documents. This has led to interest from the big providers of office productivity systems such as Microsoft and Google, as well naturally as the more dedicated cloud storage firms like Dropbox, FreeDocs, pCloud and OneDrive, not forgetting Amazon.

Dropbox identified such advanced AI driven OCR as a potential differentiator and devoted a lot of resources to it at a time when its reputation was as a dependable but unexciting member of the pack, in danger of falling behind its much larger competitors as a mere $1 billion annual revenue company.

This led to a mobile document scanner which may furnish at least a temporary edge over competitors in the OCR area and is significant in that while most of the underlying techniques are well established, their application in combination is fairly new.

The company’s first mobile scanner merely output an image with text processed just as a set of pixels, like most other such scanning apps. But with OCR the system can now extract all the text from scanned documents and index it for subsequent searching. It can also create an overlay hidden to the user which enables text to be copied and pasted conveniently with a choice of formats from scans saved as PDFs.

But the greatest achievement lies in the robustness of the algorithms capable of extracting text accurately from poor quality documents comprising crinkles, curves, shadowing, blurring and uneven illumination, even in admittedly rare circumstances where the words are in multiple languages.

In the first instance Dropbox was able to exploit the industry wide advances in application of deep learning to image processing, replacing the much less flexible pipelined hand-coded software that had to assume images were of high quality from a flatbed scanner. This led to the first machine learning systems for OCR which were of the supervised variety so that they required manual labelling of input data in order for algorithms to learn and improve their predictions.

As the learning requires a huge amount of data exposure this is a big task often delegated to so called micro-work platforms like Amazon’s Mechanical Turk. This has various downsides including concerns over privacy during the labelling given that actual documents have to be used in practice. Therefore, Dropbox developed its own labelling platform called DropTurk.

But the biggest challenge lay in identifying words capable of being recognized before doing so and performing the whole task quickly enough.  The task was broken into two parts so that each could be optimized separately for speed and accuracy, firstly to segment a document into lines and words and secondly to convert those segmented images into text.

The first part performed by a system called Word Detector was more straightforward, so the greatest efforts was invested in the second called Word DeepNet. For the latter Dropbox integrated three different AI systems, a Convolutional Neural Net (CNN), Bidirectional LSTM (Long Short Term Memory) and a Connectionist Temporal Classification (CTC). None of these are unique in themselves with the CTC being the most recent development in 2006, but the way they were combined is more cutting edge.

Images of the cropped words produced by the Word Detector are first fed into the CNN which has several convolutional layers, as has become quite standard in image processing, with the hidden layers restricting internal communication to neighboring nodes in adjoining layers to enable scaling to large networks. They have become favored for image processing because they require relatively little pre-processing or prior knowledge of the application domain.

The CNN refines the cropped word images into clearer visual features then fed to the LSTM which is commonly used in speech recognition. Here starts the process of recognizing the words, for example by making guesses at the identify of letters that are otherwise illegible by knowing what the preceding and following letters are. The CTC is then applied to make the final output text prediction.

This CTC is the most advanced part of the system, still subject to research and development for perceptual application to any task involving labelling of sequence data coming from real-world sources containing a lot of “noise”. Such applications include gesture recognition as well as speech and handwriting.

This requires a system that does not need prior knowledge of the data and for this recurrent neural networks (RNNs) have been developed. These map connections between neural nodes to a directed graph that can follow a sequence and recur where necessary. This has the advantage of being able to cater for variations such as differences in the space occupied by a text character. This presents no problem to the human eye but has to be resolved in OCR, especially when recognizing handwriting.

The basic idea is to calculate the most likely word from a given input, even when there is a lot of noise and variations in the size and presentation of characters. This is ultimately an application of Bayes theorem like so many problems in AI, calculating the probability of all candidate inputs on the basis of the observed outcomes. In this context the input might be considered the output, being the content the document carries, in this case the words to be recognized. The output is then the image, the way the words appear on a given page. The algorithms are designed to apply Bayes most effectively to a given application or problem set, in this case OCR.

Dropbox says it will be introducing this OCR feature for its paying business customers early in 2019, which will work on the 20 billion or so images and PDF files stored on its service, including PDFs, JPEGs and PNGs.