The Basis of Generative AI


In a rapidly changing world, encounters with AI are unavoidable. I am here to overview the basis of AI. AI in itself has existed for ages through machine learning, this is what fuels the recommendations given on Pinterest and one’s feed on TikTok. Generative AI is the new breakthrough in AI: it gives computers the power to come up with new and original ideas, instead of robotically executing what it was coded to do.

Large Language Models is what ChatGPT started out as, generative AI used as a typical chatbot. The GPT stands for “Generative Pre-trained Transformer”. Simply put, the input is translated into numbers so it can be processed by the various parameters of the neural network(the brain of the program). Then the brain finds patterns, for example, to fill in the next word in the sentence. When its given more prompts it continues adding onto the sentence and generates the stories its able to do today.

There are three major models that this article focuses on:

  • Machine Learning
  • Deep Learning
  • Generative Models

Machine Learning learns through a given set of data, like a search engine which learns through both supervised and unsupervised learning. When asked a question it responds with the given data set of links and sites in its database, and then based on what people chose to click on will push some results to the top: learning as it goes. Deep Learning is known for processing large quantities of data that continuously learn through neural networks. Deep learning is often grouped alongside Machine Learning. This article is going to be focused on Generative AI Models.

Generative AI models create new content using various different sources, they are intriguing in their ability to create, an ability we thought only humans possessed. AI art generators are an excellent example of how a nonliving program can design and create original works. This AI has virtually limitless possibilities.

How Generative AI is being used?

Generative AI has also been used for:

  • simple code generation (overcoming bugs by writing parts of code and simple programs)
  • Write test cases for a users existing code
  • writing original articles on prompted topics
  • creating musical numbers (changing the output based on the users prompts and commands)

This raises the ethical concerns of deepfakes alongside it, what false video evidence AI can create of people with its ability to change parts of videos and faces its given.

How does Generative AI work behind the scenes?

GAN: Generative Adversarial Networks (GANs) is the framework for the generative AI.

Generative Adversarial Networks (GANs) use two parts, a generator and a discriminator that are competing against each other.

The generator tries to generate an AI-created output realistic enough that the discriminator can not determine it was AI-generated. The discriminator is given a data set and has to compare the AI responses to see how large a margin of error is between the given “real” set and the AI generated response it is given. Essentially these two continue going back and forth until the generator can output a response that is almost indistinguishable by the discriminator.

This is mainly used for artwork and musical generation, where the generator is attempting to mimic creativity.

Variational Autoencoders (VAEs) use statistically measurements of variation between the input’s response and a latent space.

The latent space holds all the characteristics that AI has learned from a given set of data. The AI system is trying to produce undisguisable data by having the lowest numbers of statistical variation between the two set. By measuring the reconstruction loss we see how well the decoder can recreate the original prompt with the characteristics of the output (latent space) it is given. This continues until the AI system is trained to generate an output that the decoder can not piece back to reduce any chance of plagiarism and maintain originality.

KL divergence is another common term that simply measures the divergence of the latent space. With a greater number of divergence and more variation between the data sets it is a better sampling space and it can be more accurately generalized to a larger sample.

This is often used alongside GANs to generate images and articles by checking the outputs to ensure its reliability.

The fascinating part about AI is that it has been created in such a way that there are models that can write code, models that train the AI system, and outputs that mimic the creativity of real human art. Although it can be mildly terrifying, the capability of AI in healthcare and sustainability can be used to minimize the amount of time and manpower it takes to design new models and test them without wasting resources. Imagine creating a new drill that can reach the oil reserves without destroying the rock formations and the delicate structures of the earth, it could be tested from a lab using AI instead of taking months to physically test and measure.

Leave a Reply