---
title: GSD Encoding in Remote Sensing Models
url: https://www.emergentmind.com/topics/ground-sample-distance-gsd-encoding
type: topic
---

# GSD Encoding in Remote Sensing Models

Searching arXiv for the cited papers to ground the article in current literature.
[arXiv search] Querying: "Ground Sample Distance encoding remote sensing SatDINO Scale-ALiBi ScaleEarth VANGUARD"
Ground Sample Distance (GSD) encoding denotes the set of mechanisms by which the physical scale of imagery—defined as the physical size of one image pixel at the scene plane, in meters per pixel—is injected into model computation, supervision, attention structure, or downstream geometric reasoning. In recent remote-sensing and embodied-perception systems, GSD appears in at least four technically distinct forms: as an auxiliary token with a regression loss in self-supervised ViTs, as a scalar multiplier inside attention biases for multi-scale and multi-modal transformers, as a continuous conditioning variable that modulates parameter-efficient adapters in remote-sensing VLMs, and as an explicitly estimated output returned by a deterministic tool when metadata is unavailable [2508.21402] [2604.10347] [2605.07562] [2603.04277].

## 1. Physical quantity and representational regimes

Across the cited works, GSD is consistently treated as a physical quantity in meters per pixel, but the computational form varies substantially. SatDINO formulates GSD as supervised metadata associated with each training example and attaches it to a learnable token \(t_{\mathrm{gsd}}\), whose output is regressed with an MSE loss [2508.21402]. Scale-ALiBi treats GSD as a fixed scalar property of the source image and multiplies it directly into Euclidean patch-grid distances to form an attention bias in metres [2604.10347]. ScaleEarth reparameterizes GSD as a continuous conditioning scalar \(s=\log_{10}(g)\in\mathbb{R}\), which becomes the only scale input received by its CS-HLoRA adapters and SSE-U estimator [2605.07562]. VANGUARD, by contrast, addresses the case in which telemetry and camera metadata are absent, recovering GSD from visual anchors and returning a metric estimate together with confidence [2603.04277].

| System | GSD representation | Computation site |
|---|---|---|
| SatDINO | learnable token \(t_{\mathrm{gsd}}\) and ground-truth \(g\) | ViT input and student regression head |
| Scale-ALiBi | fixed scalar \(\mathrm{GSD}_{\rm source}\) | self- and cross-attention bias |
| ScaleEarth | \(s=\log_{10}(g)\) | CS-HLoRA gates and SSE-U head |
| VANGUARD | `gsd_m_per_px` and `confidence` | stateless callable API |

This distribution of designs shows that “GSD encoding” is not a single architecture pattern. It may be a latent supervisory target, an explicit inductive bias in attention, a conditioning variable for parameter routing, or an externally computed metric attached to perception outputs. A plausible implication is that the most appropriate form depends on whether the dominant requirement is representation learning, cross-resolution alignment, scale-aware language grounding, or safe metric reasoning under metadata loss.

## 2. Tokenized GSD supervision in self-supervised ViTs

SatDINO extends the ViT/DINO pipeline by adding one more learnable token \(t_{\mathrm{gsd}}\in\mathbb{R}^D\) in addition to the standard class token. For an input image \(X\in\mathbb{R}^{H\times W\times C}\), the model forms patch embeddings \(e_i=E_{\mathrm{patch}}(\mathrm{patch}_i)\in\mathbb{R}^D\), concatenates them as
\[
T_{\mathrm{in}}=[\,t_{\mathrm{cls}};\ t_{\mathrm{gsd}};\ e_1;\ e_2;\ \ldots;\ e_N\,]\in\mathbb{R}^{(N+2)\times D},
\]
adds positional embeddings, and passes the result through the transformer:
\[
Z=f_{\mathrm{trans}}(T_{\mathrm{in}}+E_{\mathrm{pos}})\in\mathbb{R}^{(N+2)\times D}.
\]
The output corresponding to the GSD token, \(z_{\mathrm{gsd}}=Z[1]\in\mathbb{R}^D\), is fed to a single linear regression head,
\[
\hat y_{\mathrm{gsd}}=w^\top z_{\mathrm{gsd}}+b,
\]
with MSE loss
\[
\mathcal{L}_{\mathrm{GSD}}=(\hat y_{\mathrm{gsd}}-g)^2.
\]
The full student objective is
\[
\mathcal{L}_{\mathrm{total}}=\mathcal{L}_{\mathrm{DINO}}+\gamma\cdot\mathcal{L}_{\mathrm{GSD}}.
\]
Both the student and teacher ViTs carry the extra \(t_{\mathrm{gsd}}\) token, but only the student’s GSD-prediction head is optimized; the teacher ignores \(\mathcal{L}_{\mathrm{GSD}}\) [2508.21402].

The architectural choices are deliberately minimal. The GSD head is a single Linear\((D\rightarrow 1)\), \(t_{\mathrm{gsd}}\) is initialized randomly in the same way as \(t_{\mathrm{cls}}\), and \(\gamma\) is kept small, approximately \(0.1\), so that the GSD objective does not swamp the contrastive signal. The practical guidance is equally constrained: \(\gamma\approx 0.1\) is recommended as a starting point, the regression head should remain a single linear layer, and GSD metadata is not needed at inference because the token learns to estimate it internally. The paper also recommends “default” DINO augmentations with probability \(=1.0\), and \(8\)–\(12\) local crops with uniform scale-stratified sampling over \([5\%,25\%]\) of the image.

The dedicated ablation in Section 5.4 varies \(\gamma\) and reports kNN and linear-probe performance on fMoW-RGB together with kNN on RESISC45, WHU-RS19, and SIRI-WHU. At \(\gamma=0.0\), the reported WHU-RS19 score is \(97.45\), while at \(\gamma=0.1\) it is \(98.18\); the same \(\gamma=0.1\) setting yields \(68.84\) kNN on fMoW and \(71.30\) Top-1 on fMoW. The authors summarize the trend as follows: as \(\gamma\rightarrow 0\) the model is blind to GSD and downstream performance is lower, while \(\gamma\approx 0.1\) gives the best average kNN on classification, for example \(+0.73\%\) on WHU-RS19, at only a \(0.1\%\) drop in fMoW probe. They further report that GSD encoding combined with uniform-crop sampling produces a small but consistent boost in downstream kNN, such as \(+0.2\ldots 0.5\%\) on RESISC45 and WHU-RS19.

In this formulation, GSD encoding is not a direct architectural bias on patch relations; it is an auxiliary supervisory channel that pushes the backbone to recover true scale. This suggests a conception of GSD as a regularizer on representation geometry rather than solely as metadata.

## 3. Attention-bias encoding of physical distance

Scale-ALiBi embeds GSD directly into transformer attention by extending ALiBi and 2D-ALiBi to multi-scale spatial relationships. For head \(h\) and query-key token indices \(i,j\), the attention logit is
\[
a_{hij}=\sqrt{d}\cdot q_{hi}\cdot k_{hj}-m(h)\cdot g(i,j),
\]
where the bias term is
\[
g(i,j)=\mathrm{distance}(i,j)\times \mathrm{GSD}_{\rm source}.
\]
Here \(\mathrm{distance}(i,j)=\sqrt{(x_i-x_j)^2+(y_i-y_j)^2}\) is the Euclidean patch-grid distance, \(\mathrm{GSD}_{\rm source}\) is the ground sample distance of the source image, and \(m(h)\) is the head-specific slope fixed at initialization as in ALiBi [2604.10347].

The operational consequence is that two patches separated by the same number of pixels incur different attention penalties if they come from sensors with different GSDs. The paper states this explicitly for Sentinel-2 and NAIP: \(\mathrm{GSD}_{\rm source}\) differs for Sentinel-2 at approximately \(10\,\mathrm{m/pixel}\) versus NAIP at approximately \(0.6\,\mathrm{m/pixel}\), so identical pixel-grid separations correspond to different physical distances on the ground. Each encoder carries its own scalar GSD source; Sentinel-2 MSI “lores” is approximately \(10\,\mathrm{m/pixel}\), Sentinel-1 SAR “radar” is similarly binned into \(10\,\mathrm{m/px}\) channels, and NAIP “hires” is approximately \(0.6\,\mathrm{m/pixel}\). No learned embedding of GSD is used beyond this scalar multiplication.

The mechanism is applied within a three-encoder architecture consisting of \(E_{\mathrm{radar}}\) on low-resolution SAR, \(E_{\mathrm{lores}}\) on low-resolution optical, and \(E_{\mathrm{hires}}\) on high-resolution optical. All self- and cross-attention layers use Scale-ALiBi. The training objective combines a triple-contrastive loss over mean-pooled, \(\ell_2\)-normalized embeddings \(z_{\mathrm{radar}}, z_{\mathrm{lores}}, z_{\mathrm{hires}}\) with a reconstructive MAE-style decoder loss, and no additional hyperparameters are introduced solely for GSD beyond the fixed scalar per encoder and the standard ALiBi slope initialization.

On GEO-Bench, the paper compares Scale-ALiBi against a baseline CROMA model on six classification tasks. The results reported in the summary are mixed but informative. For neural classification on “m-pv4ger,” SA-high is \(83.27\), SA-low is \(87.77\), and CROMA is \(88.53\). For “m-forestnet,” SA-high is \(23.51\), SA-low is \(27.83\), and CROMA is \(28.27\). On k-Means clustering for “m-pv4ger,” SA-low is \(52.83\) versus \(50.07\) for CROMA, and on k-NN with \(n=20\) for the same task, SA-high is \(92.39\) versus \(92.29\) for CROMA. The paper’s own interpretation is that Scale-ALiBi matches or slightly outperforms CROMA on many low-resolution tasks and yields comparable high-resolution accuracy, indicating that explicit encoding of physical GSD within the attention biases helps the model align and fuse multi-scale, multi-modal features.

Unlike token-based supervision, this approach encodes GSD as geometry inside the attention kernel itself. A plausible implication is that it is most naturally suited to problems in which cross-resolution correspondence matters at the level of patch-to-patch spatial relations.

## 4. Continuous scale conditioning in remote-sensing VLMs

ScaleEarth treats GSD as a true continuous variable rather than as a token or a coarse bucket. The physical quantity is \(g\) in meters per pixel, and the conditioning scalar is
\[
s=\log_{10}(g)\in\mathbb{R}.
\]
Every CS-HLoRA adapter and the SSE-U head receives \(s\), or an estimate of it, as its only scale input; no tokens or learned embeddings are used beyond this log-space scalar [2605.07562].

The core adapter is a scale-conditioned LoRA update to a projection weight \(W\in\mathbb{R}^{d\times d}\):
\[
\Delta W(s)=\left(\frac{\alpha_{\mathrm{lora}}}{r}\right)\cdot B\cdot \mathrm{diag}(h(s))\cdot A,
\]
with \(r=64\), \(B\in\mathbb{R}^{d\times 64}\), and \(A\in\mathbb{R}^{64\times d}\). The gate \(h(s)\in(0,1)^{64}\) is defined element-wise by
\[
h_k(s)=\sigma(\alpha\cdot(\tau_k-s)),\qquad k=1\ldots 64,
\]
where \(\tau=(\tau_1\ldots\tau_{64})\in\mathbb{R}^{64}\) are learnable per-rank thresholds and \(\alpha>0\) is a learnable per-layer sharpness scalar with initial value \(5.0\). As \(s\) varies continuously, each rank dimension is softly turned on when \(s<\tau_k\) and off when \(s>\tau_k\). These adapters are inserted into every LLM linear projection—attention \(Q/K/V/O\) and FFN—in each of the \(32\) transformer blocks of Qwen3-VL-8B.

To remove reliance on sensor metadata at deployment, the model adds SSE-U, a lightweight heteroscedastic sub-head that predicts \(s\) and its uncertainty from pooled CLIP-ViT features. With \(f_{\mathrm{vit}}(x)\in\mathbb{R}^D\), \(\bar f=\mathrm{LN}(f_{\mathrm{vit}})\in\mathbb{R}^D\), the head computes
\[
z=\mathrm{GELU}(W_{\mathrm{trunk}}\cdot \bar f),
\]
\[
\hat\mu(x)=W_\mu\cdot z,\qquad \hat\ell(x)=\log \hat\sigma^2(x)=W_\sigma\cdot z,
\]
and
\[
p(s|x)=\mathcal{N}(\hat\mu(x),\hat\sigma^2(x)).
\]
The log-variance is clamped to \([-10,4]\), ensuring \(\hat\sigma\in[\exp(-5),\exp(2)]\) in log-space, and the exact-GSD loss is the heteroscedastic NLL
\[
L_{\mathrm{nll}}=\frac{1}{|E|}\sum_{i\in E}\left[\frac{1}{2}\cdot\frac{(s_i-\hat\mu_i)^2}{\exp(\hat\ell_i)}+\frac{1}{2}\cdot \hat\ell_i\right].
\]

Training distinguishes exact-GSD, range-annotated, and unknown-GSD samples. Exact-GSD samples use \(s_{\mathrm{true}}=\log_{10}(g_{\mathrm{true}})\) with probability \(0.8\), and with probability \(0.2\) replace \(s_{\mathrm{eff}}\leftarrow \hat\mu(x)\) so that the SSE-U head receives some downstream VQA gradients. Range-annotated samples draw \(s_{\mathrm{eff}}\sim \mathrm{Uniform}[\log_{10}(g_{\mathrm{lo}}),\log_{10}(g_{\mathrm{hi}})]\) during training and use the midpoint at evaluation. Unknown-GSD samples always use \(s_{\mathrm{eff}}\leftarrow \hat\mu(x)\). The final objective is
\[
L=L_{\mathrm{VQA}}(\Delta W(s_{\mathrm{eff}}))+\lambda_{\mathrm{gsd}}(t)\cdot L_{\mathrm{nll}},
\]
with \(\lambda_{\mathrm{gsd}}=0.3\) for the first \(10\%\) of steps and \(0.1\) thereafter.

The matching data resource is GeoScale-VQA, a \(1.5\)M-sample scale-layered RS-VQA corpus spanning \(g\in[0.06,10]\) m. The high tier \(g<0.2\) m contains \(772\)k samples, the mid tier \(0.2\le g<1.0\) m contains \(102\)k samples, and the low tier \(g\ge 1.0\) m contains \(201\)k \(+\) \(411\)k samples from MtSCCD and PatternNet. Each image yields three QA pairs—identification, scale-specific, and discriminative—and the outputs are filtered for factuality, scale consistency, and non-triviality.

The ablations quantify the value of continuous conditioning directly. On XLRS-Bench-lite, replacing CS-HLoRA with Vanilla LoRA of the same rank \(64\) costs \(4.2\) percentage points on average; masking out all GSD fields in GeoScale-VQA costs \(3.8\) points; randomizing \(\tau\) initialization instead of physical \((0/1/4)\) costs \(3.5\) points; removing SSE-U costs \(1.4\) points. In a GSD-spoofing experiment on RSVQA-HR with \(g^\*=0.15\) m, CS-HLoRA peaks at approximately \(86\%\) near the true scale and degrades smoothly over two decades, whereas a discrete bucketed MoE-LoRA peaks at approximately \(81\%\) in the correct bucket but shows sharp \(15\) percentage-point drops at bucket boundaries. Standard LoRA and GSD-as-token remain flat at approximately \(74\)–\(76\%\) and \(76\)–\(78\%\), respectively. The paper’s quantitative takeaway is that conditional capacity gains approximately \(7\) points from discrete routing, continuous gating adds approximately \(5\) points more, and the continuous formulation eliminates boundary discontinuities.

This line of work directly challenges the assumption that GSD can be handled adequately as a discrete symbol. In the ScaleEarth formulation, the mismatch between physical scale and static parameterization is treated as a first-order modeling problem.

## 5. Metadata-free GSD recovery as an explicit geometric skill

VANGUARD addresses a distinct but closely related problem: autonomous aerial robots in GPS-denied or communication-degraded environments may lose access to camera metadata and telemetry, leaving onboard perception systems unable to recover absolute metric scale. Under the assumptions of nadir or near-nadir monocular aerial imagery of urban or suburban scenes, sub-metre true GSD—typically \(0.05\)–\(0.3\,\mathrm{m/px}\)—and ubiquitous small passenger vehicles with a tight modal length around \(4\)–\(5\) m, the system estimates GSD without GPS, altitude, lens, or IMU metadata by using cars as “geometric yardsticks” [2603.04277].

Reference calibration is performed on the DOTA v1.5 training set by computing the true physical lengths of all annotated small vehicles, \(125{,}977\) instances in total. For each instance,
\[
L_i=P_i^{(\mathrm{gt})}\cdot \mathrm{GSD}_i^{(\mathrm{gt})},
\]
where \(P_i^{(\mathrm{gt})}\) is the longer OBB side in pixels and \(\mathrm{GSD}_i^{(\mathrm{gt})}\) is the ground-truth GSD. A kernel density estimate
\[
\hat f_L(x)=\frac{1}{N}\sum_{i=1}^{N} K_h(x-L_i)
\]
yields the modal reference length
\[
L_{\mathrm{ref}}=\arg\max_x \hat f_L(x)\approx 5.045\ \mathrm{m}.
\]

The runtime API is exposed as a stateless callable:
\[
\mathrm{estimate\_gsd(image)}\longrightarrow \{\texttt{gsd\_m\_per\_px},\ \texttt{confidence}\}.
\]
Internally, the pipeline has four stages. First, vehicle detection is performed via YOLO-OBB on a raw RGB tile or full image, producing \(N\) OBBs \(\{(P_i,C_i)\}\), where \(P_i\) is long-side length in pixels and \(C_i\in[0,1]\). Second, median-based outlier filtering keeps
\[
i\iff P_i\le \alpha\cdot \mathrm{median}\{P_j\},\qquad \alpha=1.5.
\]
Third, kernel density estimation over filtered lengths \(\{P_i\}_{i=1}^{N'}\) computes
\[
\hat f_P(x)=\frac{1}{N'}\sum_{i=1}^{N'} K_h(x-P_i),
\qquad
p_{\mathrm{mode}}=\arg\max_x \hat f_P(x),
\]
with a fallback to the median of \(\{P_i\}\) if \(N'<5\). Fourth, GSD is computed by
\[
\mathrm{GSD}=\frac{L_{\mathrm{ref}}}{p_{\mathrm{mode}}}.
\]

The tool also returns a composite confidence score. Four sub-scores are normalized into \([0,1]\) and combined by weighted sum: sample sufficiency with \(w_1=0.35\), distribution concentration with \(w_2=0.35\), detection quality with \(w_3=0.20\), and anomaly detection with \(w_4=0.10\). The raw score is
\[
C_{\mathrm{raw}}=w_1C_1+w_2C_2+w_3C_3+w_4C_4.
\]
To guard against over-confidence at coarse resolution, the method imposes a hard resolution guard. Let
\[
\phi=\frac{L_{\mathrm{ref}}}{0.3\,\mathrm{m/px}}\approx 17\ \text{pixels}.
\]
Then the confidence is
\[
\mathcal C=
\begin{cases}
C_{\mathrm{raw}}, & p_{\mathrm{mode}}\ge \phi,\\[6pt]
\min\bigl(C_{\mathrm{raw}},\tfrac{p_{\mathrm{mode}}}{\phi}\bigr), & p_{\mathrm{mode}}<\phi.
\end{cases}
\]
The calling agent should trust the GSD only if \(\mathcal C\ge 0.5\); otherwise it falls back to alternative localization such as visual-inertial odometry.

The recommended output format is a small JSON or ROS-style message, for example:
```json
{
  "tool": "VANGUARD_GSD_Estimator",
  "output": {
    "gsd_m_per_px": 0.241,
    "confidence": 0.82
  }
}
```
or, in ROS, values embedded under `sensor_msgs/Image` metadata fields.

The reported performance is strong within the stated operating envelope. On DOTA v1.5 validation, which contains \(450\) images with metadata, the pipeline produces outputs on \(306\) images, or \(67\%\) coverage. On those outputs, the median relative GSD error is \(6.87\%\), the mean error is \(12.89\%\), \(66.0\%\) of images are within \(10\%\) error, and \(83.3\%\) are within \(20\%\). A GT-annotation upper bound is \(6.88\%\) median error on \(269\) images. The principal failure mode is that images with \(\mathrm{GSD}>0.3\,\mathrm{m/px}\) degrade sharply, and the resolution guard flags most of them. For downstream area measurement on RS-GSD Benchmark v5.0 with \(100\) scenes, VANGUARD combined with SAM segmentation yields \(19.7\%\) median area error and \(29.2\%\) mean error; \(30\%\) of areas are below \(10\%\) error, \(59\%\) below \(25\%\), \(80\%\) below \(50\%\), and \(97\%\) below \(100\%\), corresponding to a \(3\%\) catastrophic failure rate. The abstract further states that this is \(2.6\times\) lower category dependence and \(4\times\) fewer catastrophic failures than the best VLM baseline, while five state-of-the-art VLMs in zero-shot mode have \(38\)–\(52\%\) median error.

VANGUARD is not an internal neural encoding of GSD, but it externalizes scale as an explicit, confidence-gated geometric variable. In embodied settings, that distinction is consequential because metric reasoning can then be gated, logged, and audited.

## 6. Comparative interpretation, limitations, and recurring misconceptions

A first recurring misconception is that GSD encoding is equivalent to appending a single discrete symbol. The cited works collectively contradict that view. SatDINO uses a learnable token but supervises it with scalar regression and auxiliary loss; Scale-ALiBi uses no token at all and instead biases attention with physical distance in metres; ScaleEarth explicitly argues that RS-VLMs often discard GSD or inject it as a discrete text token, thereby forcing a single static parameter set to absorb the entire scale spectrum, and replaces that design with continuous conditioning; VANGUARD bypasses latent encoding entirely by estimating GSD as a callable tool output [2508.21402] [2604.10347] [2605.07562] [2603.04277].

A second misconception is that GSD must always be supplied as metadata at inference time. SatDINO states that GSD metadata is needed only at pretraining time to form \(\mathcal{L}_{\mathrm{GSD}}\); inference does not require it. ScaleEarth removes reliance on sensor metadata at deployment by introducing SSE-U to estimate \(s\) and its uncertainty from visual features. VANGUARD is designed precisely for cases in which GPS, altitude, lens, IMU, and telemetry metadata are unavailable. This suggests that the field distinguishes between training-time supervision, deployment-time conditioning, and deployment-time recovery, rather than treating scale metadata as a permanent prerequisite.

A third misconception is that stronger scale-awareness necessarily requires large numbers of additional parameters. The mechanisms in fact span a wide range of parameter budgets. Scale-ALiBi introduces no additional learned parameters solely for GSD beyond the fixed GSD scalar per encoder and standard ALiBi slope initialization. SatDINO adds one extra token and a single linear head. ScaleEarth uses parameter-efficient low-rank adapters with rank \(64\), but the gain comes from conditioning their active subspace continuously by \(s\), not from abandoning PEFT. VANGUARD is deterministic and stateless at the API level.

The limitations are equally explicit. VANGUARD depends on nadir or near-nadir urban or suburban monocular imagery, sub-metre GSD, and the presence of small passenger vehicles with a tight modal length distribution; it degrades sharply when \(\mathrm{GSD}>0.3\,\mathrm{m/px}\). SatDINO recommends monitoring both \(\mathcal{L}_{\mathrm{DINO}}\) and \(\mathcal{L}_{\mathrm{GSD}}\), because if \(\mathcal{L}_{\mathrm{GSD}}\) is orders of magnitude smaller than \(\mathcal{L}_{\mathrm{DINO}}\), \(\gamma\) may need to be increased or GSD units normalized. ScaleEarth reports sharp degradation for discrete bucketed routing at bucket boundaries and treats continuous conditioning as the remedy. Scale-ALiBi’s reported benchmark results are not uniformly dominant over CROMA, indicating that physically grounded biasing does not obviate the usual trade-offs between modalities, resolutions, and downstream tasks.

Taken together, these works define GSD encoding as a broader research program in physically grounded machine perception. The common thesis is that pixel-space evidence alone is insufficient when the same object may occupy radically different visual extents across orders of magnitude in ground sampling distance. What differs is the locus at which physical scale is introduced: in the loss, in the attention kernel, in the adapter path, or as an explicit geometric measurement with confidence.

Source: https://www.emergentmind.com/topics/ground-sample-distance-gsd-encoding