Computer intelligence: generative artificial intelligence in AWS solutions
October 10, 2024
Artificial intelligence is gradually making its way into our lives in almost all areas. A new round of its development is Generative Artificial Intelligence (GenAi), which allows not only to systematize and process information but also to create content. Let's find out what GenAi is and what Amazon Web Services can offer in this area right now
As the next step in the development of artificial intelligence, generative AI makes it possible to create a variety of content, including images, videos, music, etc. It can learn human language, programming language, and various subjects such as chemistry or biology. Therefore, GenAi can be used for a variety of purposes, such as product development and design, creating chatbots or multimedia. In particular, one of the most striking examples of the use of generative artificial intelligence is the popular worldwide application ChatGPT, which is a chatbot capable of interactively answering questions related to various subject areas.
Here are just a few examples of how generative AI can help companies:
- Accelerate research;
- Improve customer service;
- Optimize business processes;
- Increase employee productivity.
GenAi: Models and Operating Principles
Generative artificial intelligence works on the foundational machine learning models that have been pre-trained on huge data sets. There are Foundational Models (FM) and Large Language Models (LLM).
User request to the neural network from the point of view of the AI model
Foundational models are machine learning models trained on a wide range of generic and unlabeled data and capable of performing a range of general-purpose tasks. They typically use learned patterns and relationships to predict the next element in a sequence. For example, when an image is generated, the model analyzes it and creates a sharper, clearer version, or predicts the next word in a text string based on previous words and their context.
Large language models (LLMs) are one class of foundational models. What makes them special is that they can perform multiple tasks due to certain properties that allow them to learn complex concepts. LLMs can take into account many parameters and generate content even with a small amount of input data, learning to apply what they learn in a wide range of contexts.
While traditional machine learning models have attempted to determine the relationship between known and unknown factors by looking at known data (such as images in a training set) and matching them with unknowns (words), generative models simplify these processes. They learn the distribution of different features in the data and how they are related. For example, generative models analyze images of animals and record variables such as the different shapes of ears, eyes, tails, and skin. They study the features and their relationships to understand what different animals look like as a whole. They can then create new images of animals that were not in the training data set.
Next, we’ll look at several categories of generative AI models.
Diffusion models create new data by iteratively introducing controlled random changes to the original data set. They start with the original data and gradually reduce its similarity to the original by adding minor changes called noise. This noise is carefully controlled to ensure that the generated data retains integrity and realism. Then, over several iterations, the diffusion model reverses the process, gradually removing noise and resulting in a new data sample that is similar to the original.
Technical features of products included in the GenAi solutions category
Generative adversarial networks (GANs) also take the concept of the diffusion model further. GANs train two neural networks in a competitive mode. The first, the so-called generator, creates fake data samples by adding random noise to them. The second, the so-called discriminator, tries to distinguish real data from the fake data created by the generator. During the training process, the generator constantly improves its ability to create realistic data, and the discriminator gets better at distinguishing real data from fake data. This process continues until the generator produces data so convincing that the discriminator cannot distinguish it from real data. Such models are widely used in tasks of generating realistic images.
Variational autoencoders (VAEs) learn a mathematical representation of the data called the latent space. It can be thought of as a unique code that represents the data based on all of its attributes. For example, when learning faces, the latent space contains numbers representing the shape of the eyes, nose, cheekbones, and ears. VAEs use two neural networks, an encoder and a decoder. The encoder maps the input data to a mean and variance for each dimension of the latent space. It generates a random sample from a Gaussian distribution. This sample is a point in the latent space and is a compressed, simplified version of the input data. The decoder takes this sample from the latent space and transforms it into data that resembles the original signal. Mathematical functions are used to measure how well the reconstructed data matches the original.
The Transformer-based generative AI model builds on the concept of the VAE encoder and decoder. Transformer-based models add new layers to the encoder to improve performance on text-based tasks, including comprehension, translation, and creative writing. Transformer-based models evaluate the importance of different parts of an input sequence when processing each element of that sequence. Another important feature of these models is the implementation of contextual embedding. The encoding of an element of a sequence depends not only on the element itself but also on its context in the sequence.
Popular Industries for GenAi Applications
- Financial services
- Healthcare and life science applications
- Automotive
- Multimedia & Entertainment
- Telecommunications
- Energy
Generative AI in AWS solutions
For organizations of all sizes and types planning to implement and grow artificial intelligence, Amazon Web Services offers tools to build and scale GenAi-based applications. AWS Generative AI provides enterprise-grade security and privacy, access to industry-leading core models, generative AI applications, and a data-driven approach.
One of the most promising applications for generative AI is the code generation app - Amazon CodeWhisperer, a programming assistant that helps developers maximize their productivity. CodeWhisperer generates real-time code suggestions, ranging from snippets to full-fledged features, in the IDE based on comments and existing code. The app also supports CLI completion and natural language translation to bash. CodeWhisperer allows you to inspect your code and identify hard-to-find security vulnerabilities, with recommendations on how to fix them. The service supports 15 programming languages, including Python, Java, and JavaScript, popular IDEs such as VS Code, IntelliJ IDEA, Visual Studio, AWS Cloud9, AWS Lambda console, JupyterLab, and Amazon SageMaker Studio, and command lines including the macOS Terminal, iTerm2, and the terminal built into VS Code.
Products included in the GenAi Solutions category from Amazon Web Services
Another fully managed service that offers a wide range of high-performance base models from leading AI companies is Amazon Bedrock. It has a wide range of capabilities needed to build generative AI applications while ensuring security and privacy. Amazon Bedrock allows you to experiment with and evaluate the best base models for your use case, customize them to your data using techniques such as fine-tuning and retrieval-augmented generation (RAG), and create agents that perform tasks using enterprise systems and data sources. It’s also worth noting that the service is serverless and doesn’t require you to manage any infrastructure.
You can use Amazon SageMaker JumpStart to search, learn and deploy or even create your own fundamental models. The service is a machine learning hub with base models, built-in algorithms, and ready-made solutions that you can deploy with just a few clicks. It lets you quickly evaluate, compare, and select models based on pre-defined quality metrics. The pre-trained models are fully customizable for the user's data usage scenario and can be easily deployed in the workspace using the UI or SDK. It is also possible to access and share ready-made solutions for common use cases within an organization to speed up the creation and deployment of machine learning models.
AWS HealthScribe is a HIPAA-compliant service that enables healthcare software companies to build applications that can automatically generate clinical notes based on patient-clinician conversations. AWS HealthScribe combines speech recognition and generative AI to reduce the volume of healthcare records by transcribing patient-clinician conversations and creating more easily scannable clinical notes. Powered by Amazon Bedrock, the service makes it faster and easier to integrate generative AI capabilities without the need to manage underlying machine learning infrastructure or train large healthcare language models.
Amazon Q in QuickSight improves business productivity with generative business intelligence capabilities that help speed decision-making. It enables business analysts to create and customize visuals using natural language commands easily and simplifies users' data experience.