Answers.Body: <p>To provide some context for this answer, the referenced paper is dealing with the problem of unsupervised domain adaptation (UDA). In UDA, there are two (or more) datasets, each drawn from a different, but related domain. One of these datasets (the source) is labelled, and we want to use that data to train a machine learning model to predict the labels for the unlabelled (or target) datasets. The complicating factor is that the distribution of the data from each domain is different, so a model trained on the source data in the usual way does not generalise to the target domain. In open-set domain adaptation the distributions of the source and target labels are different and there are one or more target labels that are not represented in the source dataset.</p>
  <p>The paper addresses this problem by training a model jointly on the source and target data. The idea behind the joint training is that the deep learning model is trained to extract domain-invariant features from the input, which are then used in a classifier. As the classifier is trained on these domain-invariant features, it should be able to classify samples from the target domain, as well as from the source domain. For the source data, the usual cross-entropy loss is used. For the target data they use two loss functions, one of which is the above-mentioned cluster-aware contrastive adaptive loss.</p>
  <p>To calculate the cluster-aware contrastive adaptive loss, the learned feature maps for the source and target data are clustered separately, and then the clusters are aligned. Minimizing this loss function trains the model to extract features that bring aligned clusters closer together and pushes unaligned clusters further apart.</p>
  <p>The authors don't go into a lot of detail about how the clusters are aligned. But they do tell us they use the &quot;domain consensus score&quot; and cite the paper <a href="https://openaccess.thecvf.com/content/CVPR2021/papers/Li_Domain_Consensus_Clustering_for_Universal_Domain_Adaptation_CVPR_2021_paper.pdf" rel="nofollow noreferrer">Domain consensus clustering for universal domain adaptation</a> by Guangrui Li et al. According to this paper, they find the centre of each cluster, then for each cluster in one domain they simply find the cluster in the other domain with the nearest cluster centre. If the two clusters (one from each domain) are each other's nearest centre, then they describe this as reaching consensus. They also compute a domain consensus score, which is simply the mean of the proportion of cluster members that are located in the intersection of the two clusters.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-02-02T14:00:01.597Z
Answers.Text: Your last paragraph is useful actually for this question but still leaving questions raised for how they mentioned threshold of consensus score ? why no repulsion for intra-domain clusters (look at that image)
Answers.UserDisplayName: chickensoup
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-02-02T14:11:55.223Z
Answers.Text: Your last paragraph is useful actually for this question but still leaving questions raised for how they mentioned threshold of consensus score ? 
  why no repulsion force for intra-domain clusters (look at that image, no repulsion between 2 blue clusters)?
  The use of delta as a upper bound for repulsion force ? why that ? is that mean that as a certain point, repulsion can harm for learning invariant-domain feature ? too much force cause loss of balance in clustering ?
  Can you elaborate more on DCC paper ? (just a feedback, first 2 para are common knowledge, can get from gpt or survey)
Answers.UserDisplayName: chickensoup
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-02-01T12:45:59.667Z
Answers.LastActivityDate: 2024-02-01T12:45:59.667Z
Answers.UserDisplayName: Lynn
Body: <p>within <a href="https://link.springer.com/chapter/10.1007/978-3-031-16449-1_65" rel="nofollow noreferrer">Delving into Local Features for Open-Set Domain Adaptation in Fundus Image Analysis</a> paper. I got trouble in understanding their cluster-aware contrastive adaption <span class="math-container">$\mathcal{L}_\text{cca}$</span>.</p>
  <p><a href="https://i.sstatic.net/aLKtY.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/aLKtY.png" alt="cluster-aware contrastive adaption loss" /></a></p>
  <p>I don't get it how they defined &quot;<span class="math-container">$i$</span> and <span class="math-container">$j$</span> are <strong>aligned</strong>&quot;, and how is consider &quot;<strong>mis-aligned</strong>&quot;.</p>
  <p>This is what they say when they highlighted their contributions: <em>(CCA) method is proposed to enforce the local features of aligned clusters across domains to remain close-by, while pushing those of the misaligned clusters far apart.</em></p>
  <p><a href="https://i.sstatic.net/drNpY.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/drNpY.png" alt="CCA illustration" /></a></p>
  <p>(Blue is source domain, Orange is target domain).This is open-set domain adaptation. I believe each prototype is the mean (center) of each cluster. and they say <span class="math-container">$i$</span> (a cluster) from source, <span class="math-container">$j$</span> (a cluster) from target.</p>
  <p>After scanning the paper for a week, I still don't understand what is &quot;aligned&quot; here. I sent them email twice (politely) but no reply.</p>
  <p>Can any one enlighten me a little bit?</p>
  
Tags: <papers><definitions><clustering><domain-adaptation><grad-cam>
Title: What does "aligned" across domains in domain adaptation?
UserDisplayName: chickensoup
ThreadText: # What does "aligned" across domains in domain adaptation?
  
  (Asked by: username_0 on 2024-01-25)
  
  within [Delving into Local Features for Open-Set Domain Adaptation in Fundus Image Analysis](https://link.springer.com/chapter/10.1007/978-3-031-16449-1_65) paper. I got trouble in understanding their cluster-aware contrastive adaption $\mathcal{L}\_\text{cca}$.
  
  [![cluster-aware contrastive adaption loss](https://i.sstatic.net/aLKtY.png)](https://i.sstatic.net/aLKtY.png)
  
  I don't get it how they defined "$i$ and $j$ are **aligned**", and how is consider "**mis-aligned**".
  
  This is what they say when they highlighted their contributions: *(CCA) method is proposed to enforce the local features of aligned clusters across domains to remain close-by, while pushing those of the misaligned clusters far apart.*
  
  [![CCA illustration](https://i.sstatic.net/drNpY.png)](https://i.sstatic.net/drNpY.png)
  
  (Blue is source domain, Orange is target domain).This is open-set domain adaptation. I believe each prototype is the mean (center) of each cluster. and they say $i$ (a cluster) from source, $j$ (a cluster) from target.
  
  After scanning the paper for a week, I still don't understand what is "aligned" here. I sent them email twice (politely) but no reply.
  
  Can any one enlighten me a little bit?
  
  **Tags:** papers, definitions, clustering, domain-adaptation, grad-cam
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2024-02-01. Score: 1
  
  To provide some context for this answer, the referenced paper is dealing with the problem of unsupervised domain adaptation (UDA). In UDA, there are two (or more) datasets, each drawn from a different, but related domain. One of these datasets (the source) is labelled, and we want to use that data to train a machine learning model to predict the labels for the unlabelled (or target) datasets. The complicating factor is that the distribution of the data from each domain is different, so a model trained on the source data in the usual way does not generalise to the target domain. In open-set domain adaptation the distributions of the source and target labels are different and there are one or more target labels that are not represented in the source dataset.
  
  The paper addresses this problem by training a model jointly on the source and target data. The idea behind the joint training is that the deep learning model is trained to extract domain-invariant features from the input, which are then used in a classifier. As the classifier is trained on these domain-invariant features, it should be able to classify samples from the target domain, as well as from the source domain. For the source data, the usual cross-entropy loss is used. For the target data they use two loss functions, one of which is the above-mentioned cluster-aware contrastive adaptive loss.
  
  To calculate the cluster-aware contrastive adaptive loss, the learned feature maps for the source and target data are clustered separately, and then the clusters are aligned. Minimizing this loss function trains the model to extract features that bring aligned clusters closer together and pushes unaligned clusters further apart.
  
  The authors don't go into a lot of detail about how the clusters are aligned. But they do tell us they use the "domain consensus score" and cite the paper [Domain consensus clustering for universal domain adaptation](https://openaccess.thecvf.com/content/CVPR2021/papers/Li_Domain_Consensus_Clustering_for_Universal_Domain_Adaptation_CVPR_2021_paper.pdf) by Guangrui Li et al. According to this paper, they find the centre of each cluster, then for each cluster in one domain they simply find the cluster in the other domain with the nearest cluster centre. If the two clusters (one from each domain) are each other's nearest centre, then they describe this as reaching consensus. They also compute a domain consensus score, which is simply the mean of the proportion of cluster members that are located in the intersection of the two clusters.
  
  > **Comments:**
  > **username_0**: Your last paragraph is useful actually for this question but still leaving questions raised for how they mentioned threshold of consensus score ? why no repulsion for intra-domain clusters (look at that image)  
  > **username_0**: Your last paragraph is useful actually for this question but still leaving questions raised for how they mentioned threshold of consensus score ?  why no repulsion force for intra-domain clusters (look at that image, no repulsion between 2 blue clusters)? The use of delta as a upper bound for repulsion force ? why that ? is that mean that as a certain point, repulsion can harm for learning invariant-domain feature ? too much force cause loss of balance in clustering ? Can you elaborate more on DCC paper ? (just a feedback, first 2 para are common knowledge, can get from gpt or survey)  
  
  ---
  
  