Basin2Vec: Learning Basin-Centric Embeddings for Scalable Hydrological Modeling
Analyze & explore related research in Conceptio
Connect this record directly into your research workflow or AI agent. Explore citations across open repositories, query full text, and export structured proof bundles.
Basin2Vec: Learning Basin-Centric Embeddings for Scalable Hydrological Modeling Muhammad Talha1 Pang-Ning Tan1
Xiaofeng Liu2 Yuan Yang3 A. Pouyan Nejadhashemi1
arXiv:2611.05164v1 [cs.LG] 3 Nov 2026
1 Michigan State University 2 University of Michigan
3 University of California, San Diego
talhamuh@msu.edu, xiaofliu@umich.edu, yuy068@ucsd.edu ptan@msu.edu, pouyan@msu.edu
Accepted at the 2027 IEEE/CVF Winter Conference on Applications of Computer Vision (WACV). Abstract Reliable streamflow prediction across time and in ungauged basins requires representations that capture hydrologically relevant basin characteristics. Existing methods rely on either fixed handcrafted attributes or general-purpose Earth observation embeddings not tailored to basin structure. We introduce Basin2Vec, a self-supervised framework that learns compact basin representations from hydroclimatic and physiographic data without observed streamflow. Basin2Vec organizes representation learning around basin scale and relationships across space and time. Across multiple forecasting architectures, it consistently outperforms predefined attributes and general-purpose geospatial embeddings in temporal generalization and zero-shot spatial transfer. Basin2Vec provides average relative gains of up to 8.3% temporally and achieves 3.5× the median predictive performance of the strongest baselines on unseen basins. These results demonstrate the effectiveness of basin-centric pretraining for transferable hydrologic prediction. Code is available at https://github.com/Muhammad-Talha-MT/basin2vec.
1
Introduction
Streamflow, or river discharge, is the volume of water passing through a river cross-section per unit time. Accurate streamflow prediction is critical for flood forecasting, drought monitoring, and water resources planning. However, streamflow observations are available at only a limited and unevenly distributed network of gauging stations [6, 30, 35]. Therefore, hydrological models must generalize in two ways: temporal generalization, in which they predict future streamflow in basins seen during training, and spatial generalization, in which they predict streamflow in basins that were not used for training [10, 18]. Accurate prediction in both settings requires a robust basin representation. In particular, the representation must capture the dynamic meteorological inputs, such as precipitation and temperature, along with a static basin descriptor that distinguishes characteristics of the target basin from others. Such a descriptor must summarize the factors governing how a basin converts weather into streamflow, including climate, terrain, soils, land cover, subsurface properties, and drainage area [1, 8, 24, 34]. An informative basin representation is particularly important for spatial
1
generalization because it enables the model to identify similarities and differences between observed and previously unseen basins. Regional streamflow models commonly represent each basin as a fixed-length feature vector derived from datasets such as CAMELS and GAGES-II [1, 8, 9, 19]. While these compact attributes may summarize the spatial characteristics of the basin using statistics such as mean elevation or forest fraction, they do not capture the spatial variation of these characteristics within the basin, causing the downstream models to be oblivious to their spatial heterogeneity. Gridded datasets such as CAMELS-SPAT preserve this information but introduce highdimensional spatial inputs [17]. This motivates learning compact representations directly from basin-aligned geospatial data. Table 1: Comparison of basin representations across three design requirements. Scores indicate High, Moderate, or Low support. Approach
Basinindexed
Spatial & scale-aware
Hydrologic relation-aware
CAMELS Attr. [1] AlphaEarth [5] TESSERA [11] SatCLIP [16] Basin2Vec (Ours) High
Moderate
Low
General-purpose Earth observation (EO) embeddings provide reusable representations of satellite observations and geographic locations [5, 11, 16]. However, they are pretrained on pixels, image patches, or coordinates rather than drainage basins, requiring post hoc aggregation to construct basin descriptors. Moreover, their pretraining objectives do not explicitly encode physical basin scale or hydrologically meaningful relationships among basins. Together, these limitations motivate three design requirements for basin-centric representation, as summarized in Table 1. First, the representation should be basin-indexed, meaning that its entities correspond to drainage basins rather than individual pixels or coordinates. Second, the learned embeddings must be spatial- and scale-aware, meaning that it learns from within-basin spatial inputs while retaining information about physical basin scale. Finally, it should be hydrologic relation-aware, meaning that the learned embedding geometry reflects the hydrological and physiographic relations among the basins. To meet these requirements, we introduce Basin2Vec. Our contributions are threefold. (1) We formulate basin-centric self-supervision around a basin-year entity, producing reusable descriptors from gridded hydroclimatic and physiographic data without observed streamflow. (2) We propose a scale-aware encoder that preserves spatial and physical-scale information, together with a relation-aware contrastive objective that models temporal, overlapping, and nested basin relationships. (3) We evaluate the resulting descriptors with five forecasting architectures under temporal generalization and zero-shot spatial transfer. Basin2Vec consistently outperforms predefined attributes and general-purpose EO embeddings, with average relative temporal gains of up to 8.3% and 3.5× the median predictive performance of the strongest alternative on unseen basins.
2
2
Related Work
Basin characterization in regional hydrological models. Large-sample hydrological models are commonly conditioned on curated basin descriptors from CAMELS or GAGESII [1, 8, 9, 26]. This paradigm, including entity-aware and regional LSTMs, has demonstrated the value of static attributes for shared prediction across multiple basins [10, 18, 19]. CAMELSSPAT extends this foundation with basin-aligned rasters of climatic and physiographic variables [17], but using them directly requires each downstream model to process highdimensional spatial inputs. Earth-observation representation learning. General-purpose EO representationlearning methods derive transferable features from remotely sensed or geographic data. SatMAE learns visual representations from satellite image patches [7]; AlphaEarth and TESSERA learn geospatial representations from EO observations; and SatCLIP learns location representations from geographic coordinates [5, 11, 16]. Recent studies have used these representations as inputs to hydrological models [21, 27, 28]. Because these representations are natively associated with pixels, patches, or coordinates, their application to hydrological basins typically requires post hoc spatial aggregation. Hydrology-specific representation learning. Previous hydrology-specific learning methods have used encoder-decoder or autoencoder to infer hydrological signatures and landscape features from meteorological and streamflow time series [2, 4]. KG-SSL similarly learns basin representations from basin-level meteorological inputs and observed streamflow, treating samples from the same basin across different years as related and samples from different basins as unrelated [13]. However, these methods rely on observed streamflow during the representation learning, limiting their applicability to ungauged basins.
3
Basin2Vec
3.1
Overview
Basin2Vec learns basin-level representations from basin-year entities. Each entity corresponds dyn to a basin-year tuple, (b, y), along with its monthly hydroclimatic rasters Xb,y , static or sta meta annual spatial variables Xb,y , binary basin mask Mb , and basin metadata Xb . Note that each basin has been resampled to a fixed H × W patch using the approach described in [33], although its boundary is irregular and its physical area may vary substantially. Details of the resampling approach are given in Appendix A.2. The monthly input has shape dyn Xb,y ∈ R12×Cd ×H×W , where Cd is the number of hydroclimatic variables. The quasi-static sta ∈ RCs ×H×W , where C is the number of static or annually varying input has shape Xb,y s physiographic variables. As shown in Figure 1, Basin2Vec uses a scale-aware encoder to map these masked basin-aligned inputs to a normalized basin-year embedding zb,y ∈ Rd , and a relation-aware contrastive objective to structure the embedding space using samebasin, temporal, spatial overlap, nesting, and physiographic relations. After pretraining, the basin-year embeddings zb,y : y ∈ Yb are averaged across the available years Yb to obtain the fixed basin-level descriptor z̄b ∈ Rd for downstream streamflow prediction.
3
(𝑋,-. , 𝑀/ )
𝑢!,#,$ ∈ ℝ% Month Positional Encoding
𝜓!"#
1 2
…
Spatial Encoder
12
mask-aware
B. Quasi-static Input
%#&
ℎ!,# ∈ ℝ%
+
'$( ℎ!,# ∈ ℝ%
(𝑋 '() , 𝑀* )
C. Metadata Input 𝑋 -+$(
…
Temporal Transformer
A. Monthly Input
Metadata encoder
𝑧!"#$ Gated metadata fusion
Branch attention
&'()*
𝑔 = 𝜎(𝑊"[ℎ#,%
𝜓$%& )*'+%
ℎ!,#
Spatial Encoder
𝑧!,# ∈ ℝ
+,-.)]) ; MLP+,-.(X /
&'()* +,-. 𝐿𝑁(ℎ#,% + g /,0 ⊙ MLP+,-.(X / ))
∈ ℝ%
Normalization Area head 𝑎%,
mask-aware
Relation-Aware Contrastive loss:
ℒ = ℒ BC& + 𝜆& ℒ &+D + 𝜆( ℒ (E+(
Multimodal Fusion
Figure 1: Overview of Basin2Vec. The scale-aware encoder maps monthly and quasi-static basin-aligned grids, masks, and metadata to normalized basin-year embeddings zb,y through mask-aware encoding, multimodal fusion, and area regularization.
3.2
Scale-Aware Basin Encoder
The encoder generates the basin-year embedding zb,y by processing the inputs defined in Section 3.1 according to the following steps: mask-aware spatial encoding of the monthly and quasi-static inputs, fusion of the two resulting representations, and incorporation of basin metadata. Since the basins have been resampled to the same spatial dimensions, which removes the information about its physical size, an auxiliary drainage-area objective is also applied during pretraining. Mask-Aware Spatial Encoding. Each basin-aligned input contains grid cells both inside and outside the irregular basin boundary. To prevent out-of-basin cells from affecting the representation, Basin2Vec applies the binary mask Mb during spatial encoding and pooling. Given a multi-channel input tensor X, whose last two dimensions correspond to the H × W spatial grid, a convolutional neural network (CNN) is used to extract a spatial feature map F from the masked input. The feature map is then aggregated via masked average pooling AvgPoolMb and mask-normalized attention pooling AttnPoolMb , as shown below: u = ψ(X, Mb ) ≡ MLP
h
i
AvgPoolMb (F ); AttnPoolMb (F )
,
(1)
where ψ denotes the mask-aware spatial encoder, F = CNN (X ⊙ Mb ) denotes the masked spatial feature map, and ⊙ denotes element-wise multiplication. AvgPoolMb averages the features across all valid basin cells, whereas AttnPoolMb assigns learned weights to these cells and normalizes the weights only within the basin boundary. The two pooled summaries are concatenated and transformed by an MLP to produce the spatial basin token u ∈ Rd . The mask-aware spatial encoder ψ is applied separately to the dynamic and quasi-static inputs, each with its own learned parameters. For each month t ∈ {1, . . . , 12}, the dynamic dyn encoder ψdyn maps Xb,y,t to a monthly basin token ub,y,t . A learned month embedding pt ∈ Rd is added to identify the token’s position in the annual sequence, following standard positionalencoding practice [36]. A Transformer with four attention heads and GELU feed-forward blocks then models its temporal relationships across the 12 months. The contextualized monthly tokens are aggregated to produce the annual dynamic representation: 4
dyn , Mb , ub,y,t = ψdyn Xb,y,t
12 eb,y,t }12 {u t=1 = Transformer {ub,y,t + pt }t=1 , 12 X
hdyn b,y = MLPdyn
(2)
! eb,y,t . βb,y,t u
t=1
eb,y,t is the contextualized token for month t. The weight βb,y,t is produced by a learned Here, u P attention-pooling operation and normalized across the 12 months such that 12 t=1 βb,y,t = 1. d summarizes the monthly hydroclimatic inputs for the basinThe resulting vector hdyn ∈ R b,y year. sta is represented by a single multi-channel tensor for each basin The quasi-static input Xb,y and therefore does not require temporal processing. A separate mask-aware spatial encoder ψsta processes its channels jointly with an MLP to produce the quasi-static embedding:
sta hsta b,y = MLPsta ψsta Xb,y , Mb
.
(3)
d Here, hsta b,y ∈ R summarizes the static and annually varying physiographic inputs for basin b in year y.
Fusion and Metadata Conditioning. The dynamic and quasi-static representations are fused into a single spatial representation using learned branch-attention weights:
ℓ αb,y = softmaxℓ∈{dyn,sta} Wα hℓb,y ,
hfused = b,y
X
ℓ αb,y hℓb,y .
(4)
ℓ∈{dyn,sta} dyn sta are normalized to sum to Here, Wα is a learned scoring layer, and the weights αb,y and αb,y one. The resulting vector hfused ∈ Rd combines the spatial information learned from the static b,y and dynamic input modalities. Since all the basins have been mapped to the same H × W grid, their rescaled inputs do not directly convey physical basin size. Basin2Vec therefore uses an auxiliary prediction head qa to estimate the standardized log drainage area from the fused spatial representation by minimizing the following smoothed L1 loss:
Larea =
B 1 X ℓ (âi − ai ) , B i=1
(
ℓ(e) =
1 2 2e ,
|e| − 12 ,
(5)
|e| < 1, |e| ≥ 1.
Here, B is the mini-batch size, ai is the standardized log drainage area of the basin associated with sample i, âi = qa (hfused ) is its log drainage area estimated by the prediction head qa , and i ei = âi − ai is the prediction error. The loss is quadratic for small errors and linear for large errors, reducing sensitivity to extreme differences in basin area. Applying this objective to the fused representation hfused encourages the spatial encoder to retain information about the physical basin scale. Finally, basin-level metadata Xbmeta , including drainage area, basin geometry, and effective patch resolution, are also incorporated into the embedding through gated conditioning.
5
An MLP initially maps the standardized metadata to the embedding dimension, while a dimension-wise gate g controls their contribution to the fused spatial representation:
h
i
meta gb,y = σ Wg hfused ) b,y ; M LPmeta (Xb
,
meta vb,y = γ LN hfused ) b,y + gb,y ⊙ M LPmeta (Xb
,
(6)
zb,y = Normalize (qϕ (vb,y )) . Here, [·; ·] denotes concatenation, σ is the sigmoid function, and gb,y ∈ [0, 1]d is the metadata gate. The gated metadata are added to hfused b,y , after which layer normalization and another MLP γ is applied to produce the metadata-conditioned representation vb,y . The projection head qϕ maps this representation to the embedding space, and ℓ2 normalization produces the final basin-year embedding zb,y ∈ Rd .
3.3
Relation-Aware Contrastive Objective
Standard contrastive learning treats augmented views of the same entity as positive examples and all other entities as negative examples. This assumption is insufficient for basin-year entities that could be related through basin identity, temporal proximity, or spatial relationship. To overcome this limitation, Basin2Vec considers three positive relations between basin-year entities: (1) a hard positive between two augmented views of the same basin-year entity, (2) a temporal positive between two basin-year entities of the same basin, and (3) a spatial overlap positive between entities with overlapping or nested basin boundaries. Other entity pairs without spatial overlap remain negative examples, but their repulsive strength is adjusted using basin-metadata similarity to be described below. Figure 2 summarizes these relations.
Figure 2: Basin relations used by the relation-aware contrastive objective. For a mini-batch of B basin-year entities, two independently augmented views of each entity are generated and encoded into N = 2B normalized embeddings {zi }N i=1 . Details of the augmentation procedure are provided in Appendix A.1. Each embedding is associated with a basin ID bi , year yi , and basin metadata Xbmeta . The generated embeddings form an anchor i set A = {1, . . . , N } for computing contrastive loss. 6
For each anchor i ∈ A, we define the following relations: Pihard = {j : bi = bj , yi = yj , i ̸= j} , Pitemp = {j : bi = bj , yi ̸= yj } , Piov = {j : bi ̸= bj , ωij > 0} ,
(7)
Nineg = {j : bi ̸= bj , ωij = 0} . Here, Pihard contains the other augmented view of the same basin-year, Pitemp contains other years of the same basin, Piov contains spatially overlapping or nested basins, while Nineg contains different-basin entities with no spatial overlap. We quantify the spatial overlap between embeddings i and j using the Szymkiewicz–Simpson coefficient [32]: ωij = |Gi ∩ Gj |/ min(|Gi |, |Gj |), where Gi and Gj denote their corresponding basin polygons and | · | denotes polygon area. This coefficient reaches one when the smaller basin is fully nested within the larger, making it suitable for both overlapping and nested relations. Based on the relation sets defined above, our relation-aware contrastive loss for anchor i is given by: Lcon =− i
X
qij log P
j̸=i
dij exp(sij /τ ) , k̸=i dik exp(sik /τ )
(8)
where sij = zi⊤ zj is the cosine similarity between two normalized embeddings, qij measures the attraction (positive) strength between embeddings, dij measures the repulsive (negative) strength, while τ is a hyperparameter. The attraction (positive) strength between embeddings i and j is computed as follows: qij = P
+ wij
+, k̸=i wik
j ̸= i.
(9)
where + wij = 1j∈P hard + λt κij 1j∈P temp + λo ωij κij 1j∈Piov , i
(10)
i
Here, λt and λo control the contributions due to temporal and spatial overlap relations. The temporal factor κij = exp(−|yi − yj |/τy ) decreases as the separation between years increases, with τy controlling the decay rate. This factor is applied to both temporal and spatial overlap relations to ensure that basin-year entities observed far apart in time have lower attraction strengths. In this formulation, qij is nonzero only for embedding pairs with positive relations. Since every basin-year entity has two augmented views, each anchor must have at least one hard positive. To avoid excessive repulsion between physiographically similar basins, Basin2Vec assigns each pair the weight + 1, wij > 0, + 1 − λm ξij , wij = 0,
(
dij =
(11)
where λm ∈ [0, 1) controls the strength of metadata-based downweighting and ξij ∈ [0, 1] denotes the metadata similarity between the corresponding basins. The computation of ξij 7
is described in Appendix A.1. Positive pairs retain unit weight because their attraction is + already controlled by wij and qij . For non-positive pairs, greater metadata similarity produces a smaller dij and therefore weaker repulsion. Metadata similarity is not treated as a positive relation since physiographic similarity does not necessarily imply similar hydrological behavior. The contrastive loss given in Equation (8) pulls each anchor toward its hard, temporal, and overlap positives while reducing unnecessary repulsion from metadata-similar non-overlapping basins. The contrastive denominator provides relative negative pressure but does not directly bound the similarity of individual non-overlapping pairs. Basin2Vec therefore applies the following negative-margin loss Lneg =
X 1 |Nneg | (i,j)∈N
[max(0, sij − µij )]2 ,
(12)
neg
where Nneg = {(i, j) : i ∈ A, j ∈ Nineg } contains all non-overlapping negative pairs, and µij = µmin + (µmax − µmin )ξij is the metadata-dependent margin. Metadata-similar negative pairs receive a larger margin and may remain closer in the embedding space, whereas metadatadissimilar pairs receive a stricter margin. Altogether, the overall pre-training objective is L=
1 X con L + λn Lneg + λa Larea , N i∈A i
(13)
where the coefficients λn and λa control the contributions of the negative-margin and areapreservation terms, respectively. Note that Lcon organizes the embedding space using known i basin relations, Lneg limits excessive similarity between non-overlapping basins, while Larea encourages the encoder to retain information about physical basin scale.
3.4
Training and Embedding Generation
A basin-aware sampler selects the basins for each mini-batch and draws Kyr years per basin, to ensure the same number of temporal positives for each basin within a mini-batch. After training, the unaugmented input for each original basin-year entity is encoded to obtain its final embedding zb,y . Finally, to obtain a fixed descriptor for each basin, we take the average annual embeddings for each basin and ℓ2 -normalize the result:
1 X z̄b = Normalize zb,y , |Yb | y∈Y
(14)
b
where Yb denotes the years available for basin b. This facilitates a fair downstream comparison since some EO baselines have different temporal coverages, i.e., do not provide embeddings for a common set of years as Basin2Vec.
4
Experimental Setup
We evaluate Basin2Vec through three research questions (RQs) covering intrinsic embedding structure, temporal generalization, and zero-shot spatial transfer.
8
4.1
RQ1: Intrinsic Embedding Structure
RQ1 tests whether the learned representations (i) remain diverse rather than collapsing into a low-dimensional subspace and (ii) preserve metadata-defined scale and shape relationships. For each method, we average the available embeddings per basin, apply ℓ2 normalization, and evaluate the same 9,067 basins. Representation diversity. We measure representation diversity using entropy-based effective rank [29]. Given the eigenvalues {λi }di=1 of the covariance matrix of the embeddings, let P pi = λi / dj=1 λj . The effective rank of the learned embeddings is reff = exp −
d X
!
pi log pi .
(15)
i=1
Since the embedding dimensions may differ for different methods, we report the normalized effective rank reeff = reff / min(d, N − 1), where d and N denote the embedding dimensions and number of basins, respectively. Higher values indicate that the embeddings are more diverse as their variance spans a larger fraction of the available dimensions. Metadata consistency. The metadata incorporated into Basin2Vec include descriptors of basin scale and geometry (Appendix A.2), which influence basin hydrologic behavior. These descriptors are integrated through metadata fusion, while pairwise metadata similarity is used in the relation-aware objective. We therefore test whether metadata-similar basins are closer in the learned embedding space than metadata-dissimilar basins. We use standardized scale-and-shape metadata (Appendix A.2), with no geographiccoordinate inputs, and exclude overlapping and nested pairs. Metadata-similar pairs are defined using each basin’s nearest neighbors in Euclidean metadata space. Metadata-dissimilar pairs are selected as the most distant pairs within a randomly sampled pool of non-overlapping candidates. The same pair sets are evaluated for every method. We compare the ℓ2 -distance distributions of normalized basin embeddings and summarize their separation as ∆meta = µdissimilar − µsimilar , where the two terms denote the respective mean pairwise distances. A larger positive ∆meta indicates clearer preservation of metadata-defined basin relationships.
RQ2–RQ3: Downstream Streamflow Generalization Task description. RQ2 and RQ3 evaluate basin representations as static conditioning vectors for daily streamflow prediction. For basin b and target day t, the downstream model met and a fixed predicts streamflow Qb,t from an input sequence of meteorological forcings xb,t basin descriptor cb :
met b b,t = Fη [xmet Q b,t−L+1 , . . . , xb,t ], cb .
(16)
where L ∈ {120, 365} is the forcing-window length. Meteorological forcings are available through day t, but no observed streamflow is provided as input. Data description. Experiments use CAMELS-US basins with Daymet meteorological forcings and USGS daily streamflow [1, 26]. The dynamic inputs are precipitation, shortwave radiation, maximum and minimum temperature, and vapor pressure. Discharge is converted to basinmean runoff (mm/day); the 27 CAMELS attributes include drainage area (area_gages2).
9
The main benchmark compares basin descriptors obtained from Basin2Vec, AlphaEarth, TESSERA, SatCLIP, and CAMELS attributes. Because the learned representations differ in temporal coverage and spatial sampling, we construct one fixed descriptor per basin using all samples available from each source. Basin2Vec uses the ℓ2 -normalized, year-averaged representation z̄b from Eq. (14). For the EO baselines, embeddings are averaged over the available years and sampled locations within each basin and then ℓ2 -normalized. This avoids selecting an arbitrary source-dependent year and provides a time-invariant descriptor comparable to the CAMELS attributes. All basin descriptors remain frozen during downstream training. Evaluation protocol. For RQ2, temporal generalization is evaluated on the same 671 basins across disjoint periods. Data from 1990–2009 are used for model development, including early stopping, while 2010–2014 is held out for evaluation [10, 12]. For RQ3, zero-shot spatial transfer is evaluated using 6-fold ungauged-basin cross-validation. In each fold, held-out basins are excluded from supervised training and early stopping. The remaining basins use 1990–2004 for training and 2005–2014 for validation, while the held-out basins are evaluated over 1990–2014 [3, 18, 31]. The downstream predictor Fη is instantiated as LSTM [15], TFT [20], TimeXer [37], TimerXL [23], or iTransformer [22]. Within each architecture, the dynamic inputs, conditioning mechanism, and training protocol are held fixed across representation sources; only the descriptor input width changes to match the source dimension. All inputs, targets, and conditioning vectors are standardized using training data only. We additionally compare Basin2Vec with KG-SSL [13], a hydrology-specific self-supervised method, using its unsupervised reconstruction-and-contrastive setting without static-attribute supervision. KG-SSL is trained and its descriptors are constructed from 1990–2009 meteorology and observed streamflow, then frozen for 2010–2014 evaluation. The comparison uses the matched downstream LSTM with L = 365 and lead-zero prediction. KG-SSL is excluded from RQ3 because its descriptor construction requires streamflow from the held-out basin. Models are optimized using MSE and AdamW with validation-based early stopping and gradient clipping. Each configuration is evaluated using three seeds (42, 123, and 456). For each seed, NSE [25] and KGE [14] are computed per basin and summarized by their median across basins. We report the mean and standard deviation of these medians over the three seeds; higher values indicate better performance, with 1 representing perfect agreement. Complete hyperparameter and implementation details are provided in the appendix. Table 2: Temporal generalization results. Values are median basin-level NSE and KGE. Bold and underlining indicate the best and second-best conditioning sources, respectively. L = 365 Median NSE ↑
Model Basin2Vec
Median KGE ↑
AlphaEarth CAMELS Attr. TESSERA
SatCLIP
Basin2Vec
AlphaEarth CAMELS Attr. TESSERA
LSTM 0.782±0.009 0.641±0.017 TFT 0.753±0.011 0.741±0.026 TimeXer 0.651±0.018 0.630±0.012 Timer-XL 0.730±0.019 0.674±0.028 iTrans. 0.627±0.022 0.559±0.020
0.747±0.010 0.717±0.022 0.502±0.019 0.591±0.026 0.555±0.022
0.662±0.025 0.719±0.018 0.786±0.011 0.572±0.013 0.570±0.025 0.638±0.026 0.768±0.019 0.722±0.029 0.573±0.033 0.603±0.015 0.691±0.009 0.579±0.023 0.627±0.019 0.402±0.021 0.708±0.022 0.585±0.010 0.576±0.015 0.464±0.017 0.582±0.026 0.566±0.024
LSTM 0.754±0.014 0.619±0.015 TFT 0.737±0.019 0.719±0.020 TimeXer 0.677±0.011 0.675±0.010 Timer-XL 0.705±0.018 0.650±0.026 iTrans. 0.594±0.019 0.551±0.015
0.737±0.013 0.712±0.012 0.645±0.026 0.529±0.021 0.581±0.028
0.638±0.016 0.704±0.030 0.775±0.009 0.563±0.023 0.551±0.029 0.668±0.026 0.744±0.020 0.719±0.032 0.592±0.014 0.530±0.028 0.679±0.025 0.625±0.016 0.602±0.019 0.566±0.016 0.693±0.014 0.580±0.016 0.584±0.017 0.398±0.025 0.580±0.009 0.545±0.010
SatCLIP
0.756±0.013 0.714±0.030 0.446±0.030 0.536±0.029 0.533±0.020
0.626±0.022 0.688±0.031 0.514±0.033 0.566±0.026 0.517±0.023 0.571±0.033 0.635±0.021 0.346±0.016 0.579±0.028 0.450±0.022
0.741±0.031 0.668±0.030 0.675±0.011 0.440±0.029 0.554±0.012
0.592±0.031 0.705±0.025 0.479±0.014 0.600±0.020 0.563±0.028 0.492±0.010 0.540±0.027 0.533±0.025 0.535±0.031 0.349±0.024
L = 120
10
Effective rank / max rank
0.63 40.5/64
Basin2Vec AlphaEarth
0.20
12.9/64
TESSERA
0.20
25.1/128
0.05
SatCLIP 0.0
13.7/256 0.2
0.4
0.6
0.8
Normalized effective rank
1.0
Figure 3: Representation diversity. Normalized effective rank across 9,067 basins. Higher values indicate greater representation diversity.
Metadata-similar pairs Density
6 (a)
Basin2Vec
(b)
AlphaEarth
4 2 0
TESSERA
6 (c)
Density
Metadata-dissimilar pairs
SatCLIP
(d)
4 2 00.0
0.5
1.0 distance 2
1.5
0.0
0.5
1.0 distance 2
1.5
Figure 4: Metadata consistency. ℓ2 -distance distributions for metadata-similar and metadata-dissimilar non-overlapping pairs. Dashed lines denote means.
11
Table 3: Zero-shot spatial-transfer results for L = 365. Each value is the median per-basin NSE or KGE on held-out basins. Bold and underlining indicate the best and second-best conditioning sources, respectively. Median NSE ↑
Model Basin2Vec
Median KGE ↑
AlphaEarth CAMELS Attr. TESSERA
LSTM 0.460±0.050 0.079±0.021 TFT 0.524±0.019 0.132±0.017 TimeXer 0.491±0.016 0.126±0.020 Timer-XL 0.498±0.017 0.136±0.024 iTrans. 0.465±0.021 0.151±0.018
0.071±0.018 0.147±0.015 0.065±0.018 0.092±0.019 0.007±0.014
SatCLIP
Basin2Vec
AlphaEarth
CAMELS Attr.
0.092±0.017 0.132±0.022 0.408±0.001 −0.084±0.025 0.127±0.018 0.119±0.021 0.427±0.022 −0.077±0.028 0.065±0.021 0.106±0.017 0.431±0.018 −0.050±0.022 0.022±0.016 0.140±0.021 0.436±0.020 −0.038±0.021 0.085±0.017 0.058±0.020 0.384±0.024 −0.039±0.020
−0.098±0.027 −0.071±0.025 −0.080±0.019 −0.060±0.023 −0.093±0.026
TESSERA
SatCLIP
−0.049±0.020 −0.072±0.024 −0.055±0.019 −0.100±0.023 −0.055±0.020 −0.066±0.024 −0.114±0.029 −0.023±0.018 −0.098±0.024 −0.114±0.028
Table 4: Component ablations of Basin2Vec using LSTM with L = 365. Bold and underlining denote the best and second-best results. Category
Variant
Full model
Basin2Vec w/o monthly branch w/o quasi-static branch w/o metadata conditioning w/o gated metadata fusion w/o area regularization hard positive only
Scale-aware encoder
Ablation setting
Temporal Spatial NSE ↑ KGE ↑ NSE ↑ KGE ↑ All components 0.782 ± 0.009 0.786 ± 0.011 0.460 ± 0.050 0.408 ± 0.001 dyn zb,y removed 0.649 ± 0.016 0.621 ± 0.031 0.423 ± 0.021 0.388 ± 0.032 sta zb,y 0.635 ± 0.015 0.623 ± 0.014 0.404 ± 0.013 0.397 ± 0.007 removed 0.634 ± 0.022 0.615 ± 0.017 0.064 ± 0.044 −0.059 ± 0.044 MLPmeta () and gb,y removed gated fusion → concat. + MLP 0.651 ± 0.032 0.620 ± 0.059 0.424 ± 0.029 0.399 ± 0.042 λa = 0 0.601 ± 0.007 0.571 ± 0.001 0.412 ± 0.013 0.389 ± 0.014 + 0.670 ± 0.009 0.647 ± 0.021 0.372 ± 0.010 0.332 ± 0.021 wij = 1j∈P hard , dij = 1 i
w/o temporal positives Relation-aware w/o overlap/nesting positives objective w/o metadata-weighted denominator metadata as positive w/o negative-margin loss
0.621 ± 0.024 0.633 ± 0.012 0.638 ± 0.028 0.600 ± 0.039 0.643 ± 0.032
λt = 0 λo = 0 dij = 1 + wij += λp ξij λn = 0
0.628 ± 0.056 0.589 ± 0.001 0.608 ± 0.035 0.580 ± 0.040 0.625 ± 0.048
0.418 ± 0.030 0.408 ± 0.017 0.384 ± 0.017 0.403 ± 0.002 0.409 ± 0.024
0.398 ± 0.011 0.389 ± 0.017 0.330 ± 0.008 0.390 ± 0.004 0.383 ± 0.029
Table 5: Comparison with KG-SSL under the matched LSTM setting with L = 365. Method
Median NSE ↑
Median KGE ↑
KG-SSL Basin2Vec
0.620±0.018 0.782±0.009
0.593±0.015 0.786±0.011
12
5
Experimental Results
5.1
Intrinsic Embedding Structure
(RQ1)
Basin2Vec achieves the highest normalized effective rank (Fig. 3), indicating that its variance is distributed across a larger fraction of the available dimensions rather than concentrated in a small subspace. All methods place metadata-dissimilar pairs farther apart on average than metadata-similar pairs, but Basin2Vec exhibits the largest separation ∆meta , while the baseline distributions overlap more substantially (Fig. 4). These results show that Basin2Vec produces a diverse, non-collapsed representation that more clearly preserves basin scale and geometry relationships.
5.2
(RQ2)
Temporal Generalization
Table 2 summarizes the temporal generalization performance of the embedding methods across five downstream architectures. Basin2Vec ranks first in both NSE and KGE for every architecture at forcing-window length L ∈ {120, 365}. Its consistent gains across recurrent, attention-based, and transformer-style predictors indicate that the benefit is not specific to one architecture or forcing-window length. The right-shifted KGE distributions in Figure 5 further show that the gains extend across basins.
Basin2Vec
L = 365 Cumulative density
1.0
Attributes
LSTM
TESSERA
Timer-XL
(a)
SatCLIP
iTransformer
(b)
(c)
0.8 0.6 0.4
Median KGE AE : 0.572 Attr: 0.756 Tes : 0.626 Sat : 0.688
Median KGE AE : 0.585 Attr: 0.536 Tes : 0.635 Sat : 0.346
B2V : 0.786
0.2 0.0 1.0
L = 120 Cumulative density
AlphaEarth
(d)
Median KGE AE : 0.566 Attr: 0.533 Tes : 0.579 Sat : 0.450
B2V : 0.708
(e)
B2V : 0.582
(f)
0.8 0.6 0.4
Median KGE AE : 0.563 Attr: 0.741 Tes : 0.592 Sat : 0.705
0.2 0.0 0.0
Median KGE AE : 0.580 Attr: 0.440 Tes : 0.540 Sat : 0.533
B2V : 0.775
0.2
0.4
0.6
KGE
0.8
1.0 0.0
Median KGE AE : 0.545 Attr: 0.554 Tes : 0.535 Sat : 0.349
B2V : 0.693
0.2
0.4
0.6
KGE
0.8
1.0 0.0
B2V : 0.580
0.2
0.4
0.6
KGE
0.8
1.0
Figure 5: Per-basin KGE CDFs for temporal generalization using selected downstream architectures. 13
Comparison with hydrology-specific SSL. With the same LSTM and L = 365, Basin2Vec increases median NSE from 0.620 to 0.782 and median KGE from 0.593 to 0.786 over KG-SSL [13] (Table 5). Although KG-SSL uses streamflow, it learns from lumped one-year sequences over 671 basins, making its descriptors more dependent on the observed flow regime. Basin2Vec instead learns from distributed inputs across 9,067 basins and enforces consistency across years, producing more stable descriptors for temporal transfer.
5.3
(RQ3)
Zero-Shot Spatial Transfer
Table 3 shows that Basin2Vec ranks first in NSE and KGE for every downstream architecture. Its median NSE exceeds the strongest alternative for each architecture by 0.314–0.377, and it is the only method with consistently positive median KGE, demonstrating substantially stronger transfer to unseen basins. We also examine the relative performance of the methods across different basin sizes. Figure 6 further shows that Basin2Vec maintains the strongest NSE and KGE distributions for small, medium, and large basins. Thus, the gains are not confined to a particular basin-size range.
Basin2Vec
1.0
AlphaEarth
TESSERA
1.0
0.0 0.5 1.0
Attributes
Small Q1 n=224
Medium Large Q2 Q3 n=224 n=223
0.5
KGE
NSE
0.5
SatCLIP
0.0 0.5
Small Q1 n=224
1.0
Medium Large Q2 Q3 n=224 n=223
Basin-size class
Basin-size class
Figure 6: Spatial-split performance across basin-size classes.
5.4
Ablation Study
We remove or replace individual components of the scale-aware encoder and relation-aware objective and evaluate the resulting variants under temporal and spatial generalization. Table 4 shows that the complete Basin2Vec model achieves the best result for every metric. Scale-aware encoder. Removing either input branch degrades generalization, while removing metadata conditioning causes the largest spatial decline and negative median KGE. Gated metadata fusion outperforms concatenation, and area regularization provides particularly strong temporal gains. Relation-aware objective. The full objective outperforms every relation ablation. Hard positives alone rank second temporally but transfer poorly to unseen basins. Removing temporal or overlap/nesting positives, metadata-weighted negatives, or the negativemargin loss reduces performance. Treating metadata as a positive relation also performs worse, supporting its use to moderate negative repulsion rather than enforce attraction.
14
6
Conclusion
We presented Basin2Vec, a self-supervised framework for learning basin-centric representations from gridded hydroclimatic data without observed streamflow. Basin2Vec combines a scale-aware encoder for spatiotemporal inputs and metadata with a relation-aware contrastive objective that models hydrologic relationships across space and time. The resulting embeddings are diverse and hydrologically structured. Across architectures and forcing windows, Basin2Vec outperforms predefined attributes and general-purpose EO embeddings in temporal generalization and zero-shot transfer to unseen basins. Ablations validate its main design choices. These results show that explicitly modeling basin structure and relationships yields reusable representations for hydrologic prediction.
Acknowledgments Pang-Ning Tan acknowledges partial support from the U.S. National Science Foundation under grant IIS-2453100. A. Pouyan Nejadhashemi acknowledges support from the USDA National Institute of Food and Agriculture (NIFA) through Hatch project 1019654 and from the Institute of Water Research at Michigan State University.
15
References [1] Nans Addor, Andrew J Newman, Naoki Mizukami, and Martyn P Clark. The CAMELS data set: catchment attributes and meteorology for large-sample studies. Hydrology and Earth System Sciences, 21(10):5293–5313, 2017. doi: 10.5194/hess-21-5293-2017. URL https://hess.copernicus.org/articles/21/5293/2017/. [2] Alberto Bassi, Marvin Höge, Antonietta Mira, Fabrizio Fenicia, and Carlo Albert. Learning landscape features from streamflow with autoencoders. Hydrology and Earth System Sciences, 28(22):4971–4988, 2024. doi: 10.5194/hess-28-4971-2024. URL https: //hess.copernicus.org/articles/28/4971/2024/. [3] Günter Blöschl, Murugesu Sivapalan, Thorsten Wagener, Alberto Viglione, and Hubert Savenije (eds.). Runoff Prediction in Ungauged Basins: Synthesis across Processes, Places and Scales. Cambridge University Press, 2013. doi: 10.1017/CBO9781139235761. [4] Tom E Botterill and Hilary K McMillan. Using machine learning to identify hydrologic signatures with an encoder–decoder framework. Water Resources Research, 59(3): e2022WR033091, 2023. doi: 10.1029/2022WR033091. [5] Christopher F Brown, Michal R Kazmierski, Valerie J Pasquarella, William J Rucklidge, Masha Samsikova, Chenhui Zhang, Evan Shelhamer, Estefania Lahera, Olivia Wiles, Simon Ilyushchenko, Noel Gorelick, Lihui Lydia Zhang, Sophia Alj, Emily Schechter, Sean Askay, Oliver Guinan, Rebecca Moore, Alexis Boukouvalas, and Pushmeet Kohli. AlphaEarth foundations: An embedding field model for accurate and efficient global mapping from sparse label data. arXiv preprint arXiv:2507.22291, 2025. doi: 10.48550/ arXiv.2507.22291. URL https://arxiv.org/abs/2507.22291. [6] Manuela I Brunner, Louise Slater, Lena M Tallaksen, and Martyn Clark. Challenges in modeling and predicting floods and droughts: A review. WIREs Water, 8(3):e1520, 2021. doi: 10.1002/wat2.1520. [7] Yezhen Cong, Samar Khanna, Chenlin Meng, Patrick Liu, Erik Rozi, Yutong He, Marshall Burke, David Lobell, and Stefano Ermon. SatMAE: Pre-training transformers for temporal and multi-spectral satellite imagery. In Advances in Neural Information Processing Systems, volume 35, pp. 197–211. Curran Associates, Inc., 2022. doi: 10.52202/068431-0015. URL https://proceedings.neurips.cc/paper_files/paper/ 2022/file/01c561df365429f33fcd7a7faa44c985-Paper-Conference.pdf. [8] James A Falcone. GAGES-II: Geospatial attributes of gages for evaluating streamflow. Usgs unnumbered series, U.S. Geological Survey, 2011. URL https://pubs.usgs.gov/ publication/70046617. [9] James A Falcone, Daren M Carlisle, David M Wolock, and Michael R Meador. GAGES: A stream gage database for evaluating natural and altered flow conditions in the conterminous United States: Ecological archives E091-045. Ecology, 91(2):621–621, 2010. doi: 10.1890/09-0889.1. [10] Kuai Fang, Daniel Kifer, Kathryn Lawson, Dapeng Feng, and Chaopeng Shen. The data synergy effects of time-series deep learning models in hydrology. Water Resources Research, 58(4):e2021WR029583, 2022. doi: 10.1029/2021WR029583. 16
[11] Zhengpeng Feng, Clement Atzberger, Sadiq Jaffer, Jovana Knezevic, Silja Sormunen, Robin Young, Madeline C. Lisaius, Markus Immitzer, Toby Jackson, James Ball, David A. Coomes, Anil Madhavapeddy, Andrew Blake, and Srinivasan Keshav. TESSERA: Temporal embeddings of surface spectra for earth representation and analysis. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 34818–34831, June 2026. [12] Martin Gauch, Juliane Mai, and Jimmy Lin. The proper care and feeding of CAMELS: How limited training data affects streamflow prediction. Environmental Modelling & Software, 135:104926, 2021. doi: 10.1016/j.envsoft.2020.104926. [13] Rahul Ghosh, Arvind Renganathan, Kshitij Tayal, Xiang Li, Ankush Khandelwal, Xiaowei Jia, Christopher Duffy, John Nieber, and Vipin Kumar. Robust inverse framework using knowledge-guided self-supervised learning: An application to hydrology. In Proceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pp. 465–474, 2022. doi: 10.1145/3534678.3539448. [14] Hoshin V Gupta, Harald Kling, Koray K Yilmaz, and Guillermo F Martinez. Decomposition of the mean squared error and NSE performance criteria: Implications for improving hydrological modelling. Journal of Hydrology, 377(1-2):80–91, 2009. doi: 10.1016/j.jhydrol.2009.08.003. [15] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural Computation, 9(8):1735–1780, 1997. doi: 10.1162/neco.1997.9.8.1735. [16] Konstantin Klemmer, Esther Rolf, Caleb Robinson, Lester Mackey, and Marc Rußwurm. SatCLIP: Global, general-purpose location embeddings with satellite imagery. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 39, pp. 4347–4355, 2025. doi: 10.1609/aaai.v39i4.32457. [17] Wouter JM Knoben, Cyril Thébault, Kasra Keshavarz, Laura Torres-Rojas, Nathaniel W Chaney, Alain Pietroniro, and Martyn P Clark. Catchment attributes and meteorology for large-sample spatially distributed analysis (CAMELS-SPAT): streamflow observations, forcing data and geospatial data for hydrologic studies across North America. Hydrology and Earth System Sciences, 29(20):5791–5833, 2025. doi: 10.5194/hess-29-5791-2025. URL https://hess.copernicus.org/articles/29/5791/2025/. [18] Frederik Kratzert, Daniel Klotz, Mathew Herrnegger, Alden K Sampson, Sepp Hochreiter, and Grey S Nearing. Toward improved predictions in ungauged basins: Exploiting the power of machine learning. Water Resources Research, 55(12):11344–11354, 2019. doi: 10.1029/2019WR026065. [19] Frederik Kratzert, Daniel Klotz, Guy Shalev, Günter Klambauer, Sepp Hochreiter, and Grey Nearing. Towards learning universal, regional, and local hydrological behaviors via machine learning applied to large-sample datasets. Hydrology and Earth System Sciences, 23(12):5089–5110, 2019. doi: 10.5194/hess-23-5089-2019. URL https://hess. copernicus.org/articles/23/5089/2019/. [20] Bryan Lim, Sercan Ö. Arık, Nicolas Loeff, and Tomas Pfister. Temporal fusion transformers for interpretable multi-horizon time series forecasting. International Journal of Forecasting, 37(4):1748–1764, 2021. doi: 10.1016/j.ijforecast.2021.03.012. 17
[21] Haomei Lin, Peirong Lin, Fenghe Zhang, Louise Slater, Yuan Yang, Ming Pan, Qiming Qin, and Aizhong Hou. Fusing satellite embeddings to improve streamflow reconstruction across river networks. EGUsphere [preprint], 2026:1–26, 2026. doi: 10.5194/egusphere-2026-1834. URL https://egusphere.copernicus.org/preprints/ 2026/egusphere-2026-1834/. [22] Yong Liu, Tengge Hu, Haoran Zhang, Haixu Wu, Shiyu Wang, Lintao Ma, and Mingsheng Long. iTransformer: Inverted transformers are effective for time series forecasting. In International Conference on Learning Representations, volume 2024, pp. 11116– 11140, 2024. URL https://proceedings.iclr.cc/paper_files/paper/2024/file/ 2ea18fdc667e0ef2ad82b2b4d65147ad-Paper-Conference.pdf. [23] Yong Liu, Guo Qin, Xiangdong Huang, Jianmin Wang, and Mingsheng Long. Timer-XL: Long-context transformers for unified time series forecasting. In International Conference on Learning Representations, volume 2025, pp. 83982– 84006, 2025. URL https://proceedings.iclr.cc/paper_files/paper/2025/file/ d09820e292f915d77fa717d228c425ee-Paper-Conference.pdf. [24] Hilary K. McMillan. A review of hydrologic signatures and their applications. WIREs Water, 8(1):e1499, 2021. doi: 10.1002/wat2.1499. [25] J. E. Nash and J. V. Sutcliffe. River flow forecasting through conceptual models part I—a discussion of principles. Journal of Hydrology, 10(3):282–290, 1970. doi: 10.1016/0022-1694(70)90255-6. [26] Andrew J Newman, Martyn P Clark, Kevin Sampson, Andrew Wood, Lauren E Hay, Andy Bock, Roland J Viger, David Blodgett, Levi Brekke, J. R. Arnold, T. Hopson, and Q. Duan. Development of a large-sample watershed-scale hydrometeorological data set for the contiguous USA: data set characteristics and assessment of regional variability in hydrologic model performance. Hydrology and Earth System Sciences, 19(1):209–223, 2015. doi: 10.5194/hess-19-209-2015. URL https://hess.copernicus.org/articles/ 19/209/2015/. [27] Zhigang Ou and Yi Zheng. Foundation-scale satellite embeddings reframe hydrological generalization as a representation problem. Geophysical Research Letters, 53(7): e2025GL121604, 2026. doi: 10.1029/2025GL121604. [28] Pengfei Qu, Wenyu Ouyang, Chi Zhang, Yikai Chai, Shuolong Xu, Lei Ye, Yongri Piao, Miao Zhang, and Huchuan Lu. Utilizing earth foundation models to enhance the simulation performance of hydrological models with AlphaEarth embeddings. arXiv preprint arXiv:2601.01558, 2026. doi: 10.48550/arXiv.2601.01558. URL https://arxiv. org/abs/2601.01558. [29] Olivier Roy and Martin Vetterli. The effective rank: A measure of effective dimensionality. In 15th European Signal Processing Conference (EUSIPCO), pp. 606–610. EURASIP, 2007. URL https://www.eurasip.org/Proceedings/Eusipco/Eusipco2007/Papers/ a5p-h05.pdf. [30] Luis Samaniego, Stephan Thober, Niko Wanders, Ming Pan, Oldrich Rakovec, Justin Sheffield, Eric F Wood, Christel Prudhomme, Gwyn Rees, Helen Houghton-Carr, Matthew Fry, Katie Smith, Glenn Watts, Hege Hisdal, Teodoro Estrela, Carlo Buontempo, Andreas 18
Marx, and Rohini Kumar. Hydrological forecasts and projections for improved decisionmaking in the water sector in Europe. Bulletin of the American Meteorological Society, 100(12):2451–2472, 2019. doi: 10.1175/BAMS-D-17-0274.1. [31] Murugesu Sivapalan, K Takeuchi, Stewart W Franks, VK Gupta, H Karambiri, V Lakshmi, X Liang, JJ McDonnell, Eduardo Mario Mendiondo, PE O’Connell, T. Oki, J. W. Pomeroy, D. Schertzer, S. Uhlenbrook, and E. Zehe. IAHS decade on predictions in ungauged basins (PUB), 2003–2012: Shaping an exciting future for the hydrological sciences. Hydrological Sciences Journal, 48(6):857–880, 2003. doi: 10.1623/hysj.48.6.857.51421. [32] Dezydery Szymkiewicz. Une contribution statistique à la géographie floristique. Acta Societatis Botanicorum Poloniae, 11(3):249–265, 1934. doi: 10.5586/asbp.1934.012. [33] Muhammad Talha, A Pouyan Nejadhashemi, Xiaofeng Liu, and Yuan Yang. BASINGRID: A distributed 40-year spatiotemporal hydrology dataset for U.S. basins. Scientific Data, 2026. doi: 10.1038/s41597-026-08030-4. [34] Larisa Tarasova, Sebastian Gnann, Soohyun Yang, Andreas Hartmann, and Thorsten Wagener. Catchment characterization: Current descriptors, knowledge gaps and future opportunities. Earth-Science Reviews, 252:104739, 2024. doi: 10.1016/j.earscirev.2024. 104739. [35] U.S. Geological Survey. USGS National Streamgaging Network. U.S. Geological Survey Water Resources Mission Area. https://www.usgs.gov/ mission-areas/water-resources/science/usgs-national-streamgaging-network, 2024. URL https://www.usgs.gov/mission-areas/water-resources/science/ usgs-national-streamgaging-network. Accessed: 2026-06-03. [36] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems, volume 30, 2017. [37] Yuxuan Wang, Haixu Wu, Jiaxiang Dong, Guo Qin, Haoran Zhang, Yong Liu, Yunzhong Qiu, Jianmin Wang, and Mingsheng Long. TimeXer: Empowering transformers for time series forecasting with exogenous variables. In Advances in Neural Information Processing Systems, volume 37, pp. 469–498. Curran Associates, Inc., 2024. doi: 10.52202/079017-0015. URL https://proceedings.neurips.cc/paper_files/paper/ 2024/file/0113ef4642264adc2e6924a3cbbdf532-Paper-Conference.pdf. [38] Ailing Zeng, Muxi Chen, Lei Zhang, and Qiang Xu. Are transformers effective for time series forecasting? In Proceedings of the AAAI Conference on Artificial Intelligence, volume 37, pp. 11121–11128, 2023. doi: 10.1609/aaai.v37i9.26317. URL https://ojs. aaai.org/index.php/AAAI/article/view/26317.
19
The appendix is organized as follows: Sec. A.1 provides additional Basin2Vec implementation details; Sec. A.2 describes the pretraining and baseline datasets; Sec. A.3 provides downstream training and evaluation details; Sec. A.4 reports extended results for RQ1–RQ3; and Sec. A.5 reports grouped metadata and objective ablations from Table 4.
A
Appendix
A.1
Additional Basin2Vec Implementation Details
This section complements the Basin2Vec formulation in Sec. 3 of the main paper with the implementation details needed to reproduce pretraining and embedding extraction. We specify the metadata-similarity kernel, the exact parameterization of metadata-aware denominator weights and margins, mask-preserving augmentations, basin-aware distributed batching, and the embedding-extraction procedure. e meta and X e meta denote the standardized metadata vectors for Metadata similarity. Let X bi bj the basins associated with samples i and j, respectively. The metadata fields are listed in Table A.3. For metadata dimension Mmeta , we compute the normalized Euclidean distance m δij =
e meta − X e meta X bi bj 2 √ . Mmeta
(A.1)
The metadata similarity ξij used by the denominator weight in Eq. (11) of the main paper and the negative-margin loss in Eq. (12) is then computed with a Gaussian kernel: m )2 (δij ξij = exp − 2 2τm
!
,
ξij ∈ [0, 1],
(A.2)
where τm is the metadata-similarity bandwidth. This normalization keeps the distance scale from increasing mechanically with the number of metadata fields. Denominator-weight parameterization. For a non-positive pair, Eq. (11) of the main paper defines dij = 1 − λm ξij . In the implementation, the same weight is parameterized using the minimum negative weight dmin = 1 − λm : (
dij =
1, dmin + (1 − dmin )(1 − ξij ),
+ wij > 0, + wij = 0.
(A.3)
The two expressions are algebraically equivalent. With λm = 0.80, the implementation uses dmin = 0.20, so metadata-similar non-positive pairs exert weaker repulsion but are never removed from the contrastive denominator. Positive pairs retain unit denominator weight + because their attraction is already determined by wij and qij . Metadata-dependent negative margin. For each non-overlapping negative pair, the margin in Eq. (12) of the main paper is µij = µmin + (µmax − µmin )ξij .
(A.4)
We use µmin = 0.20 and µmax = 0.60. Thus, metadata-similar negative pairs may retain a higher cosine similarity, whereas metadata-dissimilar negative pairs are subject to a stricter margin. 20
Mask-preserving augmentations. For every basin-year entity, two views are independyn sta using weak perturbations that preserve the basin dently generated from Xb,y and Xb,y boundary. Continuous non-temperature variables are multiplicatively scaled by 1 + ϵ, where ϵ ∼ N (0, 0.042 ), while standardized temperature channels receive an additive shift with ϵ ∼ N (0, 0.032 ). Gaussian noise is applied with standard deviation 0.03. Spatial dropout uses one spatial mask shared across all 12 months so that it does not introduce artificial month-specific gaps. For the dynamic input, individual months are dropped with probability 0.08, and seasonal-block dropout removes a contiguous block of one to three months with probability 0.08. Whole-variable dropout is applied with probability 0.03. Categorical channels are not perturbed by noise, scaling, or spatial dropout and may undergo only whole-variable dropout. After augmentation, continuous values are clipped to [−10, 10], and the basin mask Mb is reapplied. We do not use cropping, rotation, or month permutation because they would alter basin geometry or seasonal ordering. Table A.1: Default Basin2Vec pretraining and augmentation settings. Setting
Value
Patch size Embedding dimension d Monthly Transformer heads Contrastive temperature τ Temporal-decay scale τy Metadata bandwidth τm Temporal-positive weight λt Overlap-positive weight λo Metadata-denominator weight λm Minimum negative weight dmin Negative-margin weight λn Area-loss weight λa Margin bounds (µmin , µmax )
64 × 64 64 4 0.15 8.0 1.5 0.35 0.12 0.80 0.20 0.05 0.05 (0.20, 0.60) σ = 0.03 p = 0.03 p = 0.08 p = 0.08, length 1–3 p = 0.03 σ = 0.04 σ = 0.03
Gaussian noise Spatial dropout Month dropout Seasonal-block dropout Whole-variable dropout Multiplicative scaling Temperature shift
Objective coefficients and ablation scope. Table A.1 specifies the reference objective coefficients, including λt = 0.35, λo = 0.12, λm = 0.80, and λn = λa = 0.05. The componentremoval comparisons in Table 4 change the stated objective term while retaining the reference settings for other terms. Such comparisons assess component contributions; they do not constitute a coefficient search or establish an optimal setting. A validation-based search protocol, candidate-selection rule, and coefficient-selection metric are not documented here, so no claim of validation-optimal coefficients is made. Basin-aware distributed batching. Each local minibatch is formed by sampling Bb distinct basins and Kyr years per selected basin, giving Bloc = Bb Kyr basin-year entities. This construction ensures that each selected basin contributes temporal positives. Under distributed training with R workers, embeddings, basin IDs, years, metadata, overlap information, and area targets are gathered across workers before the loss is evaluated. The effective global
21
Algorithm A.1 Basin2Vec pretraining and basin-level embedding extraction dyn sta Require: Basin-year data D = {(Xb,y , Xb,y , Mb , Xbmeta , ab )}, where ab is standardized log drainage area Require: Overlap strengths ωij ; encoder fθ ; projection head qϕ ; area head qa ; augmentations Thydro Require: Sampling parameters Bb , Kyr and objective parameters τ, τy , τm , λt , λo , λm , λn , λa , µmin , µmax Ensure: Basin-level descriptors {z̄b } 1: for each pretraining epoch do 2: for each distributed minibatch do 3: Sample Bb basins and Kyr years per basin to form Bloc . 4: for each (b, y) ∈ Bloc do 5: Generate two independent mask-preserving views with Thydro . 6: for r ∈ {1, 2} do fused,(r) (r) 7: Encode the view to obtain hb,y and vb,y . (r)
(r)
8:
zb,y ← Normalize(qϕ (vb,y )).
9: 10: 11: 12:
(r) fused,(r) b ab,y ← qa (hb,y ).
end for end for Gather embeddings, identifiers, metadata, overlap information, and area predictions and targets across all workers. 13: Construct Pihard , Pitemp , Piov , and Nineg using Eq. (7) of the main paper. + + 14: Compute κij and wij using Eq. (10), and normalize wij to obtain qij using Eq. (9). 15: Compute ξij using Eq. (A.2), dij using Eq. (A.3), and µij using Eq. (A.4). 16: Compute Lcon using Eq. (8), Lneg using Eq. (12), and Larea using Eq. (5) of the main paper. 17: L ← Lcon + λn Lneg + λa Larea . 18: Update the trainable parameters by backpropagating L. 19: end for 20: end for 21: Set the trained network to evaluation mode. 22: for each basin b do 23: Encode every unaugmented available basin-year to obtain {zb,y : y ∈ Yb }. ! 24:
z̄b ← Normalize
1 X zb,y . |Yb | y∈Yb
25: end for 26: return {z̄b }
batch therefore contains B = RBloc basin-year entities and N = 2B augmented embeddings. All hard, temporal, overlap/nesting, and non-overlapping relations are formed over this global batch rather than separately on each worker. Optimization and checkpointing. Basin2Vec is trained with distributed data parallelism using pre-stacked, grouped Zarr inputs. Optimization uses AdamW, mixed-precision training, and gradient clipping. Both views share the same encoder and projection head, and the area loss is averaged across the two views. Checkpoints store the encoder, projection head, and area head together with the input-channel configuration, metadata columns, normalization statistics, objective configuration, and sampling configuration required for embedding extraction. Embedding extraction. After pretraining, the network is placed in evaluation mode and embeddings are computed from unaugmented inputs under no-gradient inference. During distributed extraction, dataset indices are sharded without padding so that each basin-year entity is evaluated exactly once. The annual embeddings are then averaged across all available years for each basin and ℓ2 -normalized to obtain z̄b , as defined in Eq. (14) of the main paper. Downstream experiments use only this final basin-level descriptor.
22
A.2
Dataset Details
A.2.1
Pretraining Data
BASINGRID. Basin2Vec is pretrained on BASINGRID, which provides basin-aligned gridded data for 9,067 GAGES-II basins across the contiguous United States from 1985– 2024 [8, 33]. BASINGRID combines daily meteorological forcings, annually varying variables, and distributed static attributes. Each variable is stored in Zarr format with dimensions organized by basin, year, time, channel, height, and width, together with a binary basin mask and basin-window metadata. All source rasters are first harmonized to the common Daymet reference grid (approximately 1 km). Continuous variables are aligned using bilinear resampling, whereas categorical variables use nearest-neighbor resampling. For each basin, a padded extraction window is then resampled to a 64 × 64 patch and masked to exclude cells outside the basin boundary. The fixed array size ensures consistent model inputs and cross-variable alignment, but not a common physical resolution: the ground area represented by one patch pixel varies with basin extent. Basin-window dimensions and effective patch-pixel size are therefore retained in the metadata. For Basin2Vec pretraining, the six daily meteorological variables are aggregated to monthly dyn resolution, producing the 12-month dynamic input Xb,y . Annual PET and land cover are matched to year y, while the remaining static variables are reused across years; together they sta . Table A.2 summarizes the BASINGRID variables and their form the quasi-static input Xb,y use in Basin2Vec. Table A.2: BASINGRID variables used for Basin2Vec pretraining. Native daily variables are aggregated to monthly resolution before pretraining. Source definitions follow BASINGRID [33]. Group
Variable
BASINGRID type Basin2Vec input
Unit
Hydroclimate Precipitation Minimum temperature Maximum temperature Downward shortwave radiation Snow water equivalent Vapor pressure Potential evapotranspiration
Daily Daily Daily Daily Daily Daily Annual
Monthly dynamic Monthly dynamic Monthly dynamic Monthly dynamic Monthly dynamic Monthly dynamic Annual quasi-static
Daymet Daymet ◦C Daymet W/m2 Daymet kg/m2 Daymet Pa Daymet mm/year Hargreaves method using CW3E temperatures
Topography
Elevation
Static
Quasi-static
m
USGS 3DEP
Soil
Clay fraction Silt fraction Sand fraction Bulk density
Static, multi-depth Static, multi-depth Static, multi-depth Static, multi-depth
Quasi-static Quasi-static Quasi-static Quasi-static
g/kg g/kg g/kg cg/cm3
SoilGrids SoilGrids SoilGrids SoilGrids
Static
Quasi-static
m2
Static
Quasi-static
m/s
GLHYMPS V2.0 GLHYMPS V2.0
Hydrogeology Near-surface permeability Hydraulic conductivity
Source
mm/day
◦C
Land cover
Land-cover classification
Annual
Annual quasi-static
–
NLCD
Agriculture
Tile drainage
Static
Quasi-static
–
AgTile-US
23
Figure A.1: Spatial coverage of the 9,067 BASINGRID basins used for Basin2Vec pretraining. Colors denote HUC-2 hydrologic regions, and major rivers are shown in light blue. Basin metadata. The BASINGRID metadata file contains raw basin geometry, patch-scale information, and derived standardized variables for all 9,067 basins. Basin2Vec constructs the metadata vector Xbmeta ∈ R18 from the standardized fields listed in Table A.3. Right-skewed scale, geometry, boundary, and resolution quantities are log-transformed during preprocessing, after which each feature is standardized across the pretraining basins. Basin identifiers, centroid coordinates, and topology counts are not included. The input schema has 18 fields, of which 15 vary across basins; the final three fields are constant zero. Thus, the metadata provides 15 nonconstant input features, not 18 independently varying quantities. The same metadata vector is incorporated through gated conditioning in the scale-aware encoder and is used to compute metadata similarity for non-overlapping pairs in the relationaware objective. The pairwise overlap coefficient ωij used to construct overlap and nesting positives is computed separately from basin polygons. The three overlap-summary fields are retained in the metadata schema but are constant zero in the supplied training file and therefore provide no basin-dependent information for conditioning or metadata similarity. They are distinct from the pair-specific polygon overlap coefficients: zero overlap-summary inputs do not imply zero overlap relations or remove overlap/nesting positives from the objective. Metadata used for RQ1. The metadata-consistency analysis in RQ1 uses a restricted scaleand-shape subset comprising drainage area, perimeter, equivalent diameter, bounding-box width, height, area, diagonal, aspect ratio, and fill fraction, together with compactness, shape index, and solidity. These 12 quantities are standardized before pair construction. Centroid coordinates are not part of the encoder metadata and are not added for RQ1; geographic distance is therefore not an explicit feature in this evaluation. Effective patch-resolution, 24
Table A.3: Standardized basin metadata fields supplied to Basin2Vec. The final three overlapsummary fields are constant zero in the training metadata file; the remaining 15 fields are nonconstant. Variable
Quantity
log_area_km2_z log_perimeter_km_z log_equivalent_diameter_km_z log_bbox_width_km_z log_bbox_height_km_z log_bbox_diagonal_km_z log_bbox_aspect_ratio_z bbox_fill_fraction_z compactness_z solidity_z log_shape_index_z log_vertex_density_per_km_z log_patch_pixel_width_km_z log_patch_pixel_height_km_z log_patch_pixel_area_km2_z log_overlap_degree_z max_overlap_strength_z mean_overlap_strength_z
Drainage area Basin perimeter Equivalent diameter Bounding-box width Bounding-box height Bounding-box diagonal Bounding-box aspect ratio Basin-to-bounding-box area ratio Basin compactness Basin solidity Basin shape index Boundary vertex density Effective patch-pixel width Effective patch-pixel height Effective patch-pixel area Number of overlapping basins Maximum overlap strength Mean overlap strength
boundary-complexity, and overlap-summary variables are also excluded. Spatially overlapping and nested basin pairs are removed before selecting metadata-similar and metadata-dissimilar pairs. A.2.2
Baseline Data
CAMELS-US. The downstream experiments use the 671 CAMELS-US basins with Daymet meteorological forcings and USGS daily streamflow observations [1, 26]. The meteorological inputs are precipitation, shortwave radiation, maximum temperature, minimum temperature, and vapor pressure. Observed discharge is converted to basin-mean runoff in mm/day using the corresponding CAMELS drainage area. The hand-crafted descriptor baseline uses 27 CAMELS attributes describing climate, topography, vegetation, soil, and geology. Table A.4 lists the exact attributes. Categorical identifiers and attributes with missing values are excluded. The resulting vectors are standardized using statistics computed from the supervised training basins only. Table A.4: CAMELS-US attributes used as the hand-crafted basin descriptor baseline. The descriptor contains 27 variables. Group
Attributes
Climate
p_mean, pet_mean, p_seasonality, frac_snow, aridity, high_prec_freq, high_prec_dur, low_prec_freq, and low_prec_dur elev_mean, slope_mean, and area_gages2 frac_forest, lai_max, lai_diff, gvf_max, and gvf_diff soil_depth_pelletier, soil_depth_statsgo, soil_porosity, soil_conductivity, max_water_content, sand_frac, silt_frac, and clay_frac carbonate_rocks_frac and geol_permeability
Topography Vegetation Soil Geology
Earth-observation embeddings. We additionally compare Basin2Vec with three generalpurpose geospatial representations: AlphaEarth, TESSERA, and SatCLIP [5, 11, 16]. Because 25
these representations are defined over pixels or geographic coordinates, they are spatially aggregated over each CAMELS basin to construct a fixed basin descriptor. For AlphaEarth, the 64-dimensional annual embedding images are averaged over each basin polygon using Earth Engine region reduction. The resulting annual descriptors from 2017–2024 are then averaged to obtain one vector per basin. For TESSERA, 128-dimensional embeddings from the 2024 product are sampled at basin-interior locations and averaged across those locations. For SatCLIP, the time-invariant 256-dimensional location embeddings are evaluated at the same basin-interior locations and spatially averaged. Each aggregated EO descriptor is ℓ2 -normalized and kept fixed during downstream training. Thus, every representation source provides one time-invariant conditioning vector per basin: a year-averaged Basin2Vec embedding, a CAMELS attribute vector, or a spatially aggregated EO embedding. None of these descriptors is updated by the downstream forecasting models.
A.3
Downstream Training and Evaluation Details
Task and preprocessing. Each basin representation is used as a fixed conditioning vector and is not fine-tuned during downstream training. The predictor receives Daymet precipitation, shortwave radiation, maximum temperature, minimum temperature, and vapor pressure over a forcing window of L ∈ {120, 365} days and predicts streamflow for the final day of the window. Meteorological observations through the target day are available, corresponding to lead-zero prediction with horizon H = 1. Past streamflow is never provided as an input. Dynamic forcings and streamflow targets are standardized using statistics computed from the corresponding supervised training split. Predictions are transformed back to the original runoff scale before evaluation. Static conditioning vectors are also standardized using the appropriate training scope: all 671 basins for temporal generalization, because the basin set is shared across periods, and only the non-test basins within each spatial fold. Evaluation splits. Table A.5 summarizes the temporal and spatial evaluation protocols. In RQ2, the same basins appear during model development and evaluation, but the time periods are disjoint. Data from 1990–2009 are used for training and early stopping, while 2010–2014 is held out for final evaluation [10, 12]. In RQ3, the 671 basins are partitioned into six folds without HUC-2 stratification. For each fold, the held-out basins are excluded from supervised training, validation, early stopping, and feature standardization. The remaining basins use 1990–2004 for training and 2005–2014 for validation, while the held-out basins are evaluated over 1990–2014. Thus, every basin is evaluated exactly once as an unseen basin [3, 18, 31]. Descriptor conditioning. Descriptor construction is detailed in Appendix A.2. Basin2Vec uses the normalized year-averaged descriptor z̄b , whereas the EO baselines use spatially aggregated and normalized embeddings and CAMELS uses its predefined attribute vector. All descriptors remain fixed during downstream training. Each architecture uses the same conditioning mechanism for every descriptor source. For the LSTM, the descriptor is first projected to a common hidden dimension and concatenated with the meteorological input at every time step. For the attention-based predictors, it is projected to the model dimension and provided as static or exogenous context according to the corresponding architecture. Only the input width of the descriptor projection changes across representation sources. Optimization and repeatability. All downstream models minimize mean squared error using AdamW, gradient clipping, mixed-precision training, and validation-based early stopping. Reduce-on-plateau scheduling decreases the learning rate by a factor of 0.5 after five epochs 26
Table A.5: Downstream streamflow-prediction protocols. Setting
Protocol
Task Forcing windows Dynamic inputs Static input Discharge input Temporal development Temporal evaluation Spatial evaluation Spatial training Spatial validation Spatial testing Random seeds Metrics
Daily streamflow prediction, lead 0, horizon H = 1 L ∈ {120, 365} days Five Daymet meteorological forcings through target day t One fixed basin descriptor None Same 671 basins, 1990–2009 Same 671 basins, 2010–2014 Six-fold ungauged-basin cross-validation Non-test basins, 1990–2004 Non-test basins, 2005–2014 Held-out basins, 1990–2014 42, 123, and 456 Basin-level NSE and KGE
without validation improvement. The optimization settings are given in Table A.6. Each model–descriptor–window configuration is evaluated using seeds 42, 123, and 456. For each seed, evaluation metrics are first computed independently for every basin and summarized by their median across basins. The reported result is the mean and standard deviation of these three seed-specific medians. Table A.6: Downstream optimization settings. Setting
Temporal
Spatial
Maximum epochs Early-stopping patience Batch size per GPU Optimizer Initial learning rate Weight decay Training loss Mixed precision Gradient-norm clipping Scheduler factor Scheduler patience Minimum learning rate
40 5 128 AdamW 10−3 10−4 MSE Yes 1.0 0.5 5 10−5
30 8 128 AdamW 10−4 10−4 MSE Yes 1.0 0.5 5 10−5
Model configurations. We evaluate LSTM, TFT, TimeXer, Timer-XL, and iTransformer [15, 20, 22, 23, 37]. Table A.7 reports the shared configuration used for each architecture group. Settings that are not applicable to a particular architecture are omitted by that implementation. KG-SSL comparison. KG-SSL is evaluated only for RQ2 using its unsupervised reconstruction-and-contrastive configuration without static-attribute supervision [13]. Its encoder is a one-layer bidirectional LSTM with hidden dimension 64 and receives the same five meteorological forcings together with observed streamflow. KG-SSL is trained using data from 1990–2009, after which one fixed descriptor is constructed for each basin and used with the matched downstream LSTM at L = 365. The descriptor remains frozen during evaluation over 2010–2014. KG-SSL is not evaluated in RQ3 because constructing its representation requires observed streamflow from the target basin, which is unavailable under zero-shot ungauged-basin transfer. Evaluation metrics. Predictions are evaluated separately for each basin on the original, unstandardized runoff scale. For basin b, with observed streamflow qb,t and predicted streamflow
27
Table A.7: Model hyperparameters used in downstream experiments. Architecture
Hyperparameter
Temporal
Spatial
LSTM
Hidden dimension Recurrent layers
128 2
256 2
Attention-based
Model dimension Attention heads Encoder layers Feed-forward dimension
128 8 4 512
128 8 2 512
Patch-based
Patch length Patch stride
16 8
16 8
All models
Dropout
0.15
0.15
qbb,t over Tb evaluation days, the Nash–Sutcliffe efficiency is PTb
NSEb = 1 − Pt=1 T
(qb,t − qbb,t )2
2 b t=1 (qb,t − q b )
,
(A.5)
where q b is the mean observed streamflow. The Kling–Gupta efficiency is KGEb = 1 −
q
(rb − 1)2 + (αb − 1)2 + (βb − 1)2 ,
(A.6)
σb qb
(A.7)
where rb = corr(qb , qbb ),
αb =
σqb
,
βb =
qbb . qb
Here, rb measures temporal correlation, αb measures variability bias, and βb measures meanflow bias. Both metrics have an optimum of 1, with larger values indicating better performance [14, 25]. For RQ2, each seed is summarized by the median metric across the 671 evaluation basins. For RQ3, predictions from all six held-out folds are combined so that each basin contributes once, and the median is then computed across the full held-out-basin population. In both settings, tables report the mean and standard deviation of these medians over the three seeds. Fold-specific RQ3 results are reported separately in Appendix A.4. Aggregate improvement summaries. For each architecture a, let sa be the Basin2Vec score and ba the highest score among the alternative descriptors for the same metric and P forcing window. The mean relative improvement is 100 15 5a=1 (sa /ba − 1). The largest of the four temporal summaries (NSE/KGE, L = 120/365) is 8.339% for KGE with L = 365 in P Table 2, rounded to 8.3%. For spatial NSE in Table 3, the mean ratio 15 5a=1 sa /ba is 3.5166, rounded to 3.5. These are arithmetic summaries of the reported basin-median scores across architectures, not ratios of prediction errors or measures of statistical significance.
A.4
Extended Results for RQ1–RQ3
This section provides complementary analyses for the three research questions. For RQ1, reference-basin similarity maps illustrate the spatial organization of the Basin2Vec embedding space. For RQ2, basin-level distributions are reported for both forcing-window lengths. For RQ3, we report fold-level results and basin-level distributions for the representative L = 365 setting. Because higher NSE and KGE values indicate better performance, CDFs shifted farther to the right represent stronger performance across a larger fraction of basins. 28
A.4.1
Reference-Basin Embedding Similarity (RQ1)
To qualitatively examine the organization of the Basin2Vec embedding space, we compute the cosine similarity between selected reference-basin descriptors and all other basin descriptors. For reference basin r and basin b, the similarity is sr,b =
z̄r⊤ z̄b , ∥z̄r ∥2 ∥z̄b ∥2
(A.8)
where z̄r and z̄b are the normalized basin-level descriptors defined in Eq.14.
Figure A.2: Example reference-basin similarity maps for RQ1. Each panel shows the cosine similarity between one selected reference-basin descriptor and all Basin2Vec basin descriptors. The reference basin is outlined in black. Similar basins occur both near and far from each reference, indicating that the learned neighborhoods are not determined solely by geographic proximity. Figure A.2 shows distinct similarity patterns for the two reference basins. Some geographically distant basins have high similarity, whereas some nearby basins have lower similarity. These maps qualitatively complement the effective-rank and metadata-consistency results in the main paper by illustrating how individual basin neighborhoods vary across the embedding space. A.4.2
Basin-Level Temporal Generalization (RQ2)
Figure A.3 complements the aggregate RQ2 results with basin-level NSE distributions. The top and bottom rows correspond to L = 365 and L = 120, respectively, and each column represents one downstream forecasting architecture. The accompanying boxplots summarize basin-level KGE, while the dashed vertical line in each CDF marks the Basin2Vec median. The distributions show whether differences in median performance reflect broad improvements across the basin population or gains concentrated in a smaller subset of basins. The rightward shift of the Basin2Vec curves across architectures and forcing-window lengths supports the aggregate temporal generalization results reported in the main paper. A.4.3
Basin-Level Zero-Shot Spatial Transfer (RQ3)
Table A.8 reports fold-level zero-shot spatial-transfer results for L = 365. Each entry gives the median NSE/KGE across the held-out basins in one fold. Basin2Vec achieves the strongest
29
Table A.8: Fold-level zero-shot spatial-transfer results for L = 365. Each entry reports median NSE/KGE across the unseen basins in that fold. B2V, AE, Attr., TES., and Sat. denote Basin2Vec, AlphaEarth, CAMELS attributes, TESSERA, and SatCLIP, respectively. Bold indicates the best result. FoldModel B2V AE Attr. TES. Sat. LSTM 0.479/0.381 0.179/−0.064 0.093/−0.082 0.081/−0.127 0.219/−0.016 TFT 0.516/0.420 0.209/0.004 0.253/0.024 0.127/−0.090 0.154/−0.079 0 TimeXer 0.489/0.408 0.088/−0.052 0.010/−0.095 −0.270/−0.319 0.211/0.019 Timer-XL 0.515/0.504 0.181/−0.038 0.207/−0.009 −0.146/−0.123 0.112/−0.022 iTrans. 0.440/0.411 0.200/0.010 0.056/−0.011 0.077/−0.166 0.123/−0.065 LSTM 0.434/0.442 0.162/−0.008 0.136/−0.028 −0.004/−0.118 0.017/−0.047 0.495/0.365 0.225/0.038 0.110/−0.126 0.204/0.016 0.206/−0.062 TFT 1 TimeXer 0.466/0.452 0.240/0.126 0.095/−0.041 0.187/0.000 0.140/−0.032 Timer-XL 0.486/0.402 0.207/0.088 0.133/0.016 0.020/−0.081 0.171/0.048 iTrans. 0.421/0.362 0.239/0.103 0.043/−0.096 0.157/−0.045 0.017/−0.142 LSTM 0.437/0.333−0.029/−0.147 0.000/−0.165 0.084/−0.057 0.050/−0.098 TFT 0.499/0.374−0.041/−0.146 0.158/−0.118 0.190/−0.034 0.065/−0.144 2 TimeXer 0.480/0.386 0.050/−0.143 0.061/−0.070 0.026/−0.097 0.000/−0.136 Timer-XL 0.482/0.383 0.070/−0.066 −0.040/−0.122 0.025/−0.182 −0.036/−0.141 iTrans. 0.479/0.339−0.083/−0.166−0.003/−0.141 0.071/−0.166 −0.077/−0.218 LSTM 0.466/0.415 0.089/−0.055 0.082/−0.047 0.105/−0.001 0.015/−0.125 TFT 0.515/0.425 0.136/−0.041 0.113/−0.084 0.102/−0.022 0.114/−0.025 3 TimeXer 0.494/0.450 0.205/0.083 0.054/−0.029 0.092/0.051 0.062/−0.045 Timer-XL 0.480/0.412 0.198/0.045 0.069/−0.003 0.051/−0.088 0.160/0.016 iTrans. 0.436/0.343 0.171/0.079 −0.099/−0.104 0.105/−0.063 0.075/−0.036 LSTM 0.438/0.407 0.001/−0.098 −0.029/−0.177 0.085/−0.021 0.215/−0.028 0.533/0.489 0.121/−0.136 0.047/−0.140 0.096/−0.101 0.046/−0.162 TFT 4 TimeXer 0.496/0.427 0.043/−0.065 −0.121/−0.150 0.071/−0.063 0.141/−0.058 Timer-XL 0.477/0.443 0.142/0.005 −0.082/−0.192−0.048/−0.154 0.147/−0.094 iTrans. 0.481/0.390 0.130/−0.107 −0.162/−0.113 0.054/−0.097 0.088/−0.119 LSTM 0.496/0.443−0.006/−0.155 0.086/−0.090 0.193/0.014 0.110/−0.135 TFT 0.564/0.515 0.113/−0.163 0.198/−0.024 0.165/−0.088 0.165/−0.074 5 TimeXer 0.527/0.521 0.041/−0.116 0.129/−0.097 0.120/0.004 0.028/−0.109 Timer-XL 0.542/0.457 0.028/−0.208 0.160/−0.130 0.025/−0.068 0.175/−0.024 0.519/0.433 0.138/−0.077 0.107/−0.059 0.097/−0.086 0.025/−0.129 iTrans.
30
Basin2Vec
L = 365 Cumulative density
1.0
AlphaEarth
Attributes
TFT
(a)
TESSERA
SatCLIP
TimeXer
(b)
TimerXL
(c)
iTransformer
(d)
(e)
0.8 0.6 0.4
Median KGE AE : 0.572 Attr: 0.756 Tes : 0.626 Sat : 0.688
Median KGE AE : 0.722 Attr: 0.714 Tes : 0.514 Sat : 0.566
B2V : 0.786
0.2 0.0 1.0
L = 120 Cumulative density
LSTM
Median KGE AE : 0.579 Attr: 0.446 Tes : 0.517 Sat : 0.571
B2V : 0.768
(g)
(f)
Median KGE AE : 0.585 Attr: 0.536 Tes : 0.635 Sat : 0.346
B2V : 0.691
Median KGE AE : 0.566 Attr: 0.533 Tes : 0.579 Sat : 0.450
B2V : 0.708
(h)
B2V : 0.582
(i)
(j)
0.8 0.6 0.4
Median KGE AE : 0.563 Attr: 0.741 Tes : 0.592 Sat : 0.705
0.0 0.0
Median KGE AE : 0.719 Attr: 0.668 Tes : 0.479 Sat : 0.600
B2V : 0.775
0.2 0.2
0.4
NSE
0.6
0.8
Median KGE AE : 0.625 Attr: 0.675 Tes : 0.563 Sat : 0.492
B2V : 0.744
1.0 0.0
0.2
0.4
NSE
0.6
0.8
Median KGE AE : 0.580 Attr: 0.440 Tes : 0.540 Sat : 0.533
B2V : 0.679
1.0 0.0
0.2
0.4
NSE
0.6
0.8
Median KGE AE : 0.545 Attr: 0.554 Tes : 0.535 Sat : 0.349
B2V : 0.693
1.0 0.0
0.2
0.4
NSE
0.6
0.8
B2V : 0.580
1.0 0.0
0.2
0.4
NSE
0.6
0.8
1.0
Figure A.3: Basin-level performance distributions for RQ2 temporal generalization. Rows correspond to forcing-window lengths L = 365 and L = 120, and columns correspond to downstream forecasting architectures. The CDFs report NSE, while the accompanying boxplots summarize KGE across the same evaluation basins. performance in every fold and downstream architecture, showing that its spatial-transfer gains are not driven by a single basin partition. Figure A.4 complements the fold-level results with basin-level NSE and KGE distributions aggregated across the held-out basins for L = 365. The top row reports NSE, the bottom row reports KGE, and each column corresponds to a downstream forecasting architecture. The dashed vertical line marks the Basin2Vec median in each panel. Basin2Vec
Cumulative density (cdf)
1.0
LSTM (a)
Attributes
TESSERA
SatCLIP
TimeXer
(b)
TimerXL
(c)
iTransformer
(d)
(e)
0.8 0.6 0.4
Median NSE AE : 0.079 Attr: 0.071 Tes : 0.092 Sat : 0.132
1.0
Median NSE AE : 0.132 Attr: 0.147 Tes : 0.127 Sat : 0.119
B2V : 0.460
0.2 0.0 0.0
Cumulative density (cdf)
AlphaEarth
TFT
0.2
0.4
NSE
0.6
0.8
1.0 0.0
0.2
0.4
NSE
0.6
0.8
Median NSE AE : 0.136 Attr: 0.092 Tes : 0.022 Sat : 0.140
B2V : 0.491
1.0 0.0
(g)
(f)
Median NSE AE : 0.126 Attr: 0.065 Tes : 0.065 Sat : 0.106
B2V : 0.524
0.2
0.4
NSE
0.6
0.8
1.0 0.0
(h)
Median NSE AE : 0.151 Attr: 0.007 Tes : 0.085 Sat : 0.058
B2V : 0.498
0.2
0.4
NSE
0.6
0.8
B2V : 0.465
1.0 0.0
(i)
0.2
0.4
NSE
0.6
0.8
1.0
(j)
0.8 0.6 0.4
Median KGE AE : -0.084 Attr: -0.098 Tes : -0.049 Sat : -0.072
0.0 0.0
Median KGE AE : -0.077 Attr: -0.071 Tes : -0.055 Sat : -0.100
B2V : 0.408
0.2 0.2
0.4
KGE
0.6
0.8
1.0 0.0
Median KGE AE : -0.050 Attr: -0.080 Tes : -0.055 Sat : -0.066
B2V : 0.427
0.2
0.4
KGE
0.6
0.8
1.0 0.0
Median KGE AE : -0.038 Attr: -0.060 Tes : -0.114 Sat : -0.023
B2V : 0.431
0.2
0.4
KGE
0.6
0.8
1.0 0.0
Median KGE AE : -0.039 Attr: -0.093 Tes : -0.098 Sat : -0.114
B2V : 0.436
0.2
0.4
KGE
0.6
0.8
1.0 0.0
B2V : 0.384
0.2
0.4
KGE
0.6
0.8
1.0
Figure A.4: Basin-level performance distributions for RQ3 zero-shot spatial transfer at L = 365. The top row reports NSE and the bottom row reports KGE across held-out basins. Columns correspond to downstream forecasting architectures, and curves compare Basin2Vec, AlphaEarth, CAMELS attributes, TESSERA, and SatCLIP. Together, the fold-level results and CDFs show that Basin2Vec’s improvements persist across alternative basin partitions and throughout the held-out-basin population, including the lower-performing tail. 31
Why does the LSTM outperform the attention-based predictors? The LSTM generally performs better than the attention-based architectures in our experiments. This is consistent with large-sample hydrology studies showing that LSTMs provide a strong inductive bias for rainfall–runoff modeling [19]. Attention-based models can capture longrange dependencies, but their advantage is not universal and depends on the task and data regime [20, 38]. In our setting, the forcing history is limited to L ∈ {120, 365} days, and basinspecific information is already supplied through a fixed descriptor. This reduces the need for the downstream predictor to infer long-range basin context solely from meteorological inputs. We therefore interpret the LSTM’s stronger performance as specific to this experimental setting rather than a general superiority over attention-based architectures.
32
A.5
Metadata Conditioning and Grouped Objective Ablations
Configuration identity. Table 4 provides the authoritative values for the configurations summarized here. Its “hard positive only” variant retains direct metadata conditioning while using augmentation positives and uniform contrastive-denominator weights. Accordingly, this row is labeled Base + metadata in Table A.10, rather than Base. Its temporal NSE/KGE is 0.670/0.647 and spatial NSE/KGE is 0.372/0.332. The separately supplied 0.68/0.69 temporal and 0.43/0.38 spatial summaries are not used for this configuration because their correspondence to a distinct run configuration has not been established. No verified result is available for Base without direct metadata conditioning; its cells remain unreported. Scope of the grouped comparison. Table A.9 distinguishes the reported positive-pair and denominator rules. Other objective terms follow Table 4. In particular, the “hard positive only” row alone does not establish that the negative-margin objective was disabled. These rows therefore do not constitute a completed, strictly controlled two-by-two factorial experiment. Base + relations corresponds to Table 4’s variant without metadata conditioning, while Full uses all components. Area regularization remains active in these Table 4 variants. Polygon-based overlap relations are distinct from the constant-zero overlap-summary input fields in Table A.3. Evaluation and interpretation. The reported Table 4 results use LSTM with L = 365 under temporal and six-fold spatial evaluation, summarized as mean ± standard deviation across three seeds. Full exceeds the metadata-conditioned hard-positive control by 0.112 NSE and 0.139 KGE temporally, and 0.088 NSE and 0.076 KGE spatially. Relative to the variant without direct metadata conditioning, the gains are 0.148/0.171 temporally and 0.396/0.467 spatially. These observations support the importance of metadata conditioning and the benefit of the complete objective over the hard-positive control. They do not isolate an individual loss component or establish statistical significance. Limits. Table A.11 gives arithmetic differences between the central values in Table 4. No factorial interaction is estimated because the Base cell is unreported, and paired uncertainty for the differences cannot be recovered from marginal standard deviations alone. Every reported variant retains area supervision, and the relational objective can use metadata; “without direct metadata conditioning” is not equivalent to metadata-free learning. This comparison also does not establish metadata parity for external EO or CAMELS descriptors. Table A.9: Configuration identities for the grouped comparison. Reported configurations and objective terms follow Table 4. Base is unreported and is not assigned an inferred result. Configuration Base Base + metadata Base + relations Full Basin2Vec
Direct metadata
Positive-pair rule
Denominator weights
Off On Off On
Not evaluated here Hard positives only Full relation-aware positives Full relation-aware positives
Not evaluated here Uniform Metadata-weighted Metadata-weighted
33
Table A.10: Grouped ablation results from Table 4 using LSTM with L = 365. Values are mean ± standard deviation across three seeds; spatial evaluation uses six folds. Base + metadata is Table 4’s “hard positive only” variant; Base + relations is its “without metadata conditioning” variant. A dash indicates an unreported result, not zero. Temporal Configuration Base Base + metadata Base + relations Full Basin2Vec
Spatial
NSE ↑
KGE ↑
NSE ↑
KGE ↑
– 0.670 ± 0.009 0.634 ± 0.022 0.782 ± 0.009
– 0.647 ± 0.021 0.615 ± 0.017 0.786 ± 0.011
– 0.372 ± 0.010 0.064 ± 0.044 0.460 ± 0.050
– 0.332 ± 0.021 −0.059 ± 0.044 0.408 ± 0.001
Table A.11: Descriptive Full-model gains calculated from the central values in Table 4. No significance or factorial interaction is inferred. Temporal
Spatial
Contrast
∆NSE
∆KGE
∆NSE
∆KGE
Full − metadata-conditioned hard-positive control Full − without-metadata-conditioning control
+0.112 +0.148
+0.139 +0.171
+0.088 +0.396
+0.076 +0.467
34
Related documents
- Evaluating deep learning models for streamflow prediction under RCP 4.5 and RCP 8.5 climate scenarios#1136569
- A hybrid deep learning framework for inferring unobserved subsurface water flow across the contiguous United States / Lennart Greiner ; Gutachter: Alexander Brenning, Shijie Jiang#1052369
- A hybrid deep learning framework for inferring unobserved subsurface water flow across the contiguous United States#683267
- Integrated Analysis Of Multi-Source Satellite Data Via Deep Learning For Predicting Lake Water Level Dynamics#1242255
- dphase_dimosop: hydrological model DIMOSOP run by University of Brescia for the MAP D-PHASE project#1082448
Retrieved via Conceptio: every document is proof-bundled with source, license, and retrieval metadata.
Read the Docs → · View CLI source on GitHub · Conceptio Open Knowledge Archive