Application of neural network technologies: Software development

1. Introduction


In our time, software development has to make quite a few efforts. Too much time is spent on what it would be logical to entrust the choice of computers to methodologists, designing, writing technical specifications, testing, all this is done by a person and makes it very slowly. But is it possible in principle? Maxim Shcherbakov, Doctor of Technical Sciences, in his lecture “Neural networks: maths & magic” answered: “Yes, it is possible”. It is good to have an automated assistant who will solve the problem simply having certain criteria and patterns while not paying him and he will do it in the shortest possible time, but what specific tasks can neural networks solve in our time? The development of machine learning in our day is not taking leaps and bounds today, so tomorrow machines will be able to replace a person in routine tasks. Drawing up a technical assignment is not the most pleasant thing, especially because of the need to paint everything extremely detailed and in form (for more details see paragraph 4). Each company selects a specific software development methodology and changes it extremely rarely. How to be if for the project other methodology fits better than the previous one or is the current one not suitable at all? It would be logical to replace, but which one to choose (in more detail in paragraph 5)? Proper testing should take a decent amount of time and people. Quite expensive and long (more details in paragraph 6). The neural network will reduce the cost and speed up all these stages.

2. Abbreviations


NS - Neural Networks
Software - Software
TZ - Terms of Reference
AI - Artificial Intelligence

3. Artificial neural networks


What is artificial intelligence? Roughly speaking, this is a human simulation using a computer. Turing test in some sense answers this question. It consists in the fact that during a dialogue a person must decide who is in front of him or a car. In our time, the Turing test is considered to be not quite correct and other methods of testing artificial intelligence are used. For a greater understanding of why this test is not quite correct, you can simply flip it. How does a computer know that a person is in front of him? Ask the question how much will 754534 * 32 and start the timer. Therefore, just like we cannot solve the equation quickly enough, so the machine (for the time being) cannot completely simulate human communication with all its subtleties and features. In this view, a complete simulation of the brain by a computer seems impossible. So for now, we use artificial intelligence only as helpers in a particular area.

3.1 Brief history of AI


The history of the development of artificial intelligence is not very funny and smooth. Early experiments on the creation of artificial intelligence have helped some companies save a lot of money. For example, the company Digital Equipment Corporation using artificial intelligence saved at $ 10 million per year. Chatbot, bacteria identification systems and much more were also developed. After that, artificial intelligence companies could not fulfill all of their overestimated goals and eventually closed, because of this, difficult times came for AI and the community began to look at machine learning and neural networks. In 1943, Warren McCulloch and Walter Pitts coined the term artificial neural network. A model that performs calculations using biological neurons. And 63 years later, the universities of Toronto and Montreal did begin to train deep neural networks, which was a real revolution in machine learning!

3.2 The principle of the neural network, its successes and weaknesses


In a simplified form, the principle of operation of a neural network consists in finding dependencies and changing the weights. If the action is correct, then the weights that were responsible for the given action and vice versa are amplified. To be more precise, the principle is to reduce some error function. Gradient descent is most often used for this purpose.



The success of neural networks is all heard. They defeat the champions of the GO game, to play which, in theory, the prerogative of man alone and for the computer is too complicated, but as you can see, this is not true. Not so long ago, in 2015, the AlphaGo program won the champion by winning four out of five games. Not bad really? Two years later, in 2017, the neural network was improved and it beat 9 GO champions, winning sixty out of sixty games. The worst thing for champions was that the program acted absolutely chaotically and in the end won anyway. How did Google (the developers of AlphaGo) achieve this result? Everything just improved AlphaGo trained with its predecessor. The neural network itself found flaws and corrected them.



Neural networks also learned to write music. “Having listened” to the masterpieces of world classics, the neural network composed its music and without a good understanding of the operation of machine learning, it is almost impossible to distinguish between the creation of people and the creation of a machine. At the lecture “Neural networks: maths & magic” they included one of the works of computer calculations and suggested listening to them after saying that it was created by a great musician. After listening, the listeners were asked: “Has anyone hooked?” Some answered “Yes.” It turns out the machine can create? Quite difficult to answer. To understand why, let's understand a little about the principle of operation of a neural network using the example of a room with a very large number of leaves with symbols that we do not understand. We have an algorithm for how, where and what leaf to shift, or we ourselves build this algorithm based on whether we are encouraged or scolded for our actions. And here we get a request to the input after we run to shift the leaves by our algorithm and get a set of folded leaves to exit, but we do not understand what these symbols mean at the input and what we get at the output, we are the neural network. Let's go back to making music. It turns out that the neural network does not create the work; it is just chaotically but with certain rules it hits the chords without understanding what it is doing (somewhat reminiscent of modern painting). One example of music created by the neural network from the company Yandex:


They also learned how to draw neural networks using the same principle as with music.



As you can see, machine learning allows you to solve a huge variety of tasks. But how to teach them to do all this? The secret lies in machine learning. Let's go back to the room with the leaves and remember that “we have an algorithm for how, where and which leaf to shift” in this situation, the neural network has already been trained. She knows what needs to be put and where, but there was also a second option “we ourselves build this algorithm based on whether we are encouraged or scolded for our actions” it is this option that formulates the so-called training of a neural network with reinforcement. A certain “teacher” encourages the correct actions of the neural network, as a result of which it remembers and tries to find dependence in the correct actions or the “teacher” scolds the neural network for its errors and it increasingly tries to find dependence in the correct actions. Neural networks are also taught by methods: with a teacher, without a teacher, with partial involvement of a teacher. The choice is made depending on the conditions in which the neural network is trained.

Using training with the teacher, we must submit a data set with the correct answers or another training data set to the input, after which the neural network must identify patterns and respond correctly to the test data set. Usually (which is logical) the neural network is often mistaken on the test sample because of the “retraining problem”.



When a neural network processes the same data too many times, it adapts exclusively to this sample of data, resulting in a new sample where much of the other neural network is mistaken.

Using training without a teacher, we also submit data, but we do not know the correct answer and the task is to actually find the dependence in this data. Teaching with partial involvement of the teacher is most often used when teaching neural networks capable of processing sound. We can find as many unlabeled data as we want, but we will have to do the manual markup

The most interesting (according to some opinions) is training with reinforcements, as we can essentially teach a neural network anything just noting the right or wrong action it performed. In 2017, the eSports championship in discipline “DOTA 2” called “The International 2017” was held, in which professional players played a game against the OpenAI neural network (although with some restrictions). Professionals had no chance of winning. The method of reinforcement was used to train this neural network. The neural network has played very many times and learned to win without problems. Clearly, it doesn’t work at all without problems, since the game is quite complex and you can fool the neural network with it. One professional player managed to win only thanks to deception.


Now, having understood the basics, we can discuss the use of neural networks as assistants for programmers.

4. The use of neural networks in the creation of technical specifications


4.1 Principle


Who may need software? Nowadays, everyone needs and for completely different purposes. Often, they either cannot create software themselves, or they don’t want, therefore they turn to programmers. But how to explain to the performer what you want? In principle, a programmer can make a technical task and conditionally tell what will be in the program, but not all will be completely clear due to the use of terms or will be understood wrong. How about making TK individually? It is difficult, long and not so necessary at such costs, but when it is necessary to do something difficult and for a long time, why not assign this task to a computer? The neural network will allow you to complete this task.

4.2 Need


The builder is far from programming and indeed far from the computer. For him, the line “Processor Intel Core i5 4200M 2.5 GHz and higher” will not say anything at all and why does he need TK in general? Let's teach the neural network to change the lines for each individually based on what it does. For example, take the same line from clause 4.3 “Intel Core i5 4200M 2.5 GHz processor and higher”, for example, change it to the short name and average cost of this processor on the market. So it will be more informative for the customer.

4.3 Implementation


This can be realized using the method of training with the teacher. At the entrance we give a set of the information that the performer can receive about conditional customers. Just add shortcuts and we will hang them on people, and behind each label will hang a program that will change the text. The standard classification task is a data set and several answer choices. Suppose the neural network has determined that the customer’s knowledge in this area is not at a high level and places the corresponding label on it and then turns to the program that is responsible for this label and the text is replaced with the corresponding knowledge of the customer. This is not quite the case, since the work of a neural network is reduced only to determining the type of customer, and the program itself changes the text.

How about the program itself that is responsible for the labels to be replaced with a neural network ( kremlebote ) similar to the one used to create reviews for websites, movies and in general where reviews are used. We will teach the neural network to use the terms inherent in the customer's label in exchange for programmatic terms, and soon the program will rephrase and transfer data to the artist according to the sample customer description. Most likely, at the beginning, it will be possible to use the neural networks connection only for the item “4.Technical requirements for a software product” in view of the fact that there is basically a “problem zone” there. Item “8. Work schedule "can also be transferred to the neural network, but about this in paragraph 6.
Later, when the technologies evolve a little, it will be possible to transfer the entire design of the technical task to the shoulders of the neural network, or more precisely, to the connected network of neural networks. Like our brain, the individual components will be responsible for the individual processes in our artificial neural organism. All this will allow to destroy the professional communication barrier (it is also called the communication barrier) between the customer and the performer.

4.4 Conclusion


The implementation of this is not very complicated, especially the first neural network. From the second it is necessary to tinker, but in the end she will bear fruit. Similar use of a neural network will simplify interaction between the customer and the performer.

5. The use of neural networks in the creation of optimal software development methodologies


A person hardly takes something new when he is used to it. Even if the shovel is more convenient, easier, easier, the person will continue to use the stick to dig a hole. Very clearly seen between generations. Grandmothers, having the opportunity to pay a communal apartment from home via the Internet, prefer to drive through the city floor. Why? Because, firstly, they are people and, like most people, they don’t like change very much, secondly they don’t want to learn new things, find it too difficult for them and don’t even try to understand it. With the methodologies the same story. Companies, especially large ones, will not be very willing to change the methodology that already works. But what to do if the chosen methodology is not optimal or is absolutely not suitable for this project? It is logical to say what needs to be replaced with the optimal one, but what will it be and what does optimal mean? The one that the team will easily accept, or the one that will speed up the development? Who can be entrusted with such responsible work? Let's see how neural networks can solve this.

5.1 Implementation


Most likely, for such a situation, one neural network cannot cope and again we will need a chain of connections, each of which will be responsible for a separate task. In this situation, we have a set of data on the use of the methodologies and the projects themselves, for which they were applied. You can also add data about the developers, but this will complicate things so much that we postpone for a while. In the presence of a set of data that do not have the "answer" means we use the method without a teacher. The neural network itself will find the relationship between the time spent on development and data about the project itself. Most likely, the accuracy will not be very high due to the human factor. It will take a second neural network that will analyze developers based on eg correspondence (for which their consent is needed) or how they prefer to work. And we will add labels like those that were in point 4 and we will return them to the first neural network for processing. Here you will have to use the method with the partial involvement of the teacher. We will have to select a group of people and identify their characters (labels) by tests and submit these data to the input. Now it is necessary to determine with what the neural network will look for interconnection. If we take the correspondence, people will not like it in the first place, because their personal data is used; secondly, it will not give an accurate result. Then we will try to use data on the work of these people, but here the problem is in the availability of this data for the neural network. Correspondence transfer to the input is not difficult, but how to collect and convert data on the work of these people? Head over to the other side. As the "characters" take 8 types of roles identified by Dr. Meredith Belbin.



Now we have specific labels and characteristics to determine which one to hang. It is rather difficult to take into account the human factor due to its stochastic, but nevertheless some patterns can be traced, which can be noticed by the neural network. Suppose the subject will have the first “Chairman” label, but the National Assembly will not know about it. The characteristics of this personality neural network can take from a personal matter that it will be enough. On the basis of the reports, what label will be applied to this person will also be formed. As a result, a label will be hung and sent to the first neural network for processing and finding interconnections. All this is quite difficult, but it will significantly add accuracy when choosing the methodologies by the neural network. Our chain has learned and can determine from the input data which methodology will be optimal in time, taking into account the peculiarities of the development team. If the team constantly uses the neural network to select methodologies, then step by step it will learn better and better, thus paying for itself and increasing its accuracy. Based on this, the neural network is not the best way out because of its long learning. Let's see what else we can machine learning.

5.2 Conclusion


The neural network is not quite suitable for this task due to the large number of human factors and long and expensive training.

6. Testing software using neural networks


We are all human and we err. Kevin Mitnick once said: “People are the weakest link in security. People, not technology. ” With the development of software development technologies, the same problems always remain. Flaws, bugs, errors. All this is due to human laziness, inattention, or not knowing. This problem is solved by debugging and testing.

6.1 Web application method without a teacher


Testing takes as much as sixty percent of the total time; this is the longest stage of software development. This is due to the complexity of automating this stage due to the lack of stochasticity in auto-testers and the complexity of their creation. The best option is manual testing, because no program (at the moment) can replace a person completely. Long and difficult to implement? Again we use the help of a neural network. First you need to understand what it means testing with a neural network. Immediately you need to understand that creating a universal tester will not work and you will have to create for each generalized task separately, for example, a neural network that tests sites. To begin with, we will try to understand its principle of operation and whether its use in this direction is possible. What do we serve for the entrance? What do we expect to see? The training sample will consist of proven sites on which the neural network will be trained. Releasing our friend in free vryatli swimming we will get the desired result so we will limit the NA in terms of objects that can be present on the site - all sorts of buttons, bars, checkboxes and actions that the neural network can perform. While the neural network is having fun and remembering what happens with such an action, and with this, and we are looking for a dependency, we create the most buggy website of all that we have and set up the neural network to send a message to the output, if what is happening does not match its expectation. By submitting this site to the entrance, we will receive messages about possible bugs, thereby automating the process of creating Acceptance Sheet.

Web application. Method with reinforcement. Carrot and stick.

How accurate the previous test version will be is difficult to predict since the neural network can learn wrong and expect an illogical outcome. There is a second option longer, but more accurate and versatile. The neural network will simply monitor the actions of testers, thereby learning using the reinforcement method. It will receive large amounts of data by finding a link in them and reproducing them. The neural network should record not only the actions on the site, but at what point the tester will write a message about the bug to find the connection. Here we will get a more accurate version of the offline tester. But at the same time, the human factor is present both there and there, which is not an easy task to describe with a function, therefore, human stochasticity is difficult for neural networks.

6.2 Software Testing


When testing software, we are the same as the previous section can use the method with reinforcement. An extremely versatile method that allows you to teach a neural network almost anything. Let's set the neural network to monitor the huge number of testers. We divide its functions into functional testing and non-functional testing. The neural network responsible for functional testing will be based on the terms of reference. For her training we will use a set of TZ and bugs found by programmers in these programs. Here, too, you can use the neural network from point 5 to add shortcuts to the input data. Thus, the National Assembly will be able to inform about possible bugs or errors as constantly improving itself with time and adjusting to a specific team of developers. For non-functional testing, you can use regular programs as the neural network here will only be a complication.

6.3 Conclusion


The neural network is well suited for testing sites, but it will take a lot of time to learn. Approximately the same is true with software testing, but somewhat worse and harder in the implementation of the testing itself.

7. Conclusion


Summing up, we can say that the use of neural networks for software development will speed up the process, but not in all cases. All of the above, of course, only works in theory, in practice everything may not be so rosy, but the job is to study the possibility, at least in theory, to speed up software development using a neural network. My final result of the research is the answer: and not only in theory, but with individual approaches and analysis of a person as an individual there will be big problems that are difficult to overcome at the moment. For the full use of neural networks as assistants you need a long training, which will pay off in the future. The neural network is best suited for creating technical specifications, and more precisely to simplify the interaction between the performer and the customer. The neural network destroys the communication barrier, which speeds up and facilitates the whole process. It is also worth noting the possibility of using neural networks in testing is also extremely useful. The neural network can predict a possible bug than speed up testing. This does not dramatically speed up the process, but it will make it a little easier. Unfortunately, in the selection of methodologies, neural networks are not very effective. A neural network cannot begin to understand the feelings of people, so it can only choose a methodology based on statistical data.

Neural networks are developing by leaps and bounds and who knows how quickly those same humanoid androids will appear in our homes that ( destroy all of humanity ) will improve our lives.


(Android Sophia)

Bibliography

Nikolenko, S. Deep Learning: Immersion in the World of Neural Networks / S. Nikolenko, A. Kadurin, E. Arkhangelskaya - St. Petersburg - Deep Learning. - SPb: Peter, 2018 - 480 pp., Ill. - (Series "Library programmer").

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


All Articles