This patent document relates generally to the field of machine learning. More particularly, the present document relates to artificial intelligence devices for keywords detection.
Machine learning is an application of artificial intelligence. In machine learning, a computer or computing device is programmed to think like human beings so that the computer may be taught to learn on its own. The development of neural networks has been key to teaching computers to think and understand the world in the way human beings do.
In recent years of social media, keywords have been an important factor in online marketing for a number of years. Anyone with a website will be familiar with Search Engine Optimization (SEO), of which keywords play a large part. But keywords—the words and phrases people are using to search for something—are also a key part of social media. Selecting the correct keywords for a business is all about doing some groundwork, but as they are so crucial in a crowded market place, with everyone vying for people's attention, it will be time well spent. Therefore, there is a need to detect keywords efficiently and effectively from vast amount of data in today's digital environment.
This section is for the purpose of summarizing some aspects of the invention and to briefly introduce some preferred embodiments. Simplifications or omissions in this section as well as in the abstract and the title herein may be made to avoid obscuring the purpose of the section. Such simplifications or omissions are not intended to limit the scope of the invention.
Artificial intelligence devices for keywords detection and methods implemented in a computer system for enabling an artificial intelligence device for keywords detection are disclosed. According one aspect of the disclosure, a list of keywords in a category of interest is defined and received by a user in a computer system. A first set of general texts unrelated to the category of interest is obtained. Each sample or record of the first set is expanded to include all possible short samples. A second set of texts is created by inserting or replacing a randomly selected item from the list of keywords into each of the first set of texts at a randomly chosen location within each of the first set. A third set of texts is created by inserting or replacing a randomly selected item from the list of to-be-excluded into each of the first set of texts at a randomly chosen location within each of the first set. A first group of 2-D symbols are formed to graphically represent the second set while the second group of 2-D symbols are formed to graphically represent the third set. The first group is associated with the category of interest while the second group is associated with the category of uninterested. Keyword detection training dataset is created by combining first and second groups of 2-D symbols.
Filter coefficients of ordered convolutional layers in a deep learning model are trained using the keyword detection training dataset with an image classification technique. Trained filter coefficients are loaded into an artificial intelligence device for detecting one of the list of keywords in an input text string.
According to yet another aspect, an artificial intelligence device contains a bus, an input interface operatively connecting to the bus for receiving an input string of texts, a processing unit operatively connecting to the bus for forming a two-dimensional (2-D) symbol using a 2-D symbol creation application module installed thereon, the 2-D symbol being a matrix of N×N pixels of data for containing the input string of texts, and a Cellular Neural Networks or Cellular Nonlinear Networks (CNN) based integrated circuit loaded with a deep learning model for detecting whether the input string of texts contains one of the list of keywords, filter coefficients of a plurality of ordered convolutional layers in the deep learning model being trained using a keyword detection training dataset with an image classification technique. N is positive integer (e.g., 224).
Objects, features, and advantages of the invention will become apparent upon examining the following detailed description of an embodiment thereof, taken in conjunction with the attached drawings.
These and other features, aspects, and advantages of the invention will be better understood with regard to the following description, appended claims, and accompanying drawings as follows:
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the invention. However, it will become obvious to those skilled in the art that the invention may be practiced without these specific details. The descriptions and representations herein are the common means used by those experienced or skilled in the art to most effectively convey the substance of their work to others skilled in the art. In other instances, well-known methods, procedures, and components have not been described in detail to avoid unnecessarily obscuring aspects of the invention.
Reference herein to “one embodiment” or “an embodiment” means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the invention. The appearances of the phrase “in one embodiment” in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Used herein, the terms “vertical”, “horizontal”, “diagonal”, “left”, “right”, “top”, “bottom”, “column”, “row”, “diagonally” are intended to provide relative positions for the purposes of description, and are not intended to designate an absolute frame of reference. Additionally, used herein, term “character” and “script” are used interchangeably.
Embodiments of the invention are discussed herein with reference to
Referring first to
In 2-D symbol 340a, keyword “Best food” is inserted after the word “sciences”. In 2-D symbol 340b, keyword “near me Restaurant” is inserted after the word “Bulletin”. Although insertion is shown to demonstrate the modification, randomly selected keyword can replace the existing word or words to achieve the same. The goal is to modify the first set of general texts with one item from the list keywords. Each of the 2-D symbols 340a-340b is included in the keyword detection training dataset.
When the list of to-be-excluded items contains nothing, the third set of texts is the same as the first set of general texts because there is no item to be inserted/replaced.
With two categories set up in the keyword detection training dataset, a binary classification technique based on the two sets of 2-D symbols is used for training a deep learning model for keywords detection.
Referring now to
The CNN based computing system 400 may be implemented on integrated circuits as a digital semi-conductor chip (e.g., a silicon substrate in a single semi-conductor wafer) and contains a controller 410, and a plurality of CNN processing units 402a-402b operatively coupled to at least one input/output (I/O) data bus 420. Controller 410 is configured to control various operations of the CNN processing units 402a-402b, which are connected in a loop with a clock-skew circuit (e.g., clock-skew circuit 1540 in
In one embodiment, each of the CNN processing units 402a-402b is configured for processing imagery data, for example, two-dimensional symbol 100 of
In another embodiment, the CNN based computing system is a digital integrated circuit that can be extendable and scalable. For example, multiple copies of the digital integrated circuit may be implemented on a single semi-conductor chip as shown in
All of the CNN processing engines are identical. For illustration simplicity, only few (i.e., CNN processing engines 422a-422h, 432a-432h) are shown in
Each CNN processing engine 422a-422h, 432a-432h contains a CNN processing block 424, a first set of memory buffers 426 and a second set of memory buffers 428. The first set of memory buffers 426 is configured for receiving imagery data and for supplying the already received imagery data to the CNN processing block 424. The second set of memory buffers 428 is configured for storing filter coefficients and for supplying the already received filter coefficients to the CNN processing block 424. In general, the number of CNN processing engines on a chip is 2n, where n is an integer (i.e., 0, 1, 2, 3, . . . ). As shown in
The first and the second I/O data bus 430a-430b are shown here to connect the CNN processing engines 422a-422h, 432a-432h in a sequential scheme. In another embodiment, the at least one I/O data bus may have different connection scheme to the CNN processing engines to accomplish the same purpose of parallel data input and output for improving performance.
Referring now to
Next in action 514, a first set of texts is expanded to include all possible shorter samples. When each sample of the first set of general texts contains L number of words, the sample becomes L samples. L is a positive integer and varies from sample to sample.
At action 524, a second group of 2-D symbols is formed to graphically represent each of the third set of texts. Each of the second group of 2-D symbols is associated with the category of uninterested (e.g., “Not Food”). Next at action 526, the first group of corresponding 2-D symbols of the second set of the texts and the second group of corresponding 2-D symbols of the third set of the texts are combined to create a keyword detection training dataset.
Then, at action 528, filter coefficients in a deep learning model are trained using the keyword detection training dataset with an image classification technique (e.g., binary classification). Finally, at action 532, the deep learning model in form of trained filter coefficients is loaded into the artificial intelligence device for detecting one of the listed keywords in an input string of texts. Two example artificial intelligence devices are shown in
Input string of texts 610 is received in a first computer system 620 and converted to a graphical image in a multi-layer 2-D symbol 632 with the 2-D symbol creation application module 622. Each two-dimensional symbol 631a-631c is a matrix of N×N pixels of data (e.g., three different color, Red, Green, and Blue).
The multi-layer two-dimensional symbol 631a-631c is classified in a second computing system 640 by using an image processing technique 638.
Transmitting the multi-layer 2-D symbol 631a-631c can be performed with many well-known manners, for example, through a network either wired or wireless.
In one embodiment, the first computing system 620 and the second computing system 640 are the same computing system (not shown).
In yet another embodiment, the first computing system 620 is a general-purpose computing system while the second computing system 640 is a CNN based computing system 400 implemented as integrated circuits on a semi-conductor chip shown in
The image processing technique 638 includes predefining a set of categories 642 such as “Category-1” and “Category-2” for a binary image classification system shown in
Based on convolutional neural networks, a multi-layer two-dimensional symbol 711a-711c as input imagery data is processed with convolutions using a first set of filters or weights 720. Since the imagery data of the 2-D symbol 711a-711c is larger than the filters 720. Each corresponding overlapped sub-region 715 of the imagery data is processed. After the convolutional results are obtained, activation may be conducted before a first pooling operation 730. In one embodiment, activation is achieved with rectification performed in a rectified linear unit (ReLU). As a result of the first pooling operation 730, the imagery data is reduced to a reduced set of imagery data 731a-731c. For 2×2 pooling, the reduced set of imagery data is reduced by a factor of 4 from the previous set.
The previous convolution-to-pooling procedure is repeated. The reduced set of imagery data 731a-731c is then processed with convolutions using a second set of filters 740. Similarly, each overlapped sub-region 735 is processed. Another activation can be conducted before a second pooling operation 740. The convolution-to-pooling procedures are repeated for several layers and finally connected to a Fully-connected (FC) Layers 760. In image classification, respective probabilities 644 of predefined categories 642 can be computed in FC Layers 760.
This repeated convolution-to-pooling procedure is trained using a known dataset or database. For image classification, the dataset contains the predefined categories. A particular set of filters, activation and pooling can be tuned and obtained before use for classifying an imagery data, for example, a specific combination of filter types, number of filters, order of filters, pooling types, and/or when to perform activation. In one embodiment, the imagery data is the multi-layer two-dimensional symbol 711a-711c, which is form from a string of Latin-alphabet based language texts.
In one embodiment, convolutional neural networks are based on a Visual Geometry Group (VGG16) architecture neural nets.
More details of a CNN processing engine 802 in a CNN based integrated circuit are shown in
In order to achieve faster computations, few computational performance improvement techniques have been used and implemented in the CNN processing block 804. In one embodiment, representation of imagery data uses as few bits as practical (e.g., 5-bit representation). In another embodiment, each filter coefficient is represented as an integer with a radix point. Similarly, the integer representing the filter coefficient uses as few bits as practical (e.g., 12-bit representation). As a result, 3×3 convolutions can then be performed using fixed-point arithmetic for faster computations.
Each 3×3 convolution produces one convolution operations result, Out(m, n), based on the following formula:
where:
C(i, j) represents one of the nine weight coefficients C(3×3), each corresponds to one of the 3-pixel by 3-pixel area;
Each CNN processing block 804 produces Z×Z convolution operations results simultaneously and, all CNN processing engines perform simultaneous operations. In one embodiment, the 3×3 weight or filter coefficients are each 12-bit while the offset or bias coefficient is 16-bit or 18-bit.
To perform 3×3 convolutions at each sampling location, an example data arrangement is shown in
Imagery data are stored in a first set of memory buffers 806, while filter coefficients are stored in a second set of memory buffers 808. Both imagery data and filter coefficients are fed to the CNN block 804 at each clock of the digital integrated circuit. Filter coefficients (i.e., C(3×3) and b) are fed into the CNN processing block 804 directly from the second set of memory buffers 808. However, imagery data are fed into the CNN processing block 804 via a multiplexer MUX 805 from the first set of memory buffers 806. Multiplexer 805 selects imagery data from the first set of memory buffers based on a clock signal (e.g., pulse 812).
Otherwise, multiplexer MUX 805 selects imagery data from a first neighbor CNN processing engine (from the left side of
At the same time, a copy of the imagery data fed into the CNN processing block 804 is sent to a second neighbor CNN processing engine (to the right side of
After 3×3 convolutions for each group of imagery data are performed for predefined number of filter coefficients, convolution operations results Out(m, n) are sent to the first set of memory buffers via another multiplex MUX 807 based on another clock signal (e.g., pulse 811). An example clock cycle 810 is drawn for demonstrating the time relationship between pulse 811 and pulse 812. As shown pulse 811 is one clock before pulse 812, as a result, the 3×3 convolution operations results are stored into the first set of memory buffers after a particular block of imagery data has been processed by all CNN processing engines through the clock-skew circuit 820.
After the convolution operations result Out(m, n) is obtained from Formula (1), activation procedure may be performed. Any convolution operations result, Out(m, n), less than zero (i.e., negative value) is set to zero. In other words, only positive value of output results are kept. For example, positive output value 10.5 retains as 10.5 while −2.3 becomes 0. Activation causes non-linearity in the CNN based integrated circuits.
If a 2×2 pooling operation is required, the Z×Z output results are reduced to (Z/2)×(Z/2). In order to store the (Z/2)×(Z/2) output results in corresponding locations in the first set of memory buffers, additional bookkeeping techniques are required to track proper memory addresses such that four (Z/2)×(Z/2) output results can be processed in one CNN processing engine.
To demonstrate a 2×2 pooling operation,
An input image generally contains a large amount of imagery data. In order to perform image processing operations, an example input image 1400 (e.g., a two-dimensional symbol 100 of
Although the invention does not require specific characteristic dimension of an input image, the input image may be required to resize to fit into a predefined characteristic dimension for certain image processing procedures. In an embodiment, a square shape with (2L×Z)-pixel by (2L×Z)-pixel is required. L is a positive integer (e.g., 1, 2, 3, 4, etc.). When Z equals 14 and L equals 4, the characteristic dimension is 224. In another embodiment, the input image is a rectangular shape with dimensions of (2I×Z)-pixel and (2J×Z)-pixel, where I and J are positive integers.
In order to properly perform 3×3 convolutions at pixel locations around the border of a Z-pixel by Z-pixel block, additional imagery data from neighboring blocks are required.
When more than one CNN processing engine is configured on the integrated circuit. The CNN processing engine is connected to first and second neighbor CNN processing engines via a clock-skew circuit. For illustration simplicity, only CNN processing block and memory buffers for imagery data are shown. An example clock-skew circuit 1540 for a group of example CNN processing engines are shown in
CNN processing engines connected via the second example clock-skew circuit 1540 to form a loop. In other words, each CNN processing engine sends its own imagery data to a first neighbor and, at the same time, receives a second neighbor's imagery data. Clock-skew circuit 1540 can be achieved with well-known manners. For example, each CNN processing engine is connected with a D flip-flop 1542.
The first example artificial intelligence device for keywords detection 1600 is an embedded system using CNN based integrated circuit 1602 for computations of convolutional layers using pre-trained filter coefficients stored therein. Memory 1604 is configured for storing at least the received input string of texts. The processing unit 1612 controls input interface 1616 to receive input string of texts. Processing unit 1612 then forms a two-dimensional (2-D) symbol in accordance with a set of 2-D symbol creation rules using a 2-D symbol creation application module installed thereon.
The 2-D symbol is an imagery data that can be classified using a CNN based integrated circuit loaded with a deep learning model. The deep learning model contained at least multiple ordered convolutional layers, fully-connected layers, pooling operations and activation operations. Display device 1618 displays the input string of texts and later the determined category.
Dongle 1701 contains a CNN based integrated circuit 1702 and a DRAM (Dynamic Random Access Memory) 1704. Host 1720 contains a processing unit 1722, memory 1724, input interface 1726 and display screen 1728. In one embodiment, when the host 1720 is a mobile phone, the input means 1726 can be through the display screen 1728 as touch screen input.
Although the invention has been described with reference to specific embodiments thereof, these embodiments are merely illustrative, and not restrictive of, the invention. Various modifications or changes to the specifically disclosed example embodiments will be suggested to persons skilled in the art. For example, whereas the two-dimensional symbol has been described and shown with a specific example of a matrix of 224×224 pixels, other sizes may be used for achieving substantially similar objectives of the invention, for example, 896×896. Additionally, whereas each 2-D symbol has been shown and described to contain 64 words, other number of words may be used for achieving the same, for example, 16, 256, or other number of words. Furthermore, whereas the example samples have been shown and described with two to three samples/records, in reality, multiple thousands or millions samples/records are required to properly train the deep learning model. Finally, whereas the length of the example sample has been shown and described with limited number of words for illustration clarity and simplicity, in reality, most of the samples may contain larger number of words to form a 2-D symbol (e.g., 64 words). In summary, the scope of the invention should not be restricted to the specific example embodiments disclosed herein, and all modifications that are readily suggested to those of ordinary skill in the art should be included within the spirit and purview of this application and scope of the appended claims.
This application claims benefits of a U.S. Provisional Patent Application Ser. No. 62/789,447 for “Artificial Intelligence Devices For Keywords Detection”, filed Jan. 7, 2019. The contents of which are hereby incorporated by reference in its entirety for all purposes.
Number | Date | Country | |
---|---|---|---|
62789447 | Jan 2019 | US |