# FSN: Feature Shift Network for Load-Domain (LD) Domain Generalization
## 3 Feature Shift Networks
### Theoretical Analyses  
The design of FSN is based on two ideas, namely a domain alignment idea and domain distribution regularity idea. **Domain Alignment Conjecture. ** The solution proposed in this section is based on the idea of domain alignment. For a domain, it can be modeled as a joint distribution \(P(X,Y)\) (for ease of exposition in this section, we consider \(P(X,Y)\) as \(P_{XY}\)). Then, we can decompose this joint distribution as  
\[P(X,Y) = P(Y|X)P(X) \tag{1}\] \[= P(X|Y)P(Y) \tag{2}\]  
A common assumption in domain generalization is that shifts in the data distribution occur only at the edges \(P(X)\), with the posterior \(P(Y|X)\) remaining relatively stable. From the perspective of deep learning, if the marginal distributions of two domains can be aligned, then a predictive model trained on one domain can perform effectively as well on the other domain. In this case, the two domains can be viewed as having the same distribution. From the perspective of causal learning, if the assumption in the previous paragraph holds, then aligning the marginal distribution \(P(X)\) is only valid when X is the  
Figure 1: Domain label with or without physical information. (**a**) For these four styles, the domain labels contain no information except that they can be used to distinguish between different domains; (**b**) For these four styles, the domain labels contain no information except that they can be used to distinguish between different domains. cause of Y because, in this case, \(P(Y|X)\) is not coupled with \(P(X)\), and therefore, \(P(Y|X)\) can always remain stable when \(P(X)\) changes. Of course, there is also a possibility that \(Y\) may be the cause of \(X\), in which case the shift of \(P(X)\) will also affect \(P(Y|X)\). One of the theoretical bases of the solution proposed in this section is based on the above assumption, that is, \(X\) is the cause of \(Y\), \(P(Y|X)\) is not coupled with \(P(X)\), and therefore, the data distribution shift only occurs on the margin \(P(X)\). In this case, as long as the margin \(P(X)\) is aligned, the model can be transferred from one distribution to another. **Distribution Law Conjecture. ** In addition to the posterior stability idea mentioned above, the model proposed in this section is also based on another idea: when the domain labels correspond to physical meanings in reality, if there are two pairs of domain labels with identical internal relationships, then the internal domain feature distributions of the two pairs of domain data corresponding to these two pairs of domain labels are also identical. More precisely, if we denote the \(K\) domain labels as \(D_{1},D_{2},\cdots,D_{K}\), which correspond to domains \(P(1),P(2),\ldots,P(K)\), if there exists a relationship mapping \(F_{d}\), such that \(F_{d}(D_{k^{\prime}})=D_{k}\), and \(F_{d}(D_{k^{\prime\prime}})=D_{k^{\prime}},k,K\in\{0,\ldots,K\}\), then there exists a relationship \(F_{p}\), when the relationship mapping between the domain features \(f\Big{(}P^{(k)}\Big{)}\), \(f\Big{(}P^{(k^{\prime})}\Big{)}\) is \(F_{p}\), that is, \(F_{p}\Big{(}f\Big{(}P^{(k^{\prime})}\Big{)}\Big{)}=f\Big{(}P^{(k)}\Big{)}\), then \(F_{p}\Big{(}f\Big{(}P^{(k^{\prime\prime})}\Big{)}\Big{)}=f\Big{(}P^{(k^{\prime })}\Big{)}\). As shown in Figure 2, within the domain labels, there is a mapping relationship \(F_{d}\) that can map one label to another label, and then there is a mapping relation \(F_{p}\) that exists between the domains corresponding to the labels related to these relationships, which can map the distribution of domain features to another domain features. To illustrate the above more clearly in a diagram, let us consider a simple example. For the source domain labels 0, 1, and 2 of the CWRU dataset, it follows a linear distribution on the number line. We assume that the distribution of the domain features corresponding to the current domain labels is a kind of \"linear\" distribution in a certain dimension space.