  Two-sample tests utilizing a similarity graph on observations are useful for
high-dimensional and non-Euclidean data due to their flexibility and good
performance under a wide range of alternatives. Existing works mainly focused
on sparse graphs, such as graphs with the number of edges in the order of the
number of observations, and their asymptotic results imposed strong conditions
on the graph that can easily be violated by commonly constructed graphs they
suggested. Moreover, the graph-based tests have better performance with denser
graphs under many settings. In this work, we establish the theoretical ground
for graph-based tests with graphs ranging from those recommended in current
literature to much denser ones.
