Artificial Intelligence","metadata":{}},{"id":"faq-hub#faq-type#what-is","name":"what-is","namespaceId":"faq-hub#faq-type","description":"

what-is","metadata":{}}]}}]},"metadata":{"auth":{},"testAttributes":{}},"context":{"page":{"pageUrl":"https://aws.amazon.com/what-is/autoregressive-models/"},"environment":{"stage":"prod","region":"us-east-1"},"sdkVersion":"1.0.129"},"refMap":{"manifest.js":"289765ed09","what-is-header.js":"2e0d22c000","what-is-header.rtl.css":"ccf4035484","what-is-header.css":"ce47058367","what-is-header.css.js":"004a4704e8","what-is-header.rtl.css.js":"f687973e4f"},"settings":{"templateMappings":{"category":"category","headline":"headline","primaryCTA":"primaryCTA","primaryCTAText":"primaryCTAText","primaryBreadcrumbText":"primaryBreadcrumbText","primaryBreadcrumbURL":"primaryBreadcrumbURL"}}}

Autoregressive models are a class of machine learning (ML) models that automatically predict the next component in a sequence by taking measurements from previous inputs in the sequence. Autoregression is a statistical technique used in time-series analysis that assumes that the current value of a time series is a function of its past values. Autoregressive models use similar mathematical techniques to determine the probabilistic correlation between elements in a sequence. They then use the knowledge derived to guess the next element in an unknown sequence. For example, during training, an autoregressive model processes several English language sentences and identifies that the word “is” always follows the word “there.” It then generates a new sequence that has “there is” together.","id":"seo-faq-pairs#what-are-autoregressive-models","customSort":"1"},"metadata":{"tags":[{"id":"seo-faq-pairs#faq-collections#autoregressive-models","name":"autoregressive-models","namespaceId":"seo-faq-pairs#faq-collections","description":"

autoregressive-models","metadata":{}}]}},{"fields":{"faqQuestion":"How are autoregressive models used in generative AI?","faqAnswer":"

Generative artificial intelligence (generative AI) is an advanced data science technology capable of creating new and unique content by learning from massive training data. The following sections describe how autoregressive modeling enables generative AI applications.  \n

Natural language processing (NLP) \n

Autoregressive modeling is an important component of large language models (LLMs). LLMs are powered by the generative pre-trained transformer (GPT), a deep neural network derived from the transformer architecture. The transformer consists of an encoder-decoder, which enables natural language understanding and natural language generation, respectively. The GPT uses only the decoder for autoregressive language modeling. This allows GPT to understand natural languages and respond in ways humans comprehend. A GPT-powered large language model predicts the next word by considering the probability distribution of the text corpus it is trained on.

Read about Natural Language Processing (NLP) \n

Read about Large Language Models (LMMs) \n

Image synthesis \n

Autoregression allows deep learning models to generate images by analyzing limited information. Image processing neural networks like PixelRNN and PixelCNN use autoregressive modeling to predict visual data by examining existing pixel information. You can use autoregressive techniques to sharpen, upscale, and reconstruct images while maintaining quality.  \n

Time-series prediction  \n

Autoregressive models are helpful in predicting the likelihood of time-series events. For example, deep learning models use autoregressive techniques for forecasting stock prices, weather, and traffic conditions based on historical values.  \n

Data augmentation  \n

ML engineers train AI models with curated datasets to improve performance. In some cases, there is insufficient data to train the model adequately. Engineers use autoregressive models to generate new and realistic deep learning training data. They use the generated data to augment existing limited training datasets.","id":"seo-faq-pairs#how-are-autoregressive-models-used-in-generative-ai","customSort":"2"},"metadata":{"tags":[{"id":"seo-faq-pairs#faq-collections#autoregressive-models","name":"autoregressive-models","namespaceId":"seo-faq-pairs#faq-collections","description":"

autoregressive-models","metadata":{}}]}},{"fields":{"faqQuestion":"How does autoregressive modeling work?","faqAnswer":"

An autoregressive model uses a variation of linear regression analysis to predict the next sequence from a given range of variables. In regression analysis, the statistical model is provided with several independent variables, which it uses to predict the value of a dependent variable.  \n

Linear regression \n

You can imagine linear regression as drawing a straight line that best represents the average values distributed on a two-dimensional graph. From the straight line, the model generates a new data point corresponding to the conditional distribution of historical values.  \n

Consider the simplest form of the line graph equation between y (dependent variable) and x (independent variable); y=m*x+c, where c and m are constant for all possible values of x and y. So, for example, if the input dataset for (x,y) was (1,5), (2,8), and (3,11). To identify the linear regression method, you would use the following steps: \n

    \n
  1. Plot a straight line and measure the correlation between 1 and 5. \n
  2. Change the straight line direction for new values (2,8) and (3,11) until all values fit. \n
  3. Identify the linear regression equation as y=3*x+2. \n
  4. Extrapolate or predict that y is 14 when x is 4. \n \n

    Autoregression \n

    Autoregressive models apply linear regression with lagged variables of its output taken from previous steps. Unlike linear regression, the autoregressive model doesn’t use other independent variables except the previously predicted results. Consider the following formula.  \n

    \"\" \n

    When expressed in the probabilistic term, an autoregressive model distributes independent variables over n-possible steps, assuming that earlier variables conditionally influence the outcome of the next one.  \n

    We can also express autoregressive modeling with the equation below.  \n

    \"\" \n

    Here, y is the prediction outcome of multiple orders of previous results multiplied by their respective coefficients, ϕ. The coefficient represents weights or parameters influencing the predictor’s importance to the new result. The formula also considers random noise that may affect the prediction, indicating that the model is not ideal and further improvement is possible.   \n

    Lag \n

    Data scientists add more lagged values to improve autoregressive modeling accuracy. They do so by increasing the value of t, which denotes the number of steps in the time series of data. A higher number of steps allows the model to capture more past predictions as input. For example, you can expand an autoregressive model to include the predicted temperature from 7 days to the past 14 days to get a more accurate outcome. That said, increasing the lagged order of an autoregressive model does not always result in improved accuracy. If the coefficient is close to zero, the particular predictor has little influence on the result of the model. Moreover, indefinitely expanding the sequence results in a more complex model requiring more computing resources to run.","id":"seo-faq-pairs#how-does-autoregressive-modeling-work","customSort":"3"},"metadata":{"tags":[{"id":"seo-faq-pairs#faq-collections#autoregressive-models","name":"autoregressive-models","namespaceId":"seo-faq-pairs#faq-collections","description":"

    autoregressive-models","metadata":{}}]}},{"fields":{"faqQuestion":"What is autocorrelation?","faqAnswer":"

    Autocorrelation is a statistical method that evaluates how strongly the output of an autoregressive model is influenced by its lagged variables. Data scientists use autocorrelation to describe the relationship between the output and lagged inputs of a model. The higher the correlation, the higher the prediction accuracy of the model. The following are some considerations with autocorrelation: \n

Next Steps on AWS

Check out additional product-related resources
Innovate faster with AWS generative AI services 
Sign up for a free account

Instant get access to the AWS Free Tier.

Sign up 
Start building in the console

Get started building in the AWS management console.

Sign in