Papers
Topics
Authors
Recent
Search
2000 character limit reached

Sample-Aware RandAugment (SRA)

Updated 4 July 2026
  • The paper introduces SRA, which replaces a global augmentation magnitude with per-sample signals derived from model predictions or gradient statistics.
  • SRA leverages an asymmetric training pipeline that splits batches into exploration and refinement phases for dynamic, instance-specific augmentation.
  • SRA achieves state-of-the-art results on benchmarks like ImageNet and CIFAR while reducing search cost and enhancing transferability.

Sample-aware RandAugment (SRA) denotes a family of sample-adaptive variants of RandAugment in which augmentation strength is no longer governed by a single global magnitude, but by a per-sample signal that is recomputed during training. In the 2025 literature, the name refers both to a search-free automatic data augmentation method built from a heuristic scoring module and an asymmetric augmentation pipeline, and to a plug-and-play way to make RandAugment adaptive and instance-specific by using SADA’s gradient-guided, sample-aware stability signal (Xiao et al., 11 Aug 2025, Yang et al., 1 Oct 2025). Across these formulations, the shared premise is that augmentation should track the model’s evolving assessment of each sample rather than remain fixed across the dataset and across time.

1. Conceptual definition

SRA inherits the operational simplicity of RandAugment: an operation set is fixed in advance, and a small number of operators are sampled uniformly and applied sequentially. What changes is the control variable. Standard RandAugment uses fixed depth and a global magnitude; SRA replaces that global control with a per-sample quantity derived from the model’s current state. In the MIS-based formulation, the relevant quantity is a prediction-based difficulty score computed from the original image. In the SADA-based formulation, it is a stability score derived from gradient alignment or a first-order loss-difference proxy (Xiao et al., 11 Aug 2025, Yang et al., 1 Oct 2025).

The design rationale is consistent across these variants. Fixed or random augmentation assumes a static relationship between transformations and model needs throughout training, whereas both the optimization trajectory and per-sample difficulty evolve. The resulting mismatch is described in two complementary ways. The MIS-based SRA treats low-confidence samples as “hard” and high-confidence samples as “easy,” then augments easy samples more strongly and hard samples more gently. The SADA-based SRA treats low-variance, consistently influential samples as stable and assigns them stronger augmentation, while unstable samples receive milder transformations to preserve semantic fidelity and stabilize learning (Xiao et al., 11 Aug 2025, Yang et al., 1 Oct 2025).

2. Genealogy and relation to adjacent methods

SRA is best understood against three baselines: search-based automatic data augmentation, search-free RandAugment-style methods, and earlier sample-selection mechanisms. Search-based methods such as AutoAugment, FastAA, and DDAS are described as delivering strong performance but incurring huge search costs, often hundreds to thousands of GPU hours on a proxy task. Search-free methods such as RandAugment, TrivialAugment, UniformAugment, and timm’s RA with magnitude noise are simple and widely usable, but generally lack policy adaptation during training. SRA occupies the intermediate position of being search-free while retaining online, per-sample adaptation (Xiao et al., 11 Aug 2025).

An important antecedent is “Self-paced Data Augmentation for Training Neural Networks” (Takase et al., 2020). That work does not define SRA by name, but it formalizes a sample-aware augmentation controller in which augmentation is applied only to samples whose instantaneous loss exceeds a threshold λ\lambda. The explicit selection rule is

vn=I ⁣[L ⁣(yn,f(xn;θ))>λ],v_n = \mathbb{I}\!\left[L\!\left(y_n, f(x_n;\theta)\right) > \lambda\right],

with x~n=DA(xn,yn)\tilde{x}_n = \mathrm{DA}(x_n, y_n) when vn=1v_n = 1 and x~n=xn\tilde{x}_n = x_n otherwise. The paper further notes that integrating this mechanism with RandAugment yields a natural sample-aware RA, and it explicitly proposes per-sample mappings for NnN_n, MnM_n, and pnp_n based on loss (Takase et al., 2020).

A common source of confusion is that “SRA” is not a single canonical algorithm. The term covers distinct constructions that share the same broad goal—making RandAugment sample-aware—but differ in the source of the control signal and in the training pipeline.

Source Sample-aware signal RandAugment control
(Takase et al., 2020) Per-sample loss threshold Ln>λL_n > \lambda Gate augmentation and optionally map loss to NnN_n, vn=I ⁣[L ⁣(yn,f(xn;θ))>λ],v_n = \mathbb{I}\!\left[L\!\left(y_n, f(x_n;\theta)\right) > \lambda\right],0, vn=I ⁣[L ⁣(yn,f(xn;θ))>λ],v_n = \mathbb{I}\!\left[L\!\left(y_n, f(x_n;\theta)\right) > \lambda\right],1
(Xiao et al., 11 Aug 2025) Magnitude Instructor Score (MIS) from current prediction on the original image Use MIS as the magnitude in the refinement branch, with fixed depth vn=I ⁣[L ⁣(yn,f(xn;θ))>λ],v_n = \mathbb{I}\!\left[L\!\left(y_n, f(x_n;\theta)\right) > \lambda\right],2
(Yang et al., 1 Oct 2025) Variance of gradient alignment or first-order KL/loss-difference proxy Replace global vn=I ⁣[L ⁣(yn,f(xn;θ))>λ],v_n = \mathbb{I}\!\left[L\!\left(y_n, f(x_n;\theta)\right) > \lambda\right],3 with per-sample, time-varying vn=I ⁣[L ⁣(yn,f(xn;θ))>λ],v_n = \mathbb{I}\!\left[L\!\left(y_n, f(x_n;\theta)\right) > \lambda\right],4, optionally adapt vn=I ⁣[L ⁣(yn,f(xn;θ))>λ],v_n = \mathbb{I}\!\left[L\!\left(y_n, f(x_n;\theta)\right) > \lambda\right],5

3. MIS-based SRA: heuristic scoring and asymmetric training

The explicit SRA method introduced in “Sample-aware RandAugment: Search-free Automatic Data Augmentation for Effective Image Recognition” is a search-free, sample-aware automatic data augmentation method that couples a simple, dynamic scoring module with an asymmetric augmentation pipeline (Xiao et al., 11 Aug 2025). Its scoring module is the Magnitude Instructor Score (MIS), defined from the model’s current prediction on the original image. Let vn=I ⁣[L ⁣(yn,f(xn;θ))>λ],v_n = \mathbb{I}\!\left[L\!\left(y_n, f(x_n;\theta)\right) > \lambda\right],6 be the softmax probability vector for sample vn=I ⁣[L ⁣(yn,f(xn;θ))>λ],v_n = \mathbb{I}\!\left[L\!\left(y_n, f(x_n;\theta)\right) > \lambda\right],7, and let vn=I ⁣[L ⁣(yn,f(xn;θ))>λ],v_n = \mathbb{I}\!\left[L\!\left(y_n, f(x_n;\theta)\right) > \lambda\right],8 be the one-hot class label. MIS uses cosine similarity between these two vectors, scaled by a class-count-dependent exponent:

vn=I ⁣[L ⁣(yn,f(xn;θ))>λ],v_n = \mathbb{I}\!\left[L\!\left(y_n, f(x_n;\theta)\right) > \lambda\right],9

For one-hot labels, this cosine similarity is equal to the predicted probability of the true class. Larger MIS values indicate easier samples.

The augmentation pipeline is asymmetric because each training iteration processes the two halves of a mini-batch differently. In the exploration branch, one sub-batch is augmented by sampling x~n=DA(xn,yn)\tilde{x}_n = \mathrm{DA}(x_n, y_n)0 operators uniformly from the operator set and sampling each operator’s magnitude from x~n=DA(xn,yn)\tilde{x}_n = \mathrm{DA}(x_n, y_n)1. The model is updated once on that augmented sub-batch. In the sample-perception step, the updated model performs a forward pass on the unaugmented second sub-batch to compute MIS. In the refinement branch, each sample in that second sub-batch receives a new sub-policy in which operators are again sampled uniformly, but every operator in the sub-policy uses that sample’s MIS as its magnitude. The model is then updated a second time (Xiao et al., 11 Aug 2025).

SRA adopts the RandAugment operator set but uses continuous magnitudes rather than discrete levels. The operator parameter for operator x~n=DA(xn,yn)\tilde{x}_n = \mathrm{DA}(x_n, y_n)2 is obtained by linear interpolation:

x~n=DA(xn,yn)\tilde{x}_n = \mathrm{DA}(x_n, y_n)3

where x~n=DA(xn,yn)\tilde{x}_n = \mathrm{DA}(x_n, y_n)4 is either drawn from x~n=DA(xn,yn)\tilde{x}_n = \mathrm{DA}(x_n, y_n)5 in exploration or set to x~n=DA(xn,yn)\tilde{x}_n = \mathrm{DA}(x_n, y_n)6 in refinement. In the main experiments, augmentation depth is fixed at x~n=DA(xn,yn)\tilde{x}_n = \mathrm{DA}(x_n, y_n)7, operator sampling is uniform, and no per-operator weighting is learned. The candidate set includes geometric operators such as ShearX, ShearY, TranslateX, TranslateY, and Rotate, and photometric operators such as Brightness, Color, Contrast, Sharpness, Solarize, Posterize, Equalize, AutoContrast, and Identity (Xiao et al., 11 Aug 2025).

The significance of this construction lies in the interaction between the two branches. Exploration expands coverage of the augmented-image distribution without biasing MIS, while refinement uses real-time predictions to generate hard-but-semantic variants that help tighten decision boundaries. The paper’s ablations report that removing exploration, replacing exploration with refinement only, replacing refinement with exploration only, or mixing both strategies in one sub-batch all reduce performance relative to the asymmetric split (Xiao et al., 11 Aug 2025).

4. Gradient-guided SRA via SADA

“On-the-Fly Data Augmentation via Gradient-Guided and Sample-Aware Influence Estimation” presents SRA as a plug-and-play way to make RandAugment adaptive and instance-specific by using SADA’s gradient-guided, sample-aware stability signal (Yang et al., 1 Oct 2025). In this formulation, SRA preserves RandAugment’s operation space—randomly pick x~n=DA(xn,yn)\tilde{x}_n = \mathrm{DA}(x_n, y_n)8 operations—but replaces the global magnitude x~n=DA(xn,yn)\tilde{x}_n = \mathrm{DA}(x_n, y_n)9 with a per-sample, time-varying magnitude vn=1v_n = 10.

The underlying quantity is sample influence relative to the current optimization direction. Let vn=1v_n = 11 denote parameters at step vn=1v_n = 12, vn=1v_n = 13 the loss, and

vn=1v_n = 14

the per-sample gradient. The accumulated update direction vn=1v_n = 15 can be formed either as a windowed sum of recent parameter updates or, in the recommended lightweight version, as an EMA of batch gradients:

vn=1v_n = 16

Per-sample influence is then estimated by projecting vn=1v_n = 17 onto vn=1v_n = 18, often via cosine similarity,

vn=1v_n = 19

and temporal stability is defined as the variance of x~n=xn\tilde{x}_n = x_n0 over a local window:

x~n=xn\tilde{x}_n = x_n1

Samples with low variance are interpreted as stable and consistently influential; samples with high variance are interpreted as unstable or ambiguous (Yang et al., 1 Oct 2025).

SRA then maps this stability estimate into a per-sample RandAugment magnitude. After normalizing variance to x~n=xn\tilde{x}_n = x_n2, the paper specifies

x~n=xn\tilde{x}_n = x_n3

with an optional sample-specific number of operations

x~n=xn\tilde{x}_n = x_n4

clipped to x~n=xn\tilde{x}_n = x_n5. This mapping is monotone: lower variance implies stronger augmentation. The paper also describes sigmoid and piecewise-linear alternatives, temporal smoothing of x~n=xn\tilde{x}_n = x_n6, and safety clipping or operation filtering for unstable samples (Yang et al., 1 Oct 2025).

A notable practical contribution is the efficient first-order proxy. To avoid per-sample gradient projections, SADA approximates a sample’s contribution through the loss difference across successive model states, and with soft targets this becomes a KL divergence whose variance over a window serves as the stability signal. This path eliminates the need to store x~n=xn\tilde{x}_n = x_n7 and per-sample gradients and is presented as the most practical option when per-sample gradient computation is costly. In effect, SRA becomes a drop-in replacement for RandAugment’s global magnitude controller while remaining compatible with standard training loops (Yang et al., 1 Oct 2025).

5. Empirical profile

The MIS-based SRA reports a state-of-the-art Top-1 accuracy of x~n=xn\tilde{x}_n = x_n8 on ImageNet with ResNet-50, and x~n=xn\tilde{x}_n = x_n9 Top-1 and NnN_n0 Top-5 with label smoothing NnN_n1 under the reported 270-epoch ImageNet training setup (Xiao et al., 11 Aug 2025). On ResNet-200, it reports NnN_n2 Top-1 and NnN_n3 Top-5 without label smoothing, and NnN_n4 Top-1 and NnN_n5 Top-5 with label smoothing. The same study reports competitive or better results than search-based methods on CIFAR-10/100, improvements across DeiT-Tiny, Swin-Tiny, and VMamba-Tiny, transfer without tuning to Food101 and ImageNet-LT, and downstream gains for COCO detection with a RetinaNet R-50-FPN backbone. On COCO detection, the reported numbers are AP NnN_n6, AP50 NnN_n7, AP75 NnN_n8, APNnN_n9 MnM_n0, APMnM_n1 MnM_n2, and APMnM_n3 MnM_n4 for the SRA-pretrained backbone (Xiao et al., 11 Aug 2025).

The computational profile is correspondingly lightweight rather than search-heavy. The paper attributes the per-epoch overhead to one extra forward pass on half a batch and reports an increase of about MnM_n5 relative to a standard single-branch RA pipeline: CIFAR-100 WRN-28-10 rises from MnM_n6 s/epoch to MnM_n7 s/epoch, and ImageNet ResNet-50 on MnM_n8A100 rises from MnM_n9 s/epoch to pnp_n0 s/epoch. At the total-compute level, SRA is reported as having zero search cost and about pnp_n1 GPU-hours on ImageNet R-50, compared with approximately pnp_n2 GPU-hours for AutoAugment, about pnp_n3 GPU-hours for RA with grid search, about pnp_n4 GPU-hours for FastAA, about pnp_n5 GPU-hours for DeepAA, and about pnp_n6 GPU-hours for BDA (Xiao et al., 11 Aug 2025).

The SADA paper presents empirical evidence supporting its RandAugment instantiation by reporting gains from dynamically scaling augmentation strength per sample. These include up to pnp_n7 on fine-grained tasks, pnp_n8 on long-tailed datasets, competitive improvements on ImageNet-1k with ResNet-50 and ViT backbones, and better transferability. More granular numbers in that paper include pnp_n9 over the best baseline on CIFAR-10 with WRN-28-10, up to Ln>λL_n > \lambda0 on CIFAR-100 with ResNet-44, up to Ln>λL_n > \lambda1 over the next-best method on Tiny-ImageNet, ImageNet-LT overall closed-set Ln>λL_n > \lambda2, Places-LT open-set F-measure Ln>λL_n > \lambda3, and ViT improvements on ImageNet-1k of Ln>λL_n > \lambda4 to Ln>λL_n > \lambda5 Top-1. The paper explicitly frames these results as evidence for SRA because they were achieved by dynamically scaling augmentation strength per sample—exactly what SRA brings to RandAugment (Yang et al., 1 Oct 2025).

6. Design choices, limitations, and recurrent misconceptions

Several design choices recur across the SRA literature. In the MIS-based version, the main hyperparameters are augmentation depth Ln>λL_n > \lambda6, the scaling factor Ln>λL_n > \lambda7, and the asymmetric split itself. The reported ablations state that Ln>λL_n > \lambda8 consistently performs best in the CIFAR-100 WRN experiments, that removing Ln>λL_n > \lambda9 slightly reduces performance, and that cosine similarity is stronger than Euclidean or Jaccard similarity as the basis for MIS (Xiao et al., 11 Aug 2025). In the SADA-based version, recommended settings include small temporal windows such as NnN_n0–NnN_n1 steps or about NnN_n2–NnN_n3 epochs, EMA rates NnN_n4 and NnN_n5 in NnN_n6, and RA ranges around NnN_n7, NnN_n8, and NnN_n9, with optional variation of vn=I ⁣[L ⁣(yn,f(xn;θ))>λ],v_n = \mathbb{I}\!\left[L\!\left(y_n, f(x_n;\theta)\right) > \lambda\right],00 between vn=I ⁣[L ⁣(yn,f(xn;θ))>λ],v_n = \mathbb{I}\!\left[L\!\left(y_n, f(x_n;\theta)\right) > \lambda\right],01 and vn=I ⁣[L ⁣(yn,f(xn;θ))>λ],v_n = \mathbb{I}\!\left[L\!\left(y_n, f(x_n;\theta)\right) > \lambda\right],02 (Yang et al., 1 Oct 2025).

The principal limitation of the MIS-based SRA is that its policy space remains small. The paper states that equal-operator sampling, fixed depth, and no operator-weight learning may cap the upper bound, and that SRA is sensitive to operator set composition. It also notes that vn=I ⁣[L ⁣(yn,f(xn;θ))>λ],v_n = \mathbb{I}\!\left[L\!\left(y_n, f(x_n;\theta)\right) > \lambda\right],03 needs light tuning to be optimal, that over-transformation can still occur, and that the method can exhibit slightly higher training loss and slower convergence because it intentionally generates harder samples (Xiao et al., 11 Aug 2025). The SADA-based formulation identifies a different set of edge cases: noisy vn=I ⁣[L ⁣(yn,f(xn;θ))>λ],v_n = \mathbb{I}\!\left[L\!\left(y_n, f(x_n;\theta)\right) > \lambda\right],04 or optimizer restarts can make projections unreliable, rare categories may remain unstable, and interactions with curriculum learning or mixup/cutmix require explicit handling. Its recommended mitigations are EMA smoothing, warm-up with a global magnitude, fallback to the KL proxy, class-aware normalization, stage-wise changes to vn=I ⁣[L ⁣(yn,f(xn;θ))>λ],v_n = \mathbb{I}\!\left[L\!\left(y_n, f(x_n;\theta)\right) > \lambda\right],05, and tighter operation filtering for unstable samples (Yang et al., 1 Oct 2025).

A frequent misconception is that sample-aware augmentation necessarily means “augment the hard examples more.” The 2020 self-paced augmentation paper does select difficult samples for augmentation by thresholding loss, and explicitly proposes loss-based mappings that would make harder samples receive larger vn=I ⁣[L ⁣(yn,f(xn;θ))>λ],v_n = \mathbb{I}\!\left[L\!\left(y_n, f(x_n;\theta)\right) > \lambda\right],06 and vn=I ⁣[L ⁣(yn,f(xn;θ))>λ],v_n = \mathbb{I}\!\left[L\!\left(y_n, f(x_n;\theta)\right) > \lambda\right],07 in an SRA-style extension (Takase et al., 2020). By contrast, both 2025 formulations reverse that intuition at the level of augmentation strength: the MIS-based SRA augments easy samples more strongly and hard samples more gently, while the SADA-based SRA augments stable samples more strongly and unstable samples more gently. This divergence is not a contradiction so much as a shift in what the control signal is meant to encode—selection of augmentation targets in the self-paced formulation, versus semantic preservation and optimization stability in the 2025 formulations.

Taken together, these papers position SRA as a technically coherent direction within search-free AutoDA: it keeps RandAugment’s fixed operator space and uniform sampling, but substitutes per-sample, online magnitude control for a single global knob. The specific control signal may come from per-sample loss, cosine similarity between prediction and label, or temporal variance of gradient-alignment statistics, yet the central objective remains the same: align augmentation strength with each sample’s evolving role in optimization (Xiao et al., 11 Aug 2025, Yang et al., 1 Oct 2025).

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Sample-aware RandAugment (SRA).