---
title: 'GC-SWGAN: Semi-Supervised Galaxy Classification'
url: https://www.emergentmind.com/topics/gc-swgan
type: topic
---

# GC-SWGAN: Semi-Supervised Galaxy Classification

Searching arXiv for GC-SWGAN and closely related papers.
GC-SWGAN is a hybrid semi-supervised generative adversarial model developed for galaxy morphology classification under limited labeled data and later adapted to rare-object detection in astronomical imaging. In the available literature, it is described as integrating semi-supervised GAN ideas with Wasserstein GAN with gradient penalty in a multi-task framework comprising a generator, a discriminator, and a classifier, with partial feature sharing between discriminator and classifier so that unlabeled images can improve supervised classification indirectly [2504.00500]. A later application uses the same framework for identifying dust-lane spheroidal galaxies in DESI Legacy Surveys imaging, emphasizing scarce labeled positives, abundant unlabeled galaxy images, and binary deployment-scale inference [2509.24062].

## 1. Concept and problem setting

GC-SWGAN was introduced for galaxy morphology classification on Galaxy10 DECals, a 10-class problem derived from Galaxy Zoo and DECaLS imagery, in a setting where labeled samples are limited relative to the scale of available survey data [2504.00500]. The central motivation is that conventional supervised CNN-based pipelines depend strongly on labeled data, whereas astronomy provides abundant unlabeled images whose morphology can still be exploited during training. The model therefore combines labeled real images, unlabeled real images, and generated fake images within one semi-supervised adversarial framework.

The same methodological idea was subsequently used for dust-lane spheroidal galaxy detection, where the target class is rare and class imbalance is severe. In that application, GC-SWGAN is presented as a semi-supervised deep-learning framework for image classification under limited labeled data and abundant unlabeled data, rather than as a pure generative model or a generic feature extractor [2509.24062]. The DLSG study explicitly motivates the method by noting that a standard supervised CNN would demand many more labeled examples than exist, while a purely unsupervised method would not reliably isolate a very rare morphology.

A practical implication is that GC-SWGAN is best understood as a semi-supervised adversarial classifier with shared representation learning. The generator contributes adversarial pressure, the discriminator learns from unlabeled real and generated images, and the classifier consumes the small labeled subset. This suggests that the method’s main value lies in feature learning under label scarcity rather than in image synthesis alone.

## 2. Multi-task architecture

The architecture is organized around three modules: a generator \(G\), a discriminator \(D\), and a classifier \(C\) [2504.00500]. The distinctive design choice is that the discriminator and classifier are relatively independent in their task-specific heads but share part of the convolutional feature extractor. This differs from standard SGAN formulations that use a single \(N+1\)-class discriminator/classifier head.

In the Galaxy10 DECals formulation, the generator takes random noise \(z\) as input and is described as a deconvolutional architecture consisting of a fully connected layer, Leaky ReLU, reshape, five repeated transpose-convolution blocks with batch normalization and Leaky ReLU, and a final transpose-convolution layer with tanh activation, producing a \(192 \times 192 \times 3\) image [2504.00500]. The shared discriminator/classifier backbone consists of seven modules, each containing a convolutional layer, layer normalization, dropout, and Leaky ReLU. After this shared trunk, the discriminator has its own fully connected head for the Wasserstein real/fake score, and the classifier has separate fully connected layers plus a final softmax for 10-way morphology classification.

The DLSG application describes the same three-part structure more generically: the generator is built from fully connected layers followed by multiple transposed convolution layers, batch normalization, Leaky ReLU activations, and a final tanh output; the discriminator and classifier are independently designed task heads that share a common convolutional feature-extraction trunk; and the non-shared parts are fully connected layers for task-specific outputs [2509.24062]. In that deployment, the original multiclass classifier head is replaced with a binary softmax layer for DLSG versus non-DLSG.

The shared trunk is the key mechanism by which unlabeled data enters the classification pipeline. The classifier is directly trained using labeled data, while the discriminator is trained on unlabeled real images and generated images; because both heads share feature extraction layers, optimizing the discriminator indirectly improves the classifier [2509.24062].

## 3. Objective functions and optimization

The Galaxy10 DECals paper provides the explicit mathematical formulation used for training [2504.00500]. Inputs are normalized from \([0,255]\) to \([-1,1]\) by
\[
x^* = \frac{x - 127.5}{127.5}.
\]

The generator uses the Wasserstein objective
\[
L_G = -D(G(z)).
\]

The discriminator is written with a Wasserstein term
\[
L_{\text{Wasserstein}} = D(x) - D(G(z)),
\]
an interpolation
\[
x_{\text{interp}} = \alpha \cdot x + (1-\alpha)\cdot G(z),
\]
and a gradient penalty
\[
L_{\text{GP}} = \mathbb{E}\left[\left(\left\|\nabla_{x_{\text{interp}}} D(x_{\text{interp}})\right\|_2 - 1\right)^2\right].
\]
The total discriminator loss is
\[
L_D = L_{\text{Wasserstein}} + w_p \cdot L_{\text{GP}}, \qquad w_p = 10.
\]

The classifier is trained with categorical cross-entropy,
\[
L_C = -\sum_{i=1}^{N} y_i \log(p_i),
\]
where \(N=10\) in the Galaxy10 DECals setting [2504.00500]. The paper does not provide a single combined total objective of the form \(L_{\text{total}}\), nor does it specify explicit weighting among generator, discriminator, and classifier terms beyond the gradient-penalty coefficient.

Operationally, the semi-supervised regime is defined by the data stream attached to each head. Labeled real data update both discriminator and classifier; unlabeled real data update the discriminator only; fake data update discriminator and generator. The training loop is therefore sequential rather than expressed as a single closed-form SGAN-style \(K+1\)-class loss [2504.00500].

The DLSG paper confirms the same high-level decomposition but does not print the exact GC-SWGAN equations. It states only that the loss function consists of generator loss \(L_G\), discriminator loss \(L_D\), and classifier loss \(L_C\); that the generator loss is adversarial and based on Wasserstein distance; that the discriminator loss contains a Wasserstein term and a gradient penalty for Lipschitz continuity; and that the classifier loss is supervised categorical cross-entropy [2509.24062]. It explicitly defers detailed computational procedures and exact formulas to the original method paper.

Training settings reported for Galaxy10 DECals are Keras with TensorFlow 2, Adam for \(G\), \(D\), and \(C\), \(\beta_1=0.5\), \(\beta_2=0.999\), initial learning rate \(10^{-4}\), exponential decay by \(1/1.000004\) after each iteration, batch size \(64\), and \(100{,}000\) training iterations, with average training time of about 20 hours per experiment on an NVIDIA L40S GPU [2504.00500].

## 4. Data regimes and task adaptations

The original evaluation uses Galaxy10 DECals with 17,736 labeled color galaxy images in \(g,r,z\), cropped from \(256 \times 256\) to \(192 \times 192\), and approximately 18,000 unlabeled DECaLS color galaxy images selected mainly due to hardware constraints [2504.00500]. The class set includes disturbed galaxies, merging galaxies, smooth galaxies in several subclasses, barred and unbarred spirals, and edge-on galaxies with or without bulge. The paper studies multiple train/test split regimes—90/10, 70/30, 50/50, 30/70, 20/80, and 10/90—to simulate increasingly severe low-label settings.

The DLSG application reconfigures the framework for rare binary morphology detection in DESI Legacy Surveys DR9 imaging [2509.24062]. It uses three-band \(g,r,z\) galaxy images mapped to RGB-style channels, downloaded at \(256 \times 256\), cropped to \(192 \times 192\), and normalized with the same
\[
x^* = \frac{x - 127.5}{127.5}.
\]
The labeled set contains 459 DLSGs and 12,000 non-DLSGs after manual curation and relabeling corrections, while 20,000 randomly selected unlabeled galaxy images are used for semi-supervised training. The labeled set is split 80/20 into training and test subsets, producing 367 DLSGs and 9,600 non-DLSGs for training, and 92 DLSGs and 2,400 non-DLSGs for testing.

A notable adaptation in the DLSG study is class-imbalance handling. Augmentation is applied only to the positive DLSG class, using horizontal flip, vertical flip, and 90-degree rotations, increasing DLSG training samples by five times; SMOTE is then used to synthesize minority-class examples in feature space and create a 1:1 balanced class distribution for training [2509.24062]. The classifier head is modified to binary softmax output, and the deployed model returns a probability \(p\) of being a DLSG and \(1-p\) of being a non-DLSG, with a default threshold of 0.5 and an example high-confidence threshold of 0.9.

These two use cases illustrate the same underlying regime: a moderately large pool of unlabeled survey images, a substantially smaller labeled set, and a task in which morphology-sensitive representation learning is expected to be more useful than purely supervised fitting on the labeled subset alone.

## 5. Reported results and empirical behavior

On Galaxy10 DECals, GC-SWGAN reports strong low-label performance across all split regimes [2504.00500]. With Train\_test\_91, the model reaches 83.60% accuracy, 83.35% weighted precision, 83.60% weighted recall, and 83.13% weighted F1. With Train\_test\_28, it still reports 74.68% accuracy, 74.82% weighted precision, 74.68% weighted recall, and 74.42% weighted F1. With Train\_test\_19, it reports 68.37% accuracy, 67.85% weighted precision, 68.37% weighted recall, and 67.76% weighted F1. The paper emphasizes that accuracy remains above 75% with roughly one-fifth of the labeled data and above 68% even when only 10% of the data is labeled.

The same paper provides classwise metrics for the 90/10 split. The strongest classes are round smooth galaxies, in-between round smooth galaxies, and edge-on galaxies with or without bulge, whereas harder classes include disturbed galaxies and visually similar spiral subclasses [2504.00500]. Disturbed galaxies, for example, have 69.84% precision, 43.56% recall, and 53.66% F1 in that setting. The authors attribute these errors qualitatively to confusion among fine-grained or ambiguous morphologies.

For DLSG detection, the reported minority-class metrics are precision 84.21%, recall 86.96%, F1-score 85.56%, AU-ROC 0.9960, AU-PRC 0.8958, and support 92; for non-DLSGs, precision is 99.50%, recall 99.38%, and F1-score 99.44% [2509.24062]. The same paper reports overall accuracy of approximately 98.9% in the main text and MCC of 0.85, while also noting that the abstract states 84% accuracy. The paper identifies this as an internal inconsistency; the per-class metrics and support counts are consistent with an overall accuracy near 98.9%, not 84%.

Deployment results in the DLSG study are also substantial. After applying cuts \(m_r < 17.0\) and \(0.01 < z < 0.07\), the paper reports 314,500 galaxies for inference and identifies 9,482 DLSG candidates at threshold 0.5, with 7,376 higher-confidence DLSGs at threshold 0.9; the abstract rounds the deployment scale to \(\sim 310{,}000\) galaxies [2509.24062]. A subsequent scientific analysis on matched subsets finds that DLSGs are redder in \(g-r\) and have higher specific star formation rates than non-DLSGs.

The reported empirical picture is therefore consistent across the two studies: GC-SWGAN is presented as a representation-learning framework that retains competitive or strong classification performance when labels are scarce, and it appears especially suited to astronomy tasks where the labeled positive class is rare but unlabeled survey images are abundant.

## 6. Nomenclature, neighboring methods, and limitations

The name GC-SWGAN is not uniformly explicated across the literature summarized here. In the Galaxy10 DECals paper, the method is introduced directly as GC-SWGAN and described as a hybrid semi-supervised model for galaxy morphology classification [2504.00500]. In the DLSG paper, the acronym itself is not formally expanded; instead, the method is characterized functionally as a semi-supervised multi-task learning framework combining SGAN with improved WGAN-GP [2509.24062]. A cautious reading is therefore that the architecture and training logic are better defined than the acronym’s formal expansion.

Several nearby names should be distinguished from GC-SWGAN. It is not the same as Gated SwitchGAN, a facial image-translation model whose official terminology is SwitchGAN and Gated SwitchGAN, centered on feature switching across attribute-specific branches rather than semi-supervised astronomical classification [2111.14096]. It is also distinct from GS-WGAN, the Gradient-Sanitized Wasserstein GAN for differentially private generation, which addresses privacy-preserving generator release and federated training rather than shared-trunk semi-supervised classification [2006.08265]. Nor is it identical to SGW-GAN, a retinal enhancement model based on Sliced Gromov-Wasserstein regularization; SGW-GAN is conceptually adjacent in its use of adversarial learning and sliced optimal transport, but its objective is geometry-preserving enhancement in medical image feature space rather than astronomical semi-supervised classification [2601.13417].

The current GC-SWGAN literature also has clear limitations. The Galaxy10 DECals paper does not provide a formal ablation study isolating partial sharing, WGAN-GP, or semi-supervised training effects; it does not report quantitative generation metrics such as FID or IS; and it omits exact layer dimensions, kernel sizes, channel counts, and latent dimension \(z\) [2504.00500]. The DLSG paper, although richer in deployment detail, likewise omits exact layer-by-layer architecture, loss weights, update ratios, SMOTE settings, random seeds, and a formal ablation of unlabeled data or shared-trunk effects [2509.24062]. These omissions do not change the method’s reported role in astronomy, but they delimit reproducibility and make some architectural details dependent on the cited original method source rather than the application papers themselves.

Taken together, GC-SWGAN occupies a specific place in the GAN literature: a semi-supervised, multi-task, partially shared adversarial framework tailored to low-label astronomical image classification. Its defining claim is that discriminator training on abundant unlabeled data can improve classifier performance through shared feature extraction, while WGAN-GP-style optimization provides a more stable adversarial substrate than standard SGAN formulations [2504.00500].

Source: https://www.emergentmind.com/topics/gc-swgan