TL;DR
The Similarity-based Generative Network (SGN) is a novel generative framework that tackles data generation under distribution shift without requiring any target-domain fine-tuning or parameter updates. By structuring a latent space around label-induced pairwise similarities, SGN can generate high-quality target-domain samples simply by encoding and mixing a few representative target examples at generation time.
What Problem Does This Paper Address?
Generative models are powerful tools for data augmentation, but they typically suffer from a major flaw: they are bound to the data distribution they were trained on. When deployed in a new "target" domain with a different distribution (due to changes in environments, sensors, or populations), standard generative models produce samples aligned with the source domain rather than the target. This mismatch can severely degrade the utility of the augmented data for downstream tasks.
Existing solutions fall short. Target-specific fine-tuning is computationally expensive and unreliable when target data is scarce. Meanwhile, sample-based mixing methods (like Mixup) lack explicit semantic structures, often leading to class inconsistency. SGN addresses this gap by creating a reusable generative framework that trains once on a labeled source domain and generalizes to multiple unseen target domains out-of-the-box.
Methods
SGN utilizes an encoder-decoder architecture but replaces traditional distribution-matching objectives with a similarity-based evaluation mechanism.
The core idea is to enforce a strict zero-one similarity matrix in the latent space: the inner product (dot product) of the latent representations of two data points must equal 1 if they share the same label, and 0 otherwise. This mathematical constraint forces the latent space to separate different classes into orthogonal subspaces while keeping samples of the same class co-linear.
The training loss function balances two components:
- Regularization Loss: Enforces the zero-one similarity matrix via latent dot products.
- Reconstruction Loss: Ensures the decoder can accurately reconstruct the original data from its latent representation.
At generation time, the model parameters remain completely frozen. To generate data for a new target domain, SGN takes a small labeled representative set from that domain, passes them through the encoder, and linearly combines the latent representations of matching classes. The decoder then transforms these mixed latent vectors into new, target-aligned data samples.
The authors evaluate two post-processing variants of SGN: NeurSpec (which uses an identity function) and NormSpec (which uses a normalized function).
Datasets
The authors validated SGN across both image and tabular domains using eleven real-world datasets:
- Image Datasets: BloodMNIST, OctMNIST, TissueMNIST, RetinaMNIST, SVHN, and FashionMNIST. Distribution shifts were artificially introduced by rotating the target domain datasets by 90 degrees.
- Tabular Datasets: Insect (including sub-datasets Insects_Abr, Insects_Incr, and Insects_IncrGrd), Adult, Avila, Dry Bean, and Electrical Grid Stability. These datasets were split into subsets to simulate natural distribution shifts.
Key Insights and Ideas
- Distribution-Agnostic Learning: Instead of explicitly trying to model the complex probability distribution $p(x)$ of the source domain, SGN focuses on learning a stable, geometric label-data relationship. This makes the underlying network highly transferable.
- Orthogonal Class Separation: Forcing different classes into orthogonal latent subspaces ensures that class semantics are perfectly preserved, even when the underlying data features undergo severe distribution shifts.
- Zero-Shot Adaptation via Latent Mixing: Because the latent space geometry is universal, target domain characteristics are implicitly captured and mixed just by encoding a few target samples, bypassing the need for backpropagation during deployment.
Key Results
SGN demonstrated substantial improvements over state-of-the-art conditional generative models (such as ProjGAN, ContraGAN, ReACGAN, and ADCGAN) on image datasets. While baseline models often degraded downstream classification performance because they generated source-like images, SGN successfully generated images matching the rotated target domains.
The NeurSpec variant consistently outperformed NormSpec, yielding a 2% to 6% accuracy improvement due to its ability to employ more orthogonal bases to construct latent representations. SGN also dominated the tabular benchmarks, outperforming CTGAN and TVAE across both regression ($R^2$) and classification ($F1$) tasks.
Limitations and Future Work
The authors observed that performance is not always perfectly symmetric across tabular domain shifts; for instance, adapting from domain A to domain B might yield excellent results, while adapting from B to A might perform poorly due to intrinsic dataset differences.
Additionally, SGN still requires a small labeled representative set from the target domain at generation time, meaning it cannot operate in a completely unsupervised target setting. Future work could explore relaxing this requirement or testing SGN on more complex, non-linear distribution shifts.
Summary updated