Learning Conditional Invariances through Non-Commutativity

Abhra Chaudhuri, Serban Georgescu, Anjan Dutta · DOI

Abstract

Domain adaptation (DA) typically aims to learn representations that are invariant across source and target domains. However, this symmetry often forces models to discard informative features present only in the target domain, such as color or texture in photos compared to sketches. We present Non-Commutative Invariance (NCI), a framework that relaxes the standard commutative invariance constraint. By mapping source data into the target's feature-rich representation space while preserving target-specific information, NCI avoids the "lowest common denominator" problem and achieves superior performance on standard DA benchmarks.

The Pitfall of Symmetric Invariance

Standard DA algorithms attempt to find a shared feature space where source and target distributions are indistinguishable. While intuitive, this approach suffers from Domain Asymmetry. For instance, in datasets like PACS, real photos contain rich color and texture information that sketches simply lack.

Figure 3: Comparison of sketches and photos for dogs and giraffes, illustrating the information gap between domains.

If a model is forced to make these domains identical in its internal representation, it must ignore any features not present in both. This "commutative" approach discards useful target-specific signals, leading to sub-optimal performance on the very domain we care about most. The paper theoretically proves that the risk of an encoder optimal across all domains is strictly higher than the risk of an encoder optimized specifically for the target domain when such asymmetry exists.

Non-Commutative Invariance (NCI)

The authors propose moving away from commutative operators that map both domains to a shared intersection, which often results in a loss of information.

Figure 6: A diagram of commutative invariance where different domains are mapped to a shared, reduced representation.

Instead of the symmetric mapping shown above, NCI employs a "right-invariant" operator. In this setup, the encoder is trained to map source samples into the target domain's representation space, but target samples are allowed to keep their original, feature-rich representation.

The Implementation: To achieve this, the researchers modified the classic Domain Adversarial Neural Network (DANN). In a standard DANN, the encoder tries to "fool" a domain discriminator for both domains. In NCI, the encoder is only trained to fool the discriminator for source samples—effectively pulling the source data into the target's world—while leaving the target samples' features intact. This allows the model to retain task-relevant target features that might be absent in the source, treating source data more like a sophisticated form of data augmentation.

Empirical Validation and Results

NCI was evaluated across several standard domain adaptation benchmarks, including PACS, Office-Home, and DomainNet. The results consistently showed that NCI outperforms traditional invariance-learning methods:

  • Performance Gains: NCI achieved gains of over 2% on PACS and Office-Home compared to state-of-the-art symmetric methods.
  • Synergy with Flat-Minima: NCI is complementary to loss-landscape optimization techniques like "Model Soups." On the PACS-Photo task, combining NCI with Model Soups boosted accuracy from 81.26% to 85.09%.
  • Approaching the Oracle: In material segmentation tasks involving multiple imaging modalities, NCI's performance approached that of an "oracle" model that had access to all modalities at test time, proving it successfully captures semantically meaningful invariances.

Conclusion

By breaking the symmetry of traditional domain adaptation, Non-Commutative Invariance allows models to leverage source data without sacrificing the rich, discriminative features of the target domain. This shift from finding a "middle ground" to preserving target-specific richness represents a significant step forward in building robust, high-performance cross-domain models. Future work remains in automating the selection of the "richer" target domain in complex multi-source scenarios.

Summary updated

BibTeX
@inproceedings{chaudhuri2024learning,
  author = {Abhra Chaudhuri and Serban Georgescu and Anjan Dutta},
  title = {{Learning Conditional Invariances through Non-Commutativity}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=tUVG9nGzgE},
}
Figure