SlowGuess/NeurIPS_2023_OCR huggingface dataset:
In brief, we choose to bound the third-order term by the sum of second and fourth-order terms, and bound the fourth-order term by the definition of binary treatment vector. The format is adjusted for our optimization formulation later, where we choose the covariance matrix as decision variables.
Actually, we can find that experiment design is summarized by the covariance matrix in this upper bound. Hence, we denote this upper bound by  $\bar{V}_{\omega}(\mathrm{Cov}[t])$ . Notice that there is a common multiplier  $\gamma^2$ , which is associated with the unknown interference effect, in the squared bias and variance. This appealing feature allows us to optimize the MSE upper bound without estimating the parameter of the potential outcome model.
Combining proposition 1 and 3, we derive following upper bound for MSE.
Theorem 1 The MSE of the standard HT estimator has following upper bound
$$
\mathrm {M S E} \leq B (\operatorname {C o v} [ t ]) ^ {2} + \bar {V} _ {\omega} (\operatorname {C o v} [ t ]) \tag {15}
$$
3.2 Optimizing Covariance
Now we can discuss our experiment design. For a class of parameterized randomization schemes, one can always analyze the covariance and express the bias and variance with parameters in randomization schemes. Based on the derivation in previous section, we argue that these randomization schemes is actually specifying the patterns of covariance matrix, e.g., the block diagonal pattern. We thus choose to directly optimize the covariance matrix of randomization scheme, which is actually considering a much larger hypothesis space.
Since our decision variable is a positive semi-definite matrix, it's intuitive to make attempts for formulating the problem as positive semi-definite programming with the MSE bound acting as objective. However, notice that there is still one square term with regard to trace  $(CX)$ , which appears in the  $B(X)^2$ . If we want to transform it into semi-definite programming (SDP), we must modify the objective further. Moreover, there are some intrinsic disadvantages of this formulation. Primarily, after we solve the optimal covariance matrix, we can't directly sample from the multivariate Bernoulli distribution that is subject to this covariance matrix. Secondly, method based on mathematical programming is usually precise but not efficient enough.
To guarantee that we can sample treatment vector subject to the optimized covariance, we first present a lemma that is equivalent to the Grothendieck's identity [28].
Lemma 1 Suppose that  $(X,Y)$  follows a bivariate Gaussian distribution with correlation  $r$ , namely,
$$
\binom {X} {Y} \sim \mathcal {N} \left(\binom {0} {0}, \binom {1 r} {r 1}\right) \tag {16}
$$
$$
\operatorname {C o v} [ \operatorname {s g n} (X), \operatorname {s g n} (Y) ] = \frac {2 \arcsin (r)}{\pi} \tag {17}
$$
This lemma enables us to sample from bivariate Bernoulli distribution with mean  $(\frac{1}{2}, \frac{1}{2})$  and any valid covariance. Specifically, once we solve out the optimal covariance matrix  $X^{*}$ , we can sample from multivariate Gaussian distribution with  $\sin(2\pi X^{*})$  acting as covariance matrix, here sin function is element-wise. Nevertheless, it must be noted that this transformation isn't omnipotent for  $n > 2$  case, namely,  $\arcsin(X) / 2\pi$  can't recover all possible covariance matrix of  $n$ -variable multivariate Bernoulli distribution when  $X \succeq 0$ , since otherwise the multivariate Bernoulli distribution can be uniquely determined by its mean vector and covariance matrix, which is apparently false.
Moreover, we can't guarantee  $\sin(2\pi X^*)$  to be positive semi-definite even if  $X^*$  is positive semi-definite. Motivated by this, we adopt the Cholesky-based parameterization. We set our decision variable as matrix  $R$ , and we guarantee the validity of the covariance matrix of Gaussian distribution first, namely, we set the covariance matrix of Gaussian distribution as  $RRT$  and the covariance matrix of (Bernoulli) treatment vector is
$$
X (R) = \frac {\arcsin \left(R R ^ {T}\right)}{2 \pi} \tag {18}
$$
Now we can propose our final formulation
$$
\min _ {R} M (R) = B (X (R)) ^ {2} + \bar {V} _ {\omega} (X (R))
$$
$$
\text {s . t .} \left(R R ^ {T}\right) _ {i, j} \in [ - 1, 1 ] \quad \forall i \neq j, i, j \in [ K ] \tag {19}
$$
$$
(R R ^ {T}) _ {i, i} = 1 \quad \forall i \in [ K ]
$$
This optimization problem is no longer convex with the introduction of arcsin function, for which we design a projected gradient descent algorithm. Since it's a non-convex optimization problem, adaptive optimizer, such as Adam [20] can be applied to improve the performance of the gradient descent step.
We would like to draw attention to the fact that row normalization can be viewed as a projection operator to the domain in the aforementioned formulation, with the Frobenius norm of the matrix. This fact can be verified through the Cauchy-Schwarz inequality. Additionally, we actually optimize a total of  $K \times K$  parameters using gradient information, which is both efficient and easy to implement.
After the optimization problem is solved, we can sample from it directly through a reparameterization of the multivariate Gaussian distribution,
$$
\boldsymbol {t} = \frac {\mathbf {1} + \operatorname {s g n} \left(R ^ {*} \mathcal {N} (\mathbf {0} , I _ {K})\right)}{2} \tag {20}
$$
4 Simulation Study
4.1 Basic Setting
In this part, we carry out simulation based on a linear/multiplicative potential outcome model on a social network FB-Stanford3[32].<sup>3</sup>. We consider following linear potential outcome model,
$$
Y _ {i} (\boldsymbol {z}) = \alpha + \beta \cdot z _ {i} + c \cdot \frac {d _ {i}}{\bar {d}} + \sigma \cdot \epsilon_ {i} + \gamma \frac {\sum_ {j \in N _ {i}} z _ {j}}{d _ {i}} \tag {21}
$$
and multiplicative model, which is a simplified version of that in [36], with removing a covariate.
$$
Y _ {i} (\boldsymbol {z}) = \left(\alpha + \sigma \cdot \epsilon_ {i}\right) \cdot \frac {d _ {i}}{\bar {d}} \cdot \left(1 + \beta z _ {i} + \gamma \frac {\sum_ {j \in N _ {i}} z _ {j}}{d _ {i}}\right) \tag {22}
$$
We choose to fix all parameters except for interference density,  $\gamma$ . Namely, we set  $(\alpha, \beta, c, \sigma) = (1, 1, 0.5, 0.1)$  for both models, and set  $\gamma \in \{0.5, 1, 2\}$  to construct three regimes.  $\epsilon_{i} \sim \mathcal{N}(0, 1)$ .
It should be noted that these two models correspond to different model misspecification forms, aiming to demonstrate the robustness of our method.
Besides our optimized covariance design (OCD), we implement following randomization schemes. We first consider two baselines, independent Bernoulli randomization (Ber) and complete randomization (CR), both of which are cluster-level. We also implement two adaptive schemes, rerandomized-adaptive randomization (ReAR) and pairwise-sequential randomization (PSR) [25, 31], which balance heuristic covariates adaptively and act as competitive baselines, since the average degree is considered as a covariate in these two methods and exactly appear in both two of our models, explicitly. Then we implement the independent block randomization (IBR) [5], which represents methods that optimize parameterized randomization schemes. Nevertheless, we argue that an appropriate objective for optimization is crucial, and we propose a randomization scheme based on IBR with optimizing variance in equation (12) as objective. We nominate it as IBR-p since the heuristic solution of this scheme in our optimization problem is pairing cluster with cluster size, namely, each block is of size 2. Notice that all randomization schemes satisfy equation (4).
For every randomization scheme we consider, we perform Monte Carlo simulation that repeats randomization schemes 10,000 times and calculates the sample mean and variance of estimators.
<sup>3</sup>Network topology data can be found in https://networkrepository.com/socfb-Stanford3.php
Moreover, the oracular GATE are utilized to calculate bias.
$$
\tau_ {1} = (\alpha + \beta + c \cdot \frac {\bar {d}}{\bar {d}} + \gamma) - (\alpha + c \cdot \frac {\bar {d}}{\bar {d}}) = \beta + \gamma \tag {23}
$$
$$
\tau_ {2} = \alpha (1 + \beta + \gamma) - \alpha = \alpha (\beta + \gamma)
$$
At last, we set the clusters as given by Louvain algorithm with fixed random seed and resolution parameter as 10, which gives  $K = 192$  clusters. We also consider other two resolution levels, namely, 2 and 5, corresponding to  $K = 30, 95$ , respectively. The outcome under these two levels is presented in the appendix.
4.2 Analysis of Results
From table 1 to table 2, we show the bias, standard deviation, and MSE of standard HT estimator. We also present the result under different estimator (such as difference-in-means estimator), different clustering resolution and different dataset (network topology) in the appendix due to limited space. Overall, it meets our expectation that the proposed method OCD demonstrates greater advantages over other methods when interference intensity, namely,  $\gamma$ , increases. We emphasize the outstanding performance of our method in the multiplicative model and give the credit to handling the bias-variance tradeoff better. We also discover that our approach OCD isn't sensitive to the resolution level of upstream clustering, which isn't often the case for other methods, according to the thorough simulation results presented in the appendix. In reality, when there are certain densely connected cluster pairings that are assumed to have merged but have not, the clustering outcome is poor and resolution level may be inappropriate. Such pair would typically receive a high positive covariance from the optimization process in OCD, which could be regarded as adaptively fixing the fault.
In addition, we highlight that the bias usually dominates in MSE in many settings, and it almost scales linearly with interference intensity, which is exactly as shown in the expression of bias. According to our theoretical derivation, we attribute the dominance of bias to the density of social network. There is a trend that all other methods perform similarly with two baselines, since bias is dominating in a denser network, while this component is usually ignored in the experiment design, on account of the introduction of HT estimator with exposure indicator. Moreover, although we fix  $\omega = 1$  in presented result, we actually observe that our method is very robust to the choice of  $\omega$  in related experiment.
Finally, we point out that the distribution of proportion of treated units of optimized randomization scheme is usually bimodal (e.g. peak at  $45\%$ ,  $55\%$ ) in our randomization scheme, with the mean still  $50\%$ . This bimodal pattern is the outcome of introducing non-zero covariance on almost all off-diagonal positions of covariance matrix. This is different from other methods we considered here, for which the proportion is usually strictly  $50\%$  or unimodal and concentrates at its mean,  $50\%$ .
In this article, we derive the bias and variance of the standard HT estimator under a parametric potential outcome model and construct an estimable objective based on the derived MSE. We then propose an appropriate formulation to transform the experiment design into an optimization problem with the covariance matrix of treatment vector acting as decision variables. Besides, we propose an algorithm based on projected gradient descent to provide optimized covariance design that supports legitimate sampling. Finally, we implement a series of methods and compare their performance in diverse settings, where the advantage of our methods is demonstrated.
We stress the significance of bias and propose our method to make attempts for balancing bias and variance better. Actually, almost all potential outcome models used in the simulation part of related works admit neighborhood interference assumption, which makes the estimator using exposure indicator unbiased or nearly unbiased. However, we argue that this assumption is reasonable but also restricts our scope. There have recently been some works considering interference beyond this assumption, where bias is also demonstrated to be important.
Although there has been a lot of variance bound in this area, few of them can guide experiment design directly, and we have actually made many attempts on finding appropriate variance bound. For example, the gradient of fourth-order term  $\mathbb{E}[(t^T C t)^2]$  can be estimated directly through REINFORCE estimator [38] without need of upper bound. Nevertheless, the optimized covariance matrix tends to give a proportion of densely linked cluster pairs high correlation (near to 1), causing the covariance matrix to become nearly singular. This, in turn, leads to catastrophic gradient variance that can't be reduced by conventional technique such as [21]. In addition, weaker assumption on comparability between direct effect and interference is feasible. We can only demand there exists  $\omega' > 0$  such that  $\| h \|_2 \leq \omega' \gamma \| d \|_2$ . This weaker assumption corresponds to spectral norm bound on the second order term  $h^T \mathbb{E}[tt^T] h$ , which is a looser bound and finally produces a empirically worse solution. This bound is also utilized in [17] and is expressed as the worst-case variance, which is concerned with maximizing a convex objective over bounded potential outcomes. The optimal value is taken when potential outcome is taken as the endpoint value of its domain, which is too conservative to have good empirical performance. The simulation result of IBR can support this claim, since similar worst-case variance is utilized in IBR.
Additionally, our work can be improved and extended in several aspects. Firstly, the optimization objective can be improved with a tighter but still estimizable upper bound on variance. Moreover, the situation of non-balanced treatment assignment, i.e.,  $\mathbb{E}[z_i] \neq \frac{1}{2}$ , is worthy of exploration. Besides, the derivation for more complex estimator is kept explorable, e.g., the difference-in-means estimator, and HT estimator with exposure indicator. Our derivation is performed on the standard HT estimator, and structural assumption is introduced when the derivation encounters essential difficulties. In addition, the basic setting beyond neighborhood interference assumption also warrant further extension.
The research was supported by the National Natural Science Foundation of China (No.72171131, 72133002); the Technology and Innovation Major Project of the Ministry of Science and Technology of China under Grants 2020AAA0108400 and 2020AAA0108403. We would like to thank Ruizhong Qiu for beneficial discussion, and anonymous reviewers for the helpful feedback.
[1] Peter M Aronow and Cyrus Samii. Estimating average causal effects under general interference, with application to a social network experiment. Annals of Applied Statistics, 11(4):1912-1947, 2017.
[39] Christina Lee Yu, Edoardo M Airoldi, Christian Borgs, and Jennifer T Chayes. Estimating the total treatment effect in randomized experiments with unknown network structure. Proceedings of the National Academy of Sciences, 119(44):e2208975119, 2022.
[40] Christina Lee Yu, Edoardo M Airoldi, Christian Borgs, and Jennifer T Chayes. Graph agnostic randomized experimental design. arXiv preprint arXiv:2205.12803, 2022.
[41] Yuan Yuan and Kristen M Altenburger. A two-part machine learning approach to characterizing network interference in a/b testing, 2022.
[42] Qiong Zhang and Lulu Kang. Locally optimal design for a/b tests in the presence of covariates and network dependence. Technometrics, 64(3):358-369, 2022.
[43] Corwin M Zigler and Georgia Papadogeorgou. Bipartite causal inference with interference. Statistical science: a review journal of the Institute of Mathematical Statistics, 36(1):109, 2021.
Firstly, we notice that
$$
\mathbb {E} [ z _ {i} ] = \frac {1}{2} \quad \operatorname {V a r} [ z _ {i} ] = E [ z _ {i} ] - E [ z _ {i} ] ^ {2} = \frac {1}{4} \tag {24}
$$
Then we substitute  $Y_{i}(z)$  in HT estimator
$$
\hat {\tau} = \frac {1}{n} \sum_ {i \in [ n ]} \left(\left(\frac {z _ {i}}{\mathbb {E} [ z _ {i} ]} - \frac {(1 - z _ {i})}{\mathbb {E} [ 1 - z _ {i} ]}\right) Y _ {i} (z)\right) \tag {25}
$$
with our potential outcome model and take expectation w.r.t. treatment assignments,
$$
\begin{array}{l} \mathbb {E} [ \hat {\tau} ] = \frac {2}{n} \left(\sum_ {i = 1} ^ {n} \mathbb {E} \left[ \left(z _ {i} - \left(1 - z _ {i}\right)\right) Y _ {i} (z) \right]\right) \\ = \frac {2}{n} \sum_ {i = 1} ^ {n} \left(\alpha_ {i} \mathbb {E} [ 2 z _ {i} - 1 ] + \beta_ {i} \mathbb {E} [ z _ {i} ^ {2} ] + \gamma \sum_ {j \in N _ {i}} \mathbb {E} [ (2 z _ {i} - 1) z _ {j} ]\right) (26) \\ = \frac {2}{n} \sum_ {i = 1} ^ {n} \left(\beta_ {i} \mathbb {E} \left[ z _ {i} \right] + 2 \gamma \operatorname {C o v} \left[ z _ {i}, \sum_ {j \in N _ {i}} z _ {j} \right]\right) (26) \\ = \frac {1}{n} \sum_ {i = 1} ^ {n} \left(\beta_ {i} + 4 \gamma \operatorname {C o v} \left[ z _ {i}, \sum_ {j \in N _ {i}} z _ {j} \right]\right) \\ \end{array}
$$
Moreover, we can calculate the GATE under our potential outcome model
$$
\tau = \frac {1}{n} \sum_ {i = 1} ^ {n} \left(Y _ {i} (\mathbf {1}) - Y _ {i} (\mathbf {0})\right) = \frac {1}{n} \sum_ {1 = 1} ^ {n} \left(\beta_ {i} + \gamma d _ {i}\right) \tag {27}
$$
Hence, the bias of HT estimator is
$$
\begin{array}{l} E [ \hat {\tau} ] - \tau = \frac {1}{n} \sum_ {i = 1} ^ {n} \left(4 \gamma \operatorname {C o v} \left[ z _ {i}, \sum_ {j \in N _ {i}} z _ {j} \right] - \gamma d _ {i}\right) \tag {28} \\ = \frac {\gamma}{n} \sum_ {i = 1} ^ {n} \left(\frac {\operatorname {C o v} [ z _ {i} , \sum_ {j \in N _ {i}} z _ {j} ]}{\operatorname {V a r} [ z _ {i} ]} - d _ {i}\right) \\ \end{array}
$$
Then we derive the matrix form with cluster-level treatment vector  $t$ .
$$
\begin{array}{l} \mathbb {E} [ \hat {\tau} ] - \tau = \frac {\gamma}{n} \sum_ {i = 1} ^ {n} \left(\frac {\operatorname {C o v} \left[ z _ {i} , \sum_ {k \in \mathcal {N} _ {i}} z _ {k} \right]}{\operatorname {V a r} \left[ z _ {i} \right]} - d _ {i}\right) \\ = \frac {\gamma}{n} \left(4 \sum_ {i \neq j \in [ K ]} \operatorname {C o v} \left[ t _ {i}, t _ {j} \right] C _ {i j} - \sum_ {i \in [ n ]} d _ {i}\right) (29) \\ = \frac {\gamma}{n} \left(4 \sum_ {i, j \in [ K ]} \operatorname {C o v} \left[ t _ {i}, t _ {j} \right] \boldsymbol {C} _ {i j} - \sum_ {i, j \in [ K ]} \boldsymbol {C} _ {i j}\right) (29) \\ = \frac {\gamma}{n} \left(4 \operatorname {t r a c e} (\boldsymbol {C} \operatorname {C o v} [ \boldsymbol {t} ]) - \sum_ {i, j \in [ K ]} \boldsymbol {C} _ {i j}\right) \\ \end{array}
$$
Firstly we rewrite the estimator
$$
\begin{array}{l} \hat {\tau} = \frac {2}{n} \sum_ {i \in [ n ]} \left(\left(\beta_ {i} - \gamma d _ {i}\right) z _ {i} + 2 \gamma \sum_ {j \in N _ {i}} z _ {i} z _ {j}\right) \tag {30} \\ = \frac {2}{n} \left(\sum_ {i \in [ n ]} \left(\beta_ {i} - \gamma d _ {i}\right) z _ {i} + 2 \gamma \sum_ {(j, k) \in \mathcal {E}} z _ {j} z _ {k}\right) \\ \end{array}
$$
We then expand the variance directly, and get
$$
\begin{array}{l} \operatorname {V a r} [ \hat {\tau} ] = \frac {4}{n ^ {2}} \left(\sum_ {i, j \in [ n ]} \left(\beta_ {i} - \gamma d _ {i}\right) \left(\beta_ {j} - \gamma d _ {j}\right) \operatorname {C o v} \left[ z _ {i}, z _ {j} \right. \right. \\ + \sum_ {i \in [ n ]} \sum_ {(j, k) \in \mathcal {E}} 4 \gamma \left(\beta_ {i} - \gamma d _ {i}\right) \operatorname {C o v} \left[ z _ {i}, z _ {j} z _ {k} \right] \tag {31} \\ + \sum_ {(i, j) \in \mathcal {E}} \sum_ {(k, l) \in \mathcal {E}} 4 \gamma^ {2} \operatorname {C o v} \left[ z _ {i} z _ {j}, z _ {k} z _ {l} \right]) \\ \end{array}
$$
then we write it as matrix form with cluster-level treatment vector  $t$ ,
$$
\hat {\tau} = \frac {2}{n} \left(\boldsymbol {h} ^ {T} t + 2 \gamma t ^ {T} \boldsymbol {C} t\right) \tag {32}
$$
and expand the variance as covariance, we get the desired format
$$
\begin{array}{l} \operatorname {V a r} [ \hat {\tau} ] = \frac {4}{n ^ {2}} \left(\operatorname {t r a c e} \left(\boldsymbol {h} \boldsymbol {h} ^ {T} \operatorname {C o v} [ \boldsymbol {t} ]\right) + 4 \gamma \operatorname {C o v} \left[ \boldsymbol {h} ^ {T} \boldsymbol {t}, \boldsymbol {t} ^ {T} \boldsymbol {C t} \right] \right. \tag {33} \\ + 4 \gamma^ {2} \operatorname {V a r} [ \boldsymbol {t} ^ {T} \boldsymbol {C} \boldsymbol {t}) ] \\ \end{array}
$$
Firstly we consider the estimator of matrix form again
$$
\hat {\tau} = \frac {2}{n} \left(\boldsymbol {h} ^ {T} t + 2 \gamma t ^ {T} \boldsymbol {C} t\right) \tag {34}
$$
Since our assumption can't guarantee  $\mathbb{E}[\hat{\tau}] > 0$  always hold, we drop the square of expectation term, namely
$$
\operatorname {V a r} [ \hat {\tau} ] = \mathbb {E} [ \hat {\tau} ^ {2} ] - \mathbb {E} [ \hat {\tau} ] ^ {2} \leq \mathbb {E} [ \hat {\tau} ^ {2} ] \tag {35}
$$
Notice that all elements of matrix  $E[tt^T]$  is non-negative, we have
$$
\boldsymbol {h} ^ {T} \mathbb {E} [ t t ^ {T} ] \boldsymbol {h} \leq \omega^ {2} \boldsymbol {d} ^ {T} \mathbb {E} [ t t ^ {T} ] \boldsymbol {d} = \omega^ {2} \operatorname {t r a c e} (\boldsymbol {d} \boldsymbol {d} ^ {T} \mathbb {E} [ t t ^ {T} ]) \tag {36}
$$
Similarly, since all elements of matrix  $C$ , namely,  $C_{ij}$  is also non-negative, we have
$$
\begin{array}{l} \mathbb {E} [ (t ^ {T} C t) ^ {2} ] = \operatorname {t r a c e} (\mathbb {E} [ C t t ^ {T} C t t ^ {T} ]) \\ \leq \operatorname {t r a c e} \left(\mathbb {E} \left[ \boldsymbol {C 1 1} ^ {T} \boldsymbol {C t t} ^ {T} \right] \right. \tag {37} \\ = \operatorname {t r a c e} \left(\boldsymbol {C 1 1} ^ {T} \boldsymbol {C} \mathbb {E} [ t t ^ {T} ]\right) \\ \end{array}
$$
In summary, we have
$$
\begin{array}{l} \operatorname {V a r} [ \hat {\tau} ] \leq \mathbb {E} [ \hat {\tau} ^ {2} ] \\ \leq \frac {8}{n ^ {2}} \left(\boldsymbol {h} ^ {T} \mathbb {E} \left[ t t ^ {T} \right] \boldsymbol {h} + 4 \gamma^ {2} \mathbb {E} \left[ \left(t ^ {T} \boldsymbol {C} t\right) ^ {2} \right]\right) \tag {38} \\ \leq \frac {8 \gamma^ {2}}{n ^ {2}} \left(\omega^ {2} \operatorname {t r a c e} \left(\boldsymbol {d} \boldsymbol {d} ^ {T} \mathbb {E} [ t t ^ {T} ]\right) + 4 \operatorname {t r a c e} \left(\boldsymbol {C} \boldsymbol {1 1} ^ {T} \boldsymbol {C} \mathbb {E} [ t t ^ {T} ]\right)\right) \\ \end{array}
$$
$$
C \mathbf {1} = d \tag {39}
$$
Thus the upper bound above is actually
$$
\operatorname {V a r} [ \hat {\tau} ] \leq \frac {8 \gamma^ {2} (\omega^ {2} + 4)}{n ^ {2}} \left(\operatorname {t r a c e} \left(\boldsymbol {d} \boldsymbol {d} ^ {T} \mathbb {E} \left[ t t ^ {T} \right]\right)\right) \tag {40}
$$
At last, plug in following equation.
$$
\mathbb {E} [ t t ^ {T} ] = \operatorname {C o v} [ t ] + \frac {1}{4} \mathbf {1 1} ^ {T} \tag {41}
$$
A.4 Proof of Lemma 1
Here we provide an intuitive proof. Utilizing Box-Muller transformation or pure algebraic analysis are also feasible.
We consider  $X$  and  $Y$  is generated from multivariate Gaussian distribution,
$$
X = \langle x, g \rangle \quad Y = \langle y, g \rangle \tag {42}
$$
where  $g\sim \mathcal{N}(0,I_n)$  and  $x,y$  are two  $n$  -dim real vectors. Then we know that
$$
\operatorname {C o v} [ X, Y ] = \langle x, y \rangle \tag {43}
$$
$$
\mathbb {E} [ \operatorname {s g n} (X) ] = 0 \quad \mathbb {E} [ \operatorname {s g n} (Y) ] = 0 \tag {44}
$$
$$
\operatorname {C o v} [ \operatorname {s g n} (X), \operatorname {s g n} (Y) ] = \mathbb {E} [ \operatorname {s g n} (X) \operatorname {s g n} (Y) ] \tag {45}
$$
Then we think geometrically that  $\operatorname{sgn}(\langle x, g \rangle) \operatorname{sgn}(\langle y, g \rangle) > 0$  holds iff.  $g$  lies above or below both of the hyperplanes that is orthogonal to  $x$  and  $y$  respectively.
Notice that the direction of  $g$  is uniform, it follows that
$$
\mathbb {P} (\operatorname {s g n} (\langle x, g \rangle) \operatorname {s g n} (\langle y, g \rangle) > 0) = \frac {2}{2 \pi} (\pi - \operatorname {a r c c o s} (\langle x, y \rangle) \tag {46}
$$
Now we put things together