Training, adaptation, compression, and systems techniques · Training, fine-tuning, adaptation, compression, and systems techniques · TRN012 · Training method
mixup
Trains on convex combinations of examples and targets, encouraging smoother interpolations.
In CodeSplash
A CodeSplash method runs this entry in Python and R. Set it up from the method's page.
- Convolutional neural network (CNN) Experimental
- Domain-adversarial network (DANN) Experimental
- Deep ensemble Experimental
- FT-Transformer Experimental
- Graph neural network (GCN, GraphSAGE, GAT, GIN) Experimental
- Image classifier (pretrained ResNet-50 or DINOv2) Experimental
- Neural controlled differential equation (irregular sequences) Experimental
- Set model (Deep Sets, Set Transformer) Experimental
- TabM (parameter-efficient MLP ensemble) Experimental
- TabNet (attentive feature selection) Experimental
- Text encoder (MiniLM + linear head) Not verified yet
- Deep neural network (torch MLP) Verified in Python and R
Do it in CodeSplash Run it on your own data, in Python or R.
- Availability
- Runs in CodeSplash
- Code example
- Component demo, not a trained model
- Who ran it
- CodeSplash's run and the reference's record
- CodeSplash's run
- Verified in Python and R through learn.cnn, learn.dann, learn.deep_ensemble, learn.ft_transformer, learn.gnn, learn.neural_cde, learn.set_model, learn.tabm, learn.tabnet, learn.torch_mlp. The reference's example ran in Python and R here, and they agree.
- The reference's record
- Python: Ran in the reference's review. The report doesn't record which version of the code ran. R: Reviewed but not run: R wasn't available to the reference's authors.
Purpose
Trains on convex combinations of examples and targets, encouraging smoother interpolations.
Question / hypotheses
Does this intervention improve the intended quality, adaptation, resource, or reliability objective under a controlled comparison? It defines a method, not an intrinsic null-hypothesis test.
Architecture / computational structure
A data-pairing operation precedes the ordinary network; soft targets enter the supervised loss.
Assumptions
Interpolations must be meaningful for the task. Mixing categorical IDs, incompatible sequence alignments, or physically invalid states requires a specialized adaptation.
Formula / computational definition
Parameters and notation
Learned: the underlying network only. Hyperparameters: alpha, mixing probability, pairing policy, input versus hidden-space location, target convention.
Fitting, fine-tuning, and adaptation
Apply mixing only within the training partition. For pretrained models, tune strength on development performance and calibration; ensure loss supports probability targets.
How to use and calibrate
Compare robustness, calibration, clean-task accuracy, and learning curves. Example: regularize an audio event classifier with compatible waveform/label mixtures.
Example application
regularize an audio event classifier with compatible waveform/label mixtures.
Interpretation / pitfalls
Watch out
A convex label mixture is an assumption about supervision, not a physical law. Mixing across protected splits or using evaluation targets causes leakage.
Python and R code examples
Scope: numerical mechanism demonstration. Validation: Python executed successfully on the supplied synthetic inputs; R reviewed but not executed (Rscript unavailable).
Python and R
The reference's own programs, shown as written. A component demo shows one central piece of the method; it doesn't train a full model.
Component demo, not a trained model — numerical mechanism demonstration. · needs numpy
import numpy as np
x1=np.array([1.,0.]); x2=np.array([0.,2.]); y1=np.array([1.,0.]); y2=np.array([0.,1.]); lam=.7
print(lam*x1+(1-lam)*x2,lam*y1+(1-lam)*y2)
Component demo, not a trained model — numerical mechanism demonstration.
x1 <- c(1,0); x2 <- c(0,2); y1 <- c(1,0); y2 <- c(0,1); lambda <- .7
print(lambda*x1+(1-lambda)*x2); print(lambda*y1+(1-lambda)*y2)
Sources
- Primary/official source 1arxiv.org
From the CodeSplash reference, entry TRN012.