📜 ⬆️ ⬇️

Machine learning algorithms

Machine learning as it is now


In popular machine learning methods, the program does not learn the algorithm. A classifier, a neural network, or, for the most obvious, regression methods learn, at best, a function (in a mathematical, rather than a programmer sense): having input data, output the output data. At best, this may be the only step of the algorithm and it is not clear how to scale such a solution by a whole algorithm instead of a single step. Without the ability to learn algorithms, these methods are far from AGI (Artificial General Intelligence). On the way to AGI, it would be nice to find a way for programs to learn algorithms with branching, loops, and subroutines. Next, you should teach the program to understand other programs. Further understand and improve yourself. I do not insist that this is the way people will go to AGI, but this is my humble vision.

Program as applied artificial intelligence


Unlike other methods of machine learning, in my free time I made an interactive system that asks the user questions and after each answer gives a list of possible goals - what the user might like, whether it be a new game, film, book, product or service. The meaning of the new search engine is that the user may not have an idea of ​​what he (a) is looking for, so he cannot form keywords to drive into existing search engines. But to answer the questions of the program can, and there is always the option "I do not know / find it difficult to answer."

Realization and competitors


An example of how this works can be seen in others who have done something similar: Akinator . Let's not let the idea come to me before Akinator appeared . I got to implement it only recently, and unlike Akinator, I put it in open source - ProbQA open source code here . It is not known on which algorithm Akinator works. My own algorithm in C ++ can be seen by anyone, but in order to make the code easier to read, I will tell you a little further. The matrix N on K on M is used, where N is the number of questions, K is the number of answers, M is the number of goals. The program keeps statistics on how many times users have selected the j-th goal as the one required for a set of questions and answers. Further, on the assumption of independence, the opposite is determined: the probability of the jth goal in the set of questions and answers, including all previous ones and each unasked question as a candidate, will be next. Each question is assigned a weight based on the priority function, which depends on the entropy of new (that is, after the new question) probabilities of targets and on the Euclidean distance between old and new probabilities of targets. Further, the “best” question is selected in a weighted-random manner.

Implemented only the back-end in C ++. Waiting for someone to write a front-end web application. I myself do not specialize in this.
')

The program studies the algorithms


So it turns out that the program ProbQA (Probabilistic Question Asking), unlike other methods of machine learning, is essentially capable of learning algorithms. She showed good results in studying the binary search algorithm (dichotomy), see the picture below. We can say that she learns the algorithms, because with her knowledge the program does the following: user interaction in a few steps leading to the final goals. The program asks for input, then, depending on the input, it branches and asks the user about something else.

image

The picture above shows the curve of the study of the program algorithm dichotomy. On the X axis, the number of questions posed by the program and answered by the user; on the Y axis, the percentage of correctly guessed binary search targets for 256 one-by-one attempts. Testing is always carried out on new data: we guess a random number from 0 to 999, and let the program guess it by asking questions and receiving answers from the user (in this case, the user is a testing program that knows the hidden number). Further, if ProbQA guessed correctly, or failed (asked more than 100 questions), we learn it, revealing the number chosen by the testing program.

As we see from the picture, ProbQA training up to 100% accuracy takes the number of questions and answers approximately equal to the size of the matrix. In our case, the matrix consists of 1000 questions multiplied by 5 answer choices multiplied by 1000 goals. Each i-th question of these 1000 has the form "How does the number figure comparable to the number i?". Answer options: 0 - “The coded number is much smaller than i”, 1 - “The coded number is slightly less than i”, 2 - “The coined number is i”, 3 - “The coded number is slightly more than i”, 4 - “The coded number is much larger i.

Now the question is: what is the length of the chain of questions leading to the correct goal? In the picture below we can see that at first (during training) the program asks a lot of questions, but when the program has already learned the algorithm, the average length of the chain falls to about 7 questions.

image

The result can be considered good, given that the binary search algorithm written by a human sets ln (1000) / ln (4) = 5 questions. The remaining 2 questions the program needs to continue to learn, and not give all the best, without learning anything new. This is controlled by the priority function mentioned above and by the fact that it is not a “very-most” differentiating question that is selected, but a weighted-random one.

In addition, the dichotomy algorithm written by man does not learn, it should be noted that such an algorithm is not tolerant to errors. If he receives an incorrect answer somewhere at the entrance, then after that he will not find the hidden number. ProbQA sorts targets by their probabilities.

Long-term perspective


So far in the form of links in English, because the information is not technical and can fall into the category of “dreams”.

  1. Artificial Super-Neuron
  2. New programming

If you wish, I can write a separate article based on those two.

Source: https://habr.com/ru/post/358396/


All Articles