{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"<h1> The Generative AI Hype Cycle </h1>","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19"}},{"cell_type":"markdown","source":"<h2>Introduction</h2>\n<p>Generative AI refers to a class of artificial intelligence models designed to create new data by learning patterns and structures from existing data. These models can generate content, simulate human-like behavior, and make predictions based on their understanding of the input data.<br>\nGenerative AI has made incredible advancements in recent years, with language models like GPT-3 and GPT-4 capturing the attention of researchers, businesses, and the general public alike.<br>\nThe technology is certainly going through the hype cycle, especially while we are all grappling with what the technology is, how it works and establishing its limitations. Indeed, according to the Gartner Hype Cycle, a pattern that often emerges when a new brand, product, or technology is released, the visibility of the new innovation rises or declines over time based on the pattern in the figure below.</p>\n<img src = \"https://goldsguide.com/content/images/2023/01/Gartner_Hype_Cycle.jpg\" width = 400 height = 300></img>\n<p>The graph illustrates how, at the outset, our confidence levels about what can be done with the technology are high. This is not due to our understanding, but rather due to the opposite – our limited understanding combined with the hype, which makes us over-confident.\nAs we understand more about the technology our confidence in its power to impact everything diminishes. But, as our understanding grows we begin to truly understand where it can be effectively used, with the result being that our confidence begins to rise again but this time grounded less on hype and more on reality.<br>\nLet's ride the wave of hype cycle and try to understand the different phases of Generative AI hype cycle!</p>\n<h2>1.Generative AI innovation trigger : \"Attention is All you Need\" !</h2>\n<p> The release of the -now famous- \"Attention is All you Need\" paper by Google researchers in 2017 has driven a paradigm shift in AI. The paper introduced a new class of models called \"Transformers\".Since then, They have been driving a wave of advances in machine learning. Some have even dubbed transformer AI. The paper has accumulated a whopping 38k citations in only 5 years.<br>\nAnother breakthrough technique was the \"Diffusion models\", which can be regarded as the main factor for the recent breakthrough in the AI generative artworks field.<br>\nLet's have a deep dive into these 2 classes of models.</p>\n<h3>a. What are Transformers ?</h3>\n<p>\nTransformers are a type of neural network architecture that leverages a self-attention mechanisms to process and generate text efficiently and effectively.\nAttention mechanisms allow AI models to selectively focus on relevant parts of the input data while generating output, resulting in more coherent and context-aware text.\nWhile original Transformers were designed for language tasks, the same Transformer architecture has been applied to many other applications like the generation of images, audio, music, or even actions.<br>\nThe main components of a transformer architecture are the encoder and the decoder, each composed of multiple stacked layers.</p>\n<img src = \"https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter1/transformers_blocks.svg\" width =500 height =1000 ></img>\n<p>Encoder (left): The encoder receives an input and builds a (embedding) representation of it. \nEach encoder layer has two sub-layers. The encoder’s inputs first flow through a self-attention sub-layer which encodes each word, and the outputs are fed to the second sub-layer, a point-wise, fully connected feed-forward neural network.\nThe fully connected feed-forward network is applied to each position separately and identically. It consists of two linear transformations with a ReLU activation in between. <br>\nDecoder (right): The decoder uses the encoder’s representation (features) to generate an output sequence of words one token at a time. At each step, it is auto-regressive, consuming the previously generated token as additional input when generating the next.<br>\nIn addition to the two sub-layers in each encoder layer, the decoder has an additional encoder-decoder attention sub-layer, which performs multi-head attention over the output of the encoder stack.\n</p>\n<h3>a. What are Diffusion models ?</h3>\n<p>\nDiffusion models in deep learning were first introduced by Sohl-Dickstein et al. in the seminal 2015 paper “Deep Unsupervised Learning using Nonequilibrium Thermodynamics.”  Unfortunately, it remained behind the curtains for a while. \nBut, in 2019, Song et al. published a paper, “Generative Modeling by Estimating Gradients of the Data Distribution,” using the same principle but a different approach. In 2020,  Ho et al. published the paper, now-popular “Denoising Diffusion Probabilistic Models” (DDPM for short). \nAfter 2020, research in diffusion models took off. Much progress has been made in creating, training, and improving diffusion-based generative modeling in a relatively short time. \nThe structure (distribution) of the original image is gradually destroyed by adding noise and then using a neural network model to reconstruct the image, i.e., remove the noise at each step. Doing so enough times and with good data, the model eventually learns to estimate the underlying (original) data distribution. Then, we can simply start with just noise and use the trained neural network to generate a new image representative of the original training dataset.”\n</p>\n<img src = \"https://miro.medium.com/v2/resize:fit:720/format:webp/1*xc2Y6jwIUhfEGxJLytU1RA.png\" width = 600 height = 500> </img>\n<h2>2. Generative AI Peak of Inflated Expectations</h2>\n<p>\nGenerative models in different areas have followed different paths but eventually intersected with the transformer architecture. This architecture has become the backbone for many generative models in various domains, offering advantages over previous building blocks like LSTM and GRU. \n\nThe transformer architecture has been applied to NLP, resulting in large language models like BERT and GPT. In Computer Vision (CV), Vision Transformers and Swin Transformers have combined transformer architecture with visual components, allowing them to be applied to image-based tasks. \n\nTransformers have also enabled models from different fields to be fused for multimodal tasks, like CLIP, which combines vision and language to generate text and image data.\nThe graph below represents some of the most significant developments in generative AI over the past few years, but they are by no means the only ones. With continued research and development, we can expect to see even more exciting advances in the field of generative AI in the years to come.\n</p>\n<img src =\"https://storage.googleapis.com/kagglesdsdata/datasets/3484843/6086032/Slide1.JPG?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=databundle-worker-v2%40kaggle-161607.iam.gserviceaccount.com%2F20230705%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20230705T222025Z&X-Goog-Expires=345600&X-Goog-SignedHeaders=host&X-Goog-Signature=21c1f5fe5a33bd001d48cd095ac1a3b881a0ea63d9bfe8ef5cb65f43c33335b907f43859198f0ebaef5dc71c0c6b0e9418c43f5a99863b03a026395b8aa71703a2cc50eb2d51a61581cd80ff3448c93c0a9c996cc1250923f2dc1e3a0e42ae162dccb816dba79d86087e9d7e368a4748c607c3c7423f506a0df54cb92db6000bf59a6b1850b67a9bbd03b58c7934bf4aae3bfade60b28f2ad83c08cbc350319a7644b4d4c8d91eca41a44f018f78555ac11cecc4e1593b699e877755bd858c4d40f750ab3cf17e729df66111afb4fb98fb32e659ac3d288d48cfc747b6f3b88d9b8549c898dbb2ebabf69d72e8965ad164d16e6d74118fbed1be777e65c2c7ca\" width = 1500 height = 1000></img>\n<h2>3. Generative AI Trough of Disillusionment </h2>\n<p> Early vibes of Disillusionment towards generative AI start to appear. Indeed, as generative AI continues to grow in influence, ethical considerations and responsible AI development become increasingly important. Let's discuss some key ethical aspects in the context of generative AI:</p>\n<h4>a. Bias and Fairness</h4>\n<p>Ensuring that AI-generated text is free from biases and is fair is crucial for creating equitable AI systems.<br>\nTechniques like re-sampling, re-weighting, and adversarial training can help mitigate biases in AI-generated text and promote fairness.<p>\n<h4>b. Data Privacy and Security</h4>\n<p>Protecting user data and ensuring privacy is a key ethical consideration for AI development.<br>\nTechniques like federated learning, differential privacy, and secure multi-party computation can help safeguard user data and ensure privacy compliance.</p>\n<h4>a. Accountability and Responsibility</h4>\n<p>AI developers and organizations should be held accountable for the impacts of their AI systems, including any unintended consequences.<br>\nEstablishing clear guidelines, policies, and mechanisms for AI governance can help ensure responsible AI development and deployment.</p>\n<h4>a. Environmental Sustainability</h4>\n<p>Reducing the environmental impact of AI development, including energy consumption and carbon emissions, is essential for sustainable AI.<br>\nTechniques like model pruning, knowledge distillation, and more efficient hardware can help lower energy consumption and reduce the carbon footprint of AI development.</p>\n<h2>4. For when the Generative AI plateau of Productivity ?</h2>\n<p> The 2022 Gartner Hype Cycle™ for Artificial Intelligence (AI) identifies must-know innovations in AI technology and techniques that go beyond the everyday AI already being used to add intelligence to previously static business applications, devices and productivity tools.<br>\nConsidering the Gartner AI Hype Cycle, there are arguably five technologies which are related to Language Technology and Conversational AI, constituting 15% of the report.\nThese five language related technologies in the hype cycle are:\n<ul>\n<li>Semantic Search (2–5 Years from Plateau of Productivity)</li>\n<li>Chatbots (< 2 Years)</li>\n<li>NLP (5–10 Years)</li>\n<li>AI Orchestration (2–5 Years)</li>\n<li>Generative AI (2–5 Years)</li>\nGenerative AI is at the beginning of the cycle, but 2 to 5 years away from the plateau. NLP is in the trough of disillusionment, 3 cycles ahead, but is 5 to 10 years away from the plateau.\n</ul>\n</p>\n<img src = \"https://emtemp.gcom.cloud/ngw/globalassets/en/articles/images/hype-cycle-for-artificial-intelligence-2022.png\" width = 700 height =800></img>\n\n","metadata":{}},{"cell_type":"code","source":"import pandas as pd\nsubmission = pd.read_csv('/kaggle/input/2023-kaggle-ai-report/sample_submission.csv')\n\nvals = [\"Generative AI\", \n        \"https://www.kaggle.com/yossra/the-generative-ai-hype-cycle\",\n        \"'http://www.kaggle.com/.../your_peer_feedback'\",\n        \"'http://www.kaggle.com/.../your_peer_feedback'\",\n        \"'http://www.kaggle.com/.../your_peer_feedback'\",\n       ]\nsubmission.value = vals\n\nsubmission.to_csv('submission.csv', index=False)\nsubmission","metadata":{"execution":{"iopub.status.busy":"2023-07-05T22:58:33.563576Z","iopub.execute_input":"2023-07-05T22:58:33.563997Z","iopub.status.idle":"2023-07-05T22:58:33.581732Z","shell.execute_reply.started":"2023-07-05T22:58:33.563968Z","shell.execute_reply":"2023-07-05T22:58:33.580899Z"},"trusted":true},"execution_count":null,"outputs":[]}]}