How Does Image Analysis Work in Contract Management?

In this article, we will detail the main building blocks of DiliTrust’s artificial intelligence, in order to demystify and make more concrete the work of our Data Scientist team. It is aimed at a novice audience keen to gain a better understanding of certain artificial intelligence techniques.

In the contract analysis process developed by DiliTrust, everything often starts with image analysis. Indeed, most of the documents we process are scanned documents in which the text is not directly accessible. It is therefore necessary to go through an image analysis stage, the aim of which is to solve the following problems:

  • extract text from images (Optical Character Recognition or OCR),
  • extract important visual elements such as initials, signatures or stamps,
  • understand the reading order of the document, particularly necessary for multi-column documents.

Although these different tasks may seem substantially different, they actually call for similar analysis techniques.

Find out more about analysis techniques and their practical applications in contract management in this article.

How do you visually analyze a contract?

The image analysis techniques we use at DiliTrust are based on neural networks whose aim is to extract interesting representations, or features, which can then be used to solve a concrete problem.

To continue, let’s imagine that we want to know if our contract has been signed:

First of all, what is an image from the neural network’s point of view?
When we see a contract, the network sees a huge array of numbers, a matrix. Each cell of this matrix contains 3 values, corresponding to the intensity of the red, green and blue colors of each pixel in the image. This matrix contains several million cells.

This representation is not very suitable for deducing whether or not our contract contains a signature. For that, we need to analyze our image on a larger scale, to find areas of interest that group together several pixels. In other words, we need to make links between different parts of our image.

To do this, we use so-called convolutional neural networks. A convolution filter can be seen as a window that slides over the initial image, our large matrix, and performs mathematical operations on all the pixels contained within this window. In this way, the filter extracts information locally from the various pixels contained within the window.

These filters have always been used in image analysis, even before neural networks. In fact, they can be used to blur an image, detect contours or improve sharpness, simply by modifying the parameters that make up the filter. The example below shows the result of a convolution, which simply consists of taking the average of the pixels around a given position. It can be seen that, as the size of the neighborhood increases, the image becomes more blurred.

Recent advances in image analysis using convolutional neural networks come from the fact that convolution filters are now learned by the model during a training phase. The filters obtained are therefore, in theory, the most suitable for the task on which the model has been trained. Nevertheless, where we gain in performance, we lose in interpretability. Indeed, the filters learned in this way have an effect that is more difficult to interpret than those we were able to present.

Image analysis in contract management

OCR

OCR is the process of locating and extracting all the words and letters contained in an image. It’s an essential step when you want to extract and analyze the textual information contained in a contract. At DiliTrust, we use our OCR brick to :

  • Automatically index the content of your contracts to provide you with a powerful search engine,
  • Analyze and extract the content of your contracts to extract the most important elements, such as the parties to the contract, the expiry date, the notice period or certain clauses (force majeure, liability, etc.).

Analysis of document structure

A contract is not always just a succession of clauses, and its format can vary greatly from one company to another. There are many possible variations in the structure of contracts: multi-column, table, form… In order to offer the most robust analysis possible, we have developed our own document structure analysis brick for :

  • improve the analysis and extraction stages, which are particularly sensitive to text quality;
  • detect potential areas of interest (tables, headers, footers, etc.) and ignore them or, on the contrary, search for specific information.

Signature extraction

A contract only becomes valid once it has been signed, so this is often one of the first things DiliTrust customers seek to check. In addition to signatures, our AI is able to detect initials and handwritten elements of a contract to quickly identify possible erasures and corrections.

Would you like to talk to one of our experts?