Skip to main content

Kernel analog forecasting (KAF)

Forecasts from kernel-weighted analogs in the historical record

How kernel analog forecasting (KAF) predicts future values and threshold-exceedance probabilities by combining Lorenz’s analog method with Koopman operator theory.

Kernel analog forecasting (KAF) is one of the two forecasting methods of the framework, the other being QMDA (Zhao and Giannakis 2016; Alexander and Giannakis 2020). It is a generalization of the analog method of Lorenz, formulated within Koopman operator theory. The method and the published examples described on this page predate the present project.

From analogs to kernels

In analog forecasting (Lorenz 1969), a forecast from the current conditions is obtained by locating the state in the historical record that most closely resembles the current one and taking its subsequent evolution as the forecast. The method requires no model, but a single analog gives a noisy estimate, and close analogs are rare in systems with many degrees of freedom.

KAF modifies the method in two respects. The single best analog is replaced by a weighted average over the whole training record, with weights determined by a kernel that measures the similarity of each past state to the current one. In addition, similarity is measured between delay-embedded samples, which determine the state of the system more fully than single snapshots.

The forecasting problem

Suppose that predictors \(y = F(x)\) are observed at the time a forecast is made; these may be sea surface temperature fields, station records or Koopman indices. A forecast is sought of a response observable \(G\), such as the Niño 3.4 index or the daily temperature at a station, at lead time \(t = q\,\Delta t\).

Since the predictors determine the state only in part, the future value of \(G\) is not a function of \(y\). Among all functions of \(y\), the one with the least mean-square error is the conditional expectation (Cucker and Smale 2002)

\[ \bar g_t(y) = \mathbb{E}\big[\, G(\Phi^t(x)) \mid F(x) = y \,\big] = \mathbb{E}\big[\, U^t G \mid F = y \,\big], \]

that is, the mean future value of \(G\) over all states consistent with the observation. KAF provides an estimate of this function from training pairs \((y_n, g_n)\) of predictors and responses, with \(g_n = G(x_n)\).

The KAF estimator

In terms of the data-driven basis functions \(\phi_j\) and their out-of-sample extensions \(\varphi_j\) (see data-driven methods), the forecast at lead time \(t\) is

\[ h_t(y) = \sum_{j=1}^{L} c_j(t)\, \varphi_j(y), \qquad c_j(t) = \frac{1}{N} \sum_{n=1}^{N-q} \phi_j(x_n)\, g_{n+q}. \]

The coefficients \(c_j(t)\) are the expansion coefficients of the time-shifted response \(U^t G\) in the data-driven basis; they represent the action of the Koopman operator on the response, estimated from the training data alone.

Rearrangement of the sums exhibits the analog structure of the estimator:

\[ h_t(y) = \sum_{n=1}^{N-q} w_n(y)\, g_{n+q}, \qquad w_n(y) = \frac{1}{N} \sum_{j=1}^{L} \phi_j(x_n)\, \varphi_j(y). \]

The forecast is thus a weighted average of the values taken by the response \(q\) steps after each historical state, with weights \(w_n(y)\) that are largest for the states most similar to the current one.

As \(N \to \infty\), followed by \(L \to \infty\), \(h_t\) converges to the conditional expectation \(\bar g_t\) in the mean-square sense (Alexander and Giannakis 2020). The number of basis functions \(L\) acts as a regularization parameter: a larger \(L\) resolves finer structure in the dependence on \(y\) but requires more data for the coefficients to be estimated reliably.

Probabilities, not only averages

If the response is the indicator function of an event, equal to 1 when the event occurs and 0 otherwise (for example, temperature above a threshold), the conditional expectation is the conditional probability of the event. KAF applied to indicator functions therefore yields forecast probabilities of threshold exceedance, which are the quantities of most direct use in the assessment of hazards.

In practice

The coefficients \(c_j(t)\) are computed once, at the training stage. A forecast then requires only the evaluation of the kernel between the current predictors and the training data. The predictors need not include the response: the same response may be forecast from station observations alone, from station observations together with reanalysis fields, or with Koopman indices such as the ENSO and MJO eigenfunctions added. For several lead times the toolkit either computes separate coefficients for each lead or advances the forecast iteratively by one step at a time; the latter is of use for long horizons. The principal parameters are the length of the delay-embedding window, the kernel bandwidth (which is tuned automatically), the number of basis functions \(L\), and the length of the training record.

Example: the Lorenz 63 system

The Lorenz 63 system is a standard test case for the forecasting of chaotic dynamics. KAF forecasts computed with the Python toolkit of the project, and verified on independent test data, are shown in Figure 1.

(a) Value of a state variable 2.5 time units ahead, plotted at each initial condition on the attractor: truth (left) and KAF forecast (right)
(b) A single forecast compared with the true trajectory
(c) Normalized RMSE and anomaly correlation of forecasts of the \(x\) component against lead time
Figure 1: Kernel analog forecasts of the Lorenz 63 system. The forecasts follow the truth closely at short lead times and lose skill gradually as chaotic error growth takes over. Times are in model time units.

Example: the 2015/16 El Niño

In earlier studies KAF has been applied to extended-range forecasts of ENSO (Wang et al. 2020), to the MJO and other intraseasonal oscillations (Alexander et al. 2017), to North Pacific variability (Comeau et al. 2017) and to Arctic sea ice (Comeau et al. 2019). Forecasts of the 3-month-averaged Niño 3.4 index during the 2015/16 El Niño, from a model trained on Indo-Pacific sea surface temperature over the industrial era, are shown in Figure 2. The forecast initialized in July 2015 reproduces both the timing and the amplitude of the peak; those initialized in May and June reproduce the timing but underestimate the amplitude. In the comparisons reported by Wang et al. (2020), the skill is comparable to that of large dynamical models.

Line chart of the observed Niño 3.4 index from May 2015 to May 2017, peaking near 2.6 at the end of 2015, with three forecast curves; the July forecast reaches the observed peak while the May and June forecasts peak lower.
Figure 2: KAF forecasts of the Niño 3.4 index during the 2015/16 El Niño, initialized in May, June and July 2015 (colors), compared with observations (black). Adapted from Wang et al. (2020) (CC BY 4.0).

References

Alexander, R., and D. Giannakis. 2020. “Operator-Theoretic Framework for Forecasting Nonlinear Time Series with Kernel Analog Techniques.” Physica D 409: 132520. https://doi.org/10.1016/j.physd.2020.132520.
Alexander, R., Z. Zhao, E. Székely, and D. Giannakis. 2017. “Kernel Analog Forecasting of Tropical Intraseasonal Oscillations.” Journal of the Atmospheric Sciences 74: 1321–42. https://doi.org/10.1175/JAS-D-16-0147.1.
Burov, D., D. Giannakis, K. Manohar, and A. Stuart. 2021. “Kernel Analog Forecasting: Multiscale Test Problems.” Multiscale Modeling & Simulation 19 (2): 1011–40. https://doi.org/10.1137/20M1338289.
Comeau, D., D. Giannakis, Z. Zhao, and A. J. Majda. 2019. “Predicting Regional and Pan-Arctic Sea Ice Anomalies with Kernel Analog Forecasting.” Climate Dynamics 52 (9–10): 5507–25. https://doi.org/10.1007/s00382-018-4459-x.
Comeau, D., Z. Zhao, D. Giannakis, and A. J. Majda. 2017. “Data-Driven Prediction Strategies for Low-Frequency Patterns of North Pacific Climate Variability.” Climate Dynamics 48 (5–6): 1855–72. https://doi.org/10.1007/s00382-016-3177-5.
Cucker, F., and S. Smale. 2002. “On the Mathematical Foundations of Learning.” Bulletin of the American Mathematical Society 39 (1): 1–49. https://doi.org/10.1090/S0273-0979-01-00923-5.
Giannakis, D., A. Henriksen, J. A. Tropp, and R. Ward. 2023. “Learning to Forecast Dynamical Systems from Streaming Data.” SIAM Journal on Applied Dynamical Systems 22 (2): 527–58. https://doi.org/10.1137/21M144983X.
Gilani, F., D. Giannakis, and J. Harlim. 2021. “Kernel-Based Prediction of Non-Markovian Time Series.” Physica D 418: 132829. https://doi.org/10.1016/j.physd.2020.132829.
Lorenz, E. N. 1969. “Atmospheric Predictability as Revealed by Naturally Occurring Analogues.” Journal of the Atmospheric Sciences 26: 636–46. https://doi.org/10.1175/1520-0469(1969)26<636:APARBN>2.0.CO;2.
Wang, X., J. Slawinska, and D. Giannakis. 2020. “Extended-Range Statistical ENSO Prediction Through Operator-Theoretic Techniques for Nonlinear Dynamics.” Scientific Reports 10: 2636. https://doi.org/10.1038/s41598-020-59128-7.
Zhao, Z., and D. Giannakis. 2016. “Analog Forecasting with Dynamics-Adapted Kernels.” Nonlinearity 29: 2888–939. https://doi.org/10.1088/0951-7715/29/9/2888.