1.8. Fast estimation kernel

Every evaluation of the posterior during estimation rebuilds structures that do not depend on the parameters: the steady-state scaffolding, the filter initialization frame, index maps. The fast estimation kernel builds those structures once, when the objective is created, and evaluates each draw with only the work that depends on the parameters.

With the same stability screening, the fast kernel preserves the generic objective’s values bit for bit on eligible configurations. The field check_stability is an exception to the performance-only settings: its default is false, so it can skip a stability rejection made by the generic path. Eligibility and stability screening are separate checks.

1.8.1. Turning it on

The kernel is opt-in, through the option estim_fast_kernel. For switching models, it supports the isolated variant of M. The default curvature variant uses the generic estimation path. Select the isolated variant explicitly when requesting the fast kernel for a switching model:

m = set(m, 'solve_perturbation_type', {'m','isolated'});

The fast-kernel option accepts these values:

Value

Effect

false (default)

Normal RISE behavior: the generic objective.

true

The fast kernel with its default settings.

a settings struct

The fast kernel with modified settings (see below).

The option applies wherever the posterior objective is built:

m = estimate(m, estim_fast_kernel = true);
f = pull_objective(m, estim_fast_kernel = true);

For estimation and the comparison tutorial, keep solve_check_stability = false on both paths. If the generic objective instead checks stability, request the same screening explicitly:

settings = rise.engine.dsge_tools.estim.fast_kernel_settings();

settings.check_stability = true;

settings.on_ineligible = 'error';

f = pull_objective(m, 'estim_fast_kernel', settings);

With screening matched, equal seeds, starts and sampler settings give the same draws when objective values agree exactly. Chain time also includes proposal generation and sampler overhead; its ratio need not equal the ratio of objective-evaluation times. pull_objective returns minus the log posterior; mh_sampler accepts that sign directly.

1.8.2. Why the default stays generic

estim_fast_kernel = false retains the general objective and its existing screening. Turning the kernel on is an explicit choice because its eligibility is narrower, and its default stability setting can change which draws receive a posterior value. A fast-kernel request on an ineligible model falls back unless on_ineligible requests a warning or an error. Use fast_kernel_check to distinguish acceleration from fallback. No sampler or model default needs to change to use this option.

1.8.3. What it honors

Choices that change the posterior belong to the model, and the fast kernel replicates them rather than setting them:

  • Filter initialization. kf_init_variance = [] (the ergodic, Lyapunov initialization, the default) and a positive scalar (Harvey’s large-variance initialization) are both replicated.

  • Steady-state semantics. With sstate_imposed = true the analytic steady state is checked and a failed check rejects the draw. With sstate_imposed = false a failed check starts the same numerical rescue as the generic path.

  • Derivative routines. solve_function_mode may be 'explicit' or 'disk'.

  • Regime switching with exogenous, constant transition probabilities.

  • Dynamic parameter links (dynamically_bind), evaluated after each draw as on the generic path, and the drift of a balanced-growth solution, which enters the predictions when simul_with_growth is on.

1.8.4. When a model does not qualify

The fast kernel requires a first-order solution with symbolic derivatives and an analytic, non-loop steady-state file. It does not replicate, and so declines:

  • the exact diffuse initialization (kf_init_variance = 'exact') and a user-supplied filter initialization (kf_user_init);

  • measurement errors, observed exogenous variables, a user filtering algorithm (kf_user_algo) and a solve paradigm (solve_paradigm);

  • linear, nonlinear or general parameter restrictions, endogenous priors and DSGE-VAR priors;

  • maximum likelihood (estim_mle), Fisher scoring and runs that skip the likelihood (estim_eval_lik = false);

  • endogenous switching, time-varying transition probabilities, anticipated shocks, occasionally binding constraints, optimal policy and real-time data.

A model that does not qualify falls back to the generic objective. fast_kernel_check prints every condition and its verdict:

fast_kernel_check(m)          % with the option at its default
fast_kernel_check(m, true)    % as it would be evaluated when requested

With the option at its default the first row reports that the kernel was not requested, and the summary still says whether the model qualifies.

1.8.5. The settings struct

rise.engine.dsge_tools.estim.fast_kernel_settings() returns the default settings; modify the fields you need and pass the struct as estim_fast_kernel.

Field

Default

Meaning

use

true

Master switch inside the struct. Passing a struct is itself a request, hence the default.

on_ineligible

'fallback'

What happens when a model does not qualify: 'fallback' silently uses the generic objective, 'warn' does so with a one-line warning naming the condition, 'error' throws.

hoist_sstate

true

Build the steady-state scaffolding once rather than on every draw.

hoist_filter_init

true

Build the filter initialization frame once rather than on every draw.

check_stability

false

Skip the separate stability screen. Set true to reproduce the generic path when its solve_check_stability is on. With that model option off on both paths, leave this field off as well.

inline_kalman

true

Run the constant-parameter Kalman recursion inline rather than through the general filter engine.

The three stage toggles (hoist_sstate, hoist_filter_init, inline_kalman) are performance choices, meant to leave the result unchanged; use and on_ineligible decide whether the kernel runs and what happens when a model does not qualify. Switching one stage off measures its contribution to cost.

1.8.6. Cost and accuracy on fs2000

The kernel saves parameter-independent setup on each evaluation; it still solves and filters each proposal. The saving depends on model size, eligibility and the settings, so measure the intended workload.

On the November 23, 2026 fs2000 comparison, the analytical-file objective cost 6.17 ms per evaluation through the generic path and 4.24 ms through the fast kernel with matched screening, about 31 percent less time. The two paths agreed exactly at 2,166 distinct chain states, and the seeded 10,000-draw chains were identical. These are measurements for that model and run, not guaranteed speed ratios.

Without a steady-state file, fs2000 is ineligible for the fast kernel. Its numerical steady-state search can instead use Steady-state warm starts. That option changes numerical starting points and does not promise bit-for-bit equivalence.

Run Estimation/fast_kernel/howto_sampler_speed.m to produce comparison.csv, settings.json and comparison.mat. It compares generic and fast analytical-file objectives, then cold and warm numerical steady states, using two seeded chains per arm. The default demonstration takes about a minute; startup and machine load affect elapsed time. The CSV places per-evaluation cost, complete chain time, draw differences and log-posterior differences together. The MAT file retains the chains, probe values and complete numerical settings. Short chains here check computation, not convergence or posterior precision.

The November measurements are recorded in fs2000_speed.pdf and runs_20261123/analytic.log, fastchain.log and num10k_warm.log in the fs2000 Speed Report. New measurements should cite their own CSV and settings rather than reuse those times.

The stage-by-stage example is Estimation/fast_kernel/howto.m.