D-GAP: Improving Out-of-Domain Robustness via Dataset-Agnostic and Gradient-Guided Augmentation in Amplitude and Pixel Spaces
Ruoqi Wang, Haitao Wang, Shaojie Guo, Qiong Luo · 2025
Read D-GAP: Improving Out-of-Domain Robustness via Dataset-Agnostic and Gradient-Guided Augmentation in Amplitude and Pixel Spaces by Ruoqi Wang, Haitao Wang, Shaojie Guo, Qiong Luo (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2511-11286.txt.
Introduction
Ruoqi Wang, Haitao Wang, and their colleagues present D-GAP, an augmentation method that helps vision models stay accurate when test images come from a new domain with unlike backgrounds, styles, or instruments. Generic image tweaks give uneven gains under such shifts, while tailored tweaks need expert study of each data set. Networks also lean too hard on domain-specific frequency parts, which hurts transfer.
D-GAP needs no data set expertise. It builds sensitivity maps in frequency space from task gradients, showing which frequencies the model leans on, and blends amplitudes between source and target images under that guide. A dual-space step also adjusts pixel values, jointly curbing spectral bias and keeping spatial detail.
Catalog record
| CREATOR | Ruoqi Wang, Haitao Wang, Shaojie Guo, Qiong Luo |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 32 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2511-11286
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
D-GAP: Improving Out-of-Domain Robustness via Dataset-Agnostic and Gradient-Guided Augmentation in Amplitude and Pixel Spaces Ruoqi Wang, Haitao Wang, Shaojie Guo, Qiong Luo Abstract Out-of-domain (OOD) robustness is challenging to achieve in real-world computer vision applications, where shifts in image background, style, and acquisition instruments always degrade model performance. Generic augmentations show inconsistent gains under such shifts, whereas dataset-specific augmentations require expert knowledge and prior analysis. Moreover, prior studies show that neural networks adapt poorly to domain shifts because they exhibit a learning bias to domain-specific frequency components. Perturbing frequency values can mitigate such bias but overlooks pixel-level details, leading to suboptimal performance. To address these problems, we propose D-GAP ( D ataset-agnostic and G radient-guided augmentation in A mplitude and P ixel spaces), improving OOD robustness by introducing targeted augmentation in both the amplitude space (frequency space) and pixel space. Unlike conventional handcrafted augmentations, D-GAP computes sensitivity maps in the frequency space from task gradients, which reflect how strongly the model responds to different frequency components, and uses the maps to adaptively interpolate amplitudes between source and target samples. This way, D-GAP reduces the learning bias in frequency space, while a complementary pixel-space blending procedure restores fine spatial details. Extensive experiments on four real-world datasets and three domain-adaptation benchmarks show that D-GAP consistently outperforms both generic and dataset-specific augmentations, improving average OOD performance by +5.3% on real-world datasets and +1.8% on benchmark datasets. 1 Introduction In real-world applications, the distributions in the training datasets often differ from those in other deployment environments because of the shifts in background and acquisition instruments 15 ; 21 . In such out-of-distribution (OOD) settings, models trained on source domains always degrade when applied to unlabeled target domains. For example, in wildlife monitoring, ecologists use models to classify species of camera trap images, but these models often show significant accuracy drops when applied to new locations 3 . Annotated data are usually available only for a limited subset of cameras, which may not contain the diversity of environments in the unlabeled target domains. In this paper, we focus on improving OOD robustness in domain adaptation, where we have labeled data from source domains and unlabeled data from target domains. Data augmentation is a common strategy for improving OOD robustness of models, but designing effective augmentations remains challenging. Generic augmentations of images (e.g., RandAugment 4 , CutMix 38 , FACT 34 , SAM 33 ) improves the performance across datasets to various degrees 8 ; 32 ; 11 , whereas domain-invariance methods 36 ; 40 ; 13 ; 8 ; 37 yield limited improvements, especially on real-world domain shifts 7 . Although some dataset-specific augmentation methods 7 ; 21 can improve OOD performance, they often need expert knowledge and prior analysis of the dataset, which makes these methods hard to scale or apply to new datasets. These limitations highlight the need for more general, dataset-agnostic methods to improve OOD robustness across diverse real-world settings. Prior studies show that neural networks tend to learn biasedly from different frequency components depending on the dataset’s frequency characteristics 20 ; 10 ; 31 . Such spectral bias causes the model to overfit domain-specific frequency components in the frequency spectrum, leading to poor generalization when the target domain has different frequency distributions. As such, we consider that this bias can be reduced by perturbing the data distribution in the frequency space. However, frequency variations only reflect texture and style changes, overlooking spatial details. Since the pixel space preserves spatial details and localized pixel-level features which are complementary to frequency information, combining both spaces may address global and local domain shifts simultaneously. Building on this intuition, we propose D-GAP ( D ataset-agnostic and G radient-guided Augmentation in A mplitude and P ixel spaces), a domain adaptation framework that improves OOD robustness by introducing targeted augmentations in both the frequency and the pixel spaces. Unlike previous targeted augmentations that depend on manually designed, dataset-specific rules, and work solely in frequency or pixel space, D-GAP automatically adapts to domain shifts from data itself, without the need for expert knowledge or prior analysis. Specifically, given two images from different domains, in the frequency space, we introduce a gradient-adaptive mechanism in the frequency space that computes frequency sensitivity maps from the task gradients with respect to the amplitude. These sensitivity maps represent how strongly the model responds to different frequency components. Instead of interpolating two spectra with a fixed or random ratio, D-GAP adjusts the interpolation strength at each frequency according to its sensitivity value: more sensitive frequency components are more strongly mixed with target-domain amplitudes, while less sensitive ones are more preserved. This mechanism enables the model to suppress domain-specific spectral learning bias by perturbing biased with varying intensities. This gradient-guided interpolation creates frequency-space augmentations that adaptively keep the main content of the source image while adding features from target domains. However, frequency blending and reconstruction sometimes introduce artifacts and blurring. As such, we apply pixel-space blending to add complementary spatial pixel-level information. The final augmented image is then obtained by blending these two results from the frequency space and the pixel space. We evaluate our method on four real-world datasets: wildlife recognition (iWildCam 2 ; 22 ), tumor detection (Camelyon17 1 ; 22 ), bird species recognition (BirdCalls 14 ; 7 ), and galaxy morphology classification (Galaxy10 DECaLS & SDSS 12 ). Extensive experiments demonstrate that D-GAP consistently outperforms other baselines. Compared to other generic methods, D-GAP achieves improvements in OOD performance, including +2.1% gains on iWildCam, +4.2% on Camelyon17, +5.6% on BirdCalls, and +9.3% on Galaxy10. Also, it surpasses dataset-specific augmentation strategies tailored for different datasets. Additionally, D-GAP also makes average gains of +1.8% accuracy on standard benchmark datasets (PACS 17 , Office-Home 29 , and Digits-DG 40 ), showing its improvement across diverse distribution shifts. We further analyse the effectiveness of D-GAP connecting same-class cross-domain samples while separating different-class examples. Our work makes the following contributions: (1) We propose D-GAP, a dataset-agnostic target augmentation method that works in both the frequency and pixel spaces, through gradient-guided amplitude interpolation and spatial blending, respectively. (2) Our method is general and adaptive, with strong performance in real-world applications without dataset-specific manipulation. (3) We achieve state-of-the-art results on both real-world and general benchmark datasets, significantly outperforming other baselines. 2 Background and Formulation 2.1 Feature Decomposition To better understand how models perform under domain shifts, we use the feature decomposition framework 7 , which categorizes input features based on their dependence on the label and domain. Specifically, input features can be decomposed into four types based on their dependence on the label and the domain: (1) features that are label-dependent and domain-independent ( x_{\text{obj}} ); (2) label-dependent and domain-dependent features ( x_{\text{d:robust}} ); (3) label-independent and domain-dependent features ( x_{\text{d:spu}} ); and (4) label-independent and domain-independent features ( x_{\text{noise}} ). We formalize these relationships via their (in)dependence with the label y and domain d : x_{\text{obj}},\;x_{\text{d:robust}}\not\!\perp\!\!\!\perp\;y,\quad x_{\text{noise}},\;x_{\text{d:spu}}\perp\!\!\!\perp\;y,\quad x_{\text{d:robust}},\;x_{\text{d:spu}}\not\!\perp\!\!\!\perp\;d,\quad x_{\text{obj}},\;x_{\text{noise}}\perp\!\!\!\perp\;d. Models should focus on both x_{\text{obj}} and x_{\text{d:robust}} while avoiding reliance on spurious or noisy features 7 . We later analyse these relationships using a connectivity-based framework (Section 2.4 and 5.1 ) to evaluate how augmentations influence these label/domain dependent features. Figure 1 : Feature decomposition and augmentation