TimeGradOptions<T>

Options & Configuration · AiDotNet.Models.Options

Configuration options for TimeGrad (Autoregressive Denoising Diffusion Model for Time Series).

Inheritance: ModelOptions → RegressionOptions<T> → TimeSeriesRegressionOptions<T> → TimeGradOptions<T>

For Beginners

TimeGrad brings the power of diffusion models (like those used in image generation) to time series forecasting:

The Key Insight: Most forecasting models give you ONE prediction. But in practice, you want to know “how uncertain is this prediction?” TimeGrad solves this by modeling the FULL probability distribution of future values using a diffusion process.

How Diffusion Works (simplified):

  1. Forward Process: Gradually add noise to data until it becomes pure noise
  2. Reverse Process: Learn to remove noise step-by-step, generating samples
  3. Conditioning: Use historical data to guide the denoising
  4. Sampling: Generate multiple forecasts from the learned distribution

TimeGrad Architecture:

  • RNN encoder processes historical data
  • Diffusion model generates future values conditioned on hidden state
  • Multiple samples give uncertainty estimates

Key Benefits:

  • Probabilistic forecasts (not just point predictions)
  • Well-calibrated uncertainty estimates
  • Can generate diverse forecast scenarios
  • State-of-the-art accuracy on probabilistic metrics

How It Works

TimeGrad is a probabilistic time series forecasting model that uses denoising diffusion to generate accurate forecasts with well-calibrated uncertainty estimates.

Reference: Rasul et al., “Autoregressive Denoising Diffusion Models for Multivariate Probabilistic Time Series Forecasting”, 2021. https://arxiv.org/abs/2101.12072

Constructors

Constructor Summary
TimeGradOptions() Creates options with the paper’s defaults.
TimeGradOptions(TimeGradOptions<T> other) Copies every setting of other.

Properties

Property Summary
BetaSchedule BetaSchedule { get; set; } Gets or sets how beta grows from BetaStart to BetaEnd.
double BetaEnd { get; set; } Gets or sets the last noise variance beta_N.
double BetaStart { get; set; } Gets or sets the first noise variance beta_1.
double DropoutRate { get; set; } Gets or sets the dropout applied between stacked RNN layers.
int ContextLength { get; set; } Gets or sets the number of past steps the model conditions on.
int DenoisingNetworkDim { get; set; } Gets or sets the width the diffusion-step embedding is projected to before each residual block.
int DilationCycleLength { get; set; } Gets or sets the dilation cycle of the residual blocks: block i dilates by 2^(i mod cycle).
int ForecastHorizon { get; set; } Gets or sets the number of future steps to forecast.
int HiddenDimension { get; set; } Gets or sets the hidden size of each RNN layer in the history encoder.
int NumDiffusionSteps { get; set; } Gets or sets the number of diffusion steps N.
int NumRnnLayers { get; set; } Gets or sets the number of stacked LSTM layers in the history encoder.
int NumSamples { get; set; } Gets or sets how many sample paths a forecast generates.
int ResidualChannels { get; set; } Gets or sets the channel width of each residual block.
int ResidualLayers { get; set; } Gets or sets the number of gated residual blocks in the denoiser.
int TimeEmbeddingDim { get; set; } Gets or sets the size E of the sinusoidal diffusion-step embedding, which has 2E entries.