What are bag-of-features in computer vision? In computer vision, what are bag-of-features (also known as bag-of-visual-words)? How do they work? What can they be used for? How are they related to the bag-of-words model in NLP?

Introduction

Bag-of-features (BoF) (also known as bag-of-visual-words) is a method to represent the features of images (i.e. a feature extraction/generation/representation algorithm). BoF is inspired by the bag-of-words model often used in the context of NLP, hence the name. In the context of computer vision, BoF can be used for different purposes, such as content-based image retrieval (CBIR), i.e. find an image in a database that is closest to a query image.

Steps

The BoF can be divided into three different steps. To understand all the steps, consider a training dataset $D = \{x_1, \dots, x_N \}$ of $N$ training images. Then BoF proceeds as follows.

1. Feature extraction

In this first step, we extract all the raw features (i.e. keypoints and descriptors) from all images in the training dataset $D$. This can be done with SIFT, where each descriptor is a $128$-dimensional vector that represents the neighborhood of the pixels around a certain keypoint (e.g. a pixel that represents a corner of an object in the image).

If you are not familiar with this extraction of computer vision (sometimes known as handcrafted) features, you should read the SIFT paper, which describes a feature (more precisely, keypoint and descriptor) extraction algorithm.

Note that image $x_i \in D$ may contain a different number of features (keypoints and descriptors) than image $x_j \neq x_i \in D$. As we will see in the third step, BoF produces a feature vector of size $k$ for all images, so all images will be represented by a fixed-size vector.

Let $F= \{f_1, \dots, f_M\}$ be the set of descriptors extracted from all training images in $D$, where $M \gg N$. So, $f_i$ may be a descriptor that belongs to any of the training examples (it does not matter which training image it belongs to).

2. Codebook generation

In this step, we cluster all descriptors $F= \{f_1, \dots, f_M\}$ into $k$ clusters using k-means (or another clustering algorithm). This is sometimes known as the vector quantization (VQ) step. In fact,  the idea behind VQ is very similar to clustering and sometimes VQ is used interchangeably with clustering.

So, after this step, we will have $k$ clusters, each of them associated with a centroid $C = \{ c_1, \dots, c_k\}$, where $C$ is the set of centroids (and $c_i \in \mathbb{R}^{128}$ in the case that SIFT descriptors have been used). These centroids represent the main features that are present in the whole training dataset $D$. In this context, they are often known as the codewords (which derives from the vector quantization literature) or visual words (hence the name bag-of-visual-words). The set of codewords $C$ is often called codebook or, equivalently, the visual vocabulary.

3. Feature vector generation

In this last step, given a new (test) image $u \not\in D$ (often called the query image in this context of CBIR), then we will represent $u$ as a $k$-dimensional vector (where $k$, if you remember, is the number of codewords) that will represent its feature vector. To do that, we need to follow the following steps.

Extract the raw features from $u$ with e.g. SIFT (as we did for the training images). Let the descriptors of $u$ be $U = \{ u_1, \dots, u_{|U|} \}$.
Create a vector $I \in \mathbb{R}^k$ of size $k$ filled with zeros, where the $i$th element of $I$ corresponds to the $i$th codeword (or cluster).
For each $u_i \in U$, find the closest codeword (or centroid) in $C$. Once you found it, increment the value at the $j$th position of $I$ (i.e., initially, from zero to one), where $j$ is the found closest codeword to the descriptor $u_i$ of the query image.

The distance between $u_i$ and any of the codewords can be computed e.g. with the Euclidean distance. Note that the descriptors of $u$ and the codewords have the same dimension because they have been computed with the same feature descriptor (e.g. SIFT).

At the end of this process, we will have a vector $I \in \mathbb{R}^k$ that represents the frequency of the codewords in the query image $u$ (akin to the term frequency in the context of the bag-of-words model), i.e. $u$'s feature vector. Equivalently, $I$ can also be viewed as a histogram of features of the query image $u$. Here's an illustrative example of such a histogram.

From this diagram, we can see that there are $11$ codewords (of course, this is an unrealistic scenario!). On the y-axis, we have the frequency of each of the codewords in a given image. We can see that the $7$th codeword is the most frequent in this particular query image.

Alternatively, rather than the codeword frequency, we can use the tf-idf. In that case, each image will be represented not by a vector that contains the frequency of the codewords but it will contain the frequency of the codewords weighted by their presence in other images. See this paper for more details (where they show how to calculate tf-idf in this context; specifically, section 4.1, p. 8 of the paper).

Conclusion

To conclude, BoF is a method to represent features of an image, which could then be used to train classifiers or generative models to solve different computer vision tasks (such as CBIR). More precisely, if you want to perform CBIR, you could compare your query's feature vector with the feature vector of every image in the database, e.g. using the cosine similarity.

The first two steps above are concerned with the creation of a visual vocabulary (or codebook), which is then used to create the feature vector of a new test (or query) image.

A side note

As a side note, the term bag is used because the (relative) order of the features in the image is lost during this feature extraction process, and this can actually be a disadvantage.

Further reading

For more info, I suggest that you read the following papers

Video Google: A Text Retrieval Approach to Object Matching in Videos (2003) by Sivic and Zisserman
A Bayesian Hierarchical Model for Learning Natural Scene Categories (2005) by Fei-Fei and Perona
Introduction to the Bag of Features Paradigm for Image Classification and Retrieval (2011) by O'Hara and Draper
Bag-of-Words Representation in Image Annotation: A Review (2012) by Tsai


Keywords to describe people counting from a camera? The subject matter is to count the number of people in a large room, wherein a camera is placed in a very high ceiling: an example would be Grand Central Station.   Faces are not visible: the scalp (top of the head) is visible to the camera as shown in the link's video.

The goal: I would like to perform a Google literature search to assess the work that has been performed on overhead head recognition,  however, I am not sure what the best  keyword pairs: (scalp? head? people?) to describe the object that is to be recognized from a camera positioned in the ceiling (overhead? bird's eye? satellite?).  I'd like the search to return leading-edge (AI) techniques that benchmark results

I usually start with some papers and look at the references:

Counting people using video cameras
Sheng-Fuu Lin, Jaw-Yeh Chen, Hung-Xin Chao, Estimation of Number of People in Crowded Scenes Using Perspective Transformation,  IEEE Transactions on Systems, Man and Cybernetics, November 2001, Part A, Vol. 31, Issue 6, pp. 645-654.
A.  C.  Davies,  J.  H.  Yin,  and S.  A.  Velastin,  Crowd monitoring using image processing,  Electronics  & Communication Engineering Journal, February  1995, Vol. 7, Issue 1, pp. 37-47.

By this technique you only find older work.

To find more recent articles, use Google scholar and find who cites the articles you investigated.

Always write them down (e.g. in your bibtex file) to keep track of what you looked at already.

Good luck!


Why is tree search/planning used in reinforcement learning? In AlphaGo Zero, MCTS is used along with policy networks. Some sources say MCTS (or planning in general) increases the sample efficiency.
Assumed the transition model is known and the computational cost of interacting through planning is the same as interacting with the environment, I do not see the difference between playing many games versus playing a single game, but plan at each step.
Furthermore, given a problem with a known transition model, how do we know combining learning and tree search will likely be better than pure learning?

Some sources say MCTS (or planning in general) increases the sample efficiency.

If we're thinking purely about experiments run in simulations, then I'd estimate there may be cases where a combination of pure learning + MCTS (or some other form of planning / model-based aspect) may be more efficient, and there may be different cases where only a single one of those techniques on its own may perform better. So then I wouldn't say this is always necessarily true.
Often though, when saying "sample efficiency", we would only count the steps actually taken in a "real" environment, but maybe not count steps taken in a lookahead search or planning algorithm. In pure simulations this may seem like a weird distinction to make, but it's more sensible when you consider that we often use simulations just because they're convenient ways to evaluate and compare new algorithms, but often not the end goal. Often, the end goal would be to apply something in the "real world", for example on a robot or something. In such a situation, collecting pure learning experiences can be very expensive (time-consuming, maybe also risky because the robot may fall over and break, etc.). But you may be able to also provide that robot with a learned model, or simulator, and have the robot use that to also run its own search or planning algorithms on an approximated version of the real world. This is a clear case where performing such is much faster and cheaper and less risky than collecting true experiences in the real world for pure RL.

Assumed the transition model is known and the computational cost of interacting through planning is the same as interacting with the environment, I do not see the difference between playing many games versus playing a single game, but plan at each step.

Jumping back to the case where we actually are working purely in simulation, and where there's no difference in computational cost between steps taken for pure learning vs. steps taken in search/planning, there absolutely are still some differences. If you run search, you use extra time and have temporary extra memory usage (which frees up again after completing your search algorithm) to make one really good decision in the "main" environment. You could view the steps taken in MCTS simulations as a form of learning as well, but they have a different purpose from the steps taken in a pure RL setting; these steps are taken with the sole goal of learning how to act well in the root state. All search time and memory usage is dedicated to that single decision. This can enable smarter decision-making than if you're going purely off of what you learned through pure RL, due to 1) focusing more effort on just a single decision, and 2) not being constrained by the capacity of your learning algorithm to actually learn a good decision (simple function approximators may simply not be capable of accurately representing strong policies, and more complex function approximators will take a huge amount of time to learn). This smarter decision-making thanks to search can in turn also improve the quality of the experience used by your pure RL component.

Finally, since you started out by mentioning AlphaGo Zero, I'd like to emphasise that AlphaGo Zero and similar approaches are typically used in multi-agent adversarial domains (like zero-sum games). Pure RL approaches for such multi-agent settings do exist, but there has been significantly less research towards them than pure RL approaches for single-agent settings. Most of these pure RL approaches are really only applicable to single-agent settings, and can easily have poor performance when applied to these kinds of multi-agent settings. Search algorithms like MCTS on the other hand are very well-established techniques in these adversarial domains like games, and the combination of them with learning approaches appears to allow even for learning approaches to be used which are not explicitly "aware" of the fact that they're operating in such a multi-agent domain.


Can some one help me understand this paragraph from Nvidia's progressive gan paper? Furthermore, we observe that mode collapses traditionally
plaguing GANs tend to happen very quickly, over the course of a dozen minibatches. Commonly
they start when the discriminator overshoots, leading to exaggerated gradients, and an unhealthy
competition follows where the signal magnitudes escalate in both networks. We propose a mechanism
to stop the generator from participating in such escalation, overcoming the issue (Section 4.2).

What do they mean when the discriminator overshoots? The discriminator gets good too quickly? And signal magnitudes escalate in both networks?
My current intuition is that the discriminator gets too good too soon, which causes the generator to spike and try to play catch up. That would be the unhealthy competition that they are talking about. Model collapse is the side effect where the generator has trouble playing catch up, and decides to play it safe by generating slightly varied images to increase its accuracy. Is this way of interpreting the above paragraph correct?

A discriminator overshooting may result in a dataset that has not been thoroughly clean and probably has too many identical feature, as a result there will be an early convergence from the discriminator as there is little variation.
The drawback from this is that the model will not bee able to generalize well.


How do LSTMs work if the following two matrices are not able to be multiplied? In the above diagram, the shape of some of the matrices can be seen in the yellow highlight. For instance:
The hidden state at timestep t-1 ($h_{t-1}$) has shape $(na, m)$
The input data at timestep t ($x_{t}$) has shape $(nx, m)$
$Z_{t}$ has shape $(na+nx, m)$ since the hidden state and input data are concatenated in LSTMs.
$W_{c}$ has shape $(na, na+nx)$
$W_{c}$ • $Z_{t}$ has shape $(na, m)$ = $i_{t}$
$W_{i}$ • $Z_{t}$ has shape $(na, m)$ = $ĉ_{t}$
When working through the network to the point $i_{t}$ and $ĉ_{t}$, how can these two be dot producted when the multiplication is not of the form (m x n)(n x p) as per the matrix multiplication definition?:

Turns out the reason is because, for places where a dot is shown in the image above, they're actually element-wise multiplications, not dot products. A lot of sources use an X or . to denote multiplication, but don't clearly indicate they mean element-wise multiplication.


Use AI or Neural Network for logo detection I am trying to detect a TV channel logo inside a video file, so simply given an input .mp4 video, detect if it has that logo present in a specific frame, say first frame, or not.

We have that logo in advance (although might not be the %100 same size) and the location is always fixed.

I already have a pattern matching-based approach. But that requires the pattern be %100 same size. I would like to use Deep Learning and Neural Network to achieve that. How can I do that? I believe CNN can have a higher efficiency?

To perform image recognition you have to find a way to represent an image with certain features.

One of the defining characteristics of a good image recognition algorithm are it's ability to detect salient regions, that is, regions which contain the most information

There is a lot of attention on deep learning for content-based image classification at the moment. You can achieve decent results by implementing deep learning having three or more layers of CNN's where each layer is responsible for extracting one or more feature of the image.


What is the best AI or Machine Learning SaaS application? I'm working on a system which reads large data from Excel and tries to interpret something from it. If it doesn't understand something, the user will correct it and slowly system will learn and try to do everything itself. Is there any AI SaaS or anything that can help in this?

The use case is, I'm reading bank statements from different banks and they all have different types of narration for similar transactions. I want to put them all into an accounting software without any human intervention.

From my understanding you are referring to two different but related innovative workplace systems. These are Automated Data Capture and Entry and Document Automation.

Businesses generate massive amounts of documents such as receipts, invoices, contracts, memo's, minutes, reports e.t.c. The information from the above documents is then to be entered into different software i.e. Accounting, Payroll, Excell and the web portal. Without a doubt data entry and document management can be a time consuming and tedious task in many modern offices.

Automated Data Entry and Document Automation can help reduce the amount of time that employees spend on data entry and managing documents. This improves the speed and accuracy of work at the workplace.

The above systems work by combining OCR technology with AI. When a document is scanned, it is initially just an image file because computers cannot distinguish text characters from the background image. With OCR software you can extract text from a document. As a result the document becomes searchable and easier to work with. Document automation software can then enter the information into a spreadsheet or other software automatically.

Some players in this field include Softworks (Automated Data Entry), Xtracta (Automated Data Entry and Document Automation) and Dynamic AI. Intuit also has a paperless productivity bundle that includes equipment such as the ScanSnap scanner (Automated Data Capture) and Intuit Hubdoc (Document Automation).


Which learning algorithms are suitable for data leakage detection and prevention? I'm investigating applications of AI algorithms which can be used for data leakage detection and prevention within an intranet network (like Forcepoint). More specifically detecting traffic patterns. I'm new to this.

Which learning algorithms are most suitable for this goal? EA, GA, ANN (which one) or something else?

This seems to fall broadly into the regime of a classification problem as you want to classify an outgoing communication as "contains proprietary information" or "does not contain proprietary information".  As such, any classification approach could be applied.  Neural Networks certainly seem like a valid approach, but you might also get good mileage out of Random Forests, Support Vector Machines, a Naive Bayes classifier, etc.

GA's are more aimed towards optimization than classification, so I wouldn't say that a GA, in and of itself, would map cleanly to solving this kind of problem. If GA's had applicability here, I think it would be more likely to be in terms of training a model rooted in one of the other techniques.


How to calculate the number of parameters of a convolutional layer? I was recently asked at an interview to calculate the number of parameters for a convolutional layer. I am deeply ashamed to admit I didn't know how to do that, even though I've been working and using CNN for years now.

Given a convolutional layer with ten $3 \times 3$ filters and an input of shape $24 \times 24 \times 3$, what is the total number of parameters of this convolutional layer?

What are the parameters in a convolutional layer?

The (learnable) parameters of a convolutional layer are the elements of the kernels (or filters) and biases (if you decide to have them). There are 1d, 2d and 3d convolutions. The most common are 2d convolutions, which are the ones people usually refer to, so I will mainly focus on this case.

2d convolutions

Example

If the 2d convolutional layer has $10$ filters of $3 \times 3$ shape and the input to the convolutional layer is $24 \times 24 \times 3$, then this actually means that the filters will have shape $3 \times 3 \times 3$, i.e. each filter will have the 3rd dimension that is equal to the 3rd dimension of the input. So, the 3rd dimension of the kernel is not given because it can be determined from the 3rd dimension of the input.

2d convolutions are performed along only 2 axes (x and y), hence the name. Here's a picture of a typical 2d convolutional layer where the depth of the kernel (in orange) is equal to the depth of the input volume (in cyan).

Each kernel can optionally have an associated scalar bias.

At this point, you should already be able to calculate the number of parameters of a standard convolutional layer.  In your case, the number of parameters is $10 * (3*3*3) + 10 = 280$.

A TensorFlow proof

The following simple TensorFlow (version 2) program can confirm this.

import tensorflow as tf

def get_model(input_shape, num_classes=10):
    model = tf.keras.Sequential()
    model.add(tf.keras.layers.Input(shape=input_shape))
    model.add(tf.keras.layers.Conv2D(10, kernel_size=3, use_bias=True))
    model.add(tf.keras.layers.Flatten())
    model.add(tf.keras.layers.Dense(num_classes))

    model.summary()

    return model

if __name__ == '__main__':
    input_shape = (24, 24, 3)
    get_model(input_shape)

You should try setting use_bias to False to understand how the number of parameters changes.

General case

So, in general, given $M$ filters of shape $K \times K$ and an input of shape $H \times W \times D$, then the number of parameters of the standard 2d convolutional layer, with scalar biases, is $M * (K * K * D) + M$ and, without biases, is $M * (K * K * D)$.

See also these related questions How is the depth of filters of hidden layers determined? and In a CNN, does each new filter have different weights for each input channel, or are the same weights of each filter used across input channels?.

1d and 3d convolutions

There are also 1d and 3d convolutions.

For example, in the case of 3d convolutions, the kernels may not have the same dimension as the depth of the input, so the number of parameters is calculated differently for 3d convolutional layers. Here's a diagram of 3d convolutional layer, where the kernel has a depth different than the depth of the input volume.

See e.g. Intuitive understanding of 1D, 2D, and 3D convolutions in convolutional neural networks.


Are bandits considered an RL approach? If a research paper uses multi-armed bandits (either in their standard or contextual form) to solve a particular task, can we say that they solved this task using a reinforcement learning approach? Or should we distinguish between the two and use the RL term only when it is associated with an MDP formulation?

In fact, each RL course/textbook usually contains a section about bandits (especially when dealing with the exploration-exploitation tradeoff). Additionally, bandits also have the concept of actions and rewards.

I just want to make sure what the right terminology should be, when describing either approach.

Several important researchers distinguish between bandit problems and the general reinforcement learning problem.

The book Reinforcement learning: an introduction by Sutton and Barto describes bandit problems as a special case of the general RL problem.

  The first chapter of this part of the book describes solution methods for the special case of the reinforcement learning problem in which there is only a single state, called bandit problems. The second chapter describes the general problem formulation that we treat throughout the rest of the book — finite Markov decision processes — and its main ideas including Bellman equations and value functions.

This means that you can represent your bandit problem as an MDP with a single state and possibly multiple actions.

In section 1.1.2 of the book Bandit Algorithms (2020), Szepesvari and Lattimore describe the differences between bandits and reinforcement learning

  One of the distinguishing features of all bandit problems studied in this book is that the learner never needs to plan for the future. More precisely, we will invariably make the assumption that the learner's available choices and rewards tomorrow are not affected by their decisions today. Problems that do require this kind of long-term planning fall into the realm of reinforcement learning

This definition is different than the one by Sutton and Barto. In this case, only bandit problems where the learner doesn't need to plan for the future are considered.

In any case, bandit problems and RL problems have a lot of similarities. For example, both attempt to deal with the exploration-exploitation trade-off and, in both cases, the underlying problem can be formulated as a Markov decision process.


Genetic programming with Objective-C I have a complex wargame already developed in a aging Objective-C and I would like to improve the AI

I have built the logic for self-play, fitness evaluation and evolution
The hard-time is the ability to run a lot of experiences of self-play with limited ressources (single Mac). Time is a factor but also memory. I am facing some random crashed after a given number of games

I was wondering
- if people have faced the same issues with a large number of runs with objective-C
- if other people have tried to use Genetic Programming or Reinforcement Learning with Objective-C or C#

I have not touched Obj-C, but I've played with evolution in PHP, which wasn't designed for that at all. If a slow script language on my 10-year old desktop PC can do it, Obj-C should be able to handle that.

Some tricks:

This is a game, so - I assume - you've disabled all the graphics. A headless program is ideal for training. Waste no CPU cycles on stuff you don't need!
Use more threads/instances. Threads around the number of cores should be ideal.
Watch out for memory leaks! Even languages with GC can have problems with this when used in a wrong way. But you'll need to fix these bugs anyway. You can monitor memory consumption when you run it, and if it increases more-or-less steadily, that's a problem. There are various tools against memleaks under different systems/languages, I guess Obj-C has something similar. (these tools log every allocation and release, and list everything at exit that's left)


Running 10 epochs on the Food-101 dataset I’m currently working on the Food-101 dataset. I want to train a model that is greater than 85% accuracy for top-1 for the test set, using a ResNet50 or smaller network with a reasonable set of augmentations. I’m running 10 epochs using ResNet34 and I’m currently on the 8th epoch. This is how its doing:

epoch   train_loss  valid_loss  error_rate  time
0   2.526382    1.858536    0.465891    25:21
1   1.981913    1.566125    0.406881    27:21
2   1.748959    1.419548    0.372129    27:16
3   1.611638    1.315319    0.346980    25:16
4   1.568304    1.250232    0.328069    24:43
5   1.438499    1.193816    0.313762    24:26
6   1.378019    1.156924    0.307426    24:30
7   1.331075    1.131671    0.299010    24:26
8   1.314978    1.115857    0.297079    24:24

As you can see, it doesn’t seem like I’m going to do better than 71% accuracy at this point. The dataset size is 101,000. It has 101 different kinds of food and each food has a 1000 images. Training this definitely takes long but what are some things I can do to improve its accuracy?

try using an adjustable learning rate. Keras has a number of callbacks that are useful for this purpose. The ReduceLROnPlateau callback can be used to monitor validation loss and reduce the learning rate by a factor if the validation loss does not decrease after a user specified number of epochs. The ModelCheckpoint callback is useful to monitor the validation loss and save the model with the lowest loss which can then be used to make predictions. Documentation is here.


How to treat (label and process) edge case inputs in machine learning? In every computer vision project, I struggle with labeling guidelines for border cases. Benchmark datasets don't have this problem, because they are 'cleaned', but in real life unsure cases often constitute the majority of data.
Is 15% of a cat's tail a cat? Is a very blurred image of a cat still a cat? Are 4 legs of a horse, but the rest of its body of the frame still a horse?
Would it be easier or harder to learn a regression problem instead of classification? I.e by taking 5 subclasses of class confidence (0.2,0.4,0.6,0.8,1.) and using them as soft targets?
Or is it better to just drop every unsure case from training or/and testing set?
I experimented a lot with different options, but weren't able to get any definitive conclusion. This problem is so common that I wonder if it has already been solved for good by someone?

Unfortunately, the answer here is that "it depends". People have taken different approaches to this problem and I'll describe a few here. None of which however is the "right" answer.
Labeling
When generating benchmark datasets, we actually do have this problem. To be honest, most of the time the labeling is done to the best ability of the human. Sometimes ambiguous or difficult cases are separated out and cleaned, but, usually, labelers are given a set of concrete guidelines to say whether or not something is a cat. In the case where a human is unsure, usually, that data is thrown out or moved over to the "difficult" pile. Unfortunately, this difficult pile isn't publicly available for the most part in many public datasets. However, if you look at most public datasets, even with significant cleaning these cases exist.
Bayesian Deep Learning
One common theme that I've seen is that people add proper probabilistic uncertainties into their models. This is different than the output of a softmax at the end of an object detection network. The output of a softmax is just some number $\in [0, 1]$ that represents the regressed output of a classification within the model. For example, in SSD the softmax is just the classification of a specific anchor box. There is no real "certainty" information associated with it. In most standalone models (and without some pretty hard assumptions) it doesn't have any rigorous probabilistic meaning.
So how would we add a probability? How can we say that "There is a 80% chance that this image is a cat?. The paper, "What Uncertainties Do We Need in Bayesian Deep Learning for Computer Vision? does a pretty good job at looking at this problem.
Basically what they do is build Bayesian models to break have their models explicitly output two types of uncertainties.

Aleatoric uncertainty
captures noise inherent in the observations. On the other hand, epistemic uncertainty accounts for uncertainty in the model – uncertainty which can be explained
away given enough data.

You can go through the paper to get a better understanding of what's going on, but, basically, they fit models to regress both the uncertainty associated with the model, and the uncertainty associated with the data.
Zero-Shot Learning
What about the case where you have a very well defined object, but you've never seen it before? Let's say you've seen a bunch of horses but you've never seen a zebra. As a human, you would look at it for a while and basically just assume that it's a horse with black and white stripes. There is an entire field of machine learning dedicated to this topic. I'm not an expert in it personally, but there are plenty of resources online if you're interested.
A Practical Note
In industry, we usually try to scope the problem as best as we can such that we don't have to deal with this as much. Now, there are times when this is clearly inevitable. What I've seen if an object isn't clearly detectable, then the algorithm might fallback to just saying that there's "something" there. Consider the case for self-driving cars. It's good to detect if there are pedestrians in the road, but if you don't know if something is a pedestrian it's still useful to know that there's something in the road. For this, you can fallback to unsupervised methods to help distinguish objects. From a labeling perspective, you could imagine an ontology of objects for this purpose. At the root node of this ontology would be just, "something in the road" and branches off to "car", "pedestrian" or, "bike" for example. If a labeler is not sure if something is a pedestrian, but it's def something in the road that shouldn't be hit then it would be labeled as "something in the road". Again though, this is highly dependent upon the application.


Constructing a dataset that scores well only for a specific set of hyper parameter values When designing a machine-learning system, there are various parameters that have to be determined. I am interested in the following general question: is it possible to construct a dataset on which the system will have good performance with some specific set of parameters, but not with other paramteres?

To be more concrete, let's focus on neural networks. Suppose we have a simple neural network: a multilayer perceptron with a single hidden layer. The size of the input is fixed, the activation function is fixed (e.g. tanh), and the output is binary. The only parameter that has to be determined is the size of the hidden layer.

My question is: given a number $n$, is it possible to construct a dataset $D_n$ such that:

The MLP with $n$ hidden nodes has good performance on $D_n$ (e.g. in 10-fold cross validation);
The MLP with $n-1$  hidden nodes has bad performance on $D_n$

?

Note: I asked in CS theory but got no reply.

I'm not familiar with any existing, robust methods to generate such a dataset. Here are some thoughts though.

You propose using an MLP with a single hidden layer. That means we have two weight matrices, and two activation functions (one for hidden layer, one for output layer). Some notation:

$d$: dimensionality of input vectors
$n$: dimensionality of hidden layer
You mentioned binary output, so I'll assume that dimensionality is $2$
$W_n^{(1)} \in \mathbb{R}^{d \times n}$: the first weight matrix in the scenario where we're using $n$ hidden nodes
$W_n^{(2)} \in \mathbb{R}^{n \times 2}$: the second weight matrix in the scenario where we're using $n$ hidden nodes
$g$: first activation function
$h$: second activation function

Then, given an input vector $x \in \mathbb{R}^d$, our neural network will generate output $f_n(x) = h(W_n^{(2)} (g(W_n^{(1)}x)))$.

Now, in general we of course expect Neural Networks to only find a local optimum, but if you want a robust solution you'll want it to be able to handle the worst case, and the worst case for your "adversarial" task is when the Neural Network manages to find the global optimum. So, we'll assume it can find the global optimum.

Essentially, what you're looking for is a dataset $D_n$ containing a number of input vectors $x$, such that:

$f_n(x) = h(W_n^{(2)} (g(W_n^{(1)}x)))$ provides good / optimal results (after training to the global optimum)
$f_{n - 1}(x) = h(W_{n - 1}^{(2)} (g(W_{n - 1}^{(1)}x)))$ provides poor results (even after training to the global optimum of this setup).

In other words, you want to find a collection of vectors $x$ such that it becomes impossible to find a collection of weights in the $n - 1$ case where $f_{n-1}(x)$ is a good approximation of $f_n(x)$. You want to make it impossible that $f_{n - 1}(x) \approx f_n(x)$.

Now this has turned into a clear mathematical problem. I'm not familiar with any established methods in mathematics to solve a problem like this, maybe there are though. My best guess at this point in time would be a procedure like the following:

Generate random "ground truth" versions of the weight matrices $W^{(1)*}_{n}$ and $W^{(2)*}_{n}$ (just completely random matrices).
Generate completely random input vectors $x$. Compute the corresponding ground truth labels as $f^*_n(x) = h(W_n^{(2)*} (g(W_n^{(1)*}x)))$.
Hope that the neural network with $n$ hidden nodes can recover the ground truth weight matrices that were previously generated randomly.
Hope that the neural network with $n - 1$ hidden nodes cannot find an accurate approximation.

In theory, the MLP with $n$ hidden nodes should be able to learn the exact ground truth function. In theory, under certain conditions, the MLP with $n$ hidden nodes should not be able to learn the exact ground truth function. I suspect those "certain conditions" would be that the rows/columns of the weight matrices should be linearly independent, which is likely with randomly generated matrices, but I'm not 100% sure on this. Even if it can't learn the exact ground truth, it may still be capable of learning an approximation... there may be ways to find upper bounds on how close such an approximation could get, but I'm not sure.


How can an artificial general intelligence determine which information is true? After the explosion of fake news during the US election, and following the question about whether AIs can educate themselves via the internet, it is clear to me that any newly-launched AI will have a serious problem knowing what to believe (that is, rely on as input for making predictions and decisions).

Information provided by its creators could easily be false. Many AIs won't have access to cameras and sensors to verify things by their own observations.

If there was to be some kind of verification system for information (like a "blockchain of truth", for example, or a system of "trusted sources"), how could that function, in practical terms?

Not possible without some big restrictions. What it can do is look at known "good" sites and compare news with site that is potentially "bad". Obvious problem here is defining some sites as absolute truth. For example it can recognize, while reading text, that some politician said something. These sentences can be compared with other sites, and if there is significant difference, that news is candidate for false news.

In practical terms, program would extract sentences "i like cats", "says he likes cats", "cats that John likes" etc. We need part that recognizes something as a quote, part that extracts it and finally parser so we end up with structure stored in some form that contains meaning of sentence (john-like-cats). Also it can keep information of time and context in which it was said, like timestamp of an article, some proper nouns that can indicate place (XY conference, London...). Now, suspicious article can be compared and checked if it matches time, place, some context and contains quote that is similar. Finally it needs to compare how different it is from other quotes. "...hates cats" should be labeled as potential fake news, but "likes dogs", "thinks cats are OK", "sings well" etc. should not. This can be expanded into comparison of whole articles.

There are many features that can be used to define particular article as fake. Interesting feature  for finding fake sites could be bias when it comes to particular (political, economical, ecological...) opinion. But in the end machine can't decide if the article is fake without comparing it to other articles. It is bound to closed system that reflects real world in subjective way.


Which part of "Perceptrons: An Introduction to Computational Geometry" tells that a perceptron cannot solve the XOR problem? In the book "Perceptrons: An Introduction to Computational Geometry" by Minsky and Papert (1969), which part of this book tells that a single-layer perceptron could not solve the XOR problem?

I have been already scanned it, but I did not find the part. Or am I missing something?

The section of the book Perceptrons: An Introduction to Computational Geometry (expanded edition, third printing, 1988) that shows the limitations of the perceptron should be 11.8 The Nonseparable Case (p. 181), where the authors write

  There are many reasons for studying the operation of the perceptron learning program when there is no $\mathbf{A}^*$ with the property $\mathbf{A}^* \cdot \mathbf{\Phi} > 0$ for all $\mathbf{\Phi} \in \mathbf{F}$. Some of these are practical reasons. For example, one might want to use the program to test whether such an $\mathbf{A}^*$ exists, or one might wish to make a learning machine of this sort and be worried about the possible effects of feedback errors and other "noise". Other motives are theoretical. One cannot claim to have completely understood the "separable case" without at least some broader knowledge of other cases.

In section 12.1.1 (p. 189), the authors further write

  The PERCEPTRON scheme works perfectly only under the restriction that the data is linearly separable.


What does $r : \mathcal{S} \times \mathcal{A} \rightarrow \mathbb{R}$ mean in the article Hindsight Experience Replay, section 2.1? Taken from section 2.1 in the article:

We consider the standard reinforcement learning formalism consisting of an agent interacting with an environment. To simplify the exposition we assume that the environment is fully observable. An environment is described by a set of states $S$, a set of actions $A$, a distribution of initial states $p(s_0)$, a reward function $r : \mathcal{S} \times \mathcal{A} \rightarrow \mathbb{R}$, transition probabilities $p(s_{t+1} \mid s_t, a_t)$, and a discount factor $\gamma \in [0, 1]$.*

How should one interpret the maths behind it?

This answer assumes that you only have a problem with this notation from the article:

$r : \mathcal{S} \times \mathcal{A} \rightarrow \mathbb{R}$

This is a standard notation, used in many disciplines, for defining a function and its input and output domains. It is a bit like the method signature for the function - it does not fully define it, but does enough to show how it can interact with other expressions.
All functions can be thought of as maps between the input domain and output domain. You provide an input value, and it returns an output value. The values can be arbitrary mathematical objects. To show what kind of objects the inputs and outputs are allowed to be, the notation for sets is used.
Importantly the symbol $\mathbb{R}$ at the end does not refer to the set of possible rewards in the environment (although it is a reward function, and that will be its output), but the set of all real numbers, because a reward is always a real number*.
As a concrete example, if you had the function $f(x) = x^2 - 2x + 7$ defined for a real number $x$, then its equivalent notation might be $f : \mathbb{R} \rightarrow \mathbb{R}$. If you allowed $x$ to be complex then it would be $f : \mathbb{C} \rightarrow \mathbb{C}$, because $\mathbb{C}$ is the standard symbol for the set of all complex numbers.
So now we can break down the notation $r : \mathcal{S} \times \mathcal{A} \rightarrow \mathbb{R}$

$r$

The function is called $r$

$:$

It has an input domain of . . .

$\mathcal{S} \times \mathcal{A}$

The cartesian product of the set of all possible states $\mathcal{S}$ and the set of possible actions $\mathcal{A}$.
That is much the same as saying the function has a signature $r(s, a)$ where $s \in \mathcal{S}$ and $a \in \mathcal{A}$

$\rightarrow$

It has an output domain of . . .

$\mathbb{R}$

any single real number.

* This choice (of declaring the more general $\mathbb{R}$ instead of specific $\mathcal{R}$) is made partly because operators like $+$ and $\times$ are well defined for real numbers. This is a useful thing to assert about the behaviour of the reward function output when defining how value functions work for instance. Of course you could be more specific, defining $\mathcal{R}$ as some subset of $\mathbb{R}$, that would be correct and more precise definition, but it is not needed for general theory in reinforcement learning. The less precise definition is fine for nearly all purposes.


State representation of position in 2D plane for Reinforcement Learning (Q Learning) I recently finished Course on RL by David Silver (on YT) and thought about trying it out on simple application in Unity Game Engine, where I've built simple labyrint with ball and want to teach the ball to get from point A to point B in there while avoiding obstacles and fire (the place where you'll get burnt so big negative reward)

The problem I encountered while designing the whole thing (programming-wise) is: What is the correct (or at least good) way of representing the position in 2D space? It is continuous so I thought about representing it as feature vector consisting of [up, down, left, right, posX, posY] where direction is whether I am pressing button of moving in that direction in binary (or actions if you want) and pos are floats (0-1) representing normalized position from one corner on the plane where the whole map is. That would be accompanied by vector W that would represent the weights adjusted using Gradient Descent.

Question is: will this work?? I am asking for 2 reasons. One is that I am not so sure about that posX and posY since it can be 0 and if I multiply it by the weights vector then how could be resulting reward anything but 0? Second reason is that I am not sure if the actions should be part of the features. I mean, it makes sense to me but I could easily be very wrong since I am a beginner.

Thanks a lot guys in advance. If you have any more questions or think the problem is not described deeply enough just ask in the comments and I'll edit the question. :)

PS: I could just code it the way I think is right, but I also want to get gasp of designing applications on paper before coding them (project management).

I think your net should have the various actions as outputs, but I am not an expert in Deep Nets. I just think that that light form of multi-task learning might be better. The idea of multi-task learning is that a predictor predicting multiple variables (in this case the various Q(s,a1), Q(s,a2), ...) using mostly the same structure (varying only the output weights) will learn more sensible things. Though I admit applying this here might be a bit of a stretch.

As for the real question, a popular technique in Reinforcement Learning is Tile Coding.

The basic idea is to discretize the (2-dimensional, in your case) state-space - imagine a grid laid over the 2D space - and assigning an input feature to each cell; all of these variables are set to zero except for the one your continuous variables fall into. For example, if your grid is 20x20, you will have 400 variables, 399 of which are set to zero, and 1 set to one.

Tile Coding takes this one step further and repeats this using slight offsets for the grid. Imagine you create an identical grid but you move it slightly to the right by 1/10 of the width of a cell: you will have another set of 400 variables like before, but it is possible that the cell set to one is not the same. Then you repeat this moving the grid by 2/10 and you have another set of 400 variables, again, only 1 of which is set to one. In total you have 10 sets of 400 variables (if you repeat more than that, you get the same grids as before); of your 4000 variables, only 10 are set to one.
Now you repeat this by adding a 1/10 of a cell offset in the Y axis and obtain another 4000 variables. Repeat with 2/10 and you get another 4000. By the end of it, you have 40000 variables, 100 of which are set to one.

Now your net can more easily learn different weights for different positions. I recommend you to follow the link above for a better explanation than mine (and figures!)

My suggestion is to feed all of these variables to your net and have it predict the Q-value for all of the actions. But, again, I am no expert in deep nets so I may be wrong.

Also, according to Andrej Karpathy, "most people prefer to use Policy Gradients, including the authors of the original DQN paper who have shown Policy Gradients to work better than Q Learning when tuned well.". This means that you may be better off not using Q-learning (as they did in the original DQN formulation) to train your net. Have a look at Andrej's blog and the paper he points to.


What should be saved in SARSA prioritized sweeping? In the book "Reinforcement Learning: An Introduction", by Sutton and Barto, they provided the "Q-learning prioritized sweeping" algorithm, in which the model saves the next state and the immediate reward, for each state and action, that is, $Model(S_{t},A_{t}) \leftarrow S_{t+1}, R_{t+1}$.

If we want to use "SARSA prioritized sweeping", should we save "next state, immediate reward, and next action", that is, $Model(S_{t},A_{t}) \leftarrow  S_{t+1}, R_{t+1}, A_{t+1}$?

SARSA is an on-policy method. Your historical choices of action will have been made using older Q values, and thus from a different policy. In addition, the action that was taken at the time may not have been typical for the agent (it may have been exploring). So you don't usually want to re-use historical action choices to calculate TD targets in single-step SARSA, because these may introduce bias.

Provided you are performing single-step SARSA, then you can re-generate the action choice sampling from the current best policy. This is similar to generating the max Q value in the TD target value $R_{t+1} + \text{max}_{a'} Q(S_{t+1},a')$.

You could do this using a regular SARSA sampling the action choice:

$$R_{t+1} + Q(S_{t+1}, a' \sim \pi(\cdot|S_{t+1}) )$$

Or you could use Expected SARSA and take a weighted mean of all possible actions:

$$R_{t+1} + \sum_{a' \in \mathcal{A}(S_{t+1})} \pi(a'|S_{t+1})Q(S_{t+1}, a')$$

Technically these would both be on-policy with respect to evaluating the TD Target, but off-policy with respect to the distribution of $S_t, A_t$ that you are running the update for. That's already the case due to prioritised sweeping focussing more updates on certain transitions, but could be a big difference when using a neural network to approximate Q. Bear in mind that making TD learning methods off-policy can have a negative impact on stability.

If you want to process multi-step updates, then you do have to reference $A_{t+1}$ and adjust for when the historical data makes a different action choice than your current estimate of the best policy. This would commonly use importance sampling. This is true for Q-learning as well however, so there would still be no difference in what you store between Q-learning and SARSA.


How to reinvent jobs replaced by AI? In general, what possibilities are there for reinventing job descriptions that could be replaced by an automated AI solution?
My initial ideas include:

Monitoring the AI and flagging its incorrect actions.
Possibly taking over the control in very challenging scenarios.
Creating/gathering more training/testing data to improve the accuracy of the AI.

With AI technology at its current stage (or at least reasonably close to this stage), the jobs you proposed may very well be openings created by AI automation. However, sufficiently advanced AI technology--- the kind that can function as general purpose labor replacement--- will make even these jobs obsolete. This is because such an AI would be able to improve itself and as a result would surpass human level intelligence---meaning that it would take actions which we would not necessarily be able to understand or justify.

This is all assuming that the intelligence of humans is not some kind of upper limit on the possibilities of intelligence in general. As far as I know there is no reason to think we represent such an upper limit.

To summarize...will such jobs exist?

Sub-human artificial intelligence: sure.
Beyond-human artificial intelligence: no reason to think they would be necessary as the AI can do them itself.


Real time image processing for object recognition using security cameras I was thinking, what if we could combine Artificial Intelligence (Neural network for image recognition), computer hardware and a security camera for identify any breaking into our backyard at 12:00am - 8:00am? Of course my current knowledge leads me to only a simple question. So, in order to have a general idea:

¿Have been this already solved using a commercial or free software?
¿Can this be done using TensorFlow?
¿Is there any free set of images with millions of them to teach any AI distinguish between a man and another moving object?
¿Approximate hardware requirements for doing this?

If this question could be silly please mark it as off-topic. I based this idea on autonomous driving car, they can both recognize images and drive at the same time. Unless they have within a super computer I guess maybe the previous idea can be fulfill.

Update 1: I found this Can ConvNets be used for real-time object recognition from video feed? but I guess it could be outdated. Right now I'm in the land of "maybe" (lack of knowledge).

Here is some general info on how NNs work in relation to this specific problem. Hopefully it will provide some insight:

To identify target object, you can just train an NN to perform classification of images. Now, you will run into potential problems where this image can be located anywhere in given frame of input from the camera.

Let's say; you train a human NN that's able to act on 60px x 120px (so you will have 10800 input in your NN for the input layer). Under the assumption you can train the NN to identify whether or not the target object is showing in the image provided, you can use this trained NN to locate the object on the input frame.

Let's say the input frame from the camera is 640px x 480px. You will run into several potential problems
1) The object that's closer to the camera will be larger while the object that's further away from the camera will be smaller
2) The object may be located anywhere in the frame.

To overcome this problem with your already trained NN, I would start with a different mask size, for example, the first one I will probably have my first mask convolute all pixels with 240px x 480px. The first step is, scale it to 60px x 120px (which you can tell it is pretty much 4x) and capture the subset of pixels from pixels located in the area of (0,0) and (240, 480) and run it through the NN, If it yields true, then I will typically draw a box around the region to indicate the target object has been found.

Next, you shift over to 1-3 pixel and rerun it. For example, if we choose to move by 3px, then the region we are testing will be (3, 0) and (243, 480).

Once you finish this scale, you will want to choose a smaller mask, maybe something like 200px x 400px and do the same thing. When finished, go even smaller until you believe there's no point to search for an even smaller region because it is not going to be sufficient resolution for NN.

That's just my thought; maybe there's an even more efficient algorithm. Ultimately, I am sure there's a lot more can be optimized than what I've mentioned above!


Using a neural network for learning a Motion Graph? In a recent paper about progress in computer animation a so called motion graph is used to describe the transition between keyframes of facial animation. Easy Generation of Facial Animation Using Motion Graphs, 2018 As far as i understand from the paper, they used a motion capture device to record faces of real people and extract keyframes. Then a transition matrix was created to ensure that a walk from keyframe #10 to #24 is possible but a transition from keyframe #22 to #99 is forbidden.

The idea itself sounds reasonable good, because now a solver can search in the motion graph to bring the system from a laughing face to a bored face without interruption or unnatural in-between-keyframes. But wouldn't it be great if the transition matrix can be stored inside a neural network? As far as i understand the backpropagation algorithm , the neural network can learn input-output relations. So the neural network has to learn the transition probability between two keyframes. And a second neural network can then produce the motion plan which is also be trained by a large corpus. Is that idea possible or is it the wrong direction?

... the neural network has to learn the transition probability between two keyframes. And a second neural network can then produce the motion plan which is also be trained by a large corpus. Is that idea possible or is it the wrong direction?

That would be trivial.

More difficult, but not hard, would be to take a 14 hour video of someone and create a new video with them saying something they have never said previously. Here is a demonstration, from the BBC YouTube channel, titled: "Fake Obama created using AI video tool - BBC News".

The University of Washington demonstrates, using a variety of clips and only audio from an impersonator, that they can create realistic videos of the former president saying anything they want.

It's possible to sketch out an idea and let AI create a finished product of excellent quality.

The YouTube channel ACMSIGGRAPH has a video titled: "Technical Papers Preview: SIGGRAPH 2018", which is discussed on the webpage: "Could These Be The Next High-Tech Tools That Animators Use Daily?".

What you have asked about was possible long ago and not particularly difficult to do.


Which classifier should I use for a dataset with one feature? I have a labeled dataset composed of 3000 data. Its single feature is the price of the house and its label is the number of bedrooms.

Which classifier would be a good choice to classify these data?

It is not really a metter of what model, but if it is possible at all to predict what you're trying to predict. Let's take a similar dataset from kaggle: California Housing Prices

This dataset contains house prices and other information among which the number of bedrooms per house. As suggested by Oliver in the comments we can compute the Person coefficient to estimate the correlation between the two variables.

import pandas as pd
from scipy.stats import pearsonr

df = pd.read_csv('housing.csv')
df = df.apply(lambda row: row[df['total_bedrooms'] <= 20]) # select subset of dataframe for sake of clarity
df.dropna(inplace=True)

x = df['median_house_value'] # our single feature
y = df['total_bedrooms'] # target labels

print('Correlation: \n', pearsonr(x,y))

Out:

>>Correlation:
>>(-0.14015312664251944, 0.12362969210761204)

The correlation is pretty low, which means that the price and number of bedrooms are basically not related. We can also plot the points to check that indeed there is no correlation at all.

df.plot(x='total_bedrooms',y='median_house_value',kind='scatter')

Out:

Training a model to predict the number of bedrooms uniquely from the price would mean to find a function that can interpolate all those points, which is an impossible task since we have several different prices for houses with the same amount of bedrooms.

The only way to tackle a problem like this would be to expand the dimensionality of the data, for example by using a Support Vector Machine with a non linear kernel. But even with non linear kernels you can't do miracles, so if you're dataset looks like this one, the only solution would be to expand your dataset to include extra features.


How can we use data augmentation for creating data set for face recognition and will the inverted faces on augmented images detected? I saw when browsing we can use data augmentation for creating a dataset for face recognition. The augmented images may include inverted, tilted or distorted faces. Do the model detect the face from the inverted image. When I tried my model cant able to detect any inverted or tilted faces.

This is the purpose of rotational augmentation. In fact you should augment your images at different angle as well than just inverting it. This will make your model angle agnostic.


What do the subscripts mean in $N_{t,n,\sigma,L}$? A neural network can apparently be denoted as $N_{t,n,\sigma,L}$. What do these subscripts  $t, n, \sigma$ and $L$ mean? Could you link me to a paper, article or webpage with an explanation for this?

Here is a paper with the mathematical definition of each term:

  Let Nt,n,σ,L be all target functions that can be implemented using a
  neural network of depth t, size n, activation function σ, and when we
  restrict the input weights of each neuron to be |w|1 + |b| ≤ L.


What's the difference between architectures and backbones? In the paper "ForestNet: Classifying Drivers of Deforestation in Indonesia using Deep Learning on Satellite Imagery", the authors talk about using:

Feature Pyramid Networks (as the architecture)
EfficientNet-B2 (as the backbone)

What's the difference between architectures and backbones? I can't find much online. Specifically, what are their respective purposes? From a high-level perspective, what would integrating the two look like?

The vocabulary is definitely non-standard and a bit confusing, but Feature Pyramid Networks is used as a feature extractor, and its output is then fed into EfficientNet-B2 to be used to classify the image. One neural network model is concatenated at the end of the other.
So it seems like "architecture" is the front half of the neural network model which takes as input the satellite image and extracts image featuers, and then is directly connected to the back half of the model (hence "backbone"), which takes the features extracted from the "architecture" and makes a classification.
This terminology is definitely non-standard here, at least in the AI community, and if you ask anyone here I think it will be uncommon for them to naturally think about the words "architecture" vs "backbone" in this way unless they specialize in a similar field to the authors.


Can we make an algorithm which can solve any high school (science) problem using ML and DL? I heard that your ML model's quality depends directly on the quality and the quantity of data you use.

So I was thinking that can question answers be used as data to train an algorithm which can solve any high school science problems? Because we do have a gazillion number of high school books with millions of Question-Answers which are both high in quality as well as quantity.

P.S: I don't have any in-depth knowledge in any of the AI fields, so please answer accordingly!

Its true that your AI model's performance depends on the quality of data that you use. However, high quality data alone is insufficient to guarantee that your model will learn effectively and score well on a particular dataset. Other factors such as smarter algorithms and the use of high performance computing infrastructure must be factored in for your AI system to perform well.

Although A.I research has made massive progress in the past decade, ML engineers are yet to build a system that can match the general scope and generalization ability of the human mind. Upto the first decade of the 2000's AI was dominated by expert systems that emulated the decision making ability of an expert. AI at this point couldn't process unstructured data and therefore it lacked the capacity to sit for and pass high school exams.

This was until 2011 when IBM Watson a question answering computer system competed against two former Jeopardy quiz show winners and placed first. IBM Watson was built on top of Deep QA  (a computer system that could answer natural language questions) and UIMA (a software achitecture to process and analyse unstructured information). Below is a link to a paper giving an overview of how IBM's Watson works https://www.aaai.org/Magazine/Watson/watson.php

In 2012 a team led by Geofrey Hinton won the ImageNet competition by exploiting deep convolution networks. This was soon followed by Dahl's team winning the Merck Molecular Activity Challenge using deep neural network architecture. Yann LeCun's work in CNN's, Geoff Hinton's back propagation and Stochastic Gradient Descent aproach to training datasets alongside Andrew Ng's large scale use of GPU's ignited accelerated progress in ML. This was frequently referred to as unreasonable effectiveness of Deep learning.

Following recent advances in fields such as image captioning, natural language processing, information retrieval and computer vision it is highly probable that current generation AI systems can pass high school exams such as SAT.

The Allen AI Institute has made significant progress in developing AI systems that can read, learn and express that understanding through question answering and explanation. Founded by Paul Allen Microsoft's co-founder, the Allen AI Institute's singular focus according to their mission is to conduct high impact research in the field of AI. Below is a news link covering their cognitive system passing high school exams fortune.com/2015/09/21/computer-artificial-intelligence-math/

So far Allen AI Institute has demonstrated a cognitive platform called Geos that is capable of answering geometry questions as well as the average high school student. While another system called Aristo can answer high school science exam questions by leveraging information extraction alongside knowledge representation and reasoning models. You can access AAI's GeoS service here http://allenai.org/euclid/ and Aristo here http://allenai.org/aristo/

Meanwhile researchers working on the Todai project in Japan have demonstrated a cognitive system that is capable of passing the Tokyo University Mathematics entrance exam. My conclusion from the above examples is that possibly we already have AI that can sit for and pass high school exams.


How do temporal-difference and Monte Carlo methods work, if they do not have access to model? In value iteration, we have a model of the environment's dynamics, i.e $p(s', r \mid s, a)$, which we use to update an estimate of the value function.
In the case of temporal-difference and Monte Carlo methods, we do not use $p(s', r \mid s, a)$, but then how do these methods work?

The main idea is that you can estimate $V^\pi(s)$, the value of a state $s$ under a given policy $\pi$, even if you don't have a model of the environment, by visiting that state $s$ and following the policy $\pi$ after that state. If you repeat this process many times, you'll get many samples of trajectories starting at $s$ with some total return associated with them. If you average them, you'll have a sample-based estimate of $V^\pi(s)$. In a similar way, you can do a sample-based approach to estimate $Q^\pi(s, a)$, where you start at $s$, take some arbitrary action $a$, and then continue following $\pi$. After you collect many samples, you can also average the returns to get a sample-based estimate of $Q^\pi(s, a)$. Once you have a good enough estimate of $Q^\pi(s, a)$, you can see that it's easy to improve the current policy $\pi$ to get a new policy $\pi'$ that always chooses the best action on any given state: $\pi'(s) = \underset{a}{argmax}\ Q^\pi(s, a)$.

The procedure I described in the last paragraph where you sample an entire trajectory and wait until the end of the episode to estimate a return is the Monte Carlo approach. In contrast, TD exploits the recursive nature of the Bellman equation to learn as you go, even before the episode ends. For example, you can estimate the value function like this: $V^\pi(s_0) = r_0 + \gamma V^\pi(s_1)$, where $r_0$ comes from experience and instead of collecting more $r_t$ until the end of the episode, you rely on your estimate of the value of the next state (which you also get from experience). At the beginning, your estimates might be random, but after many iterations the process converges to good estimates. The same idea of exploiting this recursive structure can be used to estimate $Q^\pi(s, a)$. I guess this approach is known as temporal difference because you sample $r_0$ which is in some sense the temporal difference between $s_0$ and $s_1$.


Research paths/areas for improving the performance of CNNs when faced with limited data I've been reading through the research literature for image processing, computer vision, and convolutional neural networks. For image classification and object recognition, I know that convolutional neural networks deliver state-of-the-art performance when large amounts of data are available. Furthermore, I know that Hinton et al. created "capsule networks" to try and overcome some of the fundamental limitations of CNN architecture (such as them not being rotationally invariant). However, my understanding is that capsule networks have been a failure (so far), and most people expect them to go nowhere. And CNNs have progressively been improved in various ways (Bayesian optimisation for hyper parameter tuning, new convolution kernels, etc.). It seems to me that, at the moment, and for the foreseeable future, CNNs are the best architecture available for image-related stuff.
But, as I said, CNNs, like other Deep Learning architectures, require large amounts of data. So my question is as follows:
What are the research areas/topics for improving CNNs in the sense of making them work more effectively (that is, have greater performance) with less data (working with small datasets)?
I know that there is various research looking at approaches to increasing data (such as data augmentation, generative networks, etc.), but I am primarily interested in fundamental modifications to CNNs themselves, rather than purely focusing on changes to the data itself.
And to expand upon my question, using my above definition of "performance", I am interested in these two categories:

"Computational methods" for increasing CNN performance. This would be the non-mathematical stuff that I've read about, such as just increasing the number of layers and making the CNN deeper/wider (and I think another one had to do with just making the size of the convolution kernel smaller, so that it looks at smaller pieces of the image at any one time, or something like that?).

"Mathematical methods" for increasing CNN performance. This would be the cutting-edge mathematical/statistical stuff that I've read about: things like algorithms (such as Bayesian optimization); I've come across a lot of geometric stuff; and I guess the cutting-edge convolution kernels created by the image processing people would also fall under this category.

Obviously, this "list" is not exhaustive, and it's probably incorrect; I'm a novice to this research, so I'm trying to find my way around.
I am interested in studying both of the above categories, but I will primarily be working from the mathematical/statistical side. And I want to work on research that is still practical and can be put to use in industry for improved performance (even if it might still be "advanced"/complex for most people in industry) – not the the highly theoretical stuff related.
Related (but unanswered): Are there any good research papers on image identification with limited data?

Some research areas that come to mind which can be useful when faced with a limited amount of data:

Regularization: Comprises different methods to prevent the network from overfitting, to make it perform better on the validation data but not necessarily on the training data. In general, the less training data you have, the stronger you want to regularize. Common types include:

Injecting noise in the network, e.g., dropout.

Adding regularization terms to the training loss, e.g., L1 and L2 regularization of the weights, but also confident output distributions can be penalized.

Reducing the number of parameters in the network to make it unable to fit the training data completely and thus unable to overfit badly. Interestingly, increasing the number of parameters for large models can also improve the validation performance.

Early stopping of training. For example, if one part of the training set is set aside and not used to update the weights, training can be stopped when the observed loss on this part of the training set is observed to start to increase.

Generating new training data:

Data augmentation: Ways to augment existing training examples without removing the semantics, e.g., slight rotations, crops, translations (shifts) of images.

Data interpolation, e.g., manifold mixup.

Using synthetic data, e.g., frames from video games or other CGI.

Transfer learning: When you take a neural network that has already been trained on another, much larger dataset of the same modality (images, sounds, etc.) as your dataset and fine-tune it on your data.

Multitask learning: Instead of training your network to perform one task, you give it multiple output heads and train it to perform many tasks at once, given that you have that the labels for the additional tasks. While it may seem that this is a more difficult for the network, the extra tasks have a regularizing effect.

Semi-supervised learning: If you have much unlabeled data that labeled data, you can combine supervised learning with unsupervised learning. Much like with multitask learning, the extra task introduced by the unsupervised learning also has a regularizing effect.

Other interesting methods can be found in systems that perform one-shot learning, which inherently implies very little training data. These systems often uses slightly modified network architectures. For example, facial recognition systems can learn to recognize a face from only a single photo, and usually use a triplet loss (or similar) of a vector encoding of the face, instead of cross-entropy loss of the output of a softmax layer normally used for image classification.
Zero-shot learning also exists (e.g., zero-shot machine translation), but this is a completely different type of problem setup and requires multiple data modalities.


How can I read any AI paper? I have studied linear algebra, probability, and calculus twice. But I don't understand how can I reach the level that I can read any AI paper and understand mathematical notation in it.
What is your strategy when you see the mathematical expression that you can't understand?
For example, in Wasserstein GAN article, there are many advanced mathematical notations. Also, some papers are written by people who have a master's in mathematics, and those people use advanced mathematics in some papers, but I have a CS background.
When you come across this kind of problem, what do you do?

I think the answer depends very much on why you are reading the paper, what are you trying to get out of it? There are plenty of papers that I "read" (or often really just quickly skim through) where I'll definitely not understand all the math. More often than not, this will be because I don't actually care to deeply understand it.
There is plenty of more "practical" research to be done in AI, which definitely doesn't always require a deep understanding of all the math. Intuition can often be enough, at least to get started, for meaningful practical contributions. If this is the sort of research that you're interested in doing, you probably don't need to understand as many of the mathematical parts of AI papers as you do if you're really trying to do research directly in that theoretical area.
Personally, when I write "math-heavy" parts in my own papers (and that will often already be restricted to a rather simple level of math in comparison to the "real theory" ML papers), I always try to make sure to include intuitive, English descriptions of what we're doing around it. Even if you don't immediately understand a full equation, just having the intuitive explanation around it to tell you what it means can be enough for a broad understanding of the paper. Then you only have to dive deep into the details of the equations if -- based on the English text -- you decide that you're actually really interested. So, if there are sufficient, intuitive explanations surrounding the equations, I'd recommend to focus heavily on that first. Not every paper does this though, sometimes there's very little text and very much math, and then this can be difficult.
Even if it turns out that you do have to understand math, you may not have to understand ALL of it right away though. The important parts that I would try to focus on understanding first are:

A mathematical description of the "problem". This could be an objective function, a metric to be optimised/minimised/maximised, or an existing equation from previous literature that the authors take as a starting point and inspect some detail of in greater detail.
Mathematical descriptions of the outcomes/results. These could be equations that they actually use in concrete algorithms (see if you can relate them to any pseudocode that may be present), or the final equations stated in theorems / at the end of proofs.

All the complex parts in between are probably less important. Just a vague idea of what the starting point is, and a vague understanding of the final outcome, can be enough to at least know what the paper is about. Then you can decide for yourself whether you really need to know more about the details in between, or if they're maybe not relevant to you / your work / your research.


What is the formula for the momentum and Adam optimisers? In the gradient descent algorithm, the formula to update the weight $w$, which has $g$ as the partial gradient of the loss function with respect to it, is:

$$w\ -= r \times g$$

where $r$ is the learning rate.

What should be the formula for momentum optimiser and Adam (adaptive momentum?) optimiser? Something should be added to the right side of the formula above?

I'm going to use slightly different notation, $\leftarrow$ for an assignment, $\alpha$ for learning rate, $\nabla_w J$ in place of $g$* and implied multiplication as these are slightly more common. Also, using bold letters to represent vectors. In that notation, the update rule for basic gradient descent would be written as:

$$\mathbf{w} \leftarrow \mathbf{w} - \alpha \nabla_w J$$

This cannot be extended to momentum and Adam update rules whilst keeping it as a single line and modifying the right hand side. That is because these variations of gradient descent maintain running statistics of previous gradient values, which have their own separate update rules. When implemented on a computer, these become additional terms, mainly vectors the same size as the weight vector being updated. These variables also require initialisation before use.

Momentum

Momentum maintains a "velocity" term which essentially tracks a recency-weighted average of gradients. However, the classic form of momentum given here does not normalise the resulting vector, and you often have to adjust the learning rate down when using it. Momentum has a parameter $\beta$ which should be between 0 and 1, and typically is set at $0.9$ or higher.

Intitialisation

$$\mathbf{m} \leftarrow \mathbf{0}$$

Update rules

$$\mathbf{m} \leftarrow \beta \mathbf{m} + \nabla_w J$$
$$\mathbf{w} \leftarrow \mathbf{w} - \alpha \mathbf{m}$$

There are some variants of these update rules in practice. An important one is Nesterov momentum.

Adam

The Adam optimiser maintains a momentum term, plus a scaling term, and also corrects these terms for initial bias. Adam has three parameters $\beta_m$ for momentum (typically 0.99), $\beta_v$ for scaling (typically 0.999) and $\epsilon$ to avoid divide by zero and numerical stability issues (typically $10^{-6}$).

Initialisation

$$\rho_m \leftarrow 1$$
$$\rho_v \leftarrow 1$$
$$\mathbf{m} \leftarrow \mathbf{0}$$
$$\mathbf{v} \leftarrow \mathbf{0}$$

Update rules

$$\rho_m \leftarrow \beta_m \rho_m$$
$$\rho_v \leftarrow \beta_v \rho_v$$
$$\mathbf{m} \leftarrow \beta_m \mathbf{m} + (1-\beta_m) \nabla_w J$$
$$\mathbf{v} \leftarrow \beta_v \mathbf{v} + (1-\beta_v) (\nabla_w J \odot \nabla_w J)$$
$$\mathbf{w} \leftarrow \mathbf{w}- \alpha(\frac{\mathbf{m}}{\sqrt{\mathbf{v}}+\epsilon} \frac{\sqrt{1-\rho_v}}{1-\rho_m})$$

The symbol $\odot$ stands for element-wise multiplication. Here that essentially means to square each term of the gradient to calculate terms in $\mathbf{v}$. The square root and division of $\mathbf{m}$ by $\sqrt{\mathbf{v}}+\epsilon$ in the last update step are also handled element-wise.

The variant I show here has an "optimisation" to the bias correction so that you don't need to calculate high powers of either of the parameters. You may see variants that don't have $\rho_m$ and $\rho_v$ (or equivalents), but instead use $\beta_{m}^t$ or $\beta_{v}^t$ directly, which is exactly what $\rho_m$ and $\rho_v$ represent.

* $\nabla_w J$ is the gradient of $J$ with respect to $\mathbf{w}$. By writing it this way, it also describes the goal of the update explicitly within the notation i.e. to minimise a function that is parameterised by $\mathbf{w}$.


What are the value of the pixels of the convolved image? I'm studying convolutional neural networks from the following article https://ujjwalkarn.me/2016/08/11/intuitive-explanation-convnets/.

If we take a grayscale image, the value of the pixel will be between 0 and 255. Now, if we apply a filter to our "new image", can we have pixels whose values are not included in this range? In this case, how can we create the convolved image?

The convolved image can be considered a feature map, where each new neuron represents some indication (or lack-there-of) of a feature in some receptive field of the original image, so no it does not need to be a valid image in the output.

If you specifically care for it to be an image as an output, you can do a couple of things:

1) normalize the produced feature map to some set range that youre working in (0-255 or 0-1)

2) make the filter a valid probability distribution, and you know the output will stay in the same range as the input (ex: Gaussian filters)


What is the difference between a problem representation and problem modelling? As far as I know, a problem representation is the formulation of the problem in a way that it can be programmed and therefore solved (for example, you can represent the $N$-queens problem by using an array of $N \times N$).

What does problem modelling mean? What is the difference between a problem representation and problem modelling?

I would say these terms are often used interchangeably in AI. When they differ, I would say that problem modeling means finding a mathematical description of the problem, while problem representation means finding a particular way to represent that mathematical formalism.

For example, a list of numbers can be stored (represented) with a linked list, and array list, a hash table, or a self-balancing tree. All of them can produce a faithful model of the list, but if what you want to do is find the order that elements were entered in, the array list or linked list is far faster and more natural. If what you want to do is determine whether certain pieces of information are present in the list, the hash table is fastest. If what you want to do is find ranges of similar elements, the tree is fastest. Essentially, representational choices are engineering problems, while modelling choices are scientific problems.


What is the difference between success rate and reward when dealing with binary and sparse rewards? In OpenAI Gym "reward" is defined as:

reward (float): amount of reward achieved by the previous action. The
scale varies between environments, but the goal is always to increase
your total reward.

I am training Hindsight Experience Replay on Fetch robotics environments, where rewards are sparse and binary indicating whether or not the task is completed. The original paper implementing HER uses success rate as a metric in its plots, like so:

On page 5 of the original paper, it is stated that the reward is binary and sparse.
When I print the rewards obtained during a simulation of FetchReach-v1 trained with HER, I get the following values. The first column shows the reward and the second column shows the episode length.

As can be seen, at every time step, I am getting a reward, sometimes I get a $-1$ reward at every time step throughout the episode for a total of $-50$. The maximum reward I can achieve throughout the episode is $0$.
Therefore my question is: What is the reward obtained at each time-step? What does it represent and how is this different from the success rate?

Page 6 of the paper describes the exact reward functions, and why they were used:

  Goals: Goals describe the desired position of the object (a box or a
  puck depending on the task) with some fixed tolerance of $\epsilon$ i.e. $G = \mathcal{R}^3$
   and $f_g(s) = [|g − s_{object}| ≤ \epsilon]$, where $s_{object}$ is the position of
  the object in the state s. The mapping from states to goals used in
  HER is simply $m(s) = s_{object}$.

  Rewards: Unless stated otherwise we use binary and sparse rewards $r(s, a, g) = −[f_g(s 0 ) = 0]$ where $s'$ is
  the state after the execution of the action a in the state s. We
  compare sparse and shaped reward functions in Sec. 4.4.

So, at least in the base version (which I believe is your fetchreach-v1), the agent receives a reward of -1 for every timestep spent more than $\epsilon$ from the goal state, and a reward of 0 for every timestep spent within $\epsilon$ of the goal state. Thus, a score of -5.0 would seem to correspond to the agent moving directly to the goal and staying there, while a score of -50.0 would correspond to the agent failing to reach the goal state entirely.


Are there any visual elements commonly associated with AI? Are there any visual elements, patterns, colors, graphs, maps, or even programming fonts that are used and even recurring in artificial intelligence and machine learning processes?

As a designer, it is not entirely clear what these "look" like realistically, as most generally associate AI with the kind of colors and textures generally seen in sci-fi films.

A characteristic visual element for neural network might be the node diagram, which shows (schematically) the nodes in the layers of a neural network and the connections between the nodes, both within and between the layers, that get weighted as the network is trained.

If you do a Google search on "neural network node diagram", you will see what I mean.

You might also think of any sort of video or photo with computer-identified features highlighted, as in a Google image search for "machine vision feature detection".

If you are looking for something more concrete, you can think of racks of GPU cards, or a spinning LIDAR scanner.


How to convert string to number and number to string efficiently? Let's say I have a string "America" and I want to convert it into a number to feed into a machine learning algorithm. If I use two digits for each letter, e.g. A = 01, B = 02 and so on, then the word "America" will be converted to 01XXXXXXXXXX01 (1011). This is a very high number for a long int, and many words longer than "America" are expected.

How can I deal with this problem?

Suggest an algorithm for efficient and meaningful conversions.

What are you trying to achieve?

If you need to encode it to some integer use hash table. If you are using something like linear regression or neural network it would be better to use dummy features (one-hot encoding). So for your dictionary of 5 words ("America", "Brazil", "Chile", "Denmark", "Estonia") you get 5 features (x1, x2, x3, x4, x5) which indicate if some word is equal to one in dictionary. So "Brazil" is represented by (0,1,0,0,0), "Germany" is (0,0,0,0,0). Number of features grows with number of words in dictionary making some features practically useless.

If you are using decision trees you don't need to convert string to integer unless specific algorithm asks you to do so. Again, use hash table to do it. In R you can use factor() function.

If you convert your string to integers and use it as single feature ("America" - 123, "Brazil" - 245), algorithm will try to find patterns in it by comparing numbers but may fail to recognize specific countries.


Is there a theoretical maximum for intelligence? From Artificial Intelligence: A Modern Approach, Third Edition, Chapter 26:

  Note that the concept of ultraintelligent machines assumes that intelligence is an especially important attribute, and if you have enough of it, all problems can be solved. But we know there are limits on computability and computational complexity. If the problem of defining ultraintelligent machines (or even approximations to them) happens to fall in the class of, say, NEXPTIME-complete problems, and if there are no heuristic shortcuts, then even exponential progress in technology won't help—the speed of light puts a strict upper bound on how much computing can be done; problems beyond that limit will not be solved. We still don't know where those upper bounds are.

If the textbook's argument is correct, then there may be a strict upper bound to intelligence, meaning that the potential (or damage) of super-intelligence is limited. However, it is contingent on there actually being a theoretical maximum for intelligence.

Is there any literature that suggests that we know for sure whether such a maximum exist? Is the existence of that maximum dependent on our definition of intelligence (so adopting a vague and hand-wavey definition would imply no theoretical maximum, while adopting a strict and formalized definition would imply a theoretical maximum)?

Note that the statement says nothing directly about the limit of intelligence, nor even about the limit of computational intelligence - but about the limit of computing power.

Perhaps the sentence "the speed of light puts a strict upper bound on how much computing can be done" needs a better explanation:

The authors are probably referring to Bremermann's limit, which defines an upper bound in bits per second per kilogram. It is an upper bound on the processing power per unit of time of a computer with a given weight.

There is also Margolus–Levitin theorem which defines an upper limit in operations per second per joule. It is an upper bound on the processing power per unit of energy.

These principles do not define a theoretical limit on computing power, but a practical one. If you'll limit your computer and your energy source to the size and capacity of the earth (or to the those of the universe) - you'll get a very practical limit.

Check the reference section in Wikipedia article Limits to computation


What is the difference between EER and DCF I was designing a multi-speaker identification model and I searched about some metrics that one may use, I found two metrics:

EER (equal error rate).
DCF (detection cost function)

and my question is what the difference between them? and is one better than the other for my model?

Regarding DCF, Carbonell et al. (2007) state "Although it is an excellent evaluation tool, the DCF has the limitation that it has parameters that imply a particular application of the speaker detection technology."
For EER the authors make the following statement: "The EER is a concise summary of the discrimination capability of the detector. As such it is a very powerful indicator of the discrimination ability of the detector, across a wide range of applications. However, it does not measure calibration, the ability to set good decision thresholds."
References
Carbonell, J. G., Siekmann, J., Müller, C., van Leeuwen, D. A., & Brümmer, N. (2007). An Introduction to Application-Independent Evaluation of Speaker Recognition Systems. In Speaker Classification I (pp. 330–353).


What are the ethical and legal issues of self driving cars being released in the UK? What are the ethical and legal issues of self driving cars being released in the UK?

This question came up on our exam today and I was left in a daze.

I initially thought it would be issues like the legal driving age for self driving cars since they are AI do you need a minimum age limit?

Another one I thought was whether or not you need driving licenses for AI cars?

Could someone please list all the possible ethical and legal issues that surround AI controlled cars?

LEGAL
Legislative:
http://cyberlaw.stanford.edu/wiki/index.php/Automated_Driving:_Legislative_and_Regulatory_Action
http://www.ncsl.org/research/transportation/autonomous-vehicles-self-driving-vehicles-enacted-legislation.aspx
http://spectrum.ieee.org/transportation/advanced-cars/selfdriving-cars-will-be-ready-before-our-laws-are
Liability:
https://www.usatoday.com/story/money/cars/2017/04/03/tesla-mishap-raises-issues-self-driving-liability/99880620/
https://www.nytimes.com/2014/05/14/upshot/when-driverless-cars-break-the-law.html?_r=0
Regulation:
https://www.theverge.com/2016/9/19/12981448/self-driving-car-guidelines-obama-foxx-dot-nhtsa
Law Review
https://www.americanbar.org/publications/youraba/2015/october-2015/are-we-there-yet--the-legal-aspects-of-driverless-cars.html
ETHICAL
https://www.technologyreview.com/s/542626/why-self-driving-cars-must-be-programmed-to-kill/
https://www.scientificamerican.com/article/driverless-cars-will-face-moral-dilemmas/
http://news.stanford.edu/2017/05/22/stanford-scholars-researchers-discuss-key-ethical-questions-self-driving-cars-present/

This should be enough to get you started.  (In terms of how it may apply in the UK, I leave that for you to determine;)


What are the differences between machine learning, pattern recognition and data mining? I know a little about these subjects. I found them similar to each other. Can anybody explain the differences between them?

Terms in a field are sometimes defined unambiguously. For instance, we know what convergence means when communicating about machine learning algorithms in academic publications because it has a formal definition in an older field, mathematics. However, the term machine learning is defined ambiguously across academic publications.

Perspectives on Machine Learning

Some see it as a branch of applied probability and statistics involving models with curvature (not usefully approximated by a first degree polynomial) and the application of those principles in digital computing. Some see it as an extension of the work of James Watt and Le Roy MacColl the application of the feedback control concept to digital control. Some see it as the natural result of the pioneering AI work of Norbert Wiener and John Von Neumann, where the adaptive qualities of nature, including neurochemistry, are simulated with the intention of birthing artificial life.

Some don't see that deeply into ML and imagine that its a set of classes and libraries the mastery over which will make for a great career. As shallow as that may seem, that concept may be as true as the other three deeper conceptions.

Perspectives on Data Mining

The term data mining is like that. Each book, and sometimes each chapter within the same book, seems to have its own distinct conception of the verb mining. Although these definitions have some similarity, the term is nothing like the term convergence or even database in IT or melody in music.

Unfolding the metaphor contained in the two words of the term, data mining is digging up data, and perhaps that's a satisfactory definition for the most general use of the term. The information sought is not on the surface, like diamonds dropped onto the ground, but rather underneath and covered with other materials so that one has to survey, dig, and process to get past the worthless material and reveal the gems.

This term has another vantage point. In systems theory there is an important distinction between noise and signal. In data science, what an electrical engineer would call the signal is the listing of statistics, table, graphic, or other visualization miner's client needs to make management decisions. The noise is everything obscuring the signal through complexity, volume, or prominence.

Perspectives on Pattern Recognition

The term pattern recognition is perhaps the most ambiguous because neither of the two words arose in a scientific context.

Early uses of the word pattern in English (and its equivalent in other languages) are related to shelter construction, farming, or early textiles. The notion that the shape of a letter or other symbol or a sequence of phonetic elements that make up a spoken word were patterns only arose recently. Much of the early and current work in pattern recognition involving computers had to do with converting natural language expressions into some functional machine representation.

The term pattern is also ambiguous because of gestalt, the dependence of perception on the orientation of the recognizer at the time of recognition. A sand castle may have an architecture to an architect, a chemical composition to a chemist, an indication of civilization to the starving passengers of a boat adrift, an obstacle in the way to a crayfish, and an imaginary home for a child.

To a mathematician, it may be a three dimensional form with particular surface topology, feature curvature, and dimensions. To a physicist, there may be no significant difference between the sand castle and the seagull flying over it or the air in between them (unless the sand castle is the triumph of the physicists own child).

The orientation of the machine is even more a constraint on the emulation of some aspect of human perception than demonstrated in gestalt psychology experiments. The human can adjust perception when a new kind of pattern or structure is pointed out. Until AI progresses further, that kind of experience, where the computer would say, "Oh, yes. Now I see the old woman in the picture of the young woman," is only realizable in software to the most primitive degree.

Taken literally, the term recognition means the repetition of a cognitive event, but that is not what we mean when we say, "I recognize that," in common speech. We usually mean that a mental search for some set of sensory features (not necessarily any more a pattern than anything else in the sensory stream) is identified and associated with some internal object or concept.

The most common use of a convolutional network (CNN) is neither of these. It is usually used to categorize objects or as a feature extracting sensory front end to a much larger AI design.

Overlap and Associations

With all these ambiguities present, some overlap may be apparent, in that some AI activities may thoroughly involve two or all three of these terms. Certainly some associations between the three terms are obvious.

When mining data, we may be looking for a particular kind of structure in a sea of data and have a particular search strategy to narrow the search and make it manageable for computing resources available. The test use during the search may be called pattern recognition.
In machine learning, we may train a network of artificial cells to assist in locating data or features in data that are meaningful to the stakeholders in the project. That would be using ML for data mining projects.

A large number of other associations between the three terms can be made. Which ones would appear most prominent to the expert would depend on the scientific, research, and career orientation of the expert.

Not Sufficient Overlap to be Synonyms

It would be difficult however to declare any two of the three to be synonymous. The three arose out of different kinds of research and from different orientations. Only some of that etymology is preserved in the terms themselves.