1 of 33

Introduction to Generative AI

Dr. Noman Islam

2 of 33

Course Plan

Week No.

Topics

1

Introduction to Generative AI

2

Introduction to machine learning and deep learning

3

Generative Adversarial Networks

4

Variational Autoencoders

5

Sequence Generation: RNN and LSTM

6

Auto-regressive models

7

Transformers

8

BERT and GPT

9

Prompt engineering

10

Reinforcement Learning for Generative AI

11

Detecting Generative AI content

12

Hallucination in Generative AI

13

Diffusion models

14

Applications of Generative AI

15

Ethical considerations

3 of 33

Marks distribution

  • Quizzes 10
  • Assignment 10
  • Project 10
  • Mid 30
  • Final Exam 40

4 of 33

Definition

Generative AI refers to models that are capable of generating new data samples that resemble or are inspired by the data they were trained on. These models use techniques such as neural networks to capture patterns and structures within the data, allowing them to generate content that is coherent and contextually relevant.

  • Open AI

5 of 33

Generative AI is a subset of artificial intelligence focused on developing algorithms and models that can autonomously create new data instances, whether in the form of images, text, music, or other types of content. These algorithms learn from existing data and aim to produce new, meaningful, and contextually relevant outputs

- Stanford University

Artificial Intelligence Laboratory

6 of 33

Generative AI potential

  • Generative AI has transformative potential across various fields, from art and entertainment to healthcare and finance.
  • Examples of Generative AI
    • Image generation,
    • language generation,
    • drug discovery, etc.

7 of 33

8 of 33

9 of 33

GAN

  • A Generative Adversarial Network (GAN) is a deep learning model that consists of two neural networks, a generator, and a discriminator, engaged in a competitive learning process to generate realistic data samples.

10 of 33

Variational auto-encoders

  • An autoencoder is a neural network architecture used for unsupervised learning, consisting of an encoder and decoder, designed to learn efficient representations of data by reconstructing input data from reduced-dimensional latent representations.
  • A Variational Autoencoder (VAE) is a probabilistic generative model that combines an encoder and decoder network to learn a latent representation of data while generating new data samples.

11 of 33

12 of 33

Auto-regressive models

  • Autoregressive models are a class of statistical models that are used to predict or generate future data points in a sequence based on the previous data points within that sequence.
  • These models are widely used in time series analysis, natural language processing, and various other fields.

13 of 33

How Generative AI works

  • Generative AI models learn from large datasets.
  • They capture statistical patterns and structures.
  • Sampling from these models produces new data.

14 of 33

Applications of Generative AI

  • Image synthesis
  • Text generation
  • Drug discovery
  • Anomaly detection

15 of 33

16 of 33

Generative AI for images

  • Generative can be used to generate art, design elements, and synthetic data for training machine learning models.
  • Style transfer techniques can be used for art, design, and photo editing applications.
  • Generative AI can convert images from one domain to another, such as turning sketches into realistic images or changing day scenes to night scenes.
  • Generative models can enhance the resolution and quality of low-resolution images.
  • This is valuable in medical imaging, satellite imagery, and enhancing old photos.

17 of 33

  • GANs can generate realistic faces and modify facial attributes like age, gender, and expressions.
  • Applications include character creation in video games, movie special effects, and identity protection.
  • Generative models can learn the normal patterns in images and identify anomalies or outliers.
  • In industries like manufacturing and healthcare, this can help detect defects or medical conditions.

18 of 33

  • Generative models can automate the creation of content for websites, social media, and marketing campaigns.
  • Chatbots powered by generative AI can generate text and images for customer interactions.
  • Generative models can fill in missing or damaged parts of images.
  • This is useful in image restoration and forensics.
  • Generative AI has been used to create original art, music, and literature.
  • Artists and creators can collaborate with AI to generate new forms of expression.

19 of 33

Generative AI for text

  • They can be used to automate content creation, such as writing articles, marketing copy, and product descriptions.
  • Generative models can perform machine translation tasks, translating text from one language to another with high accuracy.
  • Generative AI can generate concise and informative summaries of long texts.
  • Chatbots powered by generative AI can engage in natural language conversations, answer questions, and provide customer support.

20 of 33

  • Generative models can analyze text sentiment, helping businesses understand customer feedback and opinions.
  • Generative AI can customize content for individual users based on their preferences and behavior.
  • It's used in recommendation systems for products, articles, and entertainment.
  • Generative AI can create interactive text-based games and generate branching storylines.
  • Generative models can assist professionals in various domains, such as legal, medical, and technical, by providing recommendations, drafting documents, or offering expert advice.

21 of 33

  • Generative AI can generate code snippets in response to natural language descriptions, simplifying programming tasks.
  • Generative models can transcribe audio content and translate it into different languages
  • Generative AI has been used to create poetry, stories, and other forms of creative writing.
  • Generative AI can assist users in composing emails, reports, and other documents.
  • It's valuable for streamlining communication and documentation.

22 of 33

Large language models

  • Large Language Models (LLMs) are a form of generative AI. They are the algorithmic basis for chatbots like OpenAI’s ChatGPT and Google’s Bard.
  • LLMs process natural language inputs and predict the next word based on what they’ve already seen1
  • They then predict the next word, and so on until their answer is complete. In simple terms, LLMs are next-word prediction engine

23 of 33

  • LLMs are trained on a massive collection of articles, Wikipedia entries, books, internet-based resources, and other inputs to produce human-like responses to natural language queries.
  • Some popular LLMs include OpenAI’s GPT-3 and 4 LLM, Google’s LaMDA and PaLM LLM (the basis for Bard), Hugging Face’s BLOOM and XLM-RoBERTa

24 of 33

Popular LLMs

  • Turing NLG (Microsoft)
  • Gopher, Chichilla (Deepmind)
  • Switch transformer, GLAM, PALM, Lamba, T5, MT5 (Google)
  • OPT, Fairseq Dense (Meta)
  • GPT-3 versions such as GPT-Neo, GPT-J, & GPT-NeoX (Open-AI)
  • Ernie 3.0 (Baidu)

25 of 33

  • Jurassic (AI21Labs)
  • Exaone (LG)
  • Pangu Alpha (Huawei)
  • Roberta, XML-Roberta, Deberta
  • DistilBert
  • XLNet

26 of 33

27 of 33

Popular frameworks

  • Hugging Face
    • Hugging Face is an open-source data science and machine learning platform that acts as a hub for AI experts and enthusiasts, providing the infrastructure to host, train, and deploy AI models
  • Langchain
    • LangChain is a powerful open-source framework for developing applications powered by language models.
    • It provides a standard interface through which you can interact with a variety of Large Language Models (LLMs) and integrate them with your applications and custom data4.

28 of 33

    • LangChain connects to the AI models you want to use, such as OpenAI or Hugging Face, and links them with outside sources, such as Google Drive, Notion, Wikipedia, or even your Apify Actors2. It’s designed to simplify the creation of applications using LLMs3.

29 of 33

30 of 33

Challenges in Generative AI

  • Lack of transparency. Generative AI and ChatGPT models are unpredictable, and not even the companies behind them always understand everything about how they work.
  • Accuracy. Generative AI systems sometimes produce inaccurate and fabricated answers. Assess all outputs for accuracy, appropriateness and actual usefulness before relying on or publicly distributing information.

31 of 33

  • Bias. You need policies or controls in place to detect biased outputs and deal with them in a manner consistent with company policy and any relevant legal requirements.
  • Intellectual property (IP) and copyright. There are currently no verifiable data governance and protection assurances regarding confidential enterprise information. Users should assume that any data or queries they enter into the ChatGPT and its competitors will become public information, and we advise enterprises to put in place controls to avoid inadvertently exposing IP.

32 of 33

  • Bias. You need policies or controls in place to detect biased outputs and deal with them in a manner consistent with company policy and any relevant legal requirements.
  • Intellectual property (IP) and copyright. There are currently no verifiable data governance and protection assurances regarding confidential enterprise information. Users should assume that any data or queries they enter into the ChatGPT and its competitors will become public information, and we advise enterprises to put in place controls to avoid inadvertently exposing IP.

33 of 33

Conclusion

  • Recap: Summarize the key points from the presentation.
  • Encouragement: Highlight the significance of Generative AI in the AI landscape and its potential for innovation.