Title: RiverMamba: A State Space Model for Global River Discharge and Flood Forecasting
Venue: NeurIPS 2025
Accepted: yes
Keywords: Mamba

Earth science

climate science

hydrology

flood forecasting

river discharge
Abstract: Recent deep learning approaches for river discharge forecasting have improved the accuracy and efficiency in flood forecasting, enabling more reliable early warning systems for risk management. Nevertheless, existing deep learning approaches in hydrology remain largely confined to local-scale applications and do not leverage the inherent spatial connections of bodies of water. Thus, there is a strong need for new deep learning methodologies that are capable of modeling spatio-temporal relations to improve river discharge and flood forecasting for scientific and operational applications. To address this, we present RiverMamba, a novel deep learning model that is pretrained with long-term reanalysis data and that can forecast global river discharge and floods on a $0.05^\circ$ grid up to 7 days lead time, which is of high relevance in early warning. To achieve this, RiverMamba leverages efficient Mamba blocks that enable the model to capture spatio-temporal relations in very large river networks and enhance its forecast capability for longer lead times. The forecast blocks integrate ECMWF HRES meteorological forecasts, while accounting for their inaccuracies through spatio-temporal modeling. Our analysis demonstrates that RiverMamba provides reliable predictions of river discharge across various flood return periods, including extreme floods, and lead times, surpassing both AI- and physics-based models. The source code and datasets are publicly available at the project page https://hakamshams.github.io/RiverMamba.


Peer reviews:
comments: SUMMARY:
RiverMamba forecasts river discharge up to 7 days in the future based on land surface variables, meteorological forecasts and static river attributes. 
The data is serialized with space filling curves and fed into a Mamba block. 
Paired with a sophisticated encoding and decoding, the method achieves promising results.

STRENGTHS AND WEAKNESSES:
## Strengths
 - Detailed description of the training procedure and model architecture
 - Very good results compared to GloFAS (Global Flood Awareness System)
 - Some engineering decisions were validated by ablation studies

## Weaknesses
 - The only machine learning model among the baselines is a LSTM. 
   Space filling curves might be well-suited for Mamba, but it is not clear whether this is the right approach for a LSTM. 
   (Graph)convolutional networks would be a more interesting baseline.
 - Limited reproducibility (no code provided)

QUESTIONS:
Related work uses GNNs to model the spatio-temporal relationships. Why did you opt for space filling curves combined with Mamba?

LIMITATIONS:
yes
TITLE: Official Review
CLARITY: 3
IMPACT: 3
ORIGINALITY: 2
DATE: 2025-06-17

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe authors frame the streamflow, and flood forecasting problem as image level tasks with each pixel being mapped to a unique geographical location, covering 5 arc-seconds in both directions. In this setting, they propose an encoder-decoder architecture where the encoder integrates past spatio-temporal maps in conjunction with static information into a hidden representation. Using this encoded information alongside forecasted spatio-temporal data, the decoder predicts for each point on the map the changes to the river discharge values relative to the mean of the encoder input data. \nTo produce predictions at scale, the authors propose the usage of Mamba layers with their linear space and time complexity. A set of space-filling curves serialise these geographically organised data. Through alternation of these curves, different spatial points will be close in the serialised sequence, helping the model to learn different spatial correlations. \nA novel normalisation layer facilitates the incorporation of static attributes, like the river channel network, into the hidden representation at each step in the encoder. It does that by linearly transforming the static attributes, activating them using GeLU and additively overlaying these activations with the z-score normalised hidden representation at that point. \nWith this architecture, the authors demonstrate superior performance compared to existing state of the art models (Google's operational LSTM) as well as physics-based models (GloFAS) when evaluated on both reanalysis and observational data. This performance increase is measured on multiple metrics, $R^2$, KGE, F1-score, on a global forecasting scale.\nNotably, RiverMamba is the first architecture capable of producing global river-discharge forecasts with 7 day lead time on a spatial resolution of 5 arc-seconds.\n\nSTRENGTHS AND WEAKNESSES:\n## Originality \nApplying state space models—including the necessary usage of space filling curves for serialisation—to the global hydrological forecasting task is, to the reviewer's knowledge, novel. Repeatedly adding linearly transformed and GeLU activated static attributes to the normalised hidden embeddings provides a clever way of informing the model of static spatial relationships. Additionally, their composed weighting factors that balance the recency of the input with the return period represent a thoughtful approach to addressing the dual challenges of temporal decay in forecast reliability and the relative importance of rare flood events in the training objective.\n## Quality -- Strengths\nThe authors provide a thorough evaluation of RiverMamba across multiple dimensions, including systematic ablation studies on location embedding approaches, space filling curve alternatives, weighting factors in the objective function, the impact of exchanging static attributes from LISFLOOD-derived to HydroRIVERS-derived sources, input feature importance analysis, and the effects of pretraining versus training from scratch. In addition to temporal out-of-sample settings, the extended evaluation in the appendix also tests spatial generalization and compares the model not only against the leading data-driven model from Google but also against the physics-based model GloFAS. Furthermore, the authors effectively contextualize their work by contrasting related approaches in each section against their proposed methodology, demonstrating a clear understanding of how their contributions advance the field.\n## Quality -- Weaknesses\nThe model produces only point forecasts without uncertainty estimates. These, however, provide important additional information decision makers can use in the operational flood forecasting context.\nThe ablation studies mentioned in the main text and summarised in Table 2 leave out one possible combination preventing assessment of any separate impact of one hyperparameter from possible synergistic effects. Specifically, sub-tables (a) and (b) lack results for using only the recency factor or LOAN exclusively in the forecast block. This omission prevents assessment of whether the observed performance improvements are independent effects or result from synergistic interactions between the return period weighting and LOAN placement in different blocks. \nThe authors do not provide inference time comparisons on the global scale, particularly against the LSTM baseline, which would help assess the practical computational advantages claimed for the Mamba architecture. \nAdditionally, there is a partially incorrect statement about Flash-Attention in the appendix (line 261) claiming linear complexity; while this accurately describes the space complexity improvement, Flash-Attention's time complexity remains quadratic in the input length, which undermines the claimed efficiency comparison.\n## Clarity\nThe main part of the paper clearly describes the key components of the architecture, highlighting the intended effects of each design element.\nHowever, some presentation issues hinder clarity. The sentence spanning the lines 137-140 is overly long and complex, making it difficult to follow on first reading. \nThe relationship between the number of hindcast layers and the chosen temporal input dimension is not clearly explained in the main text, though the former seems to be dependent on the latter. Additionally, Figure 4's layout is somewhat ambiguous -- it is difficult to discern whether the first serialisation layer belongs to the hindcast block, and including it within the outer shaded region would clarify this organizational structure. \nFinally, while the appendix describes how the authors set up and trained a version of Google's LSTM, it does not explicitly clarify how this relates to the LSTM results shown in the figures versus results obtained directly from Google's system.\n\nSome typos were found during reading the paper including the appendix:\n- Main paper: Line 65 \"saptio-temporal\" -> \"spatio-temporal\"\n- Appendix: Line 167 \"see\" -> \"sea\"\n## Significance \nThe model demonstrates significant practical value by effectively detecting very rare floods that might be missed by existing LSTM approaches as impressively shown in Figure 47 for example. However, the model's spatial generalization capabilities appear limited based on the results in appendix section J, where performance on spatially out-of-sample ungauged basins does not significantly differ from the LSTM baseline and regresses quickly with increasing return periods.\n\nQUESTIONS:\n- Does weighting of no-flood events equally in equation (8) to the ones with a one year return period not skew the results to the no-flood case? Weighting floods not just by their return period but also augmenting it with an additive flood offset (let's say 1) might help the flood scarcity problem a bit, which also has been mentioned in the conclusion. \n- Could you provide computational time comparisons to better position the model in the landscape of operational forecasting along Google's LSTM and GloFAS?\n- Is there an architectural reason for not training on quantile regression, thereby providing a way of estimating the uncertainty of the model's predictions?\n- Could you evaluate the model's performance with larger temporal gaps between training and test data (e.g., 5-10 years) to assess robustness to climate change impacts on flood drivers? This would help establish the model's long-term operational viability.\n\nLIMITATIONS:\nyes", "TITLE": "Official Review", "RECOMMENDATION": 5, "REVIEWER_CONFIDENCE": 4, "CLARITY": 3, "IMPACT": 3, "ORIGINALITY": 4, "DATE": "2025-06-30"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nIn this paper, the authors propose RiverMamba, a novel deep learning model that leverages Mamba blocks—a type of bidirectional state space model—to efficiently model hydrological dynamics at a global scale. RiverMamba integrates diverse data sources, including reanalysis datasets (ERA5-Land, GloFAS), meteorological forecasts (ECMWF HRES), static river attributes, and sparse in-situ gauge observations. The model produces global river discharge forecasts at a fine 0.05° resolution, with lead times of up to 7 days, and is capable of predicting extreme flood events across a wide range of return periods.\n\nSTRENGTHS AND WEAKNESSES:\nThe paper addresses a critical gap in global-scale, high-resolution river discharge and flood forecasting—an area where most existing deep learning models fall short due to their localized focus and limited ability to capture spatial dependencies across river networks.\nOne of the key innovations of this work is its multi-source data fusion architecture combined with an efficient spatio-temporal modeling strategy. RiverMamba stands out as one of the first deep learning frameworks capable of generating high-resolution (0.05°) global river discharge maps. It moves beyond localized predictions by explicitly modeling spatial connectivity across river systems. The use of space-filling curves (such as Gilbert and Sweep) to serialize river points into 1D sequences is particularly creative, enabling scalable sequence modeling using Mamba blocks. Additionally, the model introduces Location-Aware Adaptive Normalization (LOAN) to condition dynamic inputs on static river attributes, further enhancing its ability to generalize across diverse hydrological settings.\nFor operational forecasting, RiverMamba integrates ECMWF HRES meteorological forecasts and accounts for their uncertainties through robust spatio-temporal modeling. Experimental results demonstrate that it outperforms both physics-based models (like GloFAS) and AI baselines (like LSTM), especially in predicting extreme flood events across a wide range of return periods—from 1.5 to 500 years.\n\nQUESTIONS:\nThe written quality of the paper would benefit from further refinement. \n1. When evaluation metrics such as R², KGE, and F1-score are first introduced in the main text, it would be helpful to briefly define them or, at the very least, direct readers to where the definitions can be found (e.g., in the appendix).\n\n2. The presentation of results in Table 1 is confusing and potentially misleading. The reported values for R², KGE, and F1-score all exceed 1, which is unconventional and suggests a transformation has been applied. Upon checking the appendix, it appears that KGE has been multiplied by 100, and it is reasonable to assume the same was done for R² and F1-score—though this is not clearly stated. Rather than burying this detail in the appendix, I strongly recommend that the authors explicitly mention this scaling in the main text, ideally in the caption or title of Table 1. This kind of transformation is non-standard, and without proper explanation, it risks confusing readers and misrepresenting the model’s performance.\n\nLIMITATIONS:\nyes", "TITLE": "Official Review", "RECOMMENDATION": 4, "REVIEWER_CONFIDENCE": 3, "CLARITY": 3, "IMPACT": 3, "ORIGINALITY": 3, "DATE": "2025-06-30"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper introduces a genuinely interesting forecasting approach that builds upon a global hydrological model, called GloFAS, by integrating information over a (extremely) wide space. Traditional approaches always orient themselves on the physical conception of catchments and hence try to physical delineation thereof. This means that a lot of spatial information is not accounted for here. This is where RiverMamba comes in. It leverages state space models to integrate the spatial data pixelwise (and avoids paying the quadratic cost per additional pixel) and build a new forecast out of the existing reanalysis.\n\nSTRENGTHS AND WEAKNESSES:\nAlbeit I do in the following mainly focus on the weaknesses, I would like to emphasize that the overall contribution is — in my view — quite strong. The idea is good, the evaluation is sufficient for what the authors want to show, and ablations are thorough. Still, I would like to start my critique with a meta-point: The current form of the paper is rather hard to read. At some points it is even confusing. Many parts are not explained well enough and readers need to make inferences about what actually happens. For example, it is unclear how the LSTM baseline is trained and used. Is the LSTM baseline also trained on sequences of multiple hundred thousand timesteps (if yes, this is far beyond what LSTMs usually can work with)? Similarly, it took me unnecessarily long to understand that the model is still trained and used with only a small-subset of the available pixels. In short, I think with some love the readability of the manuscript could be greatly improved. As a consequence most of my critique consists of what I would normally consider minor comments or so. As a matter of fact even my major point is related to language: \n\nMy main point is that with the current formulation readers will get the impression that the LSTM baseline is the one from Nearing et al. (2024). But, as far as the provided description lets me infer, the one used as baseline has nothing in common with it besides the general architecture (decoder-encoder LSTM). The task of the LSTM in the original publication is to integrate meteorological information over longer time-horizons and provide a streamflow simulation. In contrast, the task from RiverMamba is to provide a post-processor for such a streamflow simulation model — namely GloFAS.  As a matter of fact, the LSTM from Nearing et al (2024) could very well be used as a stand-in backbone for the hydrological model, which would provide a more apt comparison. As an example of how the used language can be misleading take Table 3. First, an LSTM as proposed in Nearing et al. (2024) in a gauged setting commonly achieves median $R22$ of $> 0.7$ in the test period. Second, most results and simulations provided by Nearing et al. 2024 are for an ungauged setting (i.e., the GRDC stations were not included in the training), which, if compared to gauged, is obviously worse. \nSimilarly, different sequence lengths can be used if you feed in the states (snow, soil moisture) and current runoff to the model compared to a model that has to simulate everything (e.g., snow accumulation during the winter to predict snow melt in the spring/summer) just from weather inputs. This is because the states and the streamflow integrate the meteorological signal of the past already. Hence, sentences like the following example can easily give the wrong impression:\n\n*“In [6], an input sequence length of 365 days was used. In our experiments, we also trained the LSTM model using a range of input sequence lengths from 4 to 90 days. We observed only marginal performance gains beyond a certain point, and identified 14 days as an optimal input sequence length.”*\n\nQUESTIONS:\nI happily increase my score if the rebuttal addresses my questions and improves on the readability aspect. \n\n- I do not find the motivation for a global receptive field to account for uncertainty in the meteorological variables is convincing.  Why would ERA5-Land runoff, snow and soil moisture in a river of Siberia be a useful feature for a short-term (7-day) forecast in a reach of the Amazon River. While there is uncertainty in the precise location (and occurrence/magnitude) of precipitation forecasts, there is certainly no real-world meaning in such a receptive field. Additionally, why would a pixel in their sequence of p in P somewhere in Siberia be more informative to river discharge in a reach of the Amazon than the direct neighbors and upstream pixels in that basin (many of which are not included due to the random sampling). P denotes not even 5% of all landmass pixels. This seems particularly off since the localized ablation suggests for me that mostly local information is used to get high predictive capacity. Hence, I would recommend to the authors to instead frame the whole in a more traditional machine learning fashion. Something in the line of: Traditional models, like GloFas do not account for wide ranging spatial correlation. We can exploit that with Machine Learning. To do so we use a lot of data and let the model learn the spatial correlations rather than to set them a-priori (in this regard, you might want to refer to the bitter lesson or something too).  \n- The paper emphasizes in multiple passages that RiverMamba can be used in an operational setting (as a matter of fact, the comparison is made against two operational models). However, the model relies on ERA5-Land which is not available in real-time but has a ~30 day lag. \n- L44. Not entirely true. a) The Google Model runs globally at 300k locations (but only a few thousand are verified to be good). b) [Yang et al.](https://www.google.com/url?q=https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2024WR039764&sa=D&source=docs&ust=1751387338408298&usg=AOvVaw1VAQb4SomBzB6JgQVARGBh) already have a global gridded model.\n- L89 There is a quite some literature missing (e.g. [1](https://arxiv.org/abs/2405.19836), [2](https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2023WR036170), [3](https://www.google.com/url?q=https://essopenarchive.org/users/810569/articles/1227435-high-resolution-national-scale-water-modeling-is-enhanced-by-multiscale-differentiable-physics-informed-machine-learning&sa=D&source=docs&ust=1751387497840100&usg=AOvVaw1VwvPCwSSlHswiQ6jqLVw7), [4](https://agupubs.onlinelibrary.wiley.com/doi/10.1029/2023WR035337), [5](https://egusphere.copernicus.org/preprints/2025/egusphere-2024-3649/) to name a few)\n- L121. This must be a misunderstanding from my side but why is RiverMamba not including any information from the nowcast timestep but only up to t-1 and then starting on t+1? \n- L123. I struggle to understand the sentence about the “additional” shift to GloFAS, ERA5, and CPC. According to your notation, you only consider data until t-1, with t being the date that the forecast is issued. Why another shift by 2 days for CPC and 1 day for GloFAS and ERA5?\n- Figure 4 appears before Fig 3 (which is interesting, I did not even know that Latex allows for that)\n- Eq 2. It does seem to met that the dimensions listed in the text below do not work with this equation? \n- Eq 2. Why GELU? Have you tried different activations functions or is there any motivation to it? The LOAN reference does not (yet) seem to use GELU.\n- In general, but I noted it especially around L236ff: The terminology is a bit off. There is a difference between a flood and an event of a given return period. A 1.5 year return period does not necessarily mean any flooding. In most places in North America/Europe, not even a 10/20 year return period should necessarily mean flood.\n- L238. where do these ranges come from? Is something you chose?\n- L247. I couldn’t find the results on the ablation study of their loss weighting.\n- Suppl. L190. In many operational settings you compute return periods separately in the observed space (i.e. long-term records of streamflow measurements) and in model climatology (i.e. long-term reanalysis/reforecasts of the model). The important point to measure here is if the model predicts the correct return period and not, how well the predictions match the observations. For example imagine your model gives perfect predictions but shifted down by 100 cms. For flood forecasting, to know when to trigger an alert, it is only important to know if your model thinks the upcoming event will be larger than some threshold (usually in return period space). If the return period thresholds are computed separately for observations and model climatology, you would get 100% accuracy with such a model, even though your absolute predictions are constantly off by 100 (which is not important if your task is operational flood warnings/forecasts).\n- Suppl. Tab 5. The table is still showing P=245954 for GRDC finetuning. Is the loss only computed for those p in P that are associated to a GRDC station or also on all other points (here then on dis24 from GloFAS)?\n- Suppl F2. How can Glofas be dropped here?\n\nLastly, I am mainly mentioning the following because it came up in some other reviews that I was involved in and because Fig 13 in the Supplementary. This figure shows F1 scores over lead time for different return periods. If I understand the explanations correctly, this should essentially be the same information as Fig3 in Nearing et al. (2024). However, the figures show very different values. There might be misalignment in the data when computing the metrics, since Nearing et al. (2024) provided the data right-labeled, while GRDC data is left-labeled. E.g., note from Zenodo:\n\n*“Model outputs are daily and timestamps are right-labeled, meaning that model outputs labeled, .e.g., 01/01/2020 correspond to streamflow predictions for the day of 12/31/2019.”*\n\nLIMITATIONS:\nyes", "TITLE": "Official Review", "RECOMMENDATION": 4, "REVIEWER_CONFIDENCE": 4, "CLARITY": 2, "IMPACT": 3, "ORIGINALITY": 4, "DATE": "2025-07-01"}