12 march 2023
What Microsoft offers to work with AI
Today, anyone heard the words artificial intelligence, neural networks, ChatGPT . The topic is so relevant and important that it is simply impossible to pass it by. In this article, I will discuss a little about what modern artificial intelligence is and tell you about the services that you can use in Azure to work with neural networks.

Before telling you about Microsoft Azure services for working with ML and AI, I would like to talk a little bit about artificial intelligence itself...

It seems like magic: you give tasks to a chatbot or an image generator and it does everything for you. Beautiful texts and images are produced, and it seems like a human wrote and drew them. But in reality, it's not quite like that.

Modern artificial intelligence is a tool, and it's important to understand this clearly, because like any other tool, it has its pros and cons.

I probably won't talk about the pros here, as they well known. So let's focus on the cons.

Firstly, neural networks, like any other algorithms and tools, require certain computational resources, and before using them in your application, you need to understand how to create a neural network correctly and how to deploy it properly. These are completely different tasks, and they usually require different competencies. In other words, it's expensive and complicated.

Secondly, a neural network is not intelligence, it's not a human, and it doesn't know how to think. It can perform some routine tasks that a human can do, probably even better than a human. For example, a neural network can most likely recognize cat breeds with higher accuracy than a human, but there will still be errors. There are no 100% effective neural networks, just like there are no 100% effective humans.

Why did I say that a neural network and artificial intelligence are not intelligence in our human understanding? Because in the end, it's just an algorithm that transforms input data into output data in a certain (albeit extremely complex) way.

Let's look at two examples.

The first is the well-known ChatGPT.

This chat outputs texts as if they were written by a human. They are very lively, diverse, and always interesting. But the neural network itself, which is behind this chat, does not understand the meaning of the texts it produces. All it does is simply select the most probable words that should follow the previous words.

There is an article that I highly recommend you to read: "What Is ChatGPT Doing … and Why Does It Work?" by Stephen Wolfram. It is long and complex and explains how the GPT chat works. In short, it looks like this.
You enter some word sequences and the chat analyzes what you've entered and selects the most probable words to follow the current word sequence. Truly, it doesn't choose exactly the most probable word, but a slightly less probable one. This is done to make the text more natural. If the most probable word were chosen, the text would often be repetitive and not so ‘life”. Instead, the text becomes more interesting and varied. The neural network is used to select the most probable words and determine their probabilities. The article contains a fairly detailed description of how this is done.

So once again, ChatGPT doesn't think or analyze. It simply generates text based on what already exists. Each subsequent word inserted into the text is generated based on the neural network's experience in reading similar texts. That is, the chat does not understand the meaning of what it writes to you. It is important to know and accept this, as it imposes certain limitations on the use of this technology. I think that if you have used this chat a lot, you have probably noticed a certain linearity in its responses.

The second example is about the problems that can arise when using the output of a neural network. Let's say we have a camera that hangs over a busy road. Its task is to recognize the license plates of all passing cars. As we all know, neural networks do not work with 100% probability. Even 95% is very cool. A good result in practice would probably be somewhere around 85-90% for every image.

What does this mean? This means that even if we have a probability of 99.9%, on average, with 100 detections, we will get one error. Since our camera is on a busy road, if we talk about 100 cars, that's one error, 1,000 cars - that's 10 errors, and if it's 100,000 cars, that's already 1,000 errors. However, if the camera is really hanging on a large road with very heavy traffic, there may be even millions of cars passing by in a day.

And this is almost an unreachable probability for the operation of a neural network. There will probably be more errors because recognition probabilities are usually lower. And practice shows that everything depends heavily on how the camera is installed, what lighting, and so on.

I'm writing all this to say that don't believe those who say they have a fully automatic system using artificial intelligence that recognizes something. Generative networks don't work perfectly either, for example, there are still big problems with generating fingers on hands.

In our case with car numbers, there must be an additional check of the results. There must be a person who will check that there is no mistake. The same thing probably happens in any large service that operates in the market. In the end, some group of people checks the result of the neural network's work.

In conclusion, I would like to say again that artificial intelligence is not a panacea. It is a wonderful tool that solves some of the tasks well, but it is necessary to understand that this tool needs to be used properly and it also has its disadvantages. And the second point that I want to repeat is that in my personal opinion, artificial intelligence is not intelligence. It can’t think and understand.

Now let's return to the topic of the article and see what services Microsoft has for working with artificial intelligence.

The first is the Azure Machine Learning Service. This is a great service that allows you to experiment with models. Moreover, not only to train these models in some abstract form but also to publish and then use them in your projects. You can use the full power of Azure Data services as data sources for training. And you can use Azure ML Studio with a simple and clear visual interface. In general, these tools allow you to significantly speed up and simplify the creation and use of your own neural networks.
The next service logically follows from the previous one. If we already have tools for training, why not pre-train some models and make them available to everyone? So, Azure Cognitive Services is a set of pre-trained models that cover a huge range of tasks: working with voice and text (including conversion from one to the other and back), image processing, anomaly detection, content moderation, and so on.

This is also where the famous Open AI is located.

The product is quite new and is still in the preview stage. In short, there are two types of models. The first is a model related to real languages, some analogs of the ChatGPT. With OpenAI, you can integrate a GPT-like chat into your system. The second is working with code (like GitHub Copilot). Accordingly, you can add the ability to auto-generate code to your applications.

And for dessert, a couple of links related to working with neural networks that can recognize images.

One of the most famous libraries for working with images is PyTorch. Microsoft is a very active contributor to this ecosystem and there is even a separate PyTorch on Azure service that greatly simplifies working with this library by quickly deploying everything necessary in the cloud in just a few clicks.

The second link is related to another ecosystem for working with images - YOLOv8. This is a set of ready-to-use models for different image tasks. I'm providing a link to the GitHub project that allows you to import and use YOLOv8 models in the Azure Machine Learning Service.

As you can see, Microsoft is on the edge and the ecosystem it provides covers all the necessary tasks for working with ML and AI. You can use tools to create and train your own models, you can use ready-to-use models, and most importantly, you can work with generative neural networks within OpenAI.

That's all from me. I wish you wonderful and productive work on projects with neural networks! And let Microsoft help you with that! :)