KINOMOTO.MAG

AI Basics: Lesson 04

What is Generative AI?

Generative AI, or generative artificial intelligence, is a type of technology that can create new things, like pictures, music, or even stories, all on its own. It’s like having a very smart computer that can come up with new ideas and make something completely original, just like a human artist or writer would.

Here’s how it works:

Imagine you have a computer program that has seen lots and lots of pictures of cats. It’s been trained to understand what a cat looks like based on all those pictures. Now, if you ask the program to “create a new cat picture,” it will use what it learned from the pictures it saw before to come up with a brand new cat picture that it thinks looks realistic.

Generative AI can do this not just with pictures of cats but with all kinds of things, like landscapes, music, or even conversations. It’s able to generate new content by learning patterns and styles from existing data.

This technology has many different uses. For example, artists and musicians can use it to get inspiration for their work, or companies can use it to generate new ideas for products or advertisements. It can even be used in science and medicine to come up with new ideas for solving complex problems.

However, there are also some important things to consider with generative AI. For example, because it can create such realistic content, there are concerns about people using it to spread misinformation or create fake images or videos. So, while generative AI is very exciting and powerful, it’s also important to use it responsibly and ethically.

So what’s a prompt?

A prompt is a set of instructions or input provided by a user to guide the AI model in generating a specific output, such as an image, text, or music. It serves as a starting point or guideline for the AI to follow when creating the desired content.

For example, if you want to generate an image of a sunset over a beach, your prompt might include details such as “sunset,” “beach landscape,” “warm colors,” and “calm atmosphere.” The AI model uses this prompt to understand the user’s intentions and generate an image that aligns with the provided instructions.

In essence, a prompt acts as a communication tool between the user and the AI, helping to convey the user’s preferences, ideas, or requirements for the generated content. By crafting effective prompts, users can influence the output of generative AI models and tailor the results to their specific needs or creative vision.

Created by Kinomoto.Mag with Midjourney

Generative AI Model Techniques

There are various techniques used in generative AI, including generative adversarial networks (GANs), variational autoencoders (VAEs), and autoregressive models. GANs, for example, consist of two neural networks — a generator and a discriminator — that are trained simultaneously. The generator creates new data samples, while the discriminator evaluates these samples and provides feedback to the generator, encouraging it to produce more realistic output over time.

In more detail:

Generative Adversarial Networks (GANs):
∘ In 2014, Ian Goodfellow and associates introduced a new class of neural network architecture called GANs.


∘ They consist of two neural networks: a generator and a discriminator, which are trained simultaneously through a competitive process.


∘ The generator network learns to generate new data samples, such as images, by transforming random noise into meaningful output that resembles real data.


∘ The discriminator network, on the other hand, learns to distinguish between real data samples from a training dataset and fake samples produced by the generator.


∘ During training, the generator aims to produce data samples that are indistinguishable from real samples, while the discriminator aims to accurately classify the samples it receives.


∘ The generator and discriminator are locked in an adversarial game where the generator tries to fool the discriminator and the discriminator tries to become better at distinguishing real from fake samples.


∘ Through this adversarial process, both networks gradually improve their performance, leading to the generation of increasingly realistic data samples.

∘ Example App: Dreamscope

Variational Autoencoders (VAEs):
∘ VAEs are another type of generative model that learns to generate new data samples by compressing input data into a lower-dimensional latent space and then reconstructing it.


∘ They consist of an encoder network, a decoder network, and a latent space representation.


∘ The encoder network maps input data, such as images or text, to a probability distribution in the latent space, where each point represents a different encoding of the input.


∘ The decoder network then takes samples from the latent space and reconstructs the original input data.


∘ During training, VAEs aim to minimize the reconstruction error between the input data and the reconstructed data while also maximizing the similarity between the learned latent space distribution and a predefined prior distribution, such as a Gaussian distribution.


∘ By learning a meaningful latent space representation, VAEs can generate new data samples by sampling from the latent space and decoding them through the decoder network.

∘ Example App: Prisma

Autoregressive Models:
∘ Autoregressive models are a class of generative models that generate data sequentially, one element at a time, based on the probability distribution of previous elements.


∘ They model the conditional probability of each element in the data sequence, given the previous elements.


∘ Popular examples of autoregressive models include recurrent neural networks (RNNs), long short-term memory networks (LSTMs), and transformer models.


∘ Autoregressive models are often used for generating sequences of data, such as text, audio, or time-series data.


∘ Autoregressive models generate new data sequences by recursively sampling from the learned probability distributions, a skill they acquire during training. During generation, the models learn to predict the subsequent element in the sequence given the preceding elements.

∘ Example App: ChatGPT

Generative AI techniques such as GANs, VAEs, and autoregressive models enable the generation of new data samples by learning from existing data distributions and patterns. Each technique has its own strengths and limitations, and the choice of technique depends on the specific requirements and characteristics of the data and task at hand.

Created by Kinomoto.Mag with Midjourney

Generative AI applications

Art and Creativity: Generative AI can be used to create art, music, and literature, often producing novel and intriguing pieces that push the boundaries of human creativity.

Content Generation: In fields such as marketing and media, generative AI can be employed to automatically generate text, images, or videos for advertisements, product descriptions, or content creation.

Data Augmentation: Generative AI techniques can be used to generate synthetic data to augment existing datasets for training machine learning models, especially in scenarios where collecting real-world data is challenging or expensive.

Drug Discovery: In pharmaceutical research, generative AI can assist in the discovery of new drug compounds by generating molecular structures with desired properties.

Simulation and Gaming: Generative AI can create realistic virtual environments, characters, and scenarios for simulation training, gaming, and virtual reality experiences.