text:
What are the differences between Yolo v1 and CenterNet?
I recently read a new paper (late 2019) about a one-shot object detector called CenterNet. Apart from this, I'm using Yolo (V3) one-shot detector, and what surprised me is the close similarity between Yolo V1 and CenterNet.
First, both frameworks treat object detection as a regression problem, each of them outputs a tensor that can be seen as a grid with cells (below is an example of an output grid).

Each cell in this grid predicts an object class, a box offset relative to the cell's position and a box size. The only major difference between Yolo V1 and CenterNet is that Yolo also predicts an object confidence score, that is represented in CenterNet by the class score. Yolo also predicts 2 boxes.
In brief, the tensor at one cell position is Class + B x (Conf + Size + Off) for Yolo V1 and Class + Size + Off for CenterNet.
The training strategy is quite similar too. Only the cell containing the center of a ground truth is responsible for that detection and thus affects the loss. Cells near the ground truths center (base on the distance for CenterNet and IoU for Darknet) have a reduced penalty in the loss (Focal Loss for CenterNet vs and tuned hyper parameter for Yolo).
The loss functions have near the same structure (see above) except that L1 is preferred in CenterNet while Yolo uses L2, among other subtleties.

My point is not that Yolo V1 and CenterNet are the same — there are not — but they are far closer that it appears at first glance.
The problem is that recent papers like CenterNet (CornerNet, ExtremeNet, Triplet CenterNet, MatrixNet) all claim to be "Keypoint-based detector" while they are not so much different than regular "anchor-based" detectors (that are preconditioned regressors in fact).
Instead I think that the biggest difference between Yolo and CenterNet is the backbone that has a bigger resolution for CenterNet (64x64) while Darknet has 7 or 8 only.

My Question is: do you see a major difference between the two concepts that I may have missed and that could explain the performance gap? I understand that new backbones, new loss functions and better resolutions can improve the accuracy but is there a structural difference between the two approaches?

First and foremost CenterNet eliminate the need for NMS after detection, whereas the anchor based object detection need NMS after detection

@kkr4k maybe this is the only important difference? by identifying local maxima in the heatmap, nearby bboxes are de-duplicated automatically. It's in a sense dual to the IOU de-dedupping scheme.

You've already mentioned some technical differences between the two architectures. I think a key difference is in their "philosophy" and what they are trying to achieve.
CenterNet's abstract points out that they believe bounding-box-based approaches are inefficient as they generate many candidates for a bounding box that needs an NMS phase. Their approach claims to be more efficient and requires 1 step instead of 2.
Another core benefit of keypoint estimation architectures is that they are more flexible than bounding-box-based ones for scenarios where you need something other than a box. For instance, human pose estimation, which they describe in Chapter 4.2. So, I would mark that as a considerable difference.


text:
What happened after the second AI winter?
I know this is a very general question, but I'm trying to illustrate this topic to people who are not from the field, and also my understanding is very limited since I'm just a second-year physics student with a basic understanding of R and Python. My point is, I'm not trying to say anything wrong here.
So according to Wikipedia, after the second AI winter, which happened because expert systems didn't match expectations of the general public and of scientists, AI made a recovery "due to increasing computational power (see Moore's law), greater emphasis on solving specific problems, new ties between AI and other fields (such as statistics, economics and mathematics), and a commitment by researchers to mathematical methods and scientific standards".
What I'm trying to understand now is whether the rise of AI is rather connected to greater computational power available to the public or whether there have been fundamental mathematical advances that I'm not aware of. If the latter is the case (because according to my understanding, the mathematical models behind neural networks are rooted in the 70s and 80s), I would appreciate examples.
Again, please don't be offended by the general character of this question, I know it is probably really hard to answer correctly, however, I'm just trying to give a short historic introduction to the field to a lay audience and wanted to be clear in that regard.

@DuttaA One more question regarding your remark on matrix multiplication: you write "when we started to see Deep Learning as just a set of matrix operations", did this happen only after the 90s or 2000s?

i think people always "kinda knew" that neural networks (NN) (please don't say "deep learning" (DL) as a replacement for "neural networks", NN's are a type of architecture, DL is a way people use NN's by making them have a lot of hidden layers) can be viewed as matrix operations; but that framing of the problem wasn't particularly enlightening because NN's weren't deep enough for us to care about condensing the interpretation (but i might just be making this up)

No significant mathematical advances directly connected to AI for now, but there some advances in math which may connect in future (automatic theorem proving, that is homotopy type theory)

My reading of AI development (somewhat simplified here) is that the availability of large data sets, increased computing power, and the introduction of new machine learning algorithms (which require large data sets and massive computing power) contributed to the resurgence of AI.
However, as witnessed on this site, there has been a paradigm shift within the field: while previous approaches to AI were largely symbolic, with a bit of connectionism thrown in, the current AI mainstream is purely based on statistical models and machine learning.
Massive (distributed) computing power on its own is not sufficient, as there was a bottleneck with domain modelling/knowledge acquisition in traditional symbolic approaches. New algorithms (basically further developments of neural networks) on their own would also not be sufficient without massive amounts of training data. Only the combination of all three elements enabled the AI resurgence.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
When should I create a custom loss function?
I'm using a neural network to solve a multi regression problem because I'm trying to predict continuous values. To be more specific, I'm making a tracking algorithm to track the position of an object, I'm trying to predict two values, the latitude and longitude of an object.
Now, to calculate the loss of the model, there are some common functions, like mean squared error or mean absolute error, etc., but I'm wondering if I can use some custom function, like this, to calculate the distance between the two longitude and latitude values, and then the loss would be the difference between the real distance (calculated from the real longitude and latitude) and the predicted distance (calculated from the predicted longitude and latitude). These are some thoughts from me, so I'm wondering if such an idea would make sense?
Would this work in my case better than using the mean squared error as a loss function?
I had another question in mind. In my case, I'm predicting two values (longitude and latitude), but is there a way to transform these two target values to only one value so that my neural network can learn better and faster? If yes, which method should I use? Should I calculate the summation of the two and make that as a new target? Does this make sense?

Using two value and using MSE is probably a better approach. I'd you combine the value to one value, like the case of summation, the network may fits to output 0 on one axis and the value on the other. The method you propose also have the same issue. There are many combination to the real distance, but only one is correct.
For a neural network to learn faster, one value will not help it learn faster. Instead, accuracy is often increased if the predicted value is a one hot vector of labels instead of a single value. Hope this can help you.

I didn't understand what you mean by this: " the network may fits to output 0 on one axis and the value on the other". and how can the accuracy be increased with one hot encoding? I'm trying to predict continuous values that means accuracy doesn't make sense in this case. Accuracy would make a sense in case of discrete values not continuous values

If you use 2 values a and b and you use the (a+b) as the value to compute the loss, there is many different ways that a and b can form a combination, not only the combination (longitude and latitude) you want.

exactly, that's why I hope that someone can give me a better way to do this because obviously I need to calculate the distance between two coordinates and use it as a loss function otherwise I don't know how my loss should be

MSE should work.

Alternatively, you might measure the angle between the two vectors (assuming they are points on a sphere), perhaps using their scalar product and use that as the loss function.
$a \cdot b = \|a\|\|b\|cos\theta$
(or just use polar co-ordinates)
An important question is whether the direction of the errors is likely to be uniform or whether errors in particular directions happen more often than others (in which case that needs to be built into the loss function)

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Is there any disadvantage of the maximum number of fitness function call as a stop criterion?
I'm studying different stop criteria in genetic algorithms and the advantages and disadvantages of each of them for evaluating different algorithms. One of these methods is the max number of fitness function calls (max NFFC), so that we define a value for max NFFC and, if the number of fitness function calls reached this value, the algorithm will stop. Fitness function is called for calculating the fitness of the initial population and whenever a crossover or mutation happens (if parents are chosen as offspring there is no need to compute fitness function).
I searched if there is a disadvantage or limitation about using this stop criterion, but I didn't find anything. So, I wanted to know if applying this stop criterion in my algorithm has any disadvantages or there is nothing wrong with using this criterion.

I imagine that using the MaxNFFC as a stop criterion only happens in very particular implementations. And this is its main disadvantage.
Normally, you'd evaluate each individual, each generation. So, NFFC will always be the same as the size of the population times the number of epochs (+1 to consider the initial population).
$$N*(E+1)$$
As the population size is generally constant, MaxNFFC looks a lot like an MaxEpoch stop.
$$ \frac{\text{NFFC}}{N} = E + 1 $$
So, it seems that it might be used in scenarios where:

the population size is not constant (in this case you want to make sure that at least K individuals have been evaluated before stopping).
not all individuals are evaluated each epoch. There might be a high abortive rate (individuals with invalid genomes that are kept in the population but not considered). In this case, as above, you want to perform a minimum amount of evaluations.

I wouldn't see the usage of MaxNFFC in other cases.


text:
Why is my implementation of REINFORCE algorithm for portfolio optimization not converging?
I'm trying to implement the Reinforce algorithm (Monte Carlo policy gradient) in order to optimize a portfolio of 94 stocks on a daily basis (I have suitable historical data to achieve this). The idea is the following: on each day, the input to a neural network comprises of the following:

historical daily returns (daily momenta) for previous 20 days for each of the 94 stocks
the current vector of portfolio weights (94 weights)

Therefore states are represented by 1974-dimensional vectors. The neural network is supposed to return a 94-dimensional action vector which is again a vector of (ideal) portfolio weights to invest in. Negative weights (short positions) are allowed and portfolio weights should sum to one. Since the action space is continuous I'm trying to tackle it via the Reinforce algorithm. Rewards are given by portfolio daily returns minus trading costs. Here's a code snippet:
class Policy(nn.Module):
    def __init__(self, s_size=1974, h_size=400, a_size=94):
        super().__init__()
        self.fc1 = nn.Linear(s_size, h_size)
        self.fc2 = nn.Linear(h_size, a_size)
        self.state_size = 1974
        self.action_size = 94
    def forward(self, x):
        x = F.relu(self.fc1(x))
        x = self.fc2(x)
        return x
    def act(self, state):
        state = torch.from_numpy(state).float().unsqueeze(0).to(device)
        means = self.forward(state).cpu()
        m = MultivariateNormal(means,torch.diag(torch.Tensor(np.repeat(1e-8,94))))
        action = m.sample()
        action[0] = action[0]/sum(action[0])
        return action[0], m.log_prob(action)

Notice that in order to ensure that portfolio weights (entries of the action tensor) sum to 1 I'm dividing  by their sum. Also notice that I'm sampling from a multivariate normal distribution with extremely small diagonal terms since I'd like the net to behave as deterministically as possible. (I should probably use something similar to DDPG but I wanted to try out simpler solutions to start with).
The training part looks like this:
optimizer = optim.Adam(policy.parameters(), lr=1e-3)

def reinforce(n_episodes=10000, max_t=10000, gamma=1.0, print_every=1):
    scores_deque = deque(maxlen=100)
    scores = []
    for i_episode in range(1, n_episodes+1):
        saved_log_probs = []
        rewards = []
        state = env.reset()
        for t in range(max_t):
            action, log_prob = policy.act(state)
            saved_log_probs.append(log_prob)
            state, reward, done, _ = env.step(action.detach().flatten().numpy())
            rewards.append(reward)
            if done:
                break
        scores_deque.append(sum(rewards))
        scores.append(sum(rewards))

        discounts = [gamma**i for i in range(len(rewards)+1)]
        R = sum([a*b for a,b in zip(discounts, rewards)])

        policy_loss = []
        for log_prob in saved_log_probs:
            policy_loss.append(-log_prob * R)
        policy_loss = torch.cat(policy_loss).sum()

        optimizer.zero_grad()
        policy_loss.backward()
        optimizer.step()

        if i_episode % print_every == 10:
            print('Episode {}\tAverage Score: {:.2f}'.format(i_episode, np.mean(scores_deque)))
            print(scores[-1])

    return scores, scores_deque

scores, scores_deque = reinforce()

Unfortunately, there is no convergence during training even after fiddling with the learning rate so my question is the following: is there anything blatantly wrong with my approach here and if so, how should I tackle this?

One thing you could try to simplify the output logic would be to use a softmax output and then with your outputs set a var to = (max_output - min_output)/2 then treat that number as your long/short "threshold" and this ensures that your ouput always sums to 1 while still allowing the net to learn to output short signals. I would also check to make sure you have 1.0 bias nuerons since I imagine at times (especially first epoch) you are passing in zeros for the portfolio weights.

Unfortunately it did not help with the learning error - the average reward still doesn't seem to be converging.

hmm, i would honestly try without the current portfolio contexts as input if its being passed into the input nodes in a the same way as your returns features are since they are very different features it will be hard to train a net that can handle that naively, i know it seems like it should have this info but really you want just want the best position sizing so if it works it should have the same position sizing regardless (save the fees involved in repositioning which can be handled in the reward mechanism) ill give this another look when i get home and see if i can help somehow


text:
Is there a tool to convert from the brat standoff format to CoNLL-U format?
I've been searching for a tool to convert from the brat standoff format to the CoNLL-U format, so that to use it as a parsing corpus model to the spaCy library.
Can you help me?

The brat annotation tool has provided some useful scripts for converting the annotations format including standoff format to CoNLL. Please see this source code from brat GitHub repo for converting the .ann and .txt inputs (standoff format) to .conll file: https://github.com/nlplab/brat/blob/master/tools/anntoconll.py


text:
What are the risks associated with regulating AI?
As part of a research project for college, I would like to understand what many of you astern to be the risks associated with regulating Artificial Intelligence. Such as whether regulation is too risky in regards to limiting progress or too risky in regards to uninformed regulation.

I took the link to the survey out of the main text of the question, but I think it would be ok to post in the comments: https://docs.google.com/forms/d/e/1FAIpQLSdikvY9IaDb0s-9tC2VdyDgIrxsTqumUbRhv6prgTzR1QuGwQ/viewform

Here is a link to a survey I put together. Also as part of the project. If you have the time to look at it please do! Thank you! :) https://docs.google.com/forms/d/1eA36k-NyzPLnFIjnf7JL88Ba57WLE4dX7QVC2grCcXE/edit

I don't think regulating something necessarily causes that regulation to defacto become a "risk".
Regulation - including overregulation - may, in fact, aid in the dialogue between practitioners, which may end up educating the regulators, the public and the practitioners themselves.
My answers to your survey would most likely be "it depends...", or "no risk", which isn't to say it's not an impediment, but just not a "risk", per se.

I think there is a very strong argument for regulating AI.  Chiefly, unintentional (or intentional) bias in statistically driven algorithms, and the idea that responsibility can be offloaded to processes that cannot be meaningfully punished where they transgress.  Additionally, the history of technology, especially since the industrial revolution, strongly validates neo-luddism in the sense that the problems arising from implementation of new technology are not always predictable.
In this sense, there are both ethical reasons to consider regulation, and minimax reasons (here in the sense of erring on the side of caution to minimize the maximum potential downside.)

Risk of falling behind

A risk is that not all participants will hew to the regulations, giving those who don't a significant advantage, but, that, in and of itself, is not a reason to forgo sensible regulation.
However, this is not a justification to forgo regulation in that that penalties at least serve as potential deterrent.

Opportunity cost

Not a risk, but a driver.  The idea of "leaving money on the table" in that not implementing a given technology forgoes greater utility, sacrificing potential benefit.
This is not invalid, but shouldn't ignore hidden costs.  For instance, the wide-scale deployment of even primitive bots has had a profound social impact.

My thoughts
AI is already indirectly regulated. This is important to acknowledge and this acknowledgement is missing, in my opinion, in the discourse about law and AI.
I'm assuming that your question is about law that directly aims at AI technologies and this exemplifies one of the risks of regulating AI: that the law will focus on the technology rather than outcomes.
Another concern is that law that is inadequate or outdates quickly creates a false sense of security and this could create a situation which is even more dangerous then if the laws are not there.
Law and innovation
When it comes to the view that law stifles innovation it is paramount to acknowledge that some regulation can have a very positive effect. There is no general rule that there is a inverse relation between law and innovation.
Pacing problem and Collingridge dilemma
The following is basically what Wendell Wallach says in an espisode of Future of Life Institute's AI Alignment Podcast entitled Machine Ethics and AI Governance with Wendell Wallach.

The pacing problem refers to the fact scientific discovery, and technological innovation, is far outpacing our ability to put in place appropriate ethical legal oversight.

Wendell Wallach continues to say that pacing problem converges with what is now called the Collingridge Dilemma, a problem that 'bedevilled' people in technology and governance since 1980, and he defines it the following way:

While it was easiest to regulate a technology early in its development, early in its development we have little idea of what its societal impact would be. By the time we did understand what the challenges and the societal impact the technology would be so deeply entrenched in our society that it would be very difficult to change its trajectory.

See also:

Collingridge dilemma on Wikipedia; and
The social control of technology by David Collingridge, published 1980 by Frances Pinter.

Risks of regulation?

As you mention in your survey, it is generally understood that the primary concern with regulating AI research is that other parties risk falling behind.

Should we regulate it? Can it be done?

You can't really "regulate" technological development in the same way you can regulate some other things in general. Asides from the fact that there is no global governance that can implement this regulation on nations, you can't really regulate someone's research more than you can control how people think: you just need a pen / paper / computer to do any research in math/AI.
The NSA tried to regulate encryption citing national security reasons during a saga known as the Crypto Wars. They failed.

What is AI anyways? How will we get there? What will it be like?

Honestly, from the phrasing of your questions in your survey, I get the impression that you don't really understand the hypothetical existential risk due to AI. Personally I don't really buy into their thesis, but in any case, if such a super-intelligent agent emerges, the problem isn't so much "oh no my city is destroyed" or "oh no so many people are killed", but more so "all of humanity is enslaved without being aware" or "everything is dead". We think this might happen because we assume AI is all-powerful and we project our own negative qualities onto this unknown agent with unknown power. It's mostly fear really.
This is all speculation, and by definition you cannot predict the behavior of an agent smarter than you, so literally every single comment on this topic is purely unbased speculation. The only thing that is true is that we don't know.
There is another aspect of AI which is dangerous, which more so concerns with how humans use it: i.e. facial recognition, automated weapon systems, automated hacking. These are more pressing issues.

What should we do? We are forced to research AI because no party can afford to fall behind, but at the same time we are pushing ourselves towards a dangerous future: it's a catch-22....

Consensus and current practice suggests that every researcher publicizes our results. Compared to other areas of academia, whose research is often locked behind paywall, ML/AI research is quite publicly accessible. Of course, this doesn't prevent the possibility of a rouge agent....


text:
What's going on in the equation of the variational lower bound?

I don't really understand what this equation is saying or what the purpose of the ELBO is. How does it help us find the true posterior distribution?

Can you specify the source of the image?

From this document, as you found here, $X$ is an observed variable and $Z$ is a hidden variable; $p(X)$ is the density function of $X$. The posterior distribution of the hidden variables can then be written as follows using the Bayes’ Theorem:
$$p(Z|X) = \frac{p(X|Z)p(Z)}{p(X)} = \frac{p(X|Z)p(Z)}{\int_Zp(X,Z)}$$
Now base on what you post, if we denote that $L= \mathbb{E}_q [\log p(X, Z)] + H[Z]$ ($q(Z)$ is a distribution we use to approximation the true posterior distribution $p(Z|X)$ in VB and $H[Z] = -\mathbb{E}_q [\log q(Z)]$), then it is obvious that $L$ is a lower bound of the log probability of the observations.
As a result, if in some cases we want to maximize the marginal probability (the log probability of the observations), we can instead maximize its variational lower bound $L$. As a real example, you can follow the "Multiple Object Recognition with Visual Attention" example in the referenced document.
Moreover, the term $L$ will be presented in KL-divergence that will be used to measuring the similarity of two distributions. Be aware that there is progress on the bound in this paper (Fixing a Broken ELBO).

You do not explain how $q(Z)$ is related to the last term. What is $H[Z]$? You also do not explain why we would want to maximize $p(X)$.

@nbro well noted. It is updated.

Your answer seems correct, but I think it will still be difficult for a newbie to understand the ELBO and its motivation. Maybe later I will add a more complete answer.

what does log of the P(X) get us? Why do they log it?

@DylanY It is a marginal probability. Indeed, it is used in the concept of KL-Divergence. There, it is related to the concept of entropy that there is a $\log$ in the definition of the entropy.

do you have any good learning resources on Entropy? I have incomplete idea of what it is and how it helps get the marginal.

@DylanY I think this link of wikipedia https://en.wikipedia.org/wiki/Kullback%E2%80%93Leibler_divergence could be helpful.

The use of KL provides a more intuitive way of what the ELBO is attempting to maximize.
Basically, we want to find a posterior approximation such that $p(z\mid x) \approx q(z)\in\mathcal{Q}$
$$KL(q(z)\parallel p(z\mid x)) \rightarrow \min_{q(z)\in\mathcal{Q}}$$
As a result of this, while finding this optimal posterior approximation, we maximize the probability of all the observed data $x$. Note that the evidence is usually intractable. Thus, can express the $KL$ as follows:
\begin{align*} \log p(x) &= \int q(z) \log p(x)dz \\
&= \int q(z) \log\frac{p(x,\theta)}{p(\theta\mid x)}dz \\
&= \int q(z) \log\frac{p(x,z)q(z)}{p(\theta\mid x)q(z)}dz\\
&= \int q(z) \log\frac{p(x,z)}{q(z)}dz + \int q(z) \log\frac{q(z)}{p(z\mid x)}dz \\ &= \mathcal{L}(q(z)) + KL(q(z)\parallel p(z\mid x)) \end{align*}
In this case, KL just gives us the difference between $q$ and $p$. We want to make this difference close to zero meaning that $q=p$. So, minimizing the KL is the same as maximizing the ELBO, and as a result, we obtain the lower bound in your expression. If you expand your bound, you can find a nice interpretion:
$$ \begin{align*}
\mathcal{L}(q(z)) &= \int q(z) \log\frac{p(x,z)}{q(z)}dz \\
&= \mathbb{E}_{q(z)} \log p(x\mid z) - KL(q(z)\parallel p(z)) \end{align*} $$
When we optimize this expression, we want to find a $q$ that fits our data properly and also is really close to true posterior. Thus, $\mathbb{E}_{q(z)} \log p(x\mid z)$ act as a data term and $KL(q(z)\parallel p(z)) $ as a regularizer.

I think that the best way to motivate the ELBO is to start from the minimization problem of the KL divergence (which is the actual problem you want to solve), that is, the problem of minimizing the difference between the variational distribution (a supposedly tractable distribution) and the posterior (that you want to approximate with the variational distribution), then derive the ELBO. The motivation should not be that you want to maximize $p(x)$.


text:
What are examples of promising AI/ML techniques that are computationally intractable?
To produce tangible results in the field of AI/ML, one must take theoretical results under the lens of computational complexity.
Indeed, minimax effectively solves any two-person "board game" with win/loss conditions, but the algorithm quickly becomes untenable for games of large enough size, so it's practically useless asides from toy problems.
In fact, this issue seems to cut at the heart of intelligence itself: the Frame Problem highlights this by observing that any "intelligent" agent that operates under logical axioms must somehow deal with the explosive growth of computational complexity.
So, we need to deal with computational complexity: but that doesn't mean researchers must limit themselves with practical concerns. In the past, multilayered perceptrons were thought to be intractable (I think), and thus we couldn't evaluate their utility until recently. I've heard that Bayesian techniques are conceptually elegant, but they become computationally intractable once your dataset becomes large, and thus we usually use variational methods to compute the posterior, instead of naively using the exact solution.
I'm looking for more examples like this: What are examples of promising (or neat/interesting) AI/ML techniques that are computationally intractable (or uncomputable)?

AIXI is a Bayesian, non-Markov, reinforcement learning and artificial general intelligence agent that is incomputable, given the involved incomputable Kolmogorov complexity. However, there are approximations of AIXI, such as AIXItl, described in Universal Artificial Intelligence:  Universal Artificial Intelligence: Sequential Decisions based on Algorithmic Probability (2005), by Marcus Hutter (the original author of AIXI), and MC-AIXI-CTW (which stands for Monte Carlo AIXI Context-Tree Weighting). Here is a Python implementation of MC-AIXI-CTW: https://github.com/gkassel/pyaixi.

Exact Bayesian inference is (often) intractable (i.e. there is no closed-form solution, or numerical approximations are also computationally expensive) because it involves the computation of an integral over a range of real (or even floating-point) numbers, which can be intractable.
More precisely, for example, if you want to find the parameters $\mathbf{\theta} \in \Theta$ of a model given some data $D$, then Bayesian inference is just the application of the Bayes' theorem
\begin{align}
p(\mathbf{\theta} \mid D)
&= \frac{p(D \mid \mathbf{\theta}) p(\mathbf{\theta})}{p(D)} \\
&= \frac{p(D \mid \mathbf{\theta}) p(\mathbf{\theta})}{\int_{\Theta} p(D \mid \mathbf{\theta}^\prime) p(\mathbf{\theta}^\prime) d \mathbf{\theta}^\prime} \\
&= \frac{p(D \mid \mathbf{\theta}) p(\mathbf{\theta})}{\int_{\Theta} p(D, \mathbf{\theta}^\prime) d \mathbf{\theta}^\prime } \tag{1}\label{1}
\end{align}
where $p(\mathbf{\theta} \mid D)$ is the posterior (which is what you want to find or compute), $p(D \mid \mathbf{\theta})$ is the likelihood of your data given the (fixed) parameters $\mathbf{\theta}$, $p(\mathbf{\theta})$ is the prior and $p(D) = \int_{\Theta} p(D \mid \mathbf{\theta}^\prime) p(\mathbf{\theta}^\prime) d \mathbf{\theta}^\prime$ is the evidence of the data (which is an integral given that $\mathbf{\theta}$ is assumed to be a continuous random variable), which is intractable because the integral is over all possible values of $\mathbf{\theta}$, that is, ${\Theta}$. If all terms in \ref{1} were tractable (polynomially computable), then, given more data $D$, you could iteratively keep on updating your posterior (which becomes your prior on the next iteration), and exact Bayesian inference would become tractable.
The variational Bayesian approach casts the problem of inferring $p(\mathbf{\theta} \mid D)$ (which requires the computation of the intractable evidence term) as an optimization problem, which approximately finds the posterior, more precisely, it approximates the intractable posterior, $p(\mathbf{\theta} \mid D)$, with a tractable one, $q(\mathbf{\theta} \mid D)$ (the variational distribution). For example, the important variational auto-encoder (VAEs) paper (which did not introduce the variational Bayesian approach) uses the variational Bayesian approach to approximate a posterior in the context of neural networks (that represent distributions), so that existing machine (or deep) learning techniques (that is, gradient descent with back-propagation) can be used to learn the parameters of a model.
The variational Bayesian approach (VBA) becomes always more appealing in machine learning. For example, Bayesian neural networks (which can partially solve some of the inherent problems of non-Bayesian neural networks) are usually inspired by the results reported in the VAE paper, which shows the feasibility of the VBA in the context of deep learning.

This question gets at a really interesting fact about AI research in general: AI is hard.
In fact, almost every AI problem is computationally hard (typically NP-Hard, or #P-Hard). This means that most new areas of AI research starts out by characterizing some problem that is intractable, and proposing an algorithm that technically works, but is too slow to be useful. However, that's not the whole story. Usually AI researchers then proceed to develop tractable techniques according to one of two schools:

Algorithms that usually work in practice, and are always fast, but are not completely correct.
Algorithms that are always correct, and are usually fast, but are sometimes very slow, or only work on specific kinds of sub-problem.

Take together, these let AI address most problems. For example:

Search was developed as a general purpose AI technique for solving planning and logic problems. The first algorithm, called the general problem solver, always worked, but was extremely slow. Eventually, we developed heuristic guided search techniques like A*, domain specific tricks like GraphPlan, and stochastic search techniques like Monte-Carlo Tree Search.
Bayesian Learning (or Bayesian Inference) has been known since the 1800's, but it is known to involve either the computation of intractable integrals, or the creation of exponentially sized discrete tables, making it NP-Hard. A very simple algorithm involves applying brute force and enumerating all of the options, but this is too slow. Eventually, we developed techniques like Gibbs Sampling (that is always fast, and usually right), or Variable Elimination (that is always right, and usually fast). Today we can solve most problems of this kind very well.
Reasoning about language was thought to be very hard (see the Frame Problem), because there are an infinite number of possible sentences, and an infinite number of possible contexts they could be used in. Exact approaches based on rules did not work. Eventually we developed probabilistic approaches like Hidden Markov Models and Deep Neural Networks, that aren't certain to work, but work so well in practice that language problems are, if not completely solve, getting very close.

Games of chance, like Poker, were thought to be impossible, because they are #P-Hard to complete exactly (this is harder than NP-Hard). There will probably never be an exact algorithm for these. In spite of this, techniques like CFR+ can derive solutions that are so close to exactly perfect that you would need to play for decades against them to tell the difference.

So, what's still hard?

Inferring the structure of a Bayesian network. This is closely related to the problem of causality. It's #P-Hard, but we don't currently have any good algorithms to even do this approximately very well. This is an active area of research.
Picking a machine learning algorithm to use for an arbitrary problem. The No Free Lunch theorem tells us this is not possible in general, but it seems like we ought to be able to do it pretty well in practice.
More to come...?

I don't consider myself an expert in Bayesian inference, although I've done my master's thesis on Bayesian neural networks, but note that MC-based approaches to approximately solve the Bayesian inference problem in the context of Bayesian neural networks (the main contributor to this specific topic was Radford M. Neal) are not very "successful", i.e. they typically only work well for small-scale problems/models. As far as I understand and recall, convergence is the main problem for this approach. This is the idea I have after having done, a few months ago, a little bit of literature review.

The logical induction algorithm can make predictions about whether mathematical statements are true or false, which are eventually consistent; e.g. if A is true, its probability will eventually reach 1; if B implies C then C's probability will eventually reach or exceed B's; the probability of D will eventually be the inverse of not(D); the probabilities of E and F will eventually reach or exceed that of E AND F; etc.
It can also give consistent predictions about itself, e.g. "the logical induction algorithm will predict the probability of X to be Y at timestep T", whilst avoiding paradoxes like the liar's paradox.

ohh, this is very cool! MIRI stuff is very hard and i am forced by dumbness to ignore much of their work, but thank you for the source and a short description

Hutter's "fastest and shortest algorithm for all well-defined problems" is the ultimate just-in-time compiler. It runs a given program and, in parallel, searches for proofs that some other program is equivalent but faster. The running program is restarted at exponentially-spaced intervals; if a faster program has been found, that is started instead. The running time of this algorithm is of the same order as the fastest provably-equivalent algorithm, plus a constant $O(1)$ term (the time taken to find the proof, which doesn't dependent on the input size). For example, it will run Bubble Sort in at most $O(n~log (n))$) time, by finding a proof that it's equivalent to such a fast algorithm (like Merge Sort) then switching to that algorithm.
Hutter's algorithm is similar to the best ahead-of-time compilers, known as super-optimisers. They search through all possible programs, starting with the smallest/fastest, until they find one equivalent to the given code. These are actually in use right now, but are only practical for programs that are a few (machine code) instructions long. The LLVM compiler contains some "peephole optimisations" (i.e. find/replace templates) that were found by a super-optimiser a few years ago. Note that super-optimisation should not be confused with super-compilation (a rather general optimisation, which is not optimal and involves no search).

Levin's search algorithm is a general method of function inversion. Many AI tasks are of this sort, e.g. given a cost or reward function (object -> cost or object -> reward), its inverse (cost -> object or reward -> object) would find an object with the given cost/reward; we could ask this inverse function for an object with low cost or high reward.
Levin's algorithm is optimal iff the given function is a "black box" with no known pattern in its output. For example, if a small change in the input produces a small change in the output, Levin search wouldn't be optimal; instead we could use hill climbing or some other gradient method.
Levin's algorithm looks for the function's inverse by running all possible programs in parallel, assigning exponentially more time to shorter programs. Whenever a program halts, we check whether its output is the desired inverse (i.e. whether givenProgram(outputOfHaltedProgram) = desiredOutput, e.g. whether cost(outputOfHaltedProgram) = low).
This way "simpler" guesses at the inverse are made first; where we define the simplicity (AKA "Levin complexity") of a value by looking through all programs $p$ which generate that value, and minimising the sum of: $p$'s length (in bits) plus the logarithm of $p$'s running time (in steps). If we ignored running time we would get Kolmogorov complexity, which is theoretically nicer but is incomputable (we don't know when to give up waiting for short non-halting programs, due to the Halting Problem). Levin complexity is computable, since we can give up waiting for those loops once they've taken exponentially-many steps as a longer solution (e.g. once we've spent $T$ steps waiting for a possible loop of length $N$, we can start trying programs that are $N+1$ bits long for $T/2$ steps).
The running time of Levin Search is of the same order as the simplest such inverse-value-generating program. However, this is misleading, since the fraction of steps allocated to running any particular program $p$ is $1/2^{complexity(p)}$, so this constant factor will be slowing down the computation of the inverse too. There is also overhead associated with context-switching between all of these programs.
The FAST algorithm does the same job as Levin Search, in the same time, but avoids the overhead of context-switching between an infinite number parallel programs. Instead it runs one program at a time, cuts it off if it hasn't halted within an appropriate number of steps, then retries for twice as many steps later on. The GUESS algorithm is also equivalent, but chooses programs at random; the expected runtime is the same, but there's no need to keep track of loop counters like in FAST, plus it can be run on parallel hardware without having to coordinate anything (whilst still avoiding the infinite parallelism of the original).
Levin search is currently impractical in its original setting of searching through general-purpose, Turing-complete programs. It can be useful in less general domains, e.g. searching through the space of hyper-parameters or other domain-specific, configuration-like "programs".

In general, partially-observable Markov decision processes (POMDPs) are also computationally intractable to solve exactly. However, there are several approximations methods. See, for example, Value-Function Approximations for Partially Observable Markov Decision Processes (2000) by Milos Hauskrecht.


text:
Using ML to encypher data for production
I am looking for research and experience working with ML models to ingest data for tasks, like text analysis, and creates a system that copies (or in other words enciphers) the input data, to then reproduce it in the future without the original.
I'm interested in how ML models can be used in this way to obfuscate information without too much information loss by the model, e.g. overfitting on purpose to create a new representation of the input information.

It sounds like you are trying to compress data, and then recover the same data later.
The most common tool for this task is an autoencoder. This model accepts data as input, and then learns to compress it and decompress it to produce something as close as possible to the original data. By making the middle layer of an autoencoder narrower, you can make the compression more lossy. By making it wider, you can make it less lossy.

Hi, thanks, I'm aware that data storage is also a tendency for other models too, hence the idea of overfitting. For example an LSTM network with with layers of r larger enough size can learn to reproduce text from the input corpus. I just wondered if there had been other issues or research in this area. E.g. taking user data, training a model, deleting the user data but actually the data is still mostly present in the model to greater of lesser extent... im interested in this grey area


text:
What can I do with an autoencoder?
I cannot find information in detail about autoencoder
What can I do with an autoencoder (and how can I do this), practically speaking?
What does the encoder (this part I think I understand) and a decoder (could not find much about this) part do? Can it for example show on an explainable way how patterns in the data are being represented?
I read some papers that say that it can be used to denoise the input, how does this work? (Am I changing the values of my input)
Is it true that an autoencoder can be also done with PCA (if we assume linearity)?

An autoencoder learns to compress data, and then to decompress it again, recovering the original data.
It does this by learning a mapping from the original feature space to a lower-dimensional space, and then another mapping back. This is indeed, like PCA. The same technique is used to compress JPEG images to transmit them over the web.
Autoencoders can denoise an image because the model will not be able to easily compress or decompress random noise, and so learns to ignore it.
Autoencoders can also be used to find embeddings of data that are likely to have semantic meaning. For example, you can use an autoencoder to compress English text, and a different one to compress French text. If you add some special constraints, then the models can learn to embed in the same lower-dimensional space. This technique underlies many of the recent advances in machine translation.


text:
Is there a way to understand neural networks without using the concept of brain?
Is there a way to understand, for instance, a multi-layered perceptron without hand-waving about them being similar to brains, etc?
For example, it is obvious that what a perceptron does is approximating a function; there might be many other ways, given a labelled dataset, to find the separation of the input area into smaller areas that correspond to the labels; however, these ways would probably be computationally rather ineffective, which is why they cannot be practically used. However, it seems that the iterative approach of finding such areas of separation may give a huge speed-up in many cases; then, natural questions arise why this speed-up may be possible, how it happens and in which cases.
One could be sure that this question was investigated. If anyone could shed any light on the history of this question, I would be very grateful.
So, why are neural networks useful and what do they do? I mean, from the practical and mathematical standpoint, without relying on the concept of "brain" or "neurons" which can explain nothing at all.

Yes, thank you, that is exactly what (part of) my question is about. In fact, I assume that I may not understand the answers, but I still think this question has its place here. I wondered whether the structure of NNs could be motivated differently, by different ideas, I mean if we forget all about brains and just have a problem at hand, either to approximate a function or to label data clusters.

tl;dr I always like to think of Neural Networks as a generalization of logistic regression.
I too don't like that, traditionally, when introducing Neural Networks, books start with biological neurons and synapses, etc. I think its more beneficial to start from statistics and linear regression, then logistic regression and then neural networks.
A perceptron is essentially a simple binary logistic regressor (if you threshold the output). If you have many perceptrons that share the same input (i.e. a layer in a neural network), you can think of it as a multi-class logistic regressor. Now, by stacking one such layer after an other, you create a Multi-Layer Perceptron (MLP), which is a Neural Network with two layers. There is equivalent to two multi-class logistic regressors stacked one after the other. One notable thing that changes is the training technique here, i.e. backpropagation (because you don't have direct access to the targets from the hidden layer). Another thing that can change is the activation function (it's not always sigmoid in Neural Networks)
Introduce sparse connectivity and weight sharing and you get a Convolutional Neural Network. Add a connection from a layer to its self (for the next timestep) and you get a Recurrent Neural Network. Likewise, you can reproduce any Neural Network through this reasoning.
I know this is an over-simplified way of presenting them, but I think you get the point.

One way to view a neural network is as a series of linear transformations.
You take a bunch of data points and look at it from a different perspective from a different space. You apply some non linear function on the data points like, ReLU, sigmoid etc. Now you repeat the same process of looking from a different space.
Our goal is to look at it from a point where things starts looking right for our tasks. These linear transformations is what the network has to optimise.

That is to say, one neuron in a layer makes one coordinate, and the resulting points are then sharply differentiated by a non-linear function. So, approximation will be almost linear at some areas that are not covered by the network's "memory", and quite non-linear at other areas where the "lines of separation" are drawn and fixed in the network's weights. As the points on the second layer correspond to whole areas on the first layer, the resulting "lines of separation" may take on all kinds of shapes, not just a direct line as on the first layer..

A good way of looking at it would be understanding neural networks mathematically, i.e. purely on the basis of the fact that you're just trying to fit a function and solve an optimisation problem (apart from looking at it as multiple units of logistic regression).
Say we want to approximate a function $y =f_w(x)$ with $x \in D$, where $D$ is our domain-space. We want this function to map to $C$, our co-domain, with all the values the function ends up taking being the set $y \in R$, our range. Essentially we frame $f(x)$ as a sequence of operations (What operation should be done where is got from common-practice, intuition, and insight mostly gained from experience) assuming that when the right parameters are used for these operations we will arrive at a very reasonable approximation of the function.
We initialise the parameters with whatever values we want initially (usually random), calling this parameter-space $W$. The essential idea would be frame another function $L(f_w(x), \hat{y})$ called the loss function which we want to minimise. This acts as a test to how good our function is - since our function parameters were initially random, the error between the function approximations and the actual range values for known points (training set) are estimated. These estimated error values and its gradient is then used by back-propagation where $w_{init}\in W$ is updated to another $w_{1}\in W$, where $w_1$ is calculated by moving on $L$ in the direction of decreasing gradient, in hopes of reaching the loss functions minima.
Simplifying, essentially all you want to do is find a $y=f_w(x)$ where parameters $w$ are to be chosen such that $L(f_w(x), \hat{y})$ is minimised for the training set.
Even though this is a very rough idea of neural networks, such a direction in thinking can especially be useful when studying generative networks and other problems where the problem has to be formulated mathematically before being able to approach it.


text:
How to choose the weights for a linear combination of heuristic functions?
I need to write a minimax algorithm with alpha-beta pruning in limited time for the 2048 game. I know expectimax is better for this work.
Assume I wrote different heuristic functions. If I want to write an evaluation function as a linear combination of these heuristic functions, do I have to give random weights, or can I calculate the optimal weights with some optimization algorithm?

What do you mean by "for good enough" in "can I calculate these weights for enough good with some algorithm?"?

I meant for a linear combination like evaluation(s) = x1.f1(s) + x2.f2(s). Assume I choose x1 and x2 as 1 and 5. And with this weights my algorithm's succes chance is %50 and if I increase value of x1 algorithm's chance will increase. What if I have 20 weight? Is there a algorithm gonna find approximate weight? I heard a algorithm called CMA-ES. I'll look at it.

Well, take a look at this duuh.


text:
Understanding the partial derivative with respect to the weight matrix and bias
Say we have the layer $X W + b = Y$.

I want to get $\frac{dL}{dW}$ and we assume I have $\frac{dL}{dY}$.
So all I need is to find $\frac{dY}{dW}$. I know that it should be $X^T\frac{dL}{dY}$ but don't understand why. please explain.
I want to get $\frac{dL}{db}$ and we assume I have $\frac{dL}{dY}$.
So all I need is to find $\frac{dY}{db}$. I know that it should be $\sum(\frac{dL}{dY})_i$ (I mean sum the rows) but I don't understand why. please explain.

Thanks :)

The TL;DR answer is that the partial derivative of $L$ with respect to the weights or bias is just an application of the chain rule. Maybe later I'll add a complete answer.

Yea I know that it is because of the chain rule. I’m looking for a concise clear proof.


text:
How do we choose the activation function for each hidden node?
I am new to neural networks. I would like to use them as a fitting or forecasting method.
A simple NN model that does not contain hidden layers, that is, the input nodes are directly connected to the outputs nodes, represents a linear model.  Nonlinearity begins to appear in an ANN model when we have hidden nodes, in which a nonlinear function is assigned to the hidden nodes, and using minimization their weights are determined.
How do we choose the non-linear activation function that should be assigned to each hidden neuron?

Choice of activation functions depends a lot on the task that you want to accomplish.

This will be of help.

To know the form of your non-linear function,  firstly you should define the type of problem you are dealing with such as an image classification task. Secondly, pick the activation functions based on your task such as sigmoid, Tanh, ReLu, LeadyRelu, Softmax etc. Overall, your ANN performance mainly depends on the number of hidden layers (hidden units), selection of activation functions,  weight decay, momentum and dropout etc.

TL;DR:One does not know ahead of time what hyper-parameters will achieve optimal performance. So what you need is an iterative implementation strategy:
Implementation Strategy
When working with neural networks it is key to make sure that you spend your time wisely. It is possible to spend lots of time on a dead end simply because you made an assumption about your model at the very beginning.
So when selecting activation functions and other hyper parameters don't over think things. That is, get a quick and dirty model up and running and tune from there. From this model you can iterate. For example, you could start with ReLU activations in the hidden layers and as you tune your model you could experiment with other other activations.
That is, the data and the task at hand along with your tuning shape your model. A highly recommended video on this is A. Ng's lecture here and this video from the A. Ng deep learning specialization.
Some content not in the video is how to use learning curves to help define your iterations. These help you decide what you should do next when your model is not achieving desired performance.

Do you know if this things have changed to nowadays?

@VerónicaRmz. Deeplearning.ai has just released an updated version of the deep learning specialization. They have one course specifically dedicated to tuning neural networks. I recommend checking it out on Coursera.


text:
An "elevator pitch" breakdown of areas of applications for Reinforcement Learning & Neural Networks vs. Genetic Algorithms
I'm looking for an "elevator pitch" breakdown of areas of applications for Reinforcement Learning & Neural Networks vs. Genetic Algorithms, both actual and theoretical.
Links are welcome, but please provide some explanation.

@NeilSlater that broad scope was the intent.  (A twitter user asked a question about the differences in terms of types of applications suitable for the different techniques.)

@NeilSlater I didn't think sharing the Twitter post was relevant, per se, although here is a link: https://twitter.com/ezhillang/status/1184147600703836160.  (Part of the reason I do a little outreach on Twitter is to try and promote participation on this stack.)   PS--thanks for the the "elevator pitch" suggestion. I've edited the question to narrow it in this regard

Thanks for the edit. I don't think it is too broad now as you are clearly asking for a short summary. However, it does suffer a little from premises not quite being correct as a question (as John's answer points out), as does the original Twitter post IMO. That will mean that part of any answer has to spend time correcting the misunderstanding or miscommunication inherent in the question. Not sure how that can be avoided, it's a normal issue on this site when someone new to a subject uses slightly incorrect assumptions or terminology

Your question suggests a confusion of techniques, representations and problems.

Neural Networks are a representation that can be used to approximate functions. A neural network approximates a function that maps from inputs to outputs by optimizing parameters (weights).
Genetic Algorithms are a technique that can be used to optimize a problem. You might chose to use a GA to optimize the weights in a neural network for instance. Or you might use it to optimize a different representation or approximation of a function.
Reinforcement Learning is a problem. In a Reinforcement learning problem, the agent learns a function mapping states to actions. You can learn this function directly in some problem domains, or by a near-direct approximation (like tile-coding), or with a function appropriator (like a neural network).

Reinforcement Learning is also a field and a set of techniques to optimize a problem.
The previous sentence is taken and summarized from Sutton and Barto (2018).

@DimitrisMonroe It's true that people talk about Reinforcement Learning as a set of related techniques. However, what relates those techniques is their application to Reinforcement Learning problems. Sutton & Barto are correct that the group of people focused on this problem are large enough to claim they constitute a field, but it doesn't make sense to ask about the difference between RL & GAs, because GAs can be used to solve RL problems, but RL problems (or even techniques used to solve RL problems) cannot be used to "solve" GAs, because GAs are a search technique.

This is a fair criticism but RL algorithms can theoretically solve a large number of problems even if they are well beyond the scope of the RL problem. An example of this is SecGan. Some people even attempt to write classifiers using DQNs and Policy Gradient Algorithms.

@DimitrisMonroe That's true, but I think the issue is in calling them "RL" algorithms. Even though this usage is somewhat commonplace, they are really "algorithms for solving RL problems". Just as you can solve a classification problem with an algorithm for regression, you can solve a classification problem with an algorithm for RL, but that doesn't make regression a type of solution, even if we often lapse into talking about it that way. I think this is really an issue of semantics though.

I agree with you, it's just semantics.


text:
When and how to use a mix of loss functions for back-propagation?
I am trying to understand the best loss function to be used with a convolutional neural network. I came to know that we can mix two loss functions. Can any body share in what case was it done and how?

Mixing loss functions is very possible.  For example, in the case of neural style transfer, there is a style loss and a content loss. Both of them are backpropagated through the network. The final loss used for the backpropagation is a weighted sum of the losses. In the case of style transfer, it ensures that the image generated is not only imitating the style of the style image, but also keeping the original content. Sometimes there is also a third loss called variation loss. This is also applied to a weight and summed. Note the weight is a hyperparameter and is not changed during training. Also, the loss should not measure the same purpose, but rather a different purpose that you want to optimize together. Example code using PyTorch:
loss1 = torch.nn.MSELoss(a,b)
loss2 = torch.nn.MSELoss(b,c)
loss = loss1 * alpha + loss2 * beta


text:
Is the gradient at a layer independent of the activations of the previous layers?
Is the gradient at a layer (of a feed-forward neural network) independent of the activations of the previous layers?
I read this in a paper titled Mean Field Residual Networks: On the Edge of Chaos (2017). I am not sure how far this is true, because the error depends on those activations.

Is the gradient at a layer (of a feed-forward neural network) independent of the activations of the previous layers?

Yes, as per @recessive answer they are indeed independent of the previous layers.
The goal of back-propagation is to trace the loss(error between target and network output) to specific weights in the network, and then tweak them to minimize this loss.
For this to be possible, the activation must be independent of previous activation functions(going forward in the network).
It is very helpful to have a good understanding of the back-propagation process when reading these papers, and I personally suggest watching this video to get a good understanding of it:
https://www.youtube.com/watch?v=Ilg3gGewQ5U

Yes, this is the premise of back-propagation, the gradient at layer $j_{n}$ is not impacted by the gradient at layer $j_{n-1}$. This allows you to start with a gradient at the output layer and propagated it back through the network to the input layer.
It is however impacted by the gradient at $j_{n+1}$, which the back-prop algorithm also follows.


text:
Is there a deep learning-based architecture for digit localisation?
I'm new to object detectors and segmentation. I want to localize digits on a plate as fast as possible. All images of the dataset are normalized to $300 \times 60$. There are different approaches to solve the problem. For example, binarization + connected component labeling, vertical and horizontal projection. The aforementioned approaches fail in ambient lights, noises, and shadows. Also, there are other approaches such as STN-OCR (based on convolutional recurrent neural networks) that need a lot of plates with different composition of numbers. I have limited plates with the same numbers (about 1000 different numbers) but totally 10000 plates in different illuminations and noises. I have a good OCR (without segmentation), so I need a network just localize digits.
Is there any deep learning-based architecture for this purpose? Can I use faster RCNN? Yolo? SSD?
I trained Faster RCNN in Matlab, but it detects too many random bounding boxes for each plate. What could be the problem?

if you need bounding box ssd/yolo could work, if you need pixel wise precition then unet.

@juvian thank you. Is there any network or architecture with less parameters? I'm worry about processing time.

no hope for FasterRCNN? I'm training Faster RCNN but it seems it can not be trained very good

Sorry have never used FasterRCNN so not sure about that one.I am doing japanese text detection with unet and its working fairly well. There are many posts about doing plate detection with opencv though (with some variations), maybe show some examples where it fails?


text:
What are some books/papers that deal with fundamental and philosophical issues of ML and relate it to the global discourse of AIs?
In my experience, most of the time, when people talk about AI nowadays they mostly mean machine learning. Despite this, ML is usually seen as a mere technique to build high-performance software.
I rarely see people discuss the foundational questions of it, such as: from which "philosophy" of AI did ML emerge? Why is ML compelling in AI research, if not by its performance? What are the fundamental differences between statistical/probabilistic AI and logical AI? For reference, this hasn't even been mentioned in my master-level course on machine learning. Even myself I used to have a distaste for ML because I thought it was just mindless data-crunching.
But, lately, I've been reading through "Probability Theory: The Logic Of Science" and I'm starting to appreciate the theoretical side of ML, for instance, how Bayesian probability can be seen as a model of plausible reasoning in humans, and how probability theory extends logic (motivating, maybe, why probabilistic AIs were the next logical [no pun intended] step after logical AI). I would like now to delve deeper into the topic.
What are some books/papers that deal with fundamental and philosophical issues of ML and relate it to the global discourse of AIs?

I'll recommend two sources:

The venerable Russell & Norvig book, which is a common text in AI courses. Russell & Norvig end each chapter with a summary of the history of the developments of the techniques they have just discussed. These sections are often skipped by novice readers, but are almost exactly what you are looking for. The ones in the back half of the book should, together, give you a good sense of the order in which developments occurred, why techniques were developed, and what advances techniques enabled.
R&N does a good job of covering what happened, but not always why. For that, you want a philosophy of AI book. I recommend Mind Design II as a starting place. This book is a chronologically organized collection of papers and academic essays by the big thinkers in philosophy of mind and in AI research. Often, the papers are responses to one another. With some side reading about the history of each author, you can begin to get a good sense of the big philosophical movements in the field over the last 70 years, and why things have changed.

If you don't want to read the book, I can give you a summary (spoilers ahead!):

1920's: behaviorists, and others, propose that Mind = Brain, and specifically focus on intelligent behavior.
1950: Turing proposes that a computer could be programmed to exhibit intelligent behavior.
1960's: Cognativists in AI, Psych, and Linguistics argue that behavior is not enough. Minds think, and thought takes the form of reasoned algorithms. The lynchpin of their argument is domains like language understanding, which they claim cannot be modeled without logic. Their work produces search algorithms, and early rule-based planning and language systems.
1970's Searle argues that computers can't think because of Phenomenology. Most AI folk ignore him, and go on working, but Philosophy & Psych take greater notice.
1970's Dryfus (and others) argue compelling that logic and reason cannot explain human thought, by dissecting the rule based systems of the day through the Frame Problem. AI researchers take some notice.
The Connectionists, especially Hinton (AI) & Churchland (Philosophy) propose the first post-Cognativist theories of mind. These focus on the idea that Mind is in the Connections (specifically, the firing patterns) of neurons, not in the brain itself. This view of minds spurs (re)-development of Neural Networks. In the 1980's, this is mostly ignored.
During the 1990's, Connectionists, and others working on probabilistic methods in AI demonstrate systems for language that are substantially better than rule based methods. Cognativists begin to decline, because the domains they claimed needed reasoned algorithms are actually better handled by statistical algorithms. Connectionist views gain support in AI and elsewhere.
Today, with rising computational power, statistical techniques come to the forefront of many AI domains. Simultainiously, the Churchlands, Rodney Brooks, and others propose further Post-Cognativist schools of thought based around dynamical systems theory and embodied cognition, which were somewhat influential in robotics. Cognativism continues to enjoy some support within the AI, Psych, and Linguistics communities, but this is much diminished. Some hybrid systems use a mix of statistical and rule-based techniques.


text:
What are the best algorithms for image segmentation tasks?
I recently started looking for networks that focus on image segmentation tasks related to biomedical applications. I could not miss the publication U-Net: Convolutional Networks for Biomedical Image Segmentation (2015) by Ronneberger, Fischer, and Brox. However, as deep learning is a fast-growing field and the article was published more than 4 years ago, I was wondering if anyone knows other algorithms that yield better results for image segmentation tasks?  And if so, do they also use a U-shape architecture (i.e. contraction path then expansion path with up-conv)?

You should try doing some research on your own through Google Scholar. According to it the paper that you linked has been referenced 8722 times. Here is a link to all the papers that reference it so try looking through it, you should definitely find something relevant.

Here's a very related question (if not a duplicate): What are some good alternatives to U-Net for biomedical image segmentation?.

U-Net and U-Net inspired architectures have been quite popular in the medical image-related tasks ever since it was first introduced. There have been several improved versions of U-Net designed for specific tasks that followed. One such example is Attention U-Net, extremely popular for Pancreas Segmentation.
Other examples of architectures that have achieved state-of-the-art results in image segmentation tasks in recent years include Multi-Scale 3DCNN + CRF, popular for Brain and Lesion images, Multi-Scale Attention for MRIs, etc. A recent paper that describes an interesting 3D FCNN architecture is HyperDense-Net, widely used for multi-modal tasks in medical image segmentation.

You can find leaderboards as well as code at this address.
For now, HRNetV2 leads the game.
The U-Net architecture is part of a broad family of network architectures that aggregate multi-scale features to extract finer details useful for semantic segmentation. Examples are Feature Pyramidal Networks (FPN), Hourglass, Encoder-Decoder, MatrixNet, etc...


text:
Why is the transformer for time series forecasting faster than RNN?
I've been reading different papers which implements the Transformer for time series forecasting. Most of the them are claiming that the training time is significantly faster then using a normal RNN. From my understanding when training such a model, you can encode the input in parallel, but the decoding is still sequential unless you're using teacher-forcing.
What makes the transformer faster than RNN in such a setting? Is there something that I am missing?

For those of you interested in the concept of teacher-forcing, have a look at the paper JT-VAE. Essentially, teacher-forcing is the trick of replacing the predictions with the actual ground-truth values, so that future predictions are based on correct past histories.

@nbro Thank you for your comment. I am aware how teacher-forcing works but if you're training a model in such a way the model is not gonna learn how to recover from a mistake. On the other hand if scheduled sampling is used i think the model might perform better, but this will significantly increase the training time.


text:
Which model can I use for this problem with multiple inputs and outputs?
Which model is the most appropriate for this problem with multiple inputs and outputs?
The data set is
A1, A2, A3, A4, A5, A6, B1, B2, B3, B4

where A1, A2, A3, A4, A5, A6 are the inputs and B1, B2, B3, B4 the outputs (this is what I want the model to predict).
What an LSTM be appropriate for this task? Any advice or hint would be much appreciated. Also if anyone can share already done examples, it would really help me a lot.

Can you please mention what is the nature of your data? In really depends on the types of your inputs and outputs. LSTM works better usually when you are dealing with sequential data or data with temporal relationship.

Thanks for your comments....It is basically electrical load/energy consumption dataset containing mainly:
Equipment Details(Eg: type of equipment, AC, Fridge, etc)
Electrical Load Detail (eg: Power, Voltage, Current, Watts, Heat dissipation ..etc)
Output data: Power, Current, Voltage etc prediction using the availale dataset...
As you can see for this dataset sequence doesnt matter. Currently the data is being calculated using different electrical power equations depending on type of equipment...So time stamping or sequence is not important..

This depend on type of data you use.
Time sequence data
If the data advanced in time, a LSTM or similar RNN should be used. RNN calculate output through time. It works very good on time series data as it have a real sense of time. While CNN and MLP could work for time series data, it often don't work that well as different timestep of data is not defined.
Non- Time sequence data
According to you previous comment, the data seems to be of this kind. In the case of your data, a normal Multi-layer perceptron works well for this. The data is a direct mapping between the input and the output. If the input data is an image, use a CNN.
For example code in keras, see here:
You need the pandas module for this to work. Run pip install pandas to install pandas.
    from keras.models import Sequential
    from keras.utils import np_utils
    from keras.layers.core import Dense, Activation, Dropout
import pandas as pd
import numpy as np

# Read data
train = pd.read_csv('../input/train.csv')
labels = train.ix[:,0].values.astype('int32')
X_train = (train.ix[:,1:].values).astype('float32')
X_test = (pd.read_csv('../input/test.csv').values).astype('float32')

# convert list of labels to binary class matrix
y_train = np_utils.to_categorical(labels)

# pre-processing: divide by max and substract mean
scale = np.max(X_train)
X_train /= scale
X_test /= scale

mean = np.std(X_train)
X_train -= mean
X_test -= mean

input_dim = X_train.shape[1]
nb_classes = y_train.shape[1]

# Here's a Deep Dumb MLP (DDMLP)
model = Sequential()
model.add(Dense(128, input_dim=input_dim))
model.add(Activation('relu'))
model.add(Dropout(0.15))
model.add(Dense(128))
model.add(Activation('relu'))
model.add(Dropout(0.15))
model.add(Dense(nb_classes))
model.add(Activation('softmax'))

# we'll use categorical xent for the loss, and RMSprop as the optimizer
model.compile(loss='categorical_crossentropy', optimizer='rmsprop')

print("Training...")
model.fit(X_train, y_train, nb_epoch=10, batch_size=16, validation_split=0.1, show_accuracy=True, verbose=2)

print("Generating test predictions...")
preds = model.predict_classes(X_test, verbose=0)

def write_preds(preds, fname):
    pd.DataFrame({"ImageId": list(range(1,len(preds)+1)), "Label": preds}).to_csv(fname, index=False, header=True)

write_preds(preds, "keras-mlp.csv")

Code source: https://www.kaggle.com/fchollet/simple-deep-mlp-with-keras
In conclusion, in the case of our data, use a multi layer perceptron  should work. Hope kit can help you and have a nice day!

Many thanks..MLP fits my requirement. Would appreciate if you could share any example implementation using Keras if possible....

Edited the answer to include example code. Hope it can help you.


text:
Precise description of one-shot learning
I am working on classifying the Omniglot dataset, and the different papers dealing with this topic describe the problem as one-shot learning (classification). I would like to nail down a precise description of what counts as one-shot learning.
It's clear to me that in one-shot classification, a model tries to classify an input into one of $C$ classes by comparing it to exactly one example from each of the $C$ classes.
What I want to understand is:

Is it necessary that the model has never seen the input and the target examples before, for the problem to be called one-shot?

Goodfellow et. al. describe one-shot learning as an extreme case transfer learning where only one labeled example of the transfer task is presented. So, it means they are considering the training process as a kind of continuous transfer learning? What has the model learned earlier, that is being transferred?

The model has learnt the "features" for the type of inputs, eg. faces.
For the problem to be called one-shot, it needs to also correctly classify/compare any new samples. For example, in face recognition application, any new person's images should also result a positive for their own image and negative for any other seen or unseen image.
Since we are using euclidean distance of the final feature layer and not performing any final classification, we can say we are using the weights of a pretrained network and computing final value using that(distance), thus transfer learning. There is no backprop in this, but what you want to do with the embeddings, such as learning a threshold function can be considered learning.


text:
Which hyper-parameters are considered in neural architecture search?
I want to understand automatic Neural Architecture Search (NAS). I read already multiple papers, but I cannot figure out what the actual search space of NAS is / how are classical hyper-parameters considered in NAS?
My understanding:
NAS aims to find a good performing model in the search space of all possible model architectures using a certain search- and performance estimation strategy.
There are architecture-specific hyper-parameters (in the most simple feed-forward network case) like the number of hidden layers, the number of hidden neurons per layer as well as the type of activation function per neuron
There are classical hyper-parameters like learning rate, dropout rate, etc.
What I don't understand is:
What exactly is part of the model architecture as defined above? Is it only the architecture-specific hyper-parameters or also the classical hyper-parameters? In other words, what is spanning the search space in NAS: Only the architecture-specific hyper-parameters or also the classical hyper-parameters?
In case only the architecture-specific hyper-parameters are part of the NAS search space, what about the classical hyper-parameters? A certain architecture (with a fixed configuration of the architecture-specific hyper-parameters) might perform better or worse depending on the classical hyper-parameters - so not taking into account the classical hyper-parameters in the NAS search space might result in a non-optimal ultimate model architecture, or not?


text:
Would models like U-Net be able to segment objects which has label based on its surrounding context?
Suppose that we want to segment a red blob from the image, normally you will have a class for this red blob e.g. 0. And every red blob you detected will have a class of 0.
But, in my case, I want that the model will look at the surrounding context, e.g., if the red blob is surrounded by blue blobs, it should be classified as class 1, instead of 0. Like the following image.

Is this something easily achieve able with U-Net or other models (you can suggest)?
In my case, the context can be more difficult than this, e.g., if there are blue and green surrounding you, you will have another class.


text:
What is the name of an AI whose primary goal is to create a better AI?
A general AI x creates another AI y which is better than x.
y creates an AI better than itself.
And so on, with each generation's primary goal to create a better AI.
Is there a name for this.
By better, I mean survivability, ability to solve new problems, enhance human life physically and mentally, and advance our civilization to an intergalactic civilization to name a few.

Not marking any as answer as many people might provide their own take on this, otherwise, one would just see the answer marked as answer and not see other ones which might provide greater insight into AI.

I don't think there is a single standard word or phrase that covers just this concept. Perhaps recursive self-improvement matches the idea concisely - but that is not specific AI jargon.
Very little is understood about what strength this effect can have or what the limits are. Will 10 generations of self-improvement lead to a machine that is 10% better, 10 times better, or $2^{10}$ times better? And by what measure?
Some futurologists suggest this might be a very strong effect, and use the term Singularity to capture the idea that intelligence growth through recursive self-improvement will be strong, exceed human intelligence, and lead to some form of super-intelligent machine - the point at which this goal is reached is called The Singularity. Ray Kurzweil is a well-known proponent of this idea.
Specifically, use of the term Singularity implies more than just the basic recursion that you suggest, and includes assumptions of a very large effect. Plus technically, it refers to a stage that results from the recursion, not the recursion itself.
However, despite the popularity of it as a concept, whether or not such self-improving system will have a large impact on the generation of intelligent machines is completely unknown at this stage. Related research about general intelligence is still in its infancy, so it is not even clear what would count as being the first example system x.

system x sounds good to me!

Would it be fair to mention genetic algorithms? They do not operate on the same scale as @Ashwin is envisioning, but they create multiple different versions of itself and architecture, before testing and searching for which versions are best suited to solve their tasks, etc.

@Krrrl: I don't think they are relevant in the context of this answer. Perhaps evolutionary algorithms might be part of a solution to self-improving systems, perhaps not.

Direct Answer to Your Question:--
Google uses the term: Automated Machine Learning.

What this Answer is About:--

" ... A general AI x creates another AI y which is better than x. ... " ~ Ashwin Rohit (Stack Exchange user, Opening Poster)

What is the term for this: "A.I. creating A.I."?
-
What is some theory behind this:--

"The AutoML procedure has so far been applied to image recognition and language modeling. Using AI alone, the team have observed it creating programs that are on par with state-of-the-art models designed by the world’s foremost experts on machine learning." – Google's AI Is Now Creating Its Own AI. (2017, May 22). Retrieved from < https://www.iflscience.com/technology/google-ai-creating-own-ai/ >

Layperson Explanation:--

Google's AI Can Make Its Own AI Now
Google’s AI builds its own AI child and it’s better than anything humans have made
Google Researchers Are Teaching Their AI to Build Its Own, More Powerful AI

" ... Unfortunately, even people who have plenty of coding knowledge might not know how to create the kind of algorithm that can perform these tasks. Google wants to bring the ability to harness artificial intelligence to more people, though, and according to WIRED, it's doing that by teaching machine-learning software to make more machine-learning software.
The project is called AutoML, and it's designed to come up with better machine-learning software than humans can. As algorithms become more important in scientific research, healthcare, and other fields outside the direct scope of robotics and math, the number of people who could benefit from using AI has outstripped the number of people who actually know how to set up a useful machine-learning program. Though computers can do a lot, according to Google, human experts are still needed to do things like preprocess the data, set parameters, and analyze the results. These are tasks that even developers may not have experience in. ... "
– Google's AI Can Make Its Own AI Now. (2017, October 19). Retrieved from < https://www.mentalfloss.com/article/508019/googles-ai-can-make-its-own-ai-now >

We use programs to write programs.
Researchers often need tools to solve complicated problems and algorithms are often needed. They don't always have the technical experience to do this. This is an artificial intelligence-based solution to the ever-growing challenge of applying machine learning to this problem.
This allows non-experts to engage in predictive performance of their final machine learning models.
There is the potential of "feed-back between systems" when A.I. feeds into A.I., which continues to feed into itself, ad infinitum.

Business Applications and Practical Uses:--
Defer to the book: Automated Machine Learning for Business.

Accelerate your Data Value Journey with Automated Machine Learning
Leveraging the Power of Machine Learning to Save Lives [This is not medical advice.]

Technical Mirror:--

(http://www.ml4aad.org/automl/)

"What is AutoML?
  Automated Machine Learning provides methods and processes to make Machine Learning available for non-Machine Learning experts, to improve efficiency of Machine Learning and to accelerate research on Machine Learning.
Machine learning (ML) has achieved considerable successes in recent years and an ever-growing number of disciplines rely on it. However, this success crucially relies on human machine learning experts to perform the following tasks:

Preprocess and clean the data.
Select and construct appropriate features.
Select an appropriate model family.
Optimize model hyperparameters.
Postprocess machine learning models.
Critically analyze the results obtained.

As the complexity of these tasks is often beyond non-ML-experts, the rapid growth of machine learning applications has created a demand for off-the-shelf machine learning methods that can be used easily and without expert knowledge. We call the resulting research area that targets progressive automation of machine learning AutoML."
– AutoML. (n.d.). Retrieved from < http://www.ml4aad.org/automl/ >

(https://en.wikipedia.org/wiki/Automated_machine_learning)
(https://www.researchgate.net/publication/237136437_The_Nature_of_Self-Improving_Artificial_Intelligence)

Sources and References; and Further Reading:--

(https://ai.googleblog.com/2017/05/using-machine-learning-to-explore.html)
(http://www.primaryobjects.com/2013/01/27/using-artificial-intelligence-to-write-self-modifying-improving-programs/)
(https://skymind.ai/wiki/automl-automated-machine-learning-ai)
(https://www.datarobot.com/wiki/automated-machine-learning/)
(https://blog.aimultiple.com/auto-ml/)
(https://powerbi.microsoft.com/en-us/blog/announcing-automated-machine-learning-in-power-bi-general-availability/)

I strongly disagree that AutoML is relevant to recursive self-improvement. The Mental Floss headline is misleading. Even interpreting it charitably, it is only giving one level of improvement, not recursive. AutoML doesn't create new ML programs, it just automates some training.

The first thing that comes to mind when reading your question is Genetic algorithms.
They create alternate versions of themselves and measure each versions performance on a specific task, before discarding those that work poorly, while keeping the best ones for their next generation.
The mutations here are often random, and for large/complex problems, these simulations can take incredibly long time.
This group of algorithms are heavily inspired by evolution and biology, as you can see.
I realize as I read the last part of your question, that this might be on a much smaller scope than you had envisioned. But, in essence genetic algorithms does what you describe in your first part.
For the more grand-scale question, see @Neil Slater's answer.

Usually genetic algoriths don't "create alternate versions of themselves", but they manage a search within a loosely-defined space. The GA mechanisms in play (interpretation of the genome, assessing fitness, selection, creating next generation) are not the subjects themselves of evoltionary algorithms. They could be, in principle, but you would need to define a fitness function for them, which is hard.

I see now that my formulation there was inaccurate.
I agree about the fitness function, but I could only think of GA as a collective of methods that "try to find a better AI" - apart from your answer about the singularity - which I admit sounds more like what Ashwin is asking about here.

Respectfully, can we get some sources to back this answer up?

An answer being counter-intuitive (e.g. linking genetics with A.I.) does not necessarily mean it is wrong/invalid.

@Tautologicalrevelations John Doucette edited in a link to the genetic algorithms page. Sorry for not being precise enough in my original reply.

I think your answer is interesting. I don't know much about genetics. Best wishes. :)