# Machine Learning that improves our ML algorithms?

I know very little about ML, all I know is what I read on Flipboard or watch on youtube.

So from what I know I think ML is a series of algorithms based on statistics and evolution, such that they try to optimize some utility function.

I've read there are many algorithms, least squares, k-neighbours, neural networks etc. The only one I've studied so far is the least squares.

I've seen videos where people use neural networks algorithms (which work similar to our brain/evolution I guess, trial and error) to let the computer find its own patterns and so solve a problem. (For example I saw a guy using neural networks to teach a computer to win at Super Mario. The computer made up its own strategies and was really good)

So here's my (ignorant probably) question:

Let's call Algorithms of the first type the main algorithms/methods we are using. So for example if we use neural networks to let a machine find its own algorithms to solve Super Mario, I will call neural network algorithm of the first type and the algorithms that the machine creates algorithms of the second type.

So... is it not possible to programme a ML algorithm (based on algorithms of the first type, or also not!!) Such that we give it loads of examples of usage of algorithms of the first type, and their outcome, so that the machine can create ML algorithms for other machines to use as ML algorithms?

I hope this question makes sense, basically I'm just curious to know whether we can use ML to create an algorithm that can create better ML algorithms (or even just use our owns, but better).

• You may be talking about genetic programming: en.wikipedia.org/wiki/Genetic_programming – Tim May 9 '17 at 9:10
• Yes it is possible to some extent. Essentially the so called hyperparameters of a model are found by trial and error ( number of hidden layers, regularisation value etc). People ( eg Amazon sagemaker) are using Bayesian optimization to explore the range of possible hyperparameter values. – seanv507 Dec 30 '18 at 17:37

## 3 Answers

... let a machine find its own algorithms to solve Super Mario ...

If you mean asking the computer to solve equation and find the most likely parameters given inputs, it's exactly what a ML is doing. In fact, when you do least-square linear regression your computer give you estimated parameter for your slope and intercept.

There are many ML algorithms (e.g. reinforcement learning) that you can use to optimize a given model or framework. The parameters we are talking could be millions. It's certainly possible for a computer to optimize (improve etc) a statistical framework for other computers (or humans) to use.

However, I don't think computer is smart enough to come up with it's own algorithms. I mean, a computer magically invent a new algorithm that humans don't know, and program it itself without human inputs.

To a certain extent, this is already done. Look at deep learning in image recognition. You can actually interpret the different layers in the network as learning different visual features in the data, e.g., straight lines vs. round shapes etc.

That is, the network itself "decides" which patterns in the data encode different features, which network nodes "should" "concentrate" on which features, and how to put the results together to output whether the image is a dog or a car.

So if you call "how to put different detected features together" an algorithm, deep learning already is a meta-algorithm. And of course, other ML techniques work similarly, especially those in pattern recognition, whether it is how to isolate, detect and assemble features in handwriting recognition or in matching payments to invoices.

However, we are still far away from truly "self-learning" algorithms. Humans, when given images, can pretty much deduce that they should try to understand what the images depict. Computers that are given big heaps of bytes don't know whether they should recognize visual patterns, or detect natural language, or forecast loan defaults. They don't yet understand "meaning". (And I don't think they ever will.)

I like this question, mainly because I've had the same question myself for many years.

First it helps to understand the different branches of machine learning and AI. There's a whole bunch of terminology that might help clear this up a little. Roughly speaking when people talk about machine learning it falls into two categories supervised and unsupervised learning; supervised learning is what it sounds like you've seen, with MarI/O (the famous super mario AI) the AI processes the input data and produces a set of outputs and these outputs are scored - the score can be used by the algorithm to decide if the AI is performing well and sometimes can give the AI information on how best it can improve. With unsupervised learning there is no 'score' the algorithm is just given a bunch of input data and left to it - this is where algorithms like K-means come in. Unsupervised learning is (for the most part) clustering the data into groups of similarity.

There's a second way to divide AIs (at least for me); backpropagation based or evolutionary. Evolutionary algorithms work by having a large number (called population) of agents all trying to complete the same task. The agents are given some allotted time to solve the problem (genetic algorithms often, but not always, work in 'real time' - it can take minutes or hours to solve the problem), and then scored after this time has passed (or after they have 'died' by other means). Scoring can be anything you like, but the more closely is actually represents the problem the better (scoring in MarI/O is how to the right of the level the AI gets, but you could just as easily have used the actual score in Mario, but this would have had different effects on the progression of the AI). The top scoring agents go on to reproduce new agents for the next generation, either by a mutation of their genes or cross breading between 2 or more of the top scorers; the bottom scoring agents are deleted and replaced by the children of the top scorers.

Backpropagation on the other hand is just one single agent. It is most typically a neural network by in essence back propagation is just like linear regression, so it can work on a single or multivariate linear, polynomial or any other type of function (caveat: the function must have a differential). This type of AI has many lines of input data with associated expected values - to train a network like this you must have a whole bank of your input data and already know what the outputs are supposed to be for this training data - it's supervised learning. You then feed all your input data into your function or network and then compare what the AI is predicting to what you know is the correct answer; this difference can be used to go back through each layer of the network and accurately attribute the amount of error to each node, thereby allowing you to change the values used for the nodes. In essence you propagate the errors between the expected and the predicted values back through the layers of the network.

Now you can in theory use a genetic algorithm to model different 'hyper-parameters'of your neural network (hyper-parameters are things like the number of layers, the number of neurons per layer - these things don't change for a backpropagation AI, this would mean you have to train many hundreds of back propagation networks which would typically be time consuming and (for the most part) unnecessary - there are rules of thumb for picking hyper parameters, and if your network doesn't have the correct it's possible to just start over with different ones.