Название | PANN: A New Artificial Intelligence Technology. Tutorial |
---|---|
Автор произведения | Boris Zlotin |
Жанр | |
Серия | |
Издательство | |
Год выпуска | 0 |
isbn | 9785006423817 |
Comparison functions in PANN are implemented through mathematical operations on matrices of numeric arrays. Let’s consider the most straightforward comparison algorithm, which uses the vector product of image neuron matrices.
Two arrays are given for comparison in the form of matrices |X1| and |X2|.
|X1| × |X2|T is the vector product of the matrix |X1| on a transposed matrix |X2|. Moreover, the value of this product is proportional to the number of units in |X1| and |X2|.
|X1| × |X2|T = N only if |X1| = |X2|;
|X1| × |X2|T <N if |X1| ≠ |X2|;
|X1| × |X2|T = 0 if none of the pixels of these matrices match.
Consider the relationship:
Here, the CoS (Similarity Coefficient) between the numerical vectors X1 and X2 determines the degree of closeness of these vectors and the images described by these vectors.
Examples:
Fig. 7. Multiplying matrices to compare numerical arrays
Fig. 8. Comparison of decimal numerical arrays |A| and |B|
Classical neural networks only determine which class a recognizable object is most similar to. At the same time, they cannot specify how similar it is. Because of this, recognition is sometimes unstable – there are well-known examples where a change in a pixel in an image was enough to change its recognition. Thus, recognition in classical networks is highly dependent on random noise.
In PANN, the situation is different – the similarity coefficient value very clearly shows how significant the difference between the images is. A similarity difference of one hundredth in the format of 32 × 32 pixels corresponds to a change of about 10 pixels. And this is already enough to distinguish the images from each other confidently. The one-tenth difference indicates a profound difference and high recognition stability – low dependence of recognition on noise.
In contrast to classical neural networks, PANN networks allow you to improve the quality of recognition dramatically by:
• Statistical processing of recognition by classes and by images.
• Combining class-based recognition and image-based recognition. Moreover, combined recognition by classes and images allows us to solve one of the most unpleasant problems that limit the use of neural networks in medicine and many other applications – the problem of transparency and explainability of the network results. We will discuss this in l in the «4.6. Recognition on the PANN Network» section.
2.4.3. Assessment of the validity and accuracy of recognition
The validity and accuracy of image recognition by neural networks are essential for their use.
The accuracy and reliability of recognition of a classical neural network are determined by testing several dozens, hundreds, or thousands of images and counting the number of correct and incorrect recognitions. This test is very controversial. Due to the opacity of classical networks, recognition is highly dependent on random training features:
• Sometimes, training outcomes are poorly reproduced; the same network trained on the same images will recognize better in some cases than worse in others.
• There are no ways to assess each image’s accuracy and recognition reliability adequately.
• Impact of test image selection. Sometimes, they are selected specifically to ensure the desired result.
Recognition by PANN networks is evaluated by the numerical similarity coefficient of the image under consideration:
1. With any set of individual images loaded to the network.
2. With all classes that this network is trained in.
At the same time, both classes and individual images are ranked according to the degree of similarity, which allows for an accurate assessment of the magnitude of the differences between all the compared classes and, thereby, assessment of the accuracy and reliability of recognition.
Of course, formally correct recognition (from the point of view of a machine) is possible, but it is not satisfactory. People often recognize others not by their main features but by secondary ones. For example, we can evaluate similarity not by facial features but depending on clothes. It happens that when recognizing human faces, the features of the lighting are more significant than the facial features.
Problems of this kind can be solved in PANN in several ways, in particular:
1. Equalization of illumination by known graphical or mathematical means.
2. Introduction of a system for assessing the weight of features and filtering some features.
3. Create a set of intersecting classes, as shown below.
4. Create a «recognition committee» – a logical expert system that concludes based on the sum of recognitions for different classes and images. Thus, it reproduces what a person does by looking closely at the object.
2.4.4. Indexing Number Sequences in BCF
Indexing for quick retrieval of information.
Today, search indexing is widely used in computer science. Index files make it easier to find information and are ten times smaller than the original files. However, indexing is more difficult for different types of files (for example, graphics), and search does not always work adequately. PANN allows for a more organized and standardized approach to indexing and searching.
Using Progress Binary Comparison Format (BCF), you can build standard and universal search indices, i.e., identifiers for any numerical sequence as linear convolutions of a digital array. These indices are a sequence of matrix sums with matching row and column numbers obtained by vector multiplying a given digital array by its transposition. And they can be much smaller in volume than with conventional indexing.
At the same time, the index search process takes place in parallel, which ensures that it is accelerated many times. For example, an image is described as a matrix |X| with a number of pixels n = 1024 and a number of weight levels k = 10.
Let us define the vector product of the matrix |X| on its transposition |X|T as index I. I = |X| × |X|T = |Σ| = Σ00, Σ11, Σ22, Σ33, Σ44, … Σ99:
Fig. 9. Formation of search images
The length of the resulting index is equal to the number of weight levels and does not depend on the number of pixels in the images. Thus, if you set the standard number of weights to 10 (which is convenient because it corresponds to the accepted decimal system), these indices will be standard for all libraries, allowing them to be used universally.
Each image in the recognition libraries must be provided with an index. The recognition of each new image should begin with forming its index, allowing for quick recognition against the prepared libraries.
For