How does Generative AI work?

Raksa MA
9 min readJun 5, 2023

--

Credit: Youtube

Contents
- What is Generative AI?
- How does Generative AI Work?
- How to Evaluate Generative AI Models?
- How to Develop Generative AI Models?
- What are the Applications of Generative AI?
- What are the Challenges and Limitations of Generative AI?
- What are the Benefits of Generative AI?
- References

1. What is Generative AI?

Generative artificial intelligence (AI) allows users to generate new contents from text, images, 3D models, videos or other types of data by using advanced algorithm. This is a game-changer in the field of AI and it has potential to change the whole field.

Generative AI is consider under Deep Learning and this is an example of Google Bart describe about what is can do:

Ready to take your creativity to the next level? Look no further than generative AI! This powerful technology can help you create new and exciting content, from music and art to entire virtual worlds.

Generative AI works by learning from existing data. Once it has learned the patterns in this data, it can use this knowledge to generate new content that is similar to the data it has learned from. This means that you can use generative AI to create new content that is both original and creative.

Generative AI is still a relatively new technology, but it is rapidly evolving. As the technology continues to develop, we can expect to see even more amazing applications for generative AI.

So what are you waiting for? Start exploring the power of generative AI today!

This is perfect! Bart makes zero grammatical grammar mistakes. The tone of language used is as perfect as normal human sounds!

2. How does Generative AI Work?

Generative AI algorithms work by learning the underlying patterns and structures in training data, and then use that knowledge it has grasped to generate new content that follows the same patterns and structures.

Generative Adversarial Network (GAN) is a popular approach of generative AI. GANs consists of two neural networks which are generator and discriminator. The generator is trained to create new data (which similar to training data), while the discriminator is trained to identify the difference between real and generated data (fake).

The best thing about generative AI is the ability to take advantage of different learning approaches that do not limited to unsupervised or semi-supervised learning. Therefore, many organizations can leverage large pool of unlabeled data to create Large Language Models (LLMs) or Foundation Model. LLMs could be used to lots of downstream tasks and they are base model for AI systems.

GPT 3.5 turbo and Stable Diffusions are examples of LLMs. ChatGPT use GPT 3.5 can generate excellent message based on user prompt while Stable Diffusions allow user to prompt text describing image that they want and the model generate image as close to describing text as possible.

3. How to Evaluate Generative AI Models?

Evaluating generative models is a challenge task and there is no correct way to do it. The quality of output is assessed on subjective criteria such as semantic coherence, creativity, diversity, and novelty. In my opinion there are 4 methods to evaluate LLMs response:

First, human evaluation: the best method is to ask human evaluators to rate the quality of generated output with certain criteria. For instance, evaluators evaluate visual images generated by Stable Diffusions baed on visual quality, relatedness, and diversity.

Second, use statistical metrics. For example, we can use metrics like Inception Score, Fréchet inception distance (FID), Structural Similarity Index (SSIM), etc for image generation model. For text generation model, we could use metrics like perplexity, BLEU score to qualitate the text.

Third, use domain-specific metrics: For instance, in music generation we could use metrics like melody and rhythm quality, given genre or composer similarities.

Finally, user feedback: we could gather feedback from users who interact with the output. This can be achieved through user studies, or analyzing user behaviors.

4. How to Develop Generative AI Models?

There many types of generative models, and when combining the positive aspects of each, we ends up with even more powerful models. Below, I break down the components of generative AI models.

  • Large Language Models (LLMs) : LLMs are machine learning model that process and generate natural language text. Vast availability of text data including books, social media posts, websites like Wikipedia provide the most significance advancement in LLMs development. These data provide variety of contexts that LLMs could take advantage and capable of generating good responses. Therefore, LLMs typically used for chatbots, smart assistants or text generation like Google BART.
  • Generative Adversarial Networks (GAN): as explained before GANs const of a generator and a discriminator.
Source: Wikipedia

During training, generator tries to create data that could trick discriminator network into wrong thinking that it’s real. The process continue until generator could produce data that is indistinguishable from real data. Therefore, the networks could improve their respective tasks to be more realistic and high quality data.

  • Transformer-based models : based on neural network to understand the context and meaning of sequential data by tracking relationships with different elements. Therefore, this model is high proficient in NLP tasks like machine translation, language modeling, and question answering. These models are implemented in GPT-4 (Generative Pre-trained Transformer 4) and be come modified for other downstream tasks that involves sequential data such as image recognition.
Source: Wikipedia
  • Variational Auto Encoder models (VAEs) : these models are comparable to GANs, and they operate using two neural networks: ender and decoders. They are capable of reducing large amount of data to a smaller representation, and then generate new output that similar to the original data. VAEs typically used in image generation, videos, and audio. Interestingly, VAEs could be trained on CelebA datasets which contain of more than 200,000 celebrities images to produce new portraits to nonexistent people.
Source: Wikipedia

6. What are the Applications of Generative AI?

Generative AI is a versatile tool that can enhance the workflow of various professionals, including creatives, engineers, researchers, and scientists. Its potential applications and benefits are widespread and can be utilized across all industries and individuals.

Generative AI models have the ability to take various inputs such as text, image, audio, video, and code, and generate new content in any of these modalities. For instance, it can transform a text input into an image, convert an image into a song, or translate a video into text.

  • Coding : developers could utilize generative AI to improve their coding processes like task automation such as repetitive tasks, testing, code completion and generate new code. For example, GitHub Copilot provide developers with code suggestions and GitHub Copilot X could integrate across editor, pull requests, etc.
  • Accessibility : generative AI could help people with disabilities such as speech-to-text transcription, text-to-speech audio generation. It has paved way for more inclusive and accessible future.
  • Game industry : game studios could generate new and amazing content for gamers, reduce developers workload, and story developer by leveraging generative AI in characters, storylines, design and more. For example, This Girl Does Not Exist game.
  • Web design: Developers could use generative AI for creating layout based on user preferences and design criteria such as color scheme, or other design elements. Plus, AI could help in image and text generation uniquely. This could save lots of time, money and resource specially for start ups.
  • Web search : many companies like Microsoft start taking advantage of generative AI in web search and make it more personalized. Generative AI can be used to expand queries to improve relevance of search results. Instead of providing links, web browser could respond with natural language responses. For example Big Chat, Google Bart.
  • Healthcare: there are lots of use cases in health field including medical image, drug discovery, electronic health records, predictive analytics or even personalized medicine. In the case of medical image, Generative AI is capable of generating high quality image from noisy images to help the diagnosis of diseases and conditions. For example, NVIDIA Calara is designed for medical imaging and healthcare research.
  • Marketing and advertisement : in marketing, generative AI is very good at quickly create lots of creative content. Some companies are starting using it to personalized content based on individual preferences and behaviors by analyzing user’s browsing history and purchase behavior. Plus generative AI is now the king of chatbots where user can interact with and answer their questions correctly and elaborately. For examples tools like Jasper help marketers generate copy.
  • Art and design : for art, AI could create incredible and original portraits. Artists, designers, architects could quickly create 3D models of objects or environment and apply different styles. For example, designs has already used generator like Midjourney and Microsoft Designers to generate high quality images.
  • Finance : generative AI has the potential to improve the efficiency and accuracy of finance analysis, fraud detection, and risk management. It could also be used to automate trading strategies by analyzing market trends and making predictions on future market movement. However, there aslo concerns regarding the transparency and accountability and we must ensure it is used in a responsible and ethical manners.
  • Manufacturing : generative AI is already capable to improve the efficiency and effectiveness of manufacturing by optimizing product design, quality control, predicting maintenance needs, and supply chain control. There are concerns about job replacement and ethical concerns already.

7. What are the Challenges and Limitations of Generative AI?

Generative AI models are a relatively new technology, which means we do not yet know all the risks associated with using them. While they can produce highly convincing outputs, the information they generate may sometimes be inaccurate or biased due to the inherent biases of society and the internet. This can lead to unethical or criminal activities. Additionally, organizations that use generative AI models may face reputational and legal risks associated with publishing biased, offensive, or copyrighted content.

However, these risks can be mitigated by carefully selecting initial training data, using smaller and specialized models, customizing models based on organizational data, keeping a human in the loop to review the outputs, and avoiding using generative AI models for critical decisions.

It is important to note that the landscape of risks and opportunities in this field is rapidly changing, with new use cases and models being developed regularly. As generative AI becomes more integrated into our lives, we can expect new regulatory frameworks to emerge. As such, organizations using generative AI models should stay informed about potential regulations and risks associated with these tools.

There are more limitations such as scale of compute and infrastructure, sampling speed, lack of high quality data, data licenses, etc.

8. What are the Benefits of Generative AI?

The benefits of generative AI are numerous, including:

1. Creativity: Generative AI can create new and unique content, designs, and artworks that would be difficult or impossible to create by humans alone. This can lead to new discoveries and innovations in a variety of fields.

2. Efficiency: Generative AI can automate certain tasks and processes, such as designing products or generating personalized content, which can save time and increase productivity.

3. Personalization: Generative AI can personalize content and recommendations based on a user’s preferences and behavior, leading to a more engaging and relevant user experience.

4. Accuracy: Generative AI can analyze large amounts of data and make predictions and recommendations based on that data, leading to more accurate and informed decision-making.

5. Scalability: Generative AI can generate large amounts of content or perform complex tasks at scale, allowing businesses to reach larger audiences and achieve higher levels of efficiency.

Overall, generative AI has the potential to transform a wide range of industries and improve the efficiency, creativity, and accuracy of many processes. However, it is important to note that the use of generative AI also raises concerns around ethics, privacy, and job displacement, and care should be taken to ensure that it is used in a responsible and transparent manner.

*** Note: this last section is written by ChatGPT, as I would like to demonstrate its capabilities to you.

9. References

  1. https://www.nvidia.com/en-us/glossary/data-science/generative-ai/#:~:text=Generative%20AI%20models%20use%20neural,semi%2Dsupervised%20learning%20for%20training.
  2. https://www.mckinsey.com/featured-insights/mckinsey-explainers/what-is-generative-ai
  3. https://github.blog/2023-04-07-what-developers-need-to-know-about-generative-ai/

--

--