Universal Domain Adaptation for SAR Target Recognition

Analysis by the aitrendblend editorial team  ·  Topic, domain adaptation and remote sensing AI  ·  Reading time about 12 min

universal domain adaptation SAR target recognition AUNR evidential deep learning adversarial uncertainty contrastive learning
Universal domain adaptation for SAR target recognition aligning simulated and real synthetic aperture radar targets while flagging unknown classes
Recognizing real radar targets from simulated training data, while admitting when a target belongs to a class it has never seen. Replace this feature image before publishing.

Training a radar recognition model would be easy if you had thousands of labeled real images of every target you care about. In practice you rarely do, because the interesting targets are exactly the ones nobody hands you clean data for. So researchers fake it, generating labeled synthetic aperture radar images from computer models, and hope a network trained on the fakes still works on the real thing. It usually does not, at least not cleanly, and a team at Beihang University set out to fix the messiest version of that problem.

Key points

  • The paper tackles universal domain adaptation for synthetic aperture radar target recognition, where a model trains on labeled simulated radar images and must recognize unlabeled real ones.
  • Universal means the model gets no prior knowledge about how the label sets differ, so real data may contain new target classes the simulator never covered, and simulated data may contain classes absent from the real set.
  • The method, called AUNR, treats uncertainty as a first class signal using evidential deep learning built on the Dirichlet distribution, which lets the model say the word unknown instead of forcing every sample into a known class.
  • It trains in two stages, first learning strong features with supervised and contrastive learning, then separating known from unknown targets with an adversarial uncertainty objective and aligning shared classes through neighbor relationships.
  • Across five label shift scenarios it beat prior methods, reaching an h score of 84.22 percent where the next best managed 68.78, and 94.12 percent where the next best reached only 54.42.
  • The authors say this is the first study of universal domain adaptation for SAR target recognition, so it is a starting point as much as a result.

Two problems stacked on top of each other

The problem runs deeper than it first appears. Synthetic aperture radar, or SAR, images the world by transmitting microwaves and reading their echoes, which lets it see through cloud and darkness in a way optical cameras cannot. That makes it valuable for surveillance and monitoring, but it also makes the images strange. A SAR image of a vehicle looks nothing like a photograph, and its appearance shifts with the viewing angle and the radar settings. Deep networks can learn to classify these images, but only when they are fed large labeled datasets that match the test conditions, and for high value targets that data is scarce.

Simulation is the workaround. Using computer aided design models of a target and physics of electromagnetic scattering, software can render many labeled synthetic SAR images. The trouble is that simulated and real SAR images never quite match. Modeling errors, imperfect clutter, and the shortcuts needed to keep simulation times feasible leave a gap between the two, a gap that machine learning calls domain shift. A model trained on the simulated domain and tested on the real domain sees a different distribution than it learned, and its accuracy suffers.

Domain adaptation exists to close that gap, and most methods assume the two domains share exactly the same set of classes. That assumption is called the closed set scenario, and it rarely holds in the open world. The real data might contain target types the simulator never modeled, and the simulator might include types absent from the real data. When the label sets can differ in any of these ways, and you have no advance knowledge of how, the setting is called universal domain adaptation. The model has to do two hard things at once, align the classes that both domains share and flag the real samples whose class it has never seen.

A closed set model has no vocabulary for surprise. Ask it about a target it was never trained on and it will still answer with a known label, confidently and wrongly. On why open world radar recognition needs an unknown option

Uncertainty as the key idea

Here is where it gets interesting. If the model must sometimes answer unknown, it needs a principled way to know when it does not know. A standard classifier outputs a probability for each class and picks the highest, but those probabilities are often overconfident and say nothing trustworthy about genuine doubt. The Beihang team, led by Fei Gao, Weiru Ma, and colleagues with collaborators including Amir Hussain at Edinburgh Napier University, reach instead for evidential deep learning.

Evidential deep learning replaces the usual output with a Dirichlet distribution, which is a distribution over the class probabilities themselves rather than a single guess. Think of it as the model reporting not just its answer but how much evidence it gathered for that answer. The framework comes from subjective logic and the Dempster-Shafer theory of evidence, and it assigns a belief mass to each class plus an explicit uncertainty mass. When the collected evidence is thin, the uncertainty rises. That uncertainty is the quantity the whole method hinges on, because a sample the model is deeply uncertain about is a good candidate for the unknown label.

$$u + \sum_{j=1}^{C} b_j = 1$$

That balance equation is the heart of it. The belief masses \(b_j\) for the \(C\) classes and the single uncertainty mass \(u\) always sum to one, so any evidence not firmly assigned to a class flows into uncertainty. From the Dirichlet parameters the model reads off the expected probability of each class, and the uncertainty falls out of the same math for free.

$$\hat{p}_j = \mathbb{E}(p_j) = \frac{\alpha_j}{\sum_{i=1}^{C}\alpha_i}$$

The network produces evidence for each class through a softplus activation on its final layer, that evidence becomes the Dirichlet parameters, and the class probability is the mean of the resulting distribution. A tailored loss trains this head while a Kullback-Leibler term discourages the model from generating evidence for wrong labels, which keeps it from becoming overconfident on confusing or out of distribution samples.

Two stages, feature first, separation second

AUNR, which stands for adversarial uncertainty and neighbor relation, splits training into two stages. The first stage is about representation. SAR data is limited and its classes are hard to tell apart, so the model needs the best features it can get before it tries anything clever. Alongside ordinary supervised learning on the labeled simulated data, the team runs self supervised contrastive learning on both domains using the SIMCLR framework, generating varied views of each image through radar appropriate augmentations such as multiplicative noise and Gaussian noise. This teaches the network to represent SAR images well without needing labels for the real domain.

The second stage does the separation and alignment. Its centerpiece is an adversarial objective that drives two kinds of uncertainty apart. Model uncertainty comes from the evidence mass described above, and data uncertainty comes from the entropy of the predicted class probabilities. The insight is that a known target should end up confident on both measures while an unknown target should end up uncertain, so the training deliberately pushes target domain samples toward one extreme or the other rather than letting them sit in an ambiguous middle.

$$\mathcal{L}_{AU}(x_i^t) \;=\; -\,e(x_i^t)\,\log u(x_i^t) \;-\; \bigl(1 – e(x_i^t)\bigr)\,\log\bigl(1 – u(x_i^t)\bigr)$$

In that objective \(u\) is the model uncertainty and \(e\) is the data uncertainty entropy, and minimizing it forces the two to agree, sharpening the boundary between the known and the unknown. Once samples are sorted, the shared classes still have to be aligned across the domains, and here the method leans on geometry rather than brute force. Using mutual nearest neighbors, it pulls together samples that sit close in feature space and pushes apart those that do not, aligning the two domains according to their local structure. To avoid the noise that fixed neighbor counts introduce, the number of neighbors is chosen randomly within a sensible range during training.

The design turns a weakness into a tool. Instead of hiding the model’s uncertainty, AUNR measures it two ways and uses the disagreement to decide what counts as a target it has never seen.

What the numbers show

The team evaluated on the SAMPLE dataset, which pairs real SAR vehicle images from the well known MSTAR collection with matched simulated images across ten target types, and on a larger self built benchmark called S2R4UniDA that mixes in the MSTAR, ATRNet-STAR, and FUSAR-Ship datasets to supply genuinely unseen classes. They tested five label shift scenarios written as counts of common, source private, and target private classes, covering the closed set case and every flavor of open and partial mismatch. The headline metric for the open scenarios is the h score, the harmonic mean of accuracy on known classes and accuracy on unknown ones, which stays high only when the model does both jobs well.

Table 1. h score in percent for the open scenarios, higher is better. AUNR compared against universal and open set baselines. Best value in each row is highlighted.
Scenario (common / source / target) Best prior method AUNR (proposed)
OPDA 4 / 3 / 368.78 (DANCE)84.22
ODA 5 / 0 / 551.36 (SAN)76.87
OPDA 5 / 5 / 1054.42 (UAN)94.12

The numbers tell a clear story. In every open scenario AUNR leads by a wide margin, and the gap grows as the problem gets harder. In the toughest case, where five shared classes sit alongside five simulator only classes and ten unseen real classes, AUNR reaches an h score of 94.12 percent while the strongest baseline manages only 54.42, a difference of forty points. That scenario is the one closest to a real open world deployment, and it is where the method separates itself most.

The story holds in the other settings too. On the partial scenario, where the real data covers only eight of the simulated classes and adds none of its own, AUNR reached an average accuracy of 85.21 percent against 79.49 for the next best single scan method. On the fully closed set, where all ten classes are shared, it scored 90.58 percent without any prior knowledge of the label overlap, beating classic adaptation networks and coming close to methods that are handed that prior knowledge in advance. Doing nearly as well as the methods that get to cheat, while making no assumptions, is the quiet achievement here.

Key takeaway

  • The advantage widens with difficulty. On the closed set AUNR is competitive, but on the hardest open scenario it beats the field by roughly forty points, which is exactly where a universal method is supposed to earn its name.

How robust is it

A method that only works on pristine data is not much use for radar, so the team probed the edges. Lowering the resolution of the simulated images by a factor of two or three barely moved the h score, but pushing past a factor of four caused a steep drop, which tells you how much resolution the simulation needs to remain useful. On the real side, the recognition stayed stable when the signal to noise ratio was high, around 5 to 10 decibels, and degraded gracefully as noise grew. Cutting the amount of real data down to half left performance roughly unchanged, a reassuring sign given that scarce real data is the whole reason the problem exists.

The ablation study is where the design justifies itself. Removing the adversarial uncertainty objective collapsed the model’s ability to separate known from unknown targets, confirming that this piece does the heavy lifting for open set detection. The neighbor relation losses were more subtle. In some scenarios the model did slightly better without them, because their reliance on noisy nearest neighbor pairs can occasionally pull the wrong samples together, yet across the full range of scenarios they made the recognition more robust and preserved the geometric structure of the unseen classes. The honest reading is that no single component wins everywhere, and the combination is what holds up.

Honest limitations

The authors are candid about where the method strains. The clearest weakness appears when the number of known classes is very small. Because AUNR does not use pretrained weights, and instead learns its features from scratch on both domains, a network trained on only a handful of classes struggles to build robust representations, and recognition of the real data suffers. The team frames these extreme cases as unusual and not reflective of practical settings, which is fair, but it does mark a real boundary of the approach.

The neighbor relation machinery is the second soft spot. Mutual nearest neighbor pairs are only as trustworthy as the feature space they are computed in, and under domain shift some of those pairs inevitably link samples from different classes. That injects noise into training, and while the randomization of the neighbor count helps, the method cannot guarantee clean pairs. A third limitation is scope. Everything rests on two SAR datasets and a specific simulation pipeline, so how the approach transfers to other sensors, other simulators, and messier operational data is an open question the paper does not answer.

Key takeaway

  • Strong first result, clear edges. AUNR is the first universal domain adaptation method for SAR recognition and it leads on every open scenario, but it leans on learning features from scratch, depends on noisy neighbor pairs, and has only been shown on two datasets.

Full implementation in PyTorch

The code below is a compact and runnable reference for the uncertainty core of AUNR, the evidential deep learning head, the two kinds of uncertainty, and the adversarial objective that separates known from unknown targets. It is a teaching implementation rather than the authors’ full pipeline, leaving out the contrastive and neighbor relation stages so the uncertainty mechanism stays readable. It builds an evidential classifier, the discarded evidential loss, a Kullback-Leibler regularizer, the model and data uncertainties, the adversarial uncertainty loss, a threshold based unknown detector, and a smoke test on dummy data so you can confirm it runs end to end.

# aunr_reference.py
# A compact, runnable reference for the evidential uncertainty core of AUNR.
# Educational stand in, focuses on the Dirichlet head and adversarial uncertainty.

import torch
import torch.nn as nn
import torch.nn.functional as F


class EvidentialClassifier(nn.Module):
    """A feature extractor plus an evidential head over C classes."""
    def __init__(self, in_dim=64, n_classes=10):
        super().__init__()
        self.backbone = nn.Sequential(
            nn.Linear(in_dim, 128), nn.ReLU(),
            nn.Linear(128, 128), nn.ReLU())
        self.head = nn.Linear(128, n_classes)
        self.C = n_classes

    def forward(self, x):
        h = self.backbone(x)
        # Softplus keeps evidence non negative, as in the paper.
        evidence = F.softplus(self.head(h))
        alpha = evidence + 1.0            # Dirichlet parameters
        return evidence, alpha


def expected_prob(alpha):
    """Mean of the Dirichlet, the predicted class probabilities."""
    return alpha / alpha.sum(dim=1, keepdim=True)


def model_uncertainty(alpha):
    """u = C / S, large when total evidence S is small."""
    C = alpha.size(1)
    S = alpha.sum(dim=1)
    return C / S


def data_uncertainty(prob):
    """Normalized entropy of the predicted probabilities, in zero to one."""
    C = prob.size(1)
    ent = -(prob * torch.log(prob + 1e-8)).sum(dim=1)
    return ent / torch.log(torch.tensor(float(C)))


def evidential_loss(alpha, target_onehot):
    """Discarded evidential loss, the sum of squared errors form (Eq 7)."""
    prob = expected_prob(alpha)
    return ((target_onehot - prob) ** 2).sum(dim=1).mean()


def kl_regularizer(alpha, target_onehot):
    """
    Penalize evidence assigned to wrong classes.
    Uses the KL divergence between a masked Dirichlet and a flat one.
    """
    # Remove evidence from the correct class, keep only the misleading part.
    alpha_tilde = target_onehot + (1.0 - target_onehot) * alpha
    S = alpha_tilde.sum(dim=1, keepdim=True)
    C = alpha_tilde.size(1)
    term = (torch.lgamma(S.squeeze(1))
            - torch.lgamma(alpha_tilde).sum(dim=1)
            - torch.lgamma(torch.tensor(float(C))))
    digamma = torch.digamma(alpha_tilde) - torch.digamma(S)
    term = term + ((alpha_tilde - 1.0) * digamma).sum(dim=1)
    return term.mean()


def adversarial_uncertainty_loss(alpha):
    """
    Drive model and data uncertainty together for target samples (Eq 15),
    which sharpens the split between known and unknown targets.
    """
    prob = expected_prob(alpha)
    u = model_uncertainty(alpha).clamp(1e-4, 1 - 1e-4)
    e = data_uncertainty(prob).clamp(1e-4, 1 - 1e-4)
    return (-e * torch.log(u) - (1 - e) * torch.log(1 - u)).mean()


def predict(model, x, u_th=0.5):
    """Classify, returning an unknown label when uncertainty exceeds u_th."""
    evidence, alpha = model(x)
    u = model_uncertainty(alpha)
    prob = expected_prob(alpha)
    labels = prob.argmax(dim=1)
    labels = torch.where(u > u_th, torch.full_like(labels, -1), labels)
    return labels, u        # label -1 marks an unknown class


def smoke_test():
    """End to end check on dummy data. Confirms the pipeline runs."""
    torch.manual_seed(0)
    C = 10
    model = EvidentialClassifier(in_dim=64, n_classes=C)
    opt = torch.optim.Adam(model.parameters(), lr=1e-3)

    # Source domain, labeled simulated features.
    xs = torch.randn(128, 64)
    ys = torch.randint(0, C, (128,))
    ys_oh = F.one_hot(ys, C).float()
    # Target domain, unlabeled real features, some of them out of distribution.
    xt = torch.randn(128, 64)

    for step in range(100):
        _, alpha_s = model(xs)
        loss = evidential_loss(alpha_s, ys_oh) \
            + 0.1 * kl_regularizer(alpha_s, ys_oh)
        # Adversarial uncertainty on the unlabeled target domain.
        _, alpha_t = model(xt)
        loss = loss + 0.5 * adversarial_uncertainty_loss(alpha_t)
        opt.zero_grad(); loss.backward(); opt.step()

    labels, u = predict(model, xt, u_th=0.5)
    n_unknown = (labels == -1).sum().item()
    print(f"final loss {loss.item():.4f}")
    print(f"mean target uncertainty {u.mean():.4f}")
    print(f"flagged unknown {n_unknown} of {labels.numel()} target samples")


if __name__ == "__main__":
    smoke_test()

The smoke test trains the evidential head on labeled source features while applying the adversarial uncertainty objective to unlabeled target features, then classifies the target samples and flags the uncertain ones as unknown. The exact counts depend on the random data and the short training, so treat this as a structural demonstration rather than a benchmark. To move toward the full method you would add a real feature extractor such as ResNet18, the contrastive first stage on both domains, and the neighbor relation alignment losses, and you would tune the uncertainty threshold on held out data.

Conclusion

The core achievement of this work is a recognition system that copes with the version of the radar problem that actually turns up in the field, where the training data is simulated, the test data is real, and the two do not even agree on which target classes exist. Framing that as universal domain adaptation and solving it without any prior knowledge of the label mismatch is a meaningful step, and the authors report it as the first such study for SAR target recognition.

The conceptual move underneath the result is worth restating because it generalizes well beyond radar. Most classifiers are built to always answer, and that is exactly the wrong instinct in an open world. By modeling a full distribution over its own confidence with evidential deep learning, AUNR earns the right to say unknown, and by measuring uncertainty two different ways and forcing them into agreement, it turns that confidence signal into a sharp detector for classes it was never taught. Uncertainty stops being a nuisance and becomes the mechanism.

The two stage structure is a sensible piece of engineering. Spending the first stage on representation, through supervised and contrastive learning on both domains, gives the second stage something solid to work with, and the ablation shows why that ordering matters. The neighbor relation alignment is the least certain part of the design, helpful on balance but noisy, and the paper is honest that it does not win in every scenario. That candor is a strength, because it tells a practitioner where to be careful.

The results back the story. Leading every open scenario, and by roughly forty points on the hardest one, is the kind of margin that signals a genuine capability rather than a tuning win, and the robustness checks across resolution, noise, and data quantity suggest the method does not shatter under mild stress. The honest limitations, learning features from scratch, dependence on noisy neighbor pairs, and evaluation on only two datasets, keep the claim in proportion as a strong first result rather than a finished tool.

The direction from here is clear enough to name. Testing across more sensors and simulators, hardening the neighbor alignment against noise, and studying the very small class regime where the method weakens would each move it forward. More broadly, the idea of using calibrated uncertainty to decide what a model has never seen is one that recognition systems in many domains could borrow. Radar simply happens to be a field where admitting the unknown is not a nicety but a requirement, and this work shows one convincing way to do it.

Frequently asked questions

What is universal domain adaptation in SAR target recognition?

It is the setting where a model trains on labeled simulated SAR images and must recognize unlabeled real ones, without any prior knowledge of how the two class sets differ. The real data may contain target types the simulator never modeled, and the model has to align the shared classes while flagging the unseen ones as unknown.

What does AUNR stand for and what is its main idea?

AUNR stands for adversarial uncertainty and neighbor relation. Its main idea is to treat uncertainty as a signal, using evidential deep learning to measure how much evidence the model has for its prediction, so that highly uncertain real samples can be labeled as belonging to an unknown class rather than forced into a known one.

Why use evidential deep learning instead of a normal classifier?

A normal classifier outputs class probabilities that are often overconfident and give no reliable measure of genuine doubt. Evidential deep learning models a Dirichlet distribution over the class probabilities, which yields an explicit uncertainty value. That uncertainty is what lets the model recognize when a target does not belong to any class it was trained on.

How well does AUNR perform compared to earlier methods?

Across five label shift scenarios AUNR outperformed prior universal and open set methods. On the open scenarios it reached h scores of 84.22, 76.87, and 94.12 percent where the strongest baselines managed 68.78, 51.36, and 54.42, and it also led on the partial and closed set cases without using any prior knowledge of the label overlap.

What are the main limitations of AUNR?

It struggles when the number of known classes is very small, because it learns features from scratch without pretrained weights. Its neighbor relation alignment depends on mutual nearest neighbor pairs that can be noisy under domain shift, and the method has so far been evaluated on only two SAR datasets and one simulation pipeline.

Gao, F., Ma, W., Yuan, C., Wang, J., Sun, J., and Hussain, A. Universal domain adaptation for simulation assisted SAR target recognition based on adversarial uncertainty and neighbor relation. IEEE Transactions on Aerospace and Electronic Systems, volume 62 (2026). Beihang University, Beijing and Hangzhou, and Edinburgh Napier University. Available at https://doi.org/10.1109/TAES.2026.3670773.

This analysis is based on the published paper and an independent evaluation of its claims.

Leave a Comment

Your email address will not be published. Required fields are marked *