# Computing symmetric difference hypothesis divergence $H \Delta H$ for two domains using a segmentation network

Given two domains $$D_1$$ and $$D_2$$, the symmetric difference hypothesis divergence ($$H \Delta H$$) is used as a measure how much two domains differ from each other.

Let the hypothesis, segmentation network in my case, trained on two domains be $$h_1$$ and $$h_2$$ respectively. Then (according to this work by Loog et al);

$$d_{H\Delta H} = 2 \sup_{h_1,h_2 \in H} |\mathrm{Pr_s}[h_1\neq h_2] - \mathrm{Pr_t}[h_1\neq h_2]|$$

Where,

$$\mathrm{Pr_s}[h_1\neq h_2] = \int_{X}[h_1\neq h_2]p_s(x)\delta x$$

Since we do not have access to the true distribution $$p_s$$, we emperically determine an approximate using

$$\mathrm{\tilde{Pr_s}}[h_1\neq h_2] = \sum_N[h_1\neq h_2] / N$$

Simply put, we find the total number of samples in the source distribution that the two trained models disagree on. The benefit of this approach is that we do not require access to ground truth labels.

My question is: Why is there a negative in the equation of $$H \Delta H$$? By my understanding, if the two models disagree wildly, the number of incorrect samples would cancel out, returning a low score!