Skip to content

Build

Architectures

The factories in resdag.models build common architectures. Each one is a short function that wires layers into a model the same way you would by hand, then returns it ready to train. The result is an ordinary ESNModel: you can retrain it on your data, swap its topology, embed it in a larger network, or read its source and use it as a template. The current factories are ESN-family, but the composition system is not limited to them; new architectures are written as ordinary factory functions.

When no premade fits, write your own. A custom factory is a function that wires a graph and returns a model, and it works in every workflow (training, forecasting, tuning) the same way the premades do:

import resdag as rd

def my_esn(n: int, dim: int) -> rd.ESNModel:
    inp = rd.reservoir_input(dim)
    states = rd.ESNLayer(n, feedback_size=dim)(inp)
    return rd.ESNModel(inp, rd.CGReadoutLayer(n, dim, name="output")(states))
  • classic_esn


    The textbook Echo State Network — raw input concatenated with reservoir states before a ridge readout. Jaeger (2001).

  • coupled_ensemble_esn


    N independently trained sub-models coupled through a shared aggregated feedback signal during autoregression, trained and run through a single fit/forecast interface.

  • headless_esn


    Reservoir-only feature extractor with no readout, returning raw state sequences for use inside a larger PyTorch model.

  • linear_esn


    Identity-activation reservoir with no readout — a linear dynamics probe for spectral analysis and memory-capacity studies.

  • ott_esn


    State-augmented ESN for chaotic systems — squares even-indexed states before the readout. Pathak et al., PRL 120, 024102 (2018).

  • power_augmented


    Generalized state augmentation — every reservoir state raised to a configurable exponent before the readout. A ResDAG generalization of the Pathak et al. augmentation.

Each architecture page shows the wiring diagram of the model its factory builds, along with the factory's parameters and a usage example.

See also

  • Layers — the components the factories are wired from.
  • Train — fitting these models with ESNTrainer.fit.
  • Models reference — full factory signatures.