{'fraction_non_alphanumeric': 0.0318993486390767, 'fraction_numerical': 0.016791737870569878, 'mean_word_length': 4.659938323521167, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 2, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Detecting Treatment Interference under the K-Nearest-Neighbors Interference Model

We propose a model of treatment interference where the response of a unit depends only on its treatment status and the statuses of units within its K-neighborhood. Current methods for detecting interference include carefully designed randomized experiments and conditional randomization tests on a set of focal units. We give guidance on how to choose focal units under this model of interference. We then conduct a simulation study to evaluate the efficacy of existing methods for detecting network interference. We show that this choice of focal units leads to powerful tests of treatment interference which outperform current experimental methods.


Introduction
Randomized experiments have long been viewed as the gold standard for causal inference. In epidemiology, researchers may want to study the effect of vaccines on a target population to protect individuals who are at risk of an infectious disease. Technology companies such as Google, Amazon, Facebook, LinkedIn, Netflix, Twitter, and many others run online randomized controlled experiments to evaluate the effect of a new feature or product on user engagement. However, in such settings, units under study may interact with each other; for example, a user assigned a new feature may interact with one not assigned the feature, thereby impacting the response of the latter user. This interaction poses challenges in estimating and inferring treatment effects under traditional causal inference methodologies.
In particular, a fundamental assumption in the traditional causal inference framework is that there is only a single version of each treatment status and the response of a unit is unaffected by the treatment status of any other unit (see Imbens and Rubin (Imbens and Rubin, 2015) for a review). This is known as the stable unit treatment value assumption (SUTVA) (Rubin, 1980). SUTVA is violated under settings in which there is treatment interference-that is, when a treatment assigned to a unit affects the response of other units. Effects on response due to treatment interference are also known as spillover, peer influence, social interaction, or network effects.
The dependence of a unit's outcome on other units' exposures or treatments poses statistical challenges because the potential outcome of a unit-the hypothetical outcome of a unit given a realized treatment assignment-is not only affected by its own treatment status but also by the treatment conditions received by other units. In some settings, interference can be considered as a nuisance and researchers may control for it to reduce the bias by designing experiments in such a way that treatment effects do not interfere. Although these designs may minimize the effect of interference, such designs are not always possible. On the other hand, in other settings, estimating the causal effect in the presence of interference is of interest itself. Examples of this include studies on the efficacy of vaccines in which vaccinated and non-vaccinated members of a population interact with each other and researchers are interested in overall infection rates. Under these latter settings, considerable work has been devoted to the development of reasonable models of interference in order to ensure identification of both the direct effect of treatment and the effect of treatment spillover on the response (Aronow and Samii, 2017;Forastiere et al., 2020;Manski, 2013;Sussman and Airoldi, 2017;Toulis and Kao, 2013).
In this paper, we introduce a model of treatment interference called the K-nearest neighbors interference model (KNNIM). Under KNNIM, the response of a unit is affected only by the treatment given to that unit and the treatment statuses of its K nearest neighbors (KNN). Such models of interference may be reasonable, for example, under social network settings, where only a few of the observable potential interactions (e.g. accounts that a Twitter user follows) may be influential on a unit's response, and the strength of interaction may be measured by the amount of engagement between users.
We then perform a simulation study to determine how existing methods, and one newly developed method, for detecting treatment interference perform under data generated under a KNNIM model. While these methods were originally developed to detect arbitrary interference (Aronow, 2012;Athey et al., 2018;Basse et al., 2019;Pouget-Abadie et al., 2019;Saveski et al., 2017), it is reasonable to assume that the efficacy of these methods may vary depending on the structure of interference. However, little work has been done to assess how these methods perform under various interference models. We repeatedly simulate data under a KNNIM model and apply these methods to the simulated data. We then assess the power of these methods to successfully detect treatment interference when it is present and their likelihood of concluding insignificant interference when it is omitted. Results suggest that methods which incorporate structured selection of focal units (Aronow, 2012;Athey et al., 2018) tend to perform reasonably well on this type of data.
The rest of this paper is organized as follows. An overview on causal inference under interference is presented in Section 2. The K-nearest neighbors interference model is introduced in Section 3. We discuss the application of conditional randomization inference on non-sharp hypothesis in Section 4. An algorithm on the selection of the focal units is provided in Section 5. Section 6 gives a summary of current methods of detecting interference. Our proposed test statistic is given in Section 7. Section 8 evaluates current methods as well as our test under KNNIM model through a simulation. Results are discussed in Section 9. We conclude in Section 10.

Background and Related Work
The Neyman-Rubin Causal Model (NRCM) is a popular model of response in causal inference (Holland, 1986;Imbens and Rubin, 2015;Rubin, 1980;Splawa-Neyman et al., 1990). Consider a simple experiment on N units, numbered 1, . . . , N , where all units are given either a treatment or a control condition. The NRCM assumes that the response of unit i, denoted Y i follows the model Here, y i (W i ) is the potential outcome under treatment status W i ∈ {0, 1}-the hypothetical response of unit i had that unit received treatment status W i -and W i is a treatment indicator: W i = 1 if unit i receives treatment and W i = 0 if unit i receives control. Inherent in this model is the no interference assumption or stable unit treatment value assumption (SUTVA). This assumption states that there is only a single version of each treatment status and that a unit's outcome is only affected by its own treatment status and is not affected by the treatment status of any other unit (Cox, 1958;Rubin, 1980). In many settings, SUTVA is not plausible, and considerable work has been performed on analyzing causal effects when SUTVA is violated. Sobel (2006) showed that violating SUTVA can lead to wrong conclusions about the effectiveness of the treatment of interest. Forastiere et al. (2020) derive bias formulas for the treatment effect when SUTVA is wrongly assumed and show that the bias that is due to the presence of interference is proportional to the level of interference and the relationship between the individual and the neighborhood treatments.
When interference is present, the effect of a treatment on a unit may occur through direct application of the treatment to that unit, indirectly through application of treatment to units that interact with the original unit, or both (Hudgens and Halloran, 2008). We can extend the potential outcomes framework to account for both direct and indirect treatment components. Let y i (W) = y i (W i , W −i ) denote the potential outcome of unit i under treatment allocation W ∈ {0, 1} N , where unit i is given treatment W i , and the remaining treatment statuses are allocated according to where 1(W * = W) is an indicator variable that is equal to 1 if and only if the observed treatment status W * = W. The average direct effect τ dir is the average difference in a unit's potential outcomes when changing that unit's treatment status and holding all other units' treatment status fixed. It may be defined as where 1 denotes a vector of all 1's. In contrast to direct effect, the average indirect effect τ ind is defined as the average difference in a unit's potential outcome when changing all other treatment statuses from control to treated, holding its own treatment fixed. It can be defined as where 0 denotes a vector of all 0's. The average total effect τ tot measures the average difference in potential outcomes between all units receiving treatment and all units receiving control: Note that these quantities are defined to satisfy τ tot = τ dir + τ ind . Addionally, when SUTVA holds, τ tot = τ dir and τ ind = 0.
There are a variety of strategies for designing and analyzing experiments under treatment interference. One approach is to view interference as a nuisance parameter and to reduce the effect of treatment interference on causal estimates through effective experimental design. This line of work aims to use available information on potential interaction of units to design an experiment that mitigates the effect of this interaction. Often, this is done through forming clusters with high within-cluster interaction and randomizing treatment across clusters rather than individual units (Eckles et al., 2016;Gui et al., 2015;Ugander et al., 2013). However, knowledge of the interaction network may not necessary to make progress on this problem- Sävje et al. (2021) investigate methods for consistent estimation of treatment effects when the structure of interference is unknown. This approach may not be ideal when indirect effects are of interest to the researcher.
Rather than considering interference as a nuisance, some researchers tend to relax SUTVA and allow for different models of interference, considering interference effect as of primary interest. One significant example of this involves experiments in the efficacy of vaccines where the likelihood of a person contracting an infectious disease depends on others in the same population who are vaccinated (Halloran and Struchiner, 1995;Hudgens and Halloran, 2008;Ross, 1916). Under this setting, interference is allowed within groups but not across groups-this is referred to as a partial interference assumption (Sobel, 2006), i.e., SUTVA is assumed between groups (Basse and Feller, 2018;Hudgens and Halloran, 2008;Offer-Westort and Dimmery, 2021;Rosenbaum, 2007;Sobel, 2006;Tchetgen and VanderWeele, 2012).
A similar approach to partial interference assumes that treatment interference on a unit can only occur within a small closed neighborhood of that unit (Sussman and Airoldi, 2017)the K-nearest-neighbors interference model (KNNIM) introduced in this paper is a variant of this setting. Another common approach is to assume that the treatment condition can only "spill over" and affect the response of a control unit if a certain number or fraction of potential interactors of that unit receive treatment (Gui et al., 2015;Toulis and Kao, 2013). Finally, in its least restrictive form, Aronow and Samii (2017) consider the use of Horvitz-Thompson estimators for estimating treatment effects under arbitrary forms of interference.
Another research direction focuses on the development of hypothesis tests to detect the presence of treatment interference in an experiment. Aronow (2012) introduces a framework for conditional randomization tests for detecting treatment interference. Athey et al. (2018) extend this approach to develop tests for more general forms of treatment interference. Basse et al. (2019) build on this work and consider the validity of the test by conditioning on observed treatment assignment of the subset of units who received an exposure of interest. Saveski et al. (2017) and Pouget-Abadie et al. (2019) develop an experimental framework to simultaneously estimate treatment effects and test whether treatment interference is present within an experiment.

K-Nearest Neighbors Interference Model
Treatment interference models range between assuming no exposure to other units' treatmentswhich is the case for traditional randomized experiments with Neyman-Rubin causal model under SUTVA-and structured interference models. For models allowing arbitrary interference, each unit will have a unique type of exposure depending on the treatment assignment for all N individuals. This results in distinct 2 N potential outcomes for each unit and N 2 N potential outcomes for the experimental population where we only observe N of these potential outcomes. Under the latter exposure, there would be no meaningful way to analyze the experiment so that researchers focus on structured or limited interference.
To make progress on treatment interference problems, researchers make assumptions between those of SUTVA and arbitrary interference models that restrict the extent of interference allowed (Aronow and Samii, 2017;Sussman and Airoldi, 2017;Toulis and Kao, 2013;Ugander et al., 2013). However, most models in previous work only specify that the units' outcomes are affected by the number/fraction of treated neighbors, but do not specify which neighbors impact unit response and how they affect the response.
We now propose an interference model where we restrict the interference of treatment on a unit i to its K-nearest neighbors. This allows different neighbors to contribute different effects depending on the proximity of the relationship-neighbors that are close to unit i are more likely to have their treatment status affect the response of unit i. This model restrict the number of potential outcomes to be 2 K+1 for each unit.
We view units under study as a mathematical graph. Let G = (V, E) be a directed graph of V = N vertices; each vertex i ∈ V corresponds to a unit under study. An edge ij ∈ E denotes potential interaction between units i and j. These interactions between units can be defined by any type of relationship, for example, membership to the same group, friendship in social media, geographic proximity, etc. (Forastiere et al., 2020). For ease of exposition, we assume that the degree of each vertex i is at least K. Throughout this article, the terms vertex, unit, and individual will be used interchangeably.
where there is an edge from unit j to i and A ij = 0 otherwise. Since G has no self-loops, the diagonal elements of the adjacency matrix, A ii = 0.
Let d(i, j) denote an interaction or dissimilarity measure between units i and j. In the context of treatment interference, smaller values of d(i, j) indicate stronger interactions between units i and j. We assume, for now, that d(i, j) is only computed for units i, j with A ij = 1. Let d(i, (j)) denote the jth smallest value of {d(i, j), j = i}; that is, d(i, (1)) < d(i, (2)) < · · · . For ease of exposition, we assume that all values of d(i, j) are unique (in practice, ties may be broken arbitrarily). The K-neighborhood of unit i, denoted N iK , is the set of the K "closest" units to unit i: Recall that W i is a treatment indicator for unit i, and let W = (W 1 , W 2 , . . . , W N ) = {W i , W N iK , W N −iK } denote treatment assignment vector for all units N . Also recall that Y i is the outcome measured on the unit i. Each unit's potential outcome y i (W) is defined as a function of the entire assignment vector of units to the two treatment conditions W ∈ {0, 1} N . Now we give the following assumption that defines the K-nearest neighbors interference model: . For each unit i in a network G and for all treatment assignments W N −iK , W N −iK , the potential outcomes satisfy K-Neighborhood Interference Assumption if Assumption 1 states that the potential outcome of unit i is only affected by its treatment and by the treatments assigned to its K-nearest neighbors. Changing treatments for other units outside the K-neighborhood will not affect the potential outcome of unit i. This is a special case of the neighborhood interference assumption (NIA) described in Sussman and Airoldi (2017). In its most general form, the K-nearest neighbors interference model (KNNIM) assumes only that the treatment interference structure satisfies Assumption 1. For convenience, we will suppress the treatment statuses in W N −iK when referring to the potential outcomes y i .

Randomization Inference for Detecting Interference
We now describe the framework for randomization inference for testing the presence of treatment interference under KNNIM. Recall that W is the treatment assignment vector and y i (W) is the potential outcome of unit i under treatment W. Let T = T (W, y(W)) denote a test statistic-a random variable where the source of randomness follows from the dependence on the random treatment assignment W. Let W obs and Y obs = Y(W obs ) denote the observed treatment assignment vector and the observed outcome vector, respectively. Let T obs = T (W obs , Y obs ) denote the observed value of the test statistic. We aim to test the null hypothesis of no treatment interference for each unit (1) Typically, randomization tests under the potential outcome framework assume a sharp null hypothesis of no unit-level treatment effects, and potential outcomes are able to be inferred under this sharp null across randomizations (Fisher, 1925). However, since the hypothesis (1) does not make assumptions about direct effect of treatment on each unit, the potential outcome y i (W i , W N iK ) may not be imputable for randomizations under which W i = W obs i . Progress can be made by conditioning on a set of randomizations Ω and choosing a test statistic T such that T is imputable under randomizations in Ω (Basse et al., 2019). Afterward, a conditional p-value is obtained by computing, for example, the fraction of randomizations W ∈ Ω such that Following Aronow (2012) and Athey et al. (2018), this conditional randomization inference can be performed by first selecting a subset of units under study called focal units and to only consider randomizations of treatment W that do not affect the treatment status of the focal units. Only variant units-those that are not focal units-can have differing treatment statuses across randomizations. In other words, we simulate draws from the random treatment assignment vectors conditional on the fixed treatment of the focal units. Thus, the null hypothesis of no interference is sharp on the focal units since only treatment statuses of variant units-only those units that can impose indirect effects-are randomized. The test statistic T is only computed on the outcomes of the focal units and hence, the test statistic is imputable under alternative treatment assignment vectors.

Selection of the Focal Units
Although the choice of the focal units does not affect the validity of the test, it plays a key role for the power of the test (Athey et al., 2018). Aronow (2012) provides a restriction on the size of the focal set when the selection on the focal units is random with a binary treatment conditions. Athey et al. (2018) provide different methods of choosing the focal units and found that systematic ways perform better than random selection of the focal units. Basse et al. (2019) build on this work and provide a conditioning framework that consider the validity of the test by conditioning on observed treatment assignment of the focal units who received an exposure that contributes more to the hypothesis of interest.
Under KNNIM, we suggest choosing focal units in a way such that the K-neighborhoods of the focal units do not overlap. This will enable us to remove dependencies between outcomes of focal units induced by indirect effects. Additionally, a substantial fraction of focal units may still be selected under this condition, increasing the power of the the randomization inference.
Such a selection can be performed as follows. Define the K-nearest neighbors adjacency graph G KN N = (V, E KN N ) to be the undirected graph with an edge ij ∈ E KN N if and only if j ∈ N iK or i ∈ N jK , and second power of , as the graph that contains an edge ik ∈ E 2 KN N if and only if there is a path of two edges or fewer in E KN N joining i and k. Focal units can then be selected by choosing a maximal independent set of units F within G 2 KN N ; that is, all units in F are independent of each other in G 2 KN N , and the addition of any other unit i ∈ V \ F into F will add dependencies (Higgins et al., 2016).
Selection of a maximal independent set of focal units in G 2 KN N may be performed as follows (Higgins et al., 2016).
Algorithm 1. Given a K-nearest neighbors adjacency graph G KN N = (V, E KN N ), the following algorithm will select a maximal independent set of focal units within G 2 KN N .

1.
Step 1: (Initialize) Let U = V. Initialize the set of focal units F = ∅. Initialize the set of variant units I = ∅.

2.
Step 2: (Select focal unit) While |U| > 0, choose one vertex i ∈ U at random. Set i as a focal unit: i ∈ F.

3.
Step 3: (Find nearest neighbors) Set I equal to all units j such that ij ∈ E KN N .

4.
Step 4: (Find neighbors of neighbors) Find all units k ∈ V \ I such that, for some unit j ∈ I, jk ∈ G 2 KN N . Set these units k ∈ I.

5.
Step 5: (Remove units) Remove all vertices in F and I from U.

Test Statistics for Randomization Tests
Aronow (2012) introduced the randomization inference approach for testing for interference between units, where units are affected by their own treatment and by the treatment assigned to their immediate neighbors. In this test, the treatment status for a subset of focal units remains fixed; the rest of the units are the variant subset. The randomization inference is conditional on the observed treatment status of the fixed subset. That is, this test is on indirect effects resulting from the variation of the treatment status for the variant subset of units. A variety of test statistics may be used under this framework. Differences in the statistic across randomizations must be resulting from the variation of the treatment status of the variant units. The Pearson correlation coefficient ρ between the outcomes of the fixed units (Y F ) and the "distance" to the nearest unit of a particular treatment status in the variant subset (D nearest ) may be used as the test statistic: A common choice of distance is the Euclidean distance between pretreatment covariates. This distance can be incorporated into the KNNIM framework through the dissimilarity measure d. Aronow (2012) advocates for computing Pearson correlation coefficient on the ranks of these quantities; however, preliminary simulations suggest that the statistic ρ tends to be more powerful for the models considered in Section 8. Athey et al. (2018) extend this work and develop tests for more general realizations of interference (e.g. no higher-order interference). As part of this work, they suggest additional test statistics for detecting interference. The edge-level contrast statistic T elc -a modification of a test statistic proposed by Bond et al. (2012)-is the difference between the average outcomes of the focal units with treated neighbors and the focal units with control neighbors. Here, T elc averages over edges ij where i is a focal unit and j is not a focal unit: where F i is an indicator variable satisfying F i = 1 if and only if i ∈ F. A second test statistic is the score test statistic T score (Athey et al., 2018). This statistic is motivated by a model of treatment interference in which the indirect effect is proportional to the fraction of treated neighbors (Manski, 1993(Manski, , 2013. The score test begins by computing for each focal unit i ∈ F, whereȲ obs F,1 andȲ obs F,0 are the average outcome for the treated and control focal units respectively. Then, T score is the covariance between these r i terms and N j=1 A ij W j -the fraction of treated neighbors for unit i. This statistic is computed across only focal units that have at least one treated neighbor: Finally, Athey et al. (2018) consider the has-treated-neighbor test statistic T htn , a modification of Pearson correlation coefficient (2). Instead of using the distance to the nearest treated neighbor, this statistic uses a indicator variable E i for whether any of a unit's neighbors in the variant subset are treated: that is, E i = 1 if and only if j A ij W j (1 − F j ) > 0. Then T htn is the correlation between this indicator and the outcomes for the focal units F.
whereȲ obs F and S Y obs F are the sample mean and standard deviation of the outcomes for focal units respectively and S E is the sample standard deviation of the E i variables. Saveski et al. (2017) and Pouget-Abadie et al. (2019) present a two-stage experimental design to test for the presence of interference. In this design, the units under study are divided into two groups and two experiments are performed simultaneously: for one group, treatment is assigned completely at random, and for another group, units are clustered and treatment is assigned across clusters rather than units. Then, estimates of the average direct effect are computed under the assumption of no interference for both the completely randomized and cluster randomized designs. Finally, a standardized difference T exp is computed between these estimates:

Experimental Design Approach
whereτ cr andτ cbr are the estimates of the direct effect under the completely randomized and cluster randomized designs respectively andσ p is a pooled standard deviation of responses from both the completely randomized and cluster randomized designs (Saveski et al., 2017). Large values of T exp imply the presence of indirect effects. A conservative test of the null hypothesis of no treatment interference can be performed at the α significance level by rejecting the null hypothesis if and only if T exp ≥ α −1/2 . Additionally, as the number of units n → ∞, it can be shown that T exp converges to a standard normal distribution (provided that cluster sizes remain fixed). Thus, an approximate size α test can be conducted by rejecting the null hypothesis of no interference if T exp ≥ z 1−α/2 , where z 1−α/2 is the 1 − α/2 quantile of the standard normal distribution.

K-Nearest Neighbors Indirect Effect Test Statistic
We now propose an additional test statistic designed to detect K-nearest neighbors indirect effects. Let Y obs (W i , W =W j ) denote the average response of observed units that are assigned to treatment status W i and have their th nearest neighbor assigned to treatment status W j . The K-nearest neighbors indirect effect test statistic T knn is obtained by computing differences in potential outcomes between focal units that receive the same treatment status but differ on the status of their th nearest neighbor, and summing these differences across each of the K nearest neighbors. That is, for W i ∈ {0, 1} and ∈ {1, . . . , K}, define and define T knn, as a weighted average of these terms: where N F t and N F c are the number of treated focal units and control focal units respectively. We then can define T knn as a sum of these T knn, statistics: Note that, under the null hypothesis of no treatment interference, each of the T knn, (W i ) terms should be close to 0. Thus, since T knn is a linear combination of these terms, values of T knn that are relatively large in magnitude provide evidence against this null hypothesis, and so, |T knn | may be effective as a test statistic. Additionally, note that the statistic T knn, may be used directly for a test of interference stemming from treatments assigned to the th-nearest neighbor.

Simulation
In this Section, we conduct a comparison and evaluate the performance of the methods covered in Section 6 and 7 for testing the null hypothesis of no interference under the Knearest neighbors interference model.

Data Generation Procedure
We generate the responses under the following model which satisfies KNNIM: In this model, we assume that the closest three neighbors affect the response Y i (i.e. K = 3); we use W i to denote the treatment status of the th nearest neighbor of unit i. The covariates X j , j = 1, 2, 3, are independent and identically distributed N ormal(0, 1) random variables. We use the Euclidean distance between the covariates X i and X j as the dissimilarity measure d(i, j)-units with more similar values of covariates are more likely to interact with each other. In the initial generation of data, treatment is completely randomized across all N units, with half of the units receiving treatment and the other half receiving control. Different models are generated through varying the β = (β 1 , β 2 , β 3 , β d ) coefficients and the sample size N . We consider sample sizes of N = 256 and N = 1024.
For each choice of sample size, we consider thirteen different models of interference. We describe these models in Table 1 in terms of the coefficients vector β. The first 3 elements of β represent the indirect effect contributed by first, second, and third-nearest-neighbor respectively. The last element β d is the unit's direct effect. In all models considered, the closer the relationship to unit i, the greater the indirect effect: |β 1 | ≥ |β 2 ≥ |β 3 |. The indirect effects in every set of three models represent the degree of interference starting from no interference in the first 3 models, followed by weak interference in the second three models, moderate interference in the next three models, and finally strong interference in the last four models.
For datasets with N = 256 observations, 1,000 realizations of potential outcomes following each model are generated. Tests of indirect effects are then applied to each of the 1,000 realizations. Results for N = 256 are given in Section 9. Due to computational limitations, only 100 realizations are generated for models containing N = 1024 units. Results for N = 1024 are given in the Supplementary Material.

Simulation for Randomization Tests
We compare the performance of both conditional randomization tests and experimental design approaches for detecting interference. For the conditional randomization tests, for each set of generated potential outcomes, treatment is initially assigned completely at random to units, with half of the units receiving treatment and the other half receiving control. Then, nearest neighbors are identified, focal units are selected according to Algorithm 1. We then proceed with randomization tests as described in Sections 4 and 6.1. We evaluate the performance of the following test statistics: the Pearson correlation coefficient (Pearson) (Aronow,
Test statistics are computed across 1,000 randomizations for each realization of the potential outcomes; for each randomization, treatment statuses are fixed for focal units and are completely randomized across variant units. For each generated dataset and each choice of test statistic, we obtain a p-value for the null hypothesis of no treatment interference. Thus, for N = 256, we obtain a distribution of 1,000 p-values for each test statistic under each model. The power of the tests can also be estimated by computing the fraction of p-values that fall beneath a pre-specified significance level α.

Simulation for Experimental Design Approach
In addition, we follow the experimental design in Saveski et al. (2017) (described in Section 6.2) to determine its efficacy for testing whether SUTVA holds under KNNIM. For each set of generated potential outcomes, we divide the units into clusters of four units using a heuristic algorithm for the clique partitioning problem with minimum clique size requirement from Ji (2004) (Algorithm 4). This clustering is performed once per dataset.
We then randomly select half of the clusters to be cluster randomized; for this group, treatment is assigned at the cluster level, with half of the clusters receiving treatment and the other half receiving control. For units belonging to the remaining clusters, each unit's cluster assignment is ignored, and treatment is completely randomized across all remaining units. Again, half of these units receive treatment and the other half receive control. For each dataset, the random selection of clusters and the treatment randomization is performed 1,000 times.
For each randomization, the statistic T exp in (3) is computed. We then perform a test of the null hypothesis of no treatment interaction at the α = 0.05 significance level. A conservative test rejects this null hypothesis if T exp ≥ α −1/2 and an asymptotic test rejects the null if T exp ≥ z 1−α/2 . Thus, for N = 256, we perform a total of 1,000,000 tests: that is, 1,000 tests for each of the 1,000 generated potential outcomes. By computing the fraction of rejected null hypotheses, we are able to assess the Type I Error (Models 1-3) and the power (Models 4-13) of the experimental design approach. Figure 1 provides a visual comparison of the distribution of p-values for randomization tests to detect interference under KNNIM. Table 2 provides the estimated Type I Error and power of these tests (conducted at significance level α = 0.05) across the 13 considered models. As is expected by design (Higgins, 2004), the p-values of all randomization tests under models without treatment interference (Models 1-3) are approximately distributed uniformly between 0 and 1. Under weak interference (Models 4-6), the ELC, Score, and KNN tests seem to outperform the Pearson and the HTN tests; the p-values are smaller overall for these three tests. Similar trends hold under moderate interference (Models 7-9) and strong interference (Models 10-13). In particular, under strong interference, Score, KNN, and ELC tests have near 100% power to detect treatment interference.

Discussion
However, the ELC, Pearson, and HTN tests seem to have some difficulty with detecting indirect effects when direct effects become large. For example, the p-values for these three tests under Models 6 and 9-models that have comparatively larger direct effects-are substantially larger than under Models 4 and 5 and Models 7 and 8 respectively. The Score and KNN tests do not suffer from this loss of power as direct effects increase. For example, for Model 6, the Score and KNN tests have an estimated power of 0.916 and 0.849 respectively where the ELC, Pearson and HTN tests have an estimated power of 0.693, 0.407, and 0.367 respectively. Thus, for the considered tests, the Score and KNN tests (in that order) seem to have the best combination of power in detecting treatment effects and isolating indirect effects in the presence of direct effects. Similar comparisons between the methods hold for datasets with N = 1024 and/or when focal units are selected from only one treatment condition (see the Supplementary Material for details). Figure 2 gives box plots of the estimated rejection rate across all 1,000 generated potential outcomes for both the conservative and asymptotic tests using the experimental design method (Pouget-Abadie et al., 2019;Saveski et al., 2017) with N = 256 and significance level α = 0.05. This plot also shows the estimated power of the considered randomization tests under these 13 models. Table 2 includes the median values of the rejection rates across the 1,000 generated potential outcomes for these tests. The conservative experimental approach appears to lead to a very conservative test; the true Type I Error is much smaller than α = 0.05, and the test appears to have weak power under weak and moderate interference. Even under Models 10-13, which exhibit strong interference, the conservative test only has a median power of approximately 0.696.
The asymptotic test yields much more desirable results for our simulated data. Overall, the Type I Error seems quite close to the nominal α = 0.05. The asymptotic test outperforms the Pearson and HTN randomization tests for almost all models of interference, and has a     Figure 2: Boxplots of the estimated rejection rates under the experimental design approach for both the conservative and asymptotic tests of the null hypothesis of no treatment interference under various KNNIM models. Plots also contain the estimated Type I Error (Models 1-3) and power (Models 4-13) for the Pearson test (Pearson), edge level contrast test (ELC), score test (Score), has treated neighbor test (HTN) and K-nearest neighbors indirect effect tests (KNN). We use N = 256 units and K = 3 nearest neighbors. The rejection rates are estimated using 1,000 treatment assignments for each of the 1,000 generated potential outcomes. Tests are performed at significance level α = 0.05. . Estimates of the median rejection rates under the experimental design approach for both the conservative (Cons) and asymptotic (Asymp) tests are also provided. We use N = 256 units and K = 3 nearest neighbors. These values are estimated using 1,000 generated potential outcomes with 1,000 treatment assignments performed on each set of potential outcomes. Tests are performed at significance level α = 0.05.

Conservative Rejection Rate
power close to 1 of detecting interference under Models 10-13. However, the power of the asymptotic test still is behind that of the Score, KNN, ELC tests across all models.
When we increase the sample size to N = 1024, the conservative approach seems to be powerful for moderate and strong interference while the asymptotic approach is powerful for all interference models. However, both approaches remain comparatively less powerful than the Score, KNN, and ELC randomization tests (see the Supplementary Materials for details).
We consider a new model of treatment interference-the K-nearest-neighbors interference model (KNNIM)-in which the treatment status of a unit i affects the response of a unit j only if i is one of j's K closest neighbors. We give advice for selecting focal units for conditional randomization tests for detecting interference under KNNIM, and suggest a new test-statistic-the K-nearest neighbors indirect effect test statistic (KNN)-for these randomization tests. We then perform a simulation study to compare the efficacy of both the randomization tests and experimental design approach for detecting interference under KNNIM.
Results suggest that randomization tests that incorporate our proposed selection of focal units tend to perform reasonably well on data satisfying KNNIM. Additionally, randomization tests using the score and KNN test statistics tended to be most powerful for detecting interference, especially when direct effects are permitted to grow large relative to the indirect effects.

Different KNN Interference Models
Asymptotic Reject Null Figure 6: Boxplots of the estimated rejection rates under the experimental design approach for both the conservative and asymptotic tests of the null hypothesis of no treatment interference under various KNNIM models. We use N = 256 units and K = 3 nearest neighbors. The rejection rates are estimated using 1,000 treatment assignments for each of the 1,000 generated potential outcomes. Tests are performed at significance level α = 0.05.  Figure 7: Boxplots of the estimated rejection rates under the experimental design approach for both the conservative and asymptotic tests of the null hypothesis of no treatment interference under various KNNIM models. We use N = 1024 units and K = 3 nearest neighbors. The rejection rates are estimated using 1,000 treatment assignments for each of the 100 generated potential outcomes. Tests are performed at significance level α = 0.05.   Figure 8: Boxplots of the estimated rejection rates under the experimental design approach for both the conservative and asymptotic tests of the null hypothesis of no treatment interference under various KNNIM models. Plots also contain the estimated Type I Error (Models 1-3) and power (Models 4-13) for the Pearson test (Pearson), edge level contrast test (ELC), score test (Score), has treated neighbor test (HTN) and K-nearest neighbors indirect effect tests (KNN). We use N = 1024 units and K = 3 nearest neighbors. The rejection rates are estimated using 1,000 treatment assignments for each of the 100 generated potential outcomes. Tests are performed at significance level α = 0.05.