Skip to main content
xLSTM is an RNN-based model for sequence modeling that extends the classical Long Short-Term Memory architecture with exponential gating and novel memory structures. The architecture introduces two new memory cell variants: sLSTM, which uses a scalar memory with a scalar update rule and a new cross-cell memory mixing mechanism, and mLSTM, which replaces the scalar cell state with a matrix memory updated via a covariance (outer product) rule, enabling full parallelizability. These cell variants are integrated into residual blocks to form xLSTM blocks, which are then stacked into full xLSTM architectures. References Figure 1. Architecture of xLSTM Figure 1. Architecture of xLSTM

xLSTM

xLSTM

Bases: BaseModel xLSTM xLSTM encoder, with MLP decoder. Parameters:

xLSTM.fit

Fit. The fit method, optimizes the neural network’s weights using the initialization parameters (learning_rate, windows_batch_size, …) and the loss function as defined during the initialization. Within fit we use a PyTorch Lightning Trainer that inherits the initialization’s self.trainer_kwargs, to customize its inputs, see PL’s trainer arguments. The method is designed to be compatible with SKLearn-like classes and in particular to be compatible with the StatsForecast library. By default the model is not saving training checkpoints to protect disk memory, to get them change enable_checkpointing=True in __init__. Parameters: Returns:

xLSTM.predict

Predict. Neural network prediction with PL’s Trainer execution of predict_step. Parameters: Returns:

Usage Example