AI Models are cool things, but how are they trained?

AI Models are cool things, but how are they trained?
AI Models are cool things, but how are they trained?

The year 2023 is coming to an end. This year, Generative AI, Artificial Intelligence, AI taking over the world, ChatGPT, Sam Altman and Elon Musk made millions of headlines. You do not need to worry; I am not talking about any of it today. I too feel tired of reading all these stories. OpenAI coup was interesting, I should admit that, but pretty much else kinda made me fed up. 

Artificial has impacted our way of living quite interestingly. You see, the Internet is mostly a safe place as long as you just surf the surface, but it does not hesitate to become nasty once you take a deep dive below and the creepy part about it is that the deep below the sea of the internet is quite addictive. You do not need to care about fake content or fake news as long as your source of information is just mainstream media - not disagreeing that they publish fake news mistakingly. But, mainstream media is known to publish and circulate a set narrative so it is okay to sometimes just check the opinions of others too. The fear of fake content was at its peak this year. I do not know why it was so hyped. As long as you are only scrolling the first search results page of Google, you should be certain that most of the time you do not need to care about fake news. But the fear was real, the common man was genuinely scared of the negative impact of AI. The fear of fake content was so widespread that Merriam-Webster chose the word, "authentic" as their word of the year 2023.

Well, if you are reading this on Hackernoon, then this should be supposed to be a tech article. Well, sorry, let me rephrase what I said. Let's discuss something related to AI but something that is not that common. 

Many people write about AI and its impact on the modern way of living. Generative AI models are a fascinating technology that humans still are not able to fully harness. It has the power to revolutionize the world. You must have read the AI models work on the principles of Machine Learning, that somehow some exceptionally genius professionals and corporations can teach machines by feeding them data. This sounds like some alien tech. 

But the question I was asking myself is how these AI trainers train their models. What approach do they take? How do they do it? Are there any drawbacks to the widely used methods?

Do you feel curious? Then sit right there and let me take you on the journey of finding the answer to these questions. But before that, let me confirm one thing I am not an AI professional and definitely not an expert in the field. I am just a curious student who loves to share what he learns every day. Training an AI model is a complex process and takes years of experience, hard work and numerous collaborators. I wish to delve deeper into the topic but that topic is for another article. In this article, I wish to stay on the topic and not get too much diverted.

When we train an AI model, we need to mainly keep three goals in mind:
  • Accuracy - It should provide the output of the query with absolute possible accuracy, with chances of low to zero errors.
  • Generalisation - When we train an AI model, we train it with certain pre-designed queries. The AI model should learn these patterns and should have the ability to apply this knowledge to unforeseen data.
  • Efficiency - The cost of operating an AI model is high. It takes best-performing servers and a lot of computing to answer even the smallest possible query. The AI model should be efficient to lessen the operating cost and provide the best answers to the user's query while also learning about the user's interests, minimizing mistakes, and logging in unexpected operations and functional issues.
While doing all this, we also need to remember that training an AI model is a tiring process that requires thousands of hours and lots of resources. We also need to remember the basic principle of doing it, that is we should be able to teach the model how to transform the raw data (training data) into actionable insights that enable the model to apply its knowledge - from the training data - across the multiple sectors and in various fields.

We can train an AI model in two ways by training it under supervision known as Supervised Learning or by letting it figure out itself called Unsupervised Learning. First, we will discuss how Supervised Learning works.

Supervised Learning is when we give the model a list of inputs and train it on the expected outputs. It is similar to training a dog, when we give the dog a treat for performing the actions of sitting and standing on our orders, the dog learns the patterns and soon gets used to it. It knows that if hears the particular word, "sit" and sits down, then he will get his favourite treat. We do not really give any treat to the AI model for its good work, but we can kind of give it our acceptance by agreeing on the output it gives to the query. Supervised Learning can guide the model and help it to better its abilities. 

The model rates its performance by comparing how far it is from the expected answer. It calculates the difference and makes the report of necessary adjustments on the parts on which it needs to be improved and adjustments are to be made. It is an important part of supervised learning where the AI model learns from its mistakes and also learns to provide answers accurately and its decision-making skills are also improved.

Unsupervised Learning is called when an AI model is given a vast amount of data to play with like a toddler is given lots of building blocks to play with. The child puts them together and makes structures or shapes which helps develop its cognitive abilities. The same is the case with the AI models. It recognizes patterns in this large ocean of training data and learns to map them. Unsupervised learning uses techniques and tools that help the AI model to organise the mapped data and visualise it. It then learns to create possible inputs and suitable outputs from them. Organising the data helps to simplify the complexity and makes the task easier and more efficient for the AI model.

There is also another form of learning which is called Reinforcement Learning. In this type of training method, the AI learn from the interaction. It is similar to the learning of an intern in a job that he wishes to join. The trainer presents questions to the model and the model has to use its decision-making skills to generate outputs that are best suited to answer the user's query. The AI model is then given a reward or penalty by the trainer based on its output. The AI model constantly tries to level up its skill as it strives to get more rewards. It should be noted that the rewards and penalties here are not real and, therefore are virtual. It is just a virtual pointing system created by the trainers for the AI models. The models are programmed to get as many rewards as possible and to avoid penalties.

Reinforcement Learning or Learning from Interaction depends on several complex algorithms to guide the model to make the best decisions. 

These were the most general and standard approach taken to train an AI model.

One might also ask the question of how the data to train the AI models are obtained?

Well, there are lots of ways of obtaining data. The best and most recommended one is to buy a data set from a reputable vendor, but most AI models are trained on all the data available online. The second option should be avoided in every case. According to recent reports, many countries including the United States, the United Kingdom and India are going to make it necessary to disclose the information for the AI companies as to from where they have acquired the training data. At the start of this year, many AI companies and services were taken to court on the accusation of stealing and violating the copyrighted works of artists to train their AI models. The most notable case was against Stability AI, Midjourney and Deviant Art.

It is quite an endeavour to train an AI model as it is no less difficult than fostering a child or a pet dog. It requires patience, hard work and resources. The field is new and there are lots of possibilities. Information provided by The Data Scientist.



Popular posts from this blog

Letter to SBI Bank Manager of Local Branch to reduce the interest rate on home loan

You visited a heritage site with your classmates and teachers. Describe what you saw and learned from your visit.

Imagine that you were all alone at home on a winter night. Suddenly there was thunder, lightning and heavy rain. There was no electricity, and the inverter in your house stopped working. Narrate how you felt and what you did at that time.

Summers are becoming hotter with each passing year. Write a description of one such very hot day. What did you see and hear as you walked outside? How were birds and animals affected?

You wake up to the sound of an unusual noise coming from outside your window. Intrigued, you peek out and see a figure standing there, unlike anything you've ever encountered before. Write a story about this unexpected visitor and the impact they have on your life.

“Every person must have some skill in life.” Describe an important skill that you are learning, giving the various advantages that will accrue to you after learning it.

Describe in detail the view from your bedroom window. Does your room overlook a park? A busy street? What are the sights, sounds and smells that you would typically see, hear and experience at different times of the day? When do you most enjoy the view? Early in the morning, in the evening or late at night?

Narrate an experience that shows appearances can be deceiving

Tuesday 13th February 2024: Practising Toposheet for Geography

"No other subject taught in school is as important as Moral Science." Express your views for or against this statement