               COSDA: Counterfactual-based Susceptibility Risk Framework for Open-Set Domain Adaptation

                           ¯
combination, SR(c, c′ ) − SR(c, c′ ) is upper bounded by             prototypes by these positive instances. Subsequently, these
              LKL = −log(σC ) + log(σC′ ).               (14)        affirmative instances of known classes are eliminated, and
                                                                     the remaining samples are subjected to a clustering algo-
Corollary 1 indicates that the error between the empirical           rithm in order to estimate the prototypes of U unknown
risk and expected risk can be minimized as the KL diver-             classes. The pseudo-labels for the samples are determined
gences decrease. Proof for Corollary 1 is provided in Ap-            by calculating and comparing the distances between each
pendix B.4.                                                          target domain sample and all prototypes.
                                                                     Specifically, given the scores of xt after the softmax func-
3.4. Satisfaction of Causal Assumptions                              tion ξ(h(G(xt ))), for the k-th known class, we first define
In this section, we concern the satisfaction of causal as-           the Top-M ξk(h(G(xt ))) scores represented as positive in-
sumptions, Exogeneity (Assumption 1) and Monotonicity                stances P k , and let the positive prototype representation
(Assumption 2).                                                      pkt :

As for Monotonicity, it emphasizes the value of y given that                                         1 X
                                                                                      {pkt }K = {        G(xti )}K
                                                                                                                 k=1 .                  (17)
c should be larger than given any other intervened feature                                           M
                                                                                                         Pk
c′ . This objective can be formulated as:
    max Pt (Y = y|C = c) − Pt (Y = y|C = c′ ),           (15)        For the unknown classes, we remove all positive instances
                                                                     of known classes and use the K-means algorithm to generate
which is equal to minimizing the susceptibility risk. There-
                                                                     U negative prototypes for the unknown classes.
fore, we can naturally introduce the Monotonicity measure-
ment into the estimation of susceptibility risk.                                 {put }U = K-means (G(xt )).               (18)
                                                                                                 xt ∈Dt \{P k }K
                                                                                                               k=1

As for Exogeneity, we first rewrite the assumption using             Here we set U = K, M = Nt /(U + K). For sample xti ,
information theory (Kraskov et al., 2004).                           the o-th
                                                                            element of its pseudo label ŷ is defined as follows:
Proposition 2. (Mutual Information Equivalence) The                           1, if s (G (xti ) , pot ) = max {s (G (xti ) , pat )}K+U
                                                                                                                                    a=1
Exogeneity condition in Assumption 1 can be equivalently             ŷo =                                                                   ,
represented with the Mutual Information I(·; ·):                                 0, if s (G (xti ) , pot ) < max {s (G (xti ) , pat )}K+U
                                                                             
                                                                                                                                      a=1
    Pr(Y = k|C, E = et/s ) = Pr(Y = k|C)                                                                                                  (19)
                                                         (16)
                            ⇔ max E I(Cti ; Csk ),                   where s(a, b) measures the similarity between a and b.
                                    xti ∈k
                                                                     Based on Eq. (19), we obtain the pseudo labels ŷk for all
where Cti represents sample features in the target domain            categories o ∈ {Ys , U} = {1, ...., K, K + 1, ..., K + U }.
G(xti ) and Csk represents the center point representation in        Then, the samples with pseudo label {K + 1, ..., K + U }
the source domain G(xsi )). Both Ct and C k belong to the            are defined as unknown class samples.
k-th category. If Pr(Y = k|C, E = et/s ) = Pr(Y = k|C),              Contrastive-inspired Feature Alignment (CFA). To fully
then certain domain traits are unnecessary for identifying Y .       leverage the labeled knowledge from the source domain,
Maximizing E I(Cti ; Csk ) mitigates domain changes on               this paper adopts a contrastive learning strategy to align
             xti ∈k
causal features, ensuring resilient and trustworthy represen-        the feature space of shared classes across domains. Unlike
tation. Proposition 2 is proven in Appendix B.5.                     the contrastive learning strategy in CSDA, the prototypes
                                                                     for comparison in this work include not only the source
To achieve     E I(Cti ; Csk ), we introduce an innovative           domain prototypes pks but also the virtual unknown class
             xti ∈k
and efficient pseudo-labeling strategy termed Virtual Multi-         prototypes put (estimated by Eq. (18)). The prototypes of
unknown-categories Prototype pseudo-labeling (VMP) for               known classes in the source domain are defined as:
classifying samples from the target domain, subsequently                                           nk
                                                                                                    s
                                                                                     k K       1 X
maximizing the feature information shared between the tar-                         {ps } = { k        G(xsi )}Kk=1 .
                                                                                                                           (20)
                                                                                               ns i=1
get domain and source domain through Contrastive-inspired
Feature Alignment (CFA).                                             To prevent negative effects from pseudo label noise, the
Virtual Multi-unknown-categories Prototype pseudo-                   target domain samples used for contrastive learning are
labeling (VMP). Unlike previous clustering-based algo-               filtered by I(xt ): (i) the pseudo label obtained based on the
rithms, which group unknown classes into a unique class,             highest logit is aligned with the label obtained through the
this paper presupposes the existence of U unknown classes            VMP strategy, and (ii) the value of the highest logit is higher
in the representation space. The fundamental concept of this         than 0.7. (
approach is to initially identify positive instances of recog-                      1, max{ξk (h(G(xt )))}K   k=1 ∧ ŷk = 1
                                                                       I(xt ) =          k                                    . (21)
nized classes using confidence scores and compute positive                          0, else

                                                                 5
