Summary

This document provides an introduction to generative artificial intelligence (GenAI). It covers a range of topics on Generative and discriminative AI, their uses, and applications. The document also explains the concept of neural networks. The document is likely a presentation or lecture.

Full Transcript

Generative Artificial Intelligence Introducing GenAI 1 A Review ❑ Which of the following statements best describes the key difference between generative and discriminative AI models? A. Generative models learn to replicate the u...

Generative Artificial Intelligence Introducing GenAI 1 A Review ❑ Which of the following statements best describes the key difference between generative and discriminative AI models? A. Generative models learn to replicate the underlying data distribution, while discriminative models learn the boundary between classes. B. Generative models classify data while discriminative models create new data. C. Generative models can adapt to new data while discriminative models cannot handle new data. D. Generative models only work with labeled data, whereas discriminative models can operate with unlabeled data. 2 Review ❑ Which is a common use case for discriminative models? A. Text-to-speech services B. Anomaly detection B C. Text summarization D. Data generation ❑ Which of the following tasks would be best suited for a generative model? A. Sentiment analysis of text B. Image classification C. Text-to-image synthesis C D. Spam detection in emails 3 D Review ❑ Which of the following best describes the key steps in how generative AI systems create new content? A. The system is given specific rules to follow, and it generates new content by following these rules. While rule-based AI systems exist, they are less common in modern generative AI B. The system is programmed by hand to replicate human creativity in a particular domain. Hardcoding human creativity is very difficult! GenAI takes a data-driven approach to mimic human C. The system searches the internet to find existing content, and then makes small modifications to create "new" content. GenAI creates new content rather than simply remixing or modifying existing content D. The system is trained on a large dataset, learns the patterns in the data, and then generates new data based on what it learned. 4 Review ❑ What is backpropagation used for in neural networks? A. To initialize weights B. To compute the output of the network C. To update the weights based on the error C D. To generate new training data ❑ What role do weights play in a neural network? A. They determine the structure of the network B. They influence how much input data contributes to the output B C. They represent the activation functions used D. They are used to store the training data 5 Taxonomy of Generative AI ❑ Application types ▪ Text generation ▪ Image generation ▪ Audio generation ▪ Video generation ▪ Others ❑ Deep Learning Models ▪ Convolutional neural networks (CNNs) ▪ Recurrent neural networks (RNNs) ▪ Generative Adversarial Networks (GANs) ▪ Autoencoders ▪ Diffusion model ▪ Transformer 6 Convolutional Neural Network (CNN) ❑ A convolutional neural network (CNN) is a type of NN primarily used for processing structured grid data, such as images. ❑ The use of a convolutional layer allows the network to learn spatially invariant features that are useful for the task at hand. A diagram of a layer Description automatically generated https://medium.com/@learnwithwhiteboard_digest/difference-between-ann-vs-cnn-vs-rnn-ae40269b46e7 https://www.superannotate.com/blog/guide-to-convolutional-neural-networks https://setosa.io/ev/image-kernels/ 7 Convolutional Neural Network (CNN) ❑ An image kernel is a small matrix used to apply effects like the ones you might find in Photoshop or GIMP, such as blurring, sharpening, outlining or embossing. ❑ Kernels are used in machine learning for “feature extraction”, a technique for determining the most important portions of an image. ❑ In this context, the process is referred to more generally as “convolution.” A close-up of a person's face Description automatically generated A diagram of a layer Description automatically generated https://www.superannotate.com/blog/guide-to-convolutional-neural-networks https://setosa.io/ev/image-kernels/ 8 Convolutional Neural Network (CNN) 0 -1 0 -1 5 -1 0 -1 0 Apply a 3x3 kernel to the image A close-up of a person's face Description automatically generated https://setosa.io/ev/image-kernels/ https://medium.com/@alejandro.itoaramendia/convolutional-neural-networks-cnns-a-complete-guide-a803534a1930 9 Recurrent Neural Network (RNN) ❑ A recurrent neural network (RNN) is a type of NN designed for processing sequential data. ❑ Unlike traditional feedforward neural networks, RNNs have connections that loop back on themselves, allowing them to maintain a memory of previous inputs. ❑ RNN has an internal memory. https://www.naukri.com/code360/library/ann-vs-cnn-vs-rnn 11 Recurrent Neural Network (RNN) ❑ An RNN is made up of a series of “cells,” which process the input data and produce an output. ❑ Each cell takes in an input and a “hidden state,” which represents the information from the previous time step. The hidden layer for input x1 https://www.researchgate.net/figure/Using-an-RNN-language-model-to-generate-a-word-sequence_fig6_325385139 12 Generative Adversarial Network (GAN) ❑ A GAN consists of two neural networks—a generator and a discriminator— that are trained simultaneously with opposing objectives ▪ The generator learns to generate plausible data. The generated instances become negative training examples for the discriminator. ▪ The discriminator learns to distinguish the generator's fake data from real data. The discriminator penalizes the generator for producing implausible results. Both the generator and the discriminator are neural networks https://developers.google.com/machine-learning/gan 13 14 How to train GAN (optional) Discriminator loss penalizes the discriminator for misclassifying a real instance as fake or a fake instance as real. 15 How to train GAN (optional) When will GAN converge? Generator loss penalizes the generator for failing to fool the discriminator 16 The Artistic Generator and the Detective Discriminator ❑ A GAN is a pair of computer programs that work together, just like a team. ❑ But there’s a twist: they’re also kind of working against each other, like two players in a game. This team has two members: the “generator” and the “discriminator.” https://ai.plainenglish.io/generative-adversarial-networks-gans-a-simple-explanation-6860afda181f 17 Applications of GAN ❑ Generate Photographs of Human Faces ▪ GANs can generate realistic photographs of human faces, including images of people who do not exist in the real world. You can use these rendered images for various purposes, such as creating avatars for online games or social media profiles. ❑ Generate Cartoon Characters ▪ GANs can be used to generate cartoon characters that are similar to those found in popular movies or television shows. These developed characters can create new content or customize existing characters in games and other applications. ❑ Photograph Editing ▪ GANs can be used to edit photographs in various ways, such as changing the background, adding or removing objects, or altering the appearance of people or animals in the image. ❑ Face Aging ▪ GANs can be used to generate images of people at different ages, allowing users to visualize how they might look in the future or to see what they might have looked like in the past. ❑ … 18 https://poloclub.github.io/ganlab/ 19 https://thisbeachdoesnotexist.com/ 20 Autoencoder Both Encoder and ❑ Autoencoder is a type of unsupervised deep learning network. Decoder are neural networks ❑ It is trained to copy its input to its output. “Bottleneck” It first encodes the Then decodes the image into a lower latent dimensional latent representation representation back to an image. 21 Applications of Autoencoder ❑ Dimensionality reduction ▪ Undercomplete autoencoders are those that are used for dimensionality reduction. ❑ Image denoising ▪ Autoencoders like the denoising autoencoder can be used for performing efficient and highly accurate image denoising. ❑ Generation of image and time series data ▪ Variational Autoencoders can be used to generate both image and time series data. ❑ Anomaly detection ▪ Undercomplete autoencoders can also be used for anomaly detection. 22 Transformer ❑ A neural network for language understanding ❑ Proposed by Google in 2017 ❑ Initially used for machine translation tasks and achieved optimal performance through its Encoder excellent feature extraction and parallel computing abilities Decoder ❑ Then became the foundation for pre-training models like GPT and BERT Vaswani, A. (2017). Attention is all you need. arXiv preprint arXiv:1706.03762. 23 Attention and Transformer ❑ Human brain’s information processing mechanisms ▪ Brain constantly receives massive external input - visual, auditory, tactile information ▪ For vision alone, eyes send millions of bits of data per second to the visual system ▪ The brain uses attention to address the problem of information overload 24 Attention and Transformer ❑ Self-attention mechanisms ▪ Self-attention allows the model to weigh the importance of different words in a sequence relative to each other to capture contextual relationships. What does “it” refer to in this sentence? https://jalammar.github.io/illustrated-transformer/ 25 Advantages of Transformer ❑ Limitations of CNNs and RNNs for language tasks ▪ CNNs require a fixed input size; They struggles with long-term dependencies and sequential information in the input data. ▪ RNNs suffer from long-term dependency; Compute hidden layers sequentially, leading to low efficiency. ▪ LSTMs (long short-term Memory, a type of RNN) improve on RNN’s long-term dependency, but they can only effectively handle sequences up to 200 tokens. ❑ Transformer’s Improvements ▪ Captures global information ▪ Supports parallel computation ❑ Highlights ▪ Self-attention mechanism ▪ Multi-head attention ▪ Scaled dot-product attention scoring 26 Objectives 1. Understand the differences between Generative AI and Discriminative AI. 2. Articulate a clear definition of GenAI and its operational mechanisms. 3. Distinguish different types of GenAI including their applications and models. 4. Assess the potential and limitations of GenAI in a variety of application domains. 5. Implement strategies for effective communication and judgement when interacting with GenAI. 6. Apply knowledge of GenAI to create effective prompts, facilitating better outcomes from GenAI systems. 7. Integrate the core principles of Responsible AI into the development and application of GenAI systems 29 The Potential of GenAI ❑Summarizing Information Generating concise summaries from large volumes of text Useful but verify accuracy of Extracting key points from lengthy documents summaries ❑Vast Knowledge pool May seem like an expert on any topic Do not fully Prone to overconfidence, bias, inaccuracy trust its knowledge ❑Coding Assistance Can suggest code and help debug Aid in software dev, data analysis, more Review work for errors 30 The Potential of GenAI (cont’d) ❑Creative media Tools like Midjourney and Sora produce images and video from text prompts Does not truly feel or imagine Follows human instructions creatively ❑Integration with Software Can connect with business processes Humans must review all Generate efficiencies and automation outcomes ❑… 31 The Limitations of GenAI Four variations of a prompt for a biochemistry professor ▪ Bias. ▪ Does not work well with structured data ▪ Make things up ▪ Knowledge cutoffs ▪ Limited input and output length https://www.futurelearn.com/info/courses/generative-ai-in-higher-education/0/steps/390237 32 Making things up: Hallucinations ❑ LLMs can generate incorrect or misleading information, a phenomenon known as hallucination. Hallucinations can occur due to several reasons, such as incorrect retrieval results, ambiguity in input, and over-optimization for certain objectives during training. ❑ The prevalence of hallucination in LLMs, estimated at a rate of 15% to 20% for ChatGPT, can have profound implications for companies' reputation and the reliability of Al systems. 33 Types of Hallucinations Generates sentences Sentences contradict Lacks logical contradicting prompt coherence previous text Concerns about Reduces usability Undermines reliability coherence Sentence Prompt Nonsensical Contradiction Contradiction Output Unrelated to Presents fiction Divergence in context as fact training data Spurious Spreads Causes information misinformation fabricated information Factual Source-Reference Irrelevant/Random Contradiction Divergence 34 Knowledge cutoffs ❑ An LLM’s knowledge of the world is frozen at the time of its training ❑ A model trained on data scraped from internet in Oct 2021 has no information about more recent events. 35 The Input and Output Length are Limited ❑ Many LLMs can accept a prompt of up to only a few thousand words. The total amount of context you can give it is limited. ❑ Some LLMs have longer context limits – up to 100,000 words. 36 The Input and Output Length are Limited ❑ A better way 37 Objectives 1. Understand the differences between Generative AI and Discriminative AI. 2. Articulate a clear definition of GenAI and its operational mechanisms. 3. Distinguish different types of GenAI including their applications and models. 4. Assess the potential and limitations of GenAI in a variety of application domains. 5. Implement strategies for effective communication and judgement when interacting with GenAI. 6. Apply knowledge of GenAI to create effective prompts, facilitating better outcomes from GenAI systems. 7. Integrate the core principles of Responsible AI into the development and application of GenAI systems 38 Guidelines of Effective Use of GenAI ❑Familiarization with GenAI: Your role ▪ Start with low-risk tasks to familiarize yourself with GenAI’s capabilities and limitations. ❑Awareness of AI Limitations: ▪ Be aware of GenAI’s limitations, such as GenAI hallucinations and the need for human guidance to adapt to various writing styles. ▪ Review the content generated by GenAI carefully and don’t rely on it for 100% accurate or final content. 39 Guidelines of Effective Use of GenAI Effective Use Practices: Use GenAI as a Experiment with Break down brainstorm different complex Define your tone partner or prompts and requests into and style when research styles to become multiple steps to using GenAI for assistant, not as proficient in improve content creation. an expert prompt communication content creator. engineering. with GenAI. 40 Objectives 1. Understand the differences between Generative AI and Discriminative AI. 2. Articulate a clear definition of GenAI and its operational mechanisms. 3. Distinguish different types of GenAI including their applications and models. 4. Assess the potential and limitations of GenAI in a variety of application domains. 5. Implement strategies for effective communication and judgement when interacting with GenAI. 6. Apply knowledge of GenAI to create effective prompts, facilitating better outcomes from GenAI systems. 7. Integrate the core principles of Responsible AI into the development and application of GenAI systems 41 Prompting Engineering Context Specification Conversation Every human activity Provide more details You do not have to happens with a context helps GenAI systems repeat your prompt understand your prompt every time since - Relative context better and generates a modern GenAI systems - Social context more customized have the ability to - Mental context response with fewer remember what you … errors. have said. https://mitsloanedtech.mit.edu/ai/basics/effective-prompts/ 42 Prompting Process 1. Be clear and specific in prompt 2. Think about why result isn’t giving desired output 3. Refine your prompt 4. Repeat 43 Objectives 1. Understand the differences between Generative AI and Discriminative AI. 2. Articulate a clear definition of GenAI and its operational mechanisms. 3. Distinguish different types of GenAI including their applications and models. 4. Assess the potential and limitations of GenAI in a variety of application domains. 5. Implement strategies for effective communication and judgement when interacting with GenAI. 6. Apply knowledge of GenAI to create effective prompts, facilitating better outcomes from GenAI systems. 7. Integrate the core principles of Responsible AI into the development and application of GenAI systems 44 Consequences of Unethical GenAI ❑ Distribution of harmful content ❑ Copyright and legal exposure ❑ Data privacy violations ❑ Sensitive information disclosure ❑ Unintended bias and discrimination ❑ Misinformation and deepfakes ❑ Lack of explainability and interpretability ❑ Potential for worker displacement due to automation 45 Ethical AI ❑ Transparency: AI systems should be transparent, meaning their operations and decision-making processes should be understandable to users and stakeholders. Transparency is crucial for building trust and allowing for meaningful human oversight. ❑ Fairness: AI should avoid biases that can lead to discrimination against certain groups or individuals. Fairness in AI ensures that AI systems do not perpetuate existing social inequalities and that they treat all users equitably. ❑ Accountability: When AI systems make decisions, especially those affecting human lives, it must be clear who is responsible for the outcomes. Accountability involves having mechanisms in place to track decisions back to the entities (organizations or individuals) responsible for the deployment of the AI. Note: there are more aspects to be considered in Ethical AI such as Inclusiveness, Privacy, Security, Reliability 46 Group Project Information (Tentative) ❑ Group size ▪ Maximum of three students per group ▪ Individual projects are also allowed ❑ Presentation ▪ Video format ▪ 15-minute (maximum) presentation recording ▪ Good presentations will be selected to be shown during classes ❑ Report ▪ No more than 5,000 words (excluding cover page, appendices, and references) 47 Group Project Information (Tentative) ❑ Opportunity to apply these techniques to a real-world problem or creative endeavor ❑ When you contrive, ask ▪ Why GenAI is used/needed in your project? ▪ How do you make use of GenAI in your project? ❑ Choose a specific domain or application area where Generative AI can be leveraged to augment or automate a certain task ▪ Identify a real-world problem ▪ Devising a feasible solution using generative AI technology ▪ Proceed to develop an initial demonstration of the solution ▪ Address potential environmental, social, and governance implications 48 Group Project Information (Tentative) ❑ Rubrics Report % Presentation % ❖ Team Collaboration 10 ❖ Team Collaboration 20 ❖ Report Format 10 ❖ Presentation Organization 30 ❖ Literature Review 5 ❖ Visual Aids 20 ❖ Uses language effectively 5 ❖ Engagement of Audience 20 ❖ Understanding of Course Concepts 10 ❖ Time Management 10 ❖ Ability to Apply Generative AI 20 ❖ Evaluation of Generated Contents 10 ❖ Ability to Enhance Generative Models 20 ❖ Critical Thinking of Generative AI 10 49

Use Quizgecko on...
Browser
Browser