Frequency Bias in Neural Networks for Input of Non-Uniform Density
Ronen Basri, Meirav Galun, Amnon Geifman, David Jacobs, Yoni Kasten, Shira Kritchman
Introduction
A key question in understanding the success of neural networks is: what makes over-parameterized networks generalize so well, avoiding solutions that overfit the training data? In search of an explanation, a number of recent papers (Farnia et al., 2018; Rahaman et al., 2019; Xu et al., 2019) have suggested that training with gradient descent (GD) (as well as SGD) yields a frequency bias – in early epochs training a neural net yields a low frequency fit to the target function, while high frequencies are learned only in later epochs, if they are needed to fit the data (see Figure 1(top)).
This frequency bias has been carefully analyzed in the case of over-parameterized, two-layer networks with Rectified Linear Unit (ReLU) activation, when only the first layer is trained. The dynamics of GD in this case was shown to match the dynamics of GD for the corresponding Neural Tangent Kernel (NTK) (Arora et al., 2019b; Du et al., 2019; Jacot et al., 2018). Assuming the training data is distributed uniformly on a hypersphere, the NTK matrix forms a convolution on the sphere. Its eigenvectors consist of the spherical harmonic functions (Basri et al., 2019; Xie et al., 2017), and its eigenvalues shrink monotonically with frequency, yielding longer convergence times for high frequency components. Specifically, for training data on the circle, high frequencies are learned quadratically slower than low frequencies, and this frequency-dependent gap increases exponentially with dimension (Basri et al., 2019; Bietti & Mairal, 2019; Cao et al., 2019).
All this previous work assumed that training data is distributed uniformly. However, realistic training datasets are distributed with a non-uniform density. A natural question therefore is to what extent frequency bias is exhibited for such datasets? Below we provide evidence that frequency bias interacts with density. We show that in any region of the input space with locally constant density, low frequencies are still learned much faster than high frequencies, but the rate of learning also depends linearly on the density. This phenomenon is demonstrated in Figure 1(bottom).
Our paper contains both theoretical and empirical results. We first focus on analyzing the NTK model for two-layer networks with ReLU activation and 2D input, normalized to lie on the unit circle, allowing for input drawn from a non-uniform density that is piecewise constant. For this model we derive closed form expressions for its eigenfunctions and eigenvalues. These eigenfunctions contain functions of piecewise constant local frequency, with higher frequencies where the density of the training data is higher. This implies that we learn high frequency components of a target function faster in regions of higher density. This also allows us to prove that a pure 1-dimensional sine function of frequency is learned in time , where denotes the minimum density in the input space. Our experiments illustrate these results and further suggest that for input on a -dimensional hypersphere, spherical harmonics are learned in time .
We next examine the NTK for deep, fully connected (FC) networks. We first prove that given a target function , training networks of finite width with GD converges to at a speed that depends on the projection of over the eigenvectors of the NTK, extending previous results proved for two-layer networks (Arora et al., 2019b; Cao et al., 2019). We further show that for uniform data the eigenfunctions of NTK consist of the spherical harmonics. We complement these observations with several empirical findings. (1) We show that for uniformly distributed data the eigenvalues decay with frequency, suggesting that frequency bias exists also in deep FC networks. Moreover, similar to two-layer networks, a pure harmonic function of frequency is learned in time asymptotically in . However, deeper networks appear to learn frequencies of lower faster than shallow ones. (2) For training data drawn from non-uniform densities the eigenfunctions of NTK appear indistinguishable from those obtained for two-layer networks, indicating that with deep nets learning a harmonic of frequency should also require iterations.
Our results have several implications. First, we extend results that have been proven for training data with a uniform density to the more realistic case of non-uniform density, also extending results for shallow networks to deep, fully connected networks. These results support the idea that real neural networks have a frequency bias that can explain their ability to avoid overfitting. Second, while it is not surprising that networks fit functions of all frequencies more slowly in regions with low data density, we demonstrate that this is the case and quantify this effect. Our results have an interesting implication for training that uses early stopping to regularize the solution. Suppose the signal one wishes to fit is low frequency, and it is corrupted by high frequency noise. Because a network learns low frequency signals more slowly in regions of low density, by the time the signal is learned in these regions, the network will also have learned high frequency components of the noise in regions of high density. This is illustrated in Figure 1(bottom).
Motivating example: Target function made of low frequency + high frequency noise (of small amplitude). Data is composed, say, of two constant densities. Show fit at different epochs. Essentially we want to show that network cannot fit the low frequency in all space at any given time. i.e. to get the low frequency at the sparse part you already fit the noise in the dense part [Ronen: Should we show in contrast that this is possible with uniform density? Maybe not..]
2 layers, NTK: the eigenfunctions obtained for a certain density. Also for 2D data.
2 layers, NTK: a plot of the eigenvalues + normalized by Z to show they all coincide.. Also for 2D data.
2 layers network: convergence times for several densities + normalized so that all parabolas coincide
Inverse linear relation of convergence time and density. Also for 2D data.
Deep NTK: eigenfunctions for uniform and non-uniform densities. (Maybe unnecessary because they are the same as the shallow case, or maybe plot just the ones for a deep net?)
Deep, NTK: exponent as a function of number of layers for 1D, 2D and maybe 3D.
Deep network: actual convergence times for 3, 5 and 7 layers. Show a fit to the previous figure. Also for 2D input.
Eigen functions under the uniform density are spherical harmonics and are ordered according to frequency.
Complexity (exponent) of convergence rate under the uniform density as a function of depth and dimension (graph).
Run experiments to fit this graph (using Yoni’s code).
Non-uniform for deep FC + experiment. Also Resnet?
Verify theory for non-uniform. Are the eigenvalues identical to the uniform case?
Probably not in this round: NTK for Resnet
Prior work
Many recent papers attempt to explain the generalization ability of overparameterized nets. Perhaps the most convincing relate overparameterized networks to kernel methods. (Jacot et al., 2018) identified a family of kernels, termed Neural Tangent Kernels, and showed that neural networks behave like these kernels, in the limit of infinite widths. Related work investigated variants of these kernels, showing that networks of finite, albeit very large widths converge to zero training error almost always and deriving generalization bounds for such networks. These analyses were applied to two-layer networks (Bach, 2017; Bietti & Mairal, 2019; Du et al., 2019; Vempala & Wilmes, 2018; Xie et al., 2017), multilayer perceptrons (i,e. fully connected), residual and convolutional networks (Allen-Zhu et al., 2018, 2019; Arora et al., 2019a; Huang & Yau, 2019; Lee et al., 2019).
However, these kernel models have been criticised for requiring unrealistically wide networks. Additionally, it is still debated if such linear dynamics (referred to as “lazy training”) fully explain the performance of neural networks. Recent theoretical and empirical results suggest that NTK models still somewhat underperform common nonlinear networks (Arora et al., 2019a; Chizat et al., 2019; Novak et al., 2019; Woodworth et al., 2019).
Other work suggested that networks are biased to learn simple functions, and in particular that GD proceeds by first fitting a low frequency function to the target function, and only fits the higher frequencies in later epochs (Rahaman et al., 2019; Xu et al., 2019; Farnia et al., 2018). Additional work (Bach, 2017; Basri et al., 2019; Bietti & Mairal, 2019; Cao et al., 2019) proved the existence of frequency bias in NTK models of two-layer networks and derived convergence rates of training as a function of target frequency. All of these works assumed that training data is distributed uniformly. (Canu & Elisseef, 1999) proposed loss functions that allow higher frequency fit in regions where training data is dense, and only low frequency fit in the sparse regions. Our results suggest that such a penalization may be implicitly enforced in NTK models.
Classical work on kernel methods acknowledged the importance of understanding the eigenfunctions and eigenvalues of kernels for non-uniform data distributions, but focused mainly on bounding the difference between the empirical kernel matrix and the theoretical kernel for the given distribution (e.g., (Shawe-Taylor et al., 2005; Williams & Seeger, 2000)). (Liang & Lee, 2013) derived analytic expressions for the eigenfunctions of polynomial kernels. (Goel & Klivans, 2017) investigated the gram matrix of the data distribution and showed that sufficiently fast decay of its eigenvalues allows learnability by neural networks. We are unaware of works that derive analytic expressions for the eigenfunctions of NTK under non-uniform distributions.
Left outs: Papers showing implicit regularization (https://arxiv.org/abs/1810.01075). Convergence results for two-layers (like Arora fine grained) + spherical harmonics for uniform distribution (https://arxiv.org/pdf/1912.01198.pdf) The dynamics of gradient descent bias the model towards simple solutions - initialization separates deep and shallow (https://arxiv.org/pdf/1909.12051.pdf)
Preliminaries
We consider in this work NTK models for fully connected neural networks with rectified linear unit (ReLU) activations. These kernels are defined through the following formula
We first consider a two layer network with bias:
We then consider deep fully-connected networks with layers. For such networks we forgo the bias since our empirical results (Section 5) indicate that they are universal even without bias. These networks are expressed as
For our analysis, to simplify the NTK expressions, in the case of a two-layer network we only train the weights and bias of the first layer (as in (Arora et al., 2019b; Du et al., 2019)). We initialize these weights from a normal distribution . We further initialize from a uniform distribution on and keep those weights fixed. In the case of deep networks we train all the weights, initializing by .
We next provide expressions for the corresponding neural tangent kernels. For a two-layer network with bias where only the first layer weights are trained the corresponding NTK takes the form (Basri et al., 2019)
For a deep FC network the NTK is expressed by the following recursion (Arora et al., 2019a; Jacot et al., 2018)
Here denotes the step function (i.e., the derivative of the ReLU function). The covariance matrices have the form with , and the expectations have the following closed form expressions
The eigenfunctions of NTK for two-layer networks for non-uniform distributions
implying the eigenfunctions exist and is real.
We next parameterize the unit circle by angles, and denote by any two angles. We can therefore express (7) as
where the kernel in (5) expressed in terms of angles reads
Both and are periodic with a period of since lies on the unit circle.
Below we solve (9) and derive an explicit expression for the eigenfunctions . Our derivation assumes that is piecewise constant. While this assumption limits the scope of our solution, empirical results suggest that when changes continuously the eigenfunctions are modulated continuously, consistently with our solution. We summarize:
In other words, over the region , this is a cosine function with frequency proportional to . A plot of eigenfunctions for a piecewise constant distribution is shown in Fig. 3.
The proof of the proposition relies on a lemma, proved in supplementary material, stating that the solution to (9) satisfies the following second order ordinary differential equation (ODE)
In a nutshell, the lemma proved by applying a sequence of six derivatives to (9) with respect to , along with some algebraic manipulations, yielding a sixth order ODE for . Assuming that is piecewise constant simplifies the ODE. Then (13) is obtained by restricting to have a period of , but this restriction can be lifted by preprocessing the data in a straightforward way without changing the function that needs to be learned.
Eq. (13) has the following general solutions
such that the derivative of is , resulting in real eigenfunctions of the form
As with the uniform distribution, due to periodic boundary conditions there is a countable number of eigenvalues, and those can be determined (up to scale) using the known eigenvalues for the uniform case (Basri et al., 2019). With this we obtain
is integer, and there is one eigenfunction for and two eigenfunctions for every . Figure 4 shows a plot of the eigenvalues computed for various densities.
The amplitudes and phase shifts are determined by requiring the eigenfunctions to be continuous and differentiable everywhere. We show in supplementary material that for two neighboring regions, it holds that if then the ratio of the amplitudes is bounded (tightly) for different values of and as follows:
Figure 3 shows the eigenvectors and eigenvalues for an example of a piecewise constant distribution. It can be seen that each eigenfunction consists of a piecewise sine function; i.e., the eigenfunctions in every region where is constant form pure sine functions with frequency that changes from one region to the next. As we inspect eigenfunctions with decreasing eigenvalues we find, as our theory shows (see Figure 3), that the frequencies increase in all regions, but for all eigenfunctions they maintain constant ratios that are equal to the ratios between the square roots of the corresponding densities. Finally, Figure 5 shows the eigenvectors of for a continuous distribution, showing similar behaviour to our analytic expressions.
2 Time to convergence
Proving this theorem is complicated by the fact that (1) the frequency of the target function may not be exactly represented in the eigenfunctions of the kernel, due to the discrete number of eigenfunctions, and (2) the eigenfunctions restricted to any given region are not orthogonal. These two properties may result in non-negligible correlations of with eigenfunctions of yet smaller eigenvalues. Therefore, to prove Theorem 1 we first inspect the projections of onto the eigenfunctions corresponding to such small eigenvalues and prove a bound on this tail. Subsequently we use this bound to prove the convergence rate in the theorem. The proofs are provided in the supplementary material.
In Figure 7 we used the target function for different values of to train a 2-layer network. The data was sampled from a non-uniform distribution with three constant regions of densities . It can be seen that runtime increases for each region in proportion to , and the network converged faster at denser regions (in proportion to ).
3 Higher dimension
Deep networks
We next extend our discussion to NTK models of deep, fully connected networks. We first prove that the eigenvectors of NTK indeed characterize the convergence of GD of highly overparmeterized networks of finite width. We then empirically investigate the eigenvectors and eigenvalues of NTK for data drawn from either uniform or non-uniform distributions and show convergence times for pure sine and harmonic target functions.
We begin by showing that the eigenvectors of NTK characterize the dynamics of overparameterized FC networks of finite width. Our theorem extends Thm. 4.1 in (Arora et al., 2019b) (see also (Cao et al., 2019)), which has dealt with two-layer networks, to deep nets. Consider a FC network of depth and width in each layer, and suppose the network is trained with pairs . Denote the vector of target values by and the network predictions for these values at time by . In our theorem, Thm. 2, we use a slightly different model than the model stated above (3). First, we assume that the first and last layers are initialized and then held fixed throughout training, and the last layer is initialized randomly . The NTK for this training data is summarized in an matrix , whose entries are set to where is defined in (1). Let and respectively denote the eigenvectors of and their corresponding eigenvalues. The next Theorem establishes that the convergence rate of training this deep (finite width) network depends on the decomposition of the target values over the eigenvectors of .
For any and , let , , . Then, with probability of at least over the random initialization after GD iterations we have that
The proof is provided in the supplementary material. Below, we give a brief proof sketch. First, we show that for any number of layers and at any iteration the following relation holds
where and the residual due to the GD steps is relatively small. Then, based on several results due to (Allen-Zhu et al., 2019; Arora et al., 2019a), we show that can be approximated by , yielding, by applying recursion to (23)
where . Next we show that under the setting of , . Finally, by applying the spectral decomposition to we obtain (50).
Finally, for data drawn from a non-uniform distribution the eigenfunctions of NTK for deep networks appear to be indistinguishable from those obtained for two-layer networks. Figure 3 shows a plot of the local frequencies obtained with NTK for a network of depth 10. It can be seen that the local frequencies are identical to those obtained with NTK for a two-layer network. The eigenvalues are similar to those obtained with the uniform density, up to a normalizing scale which depends on the distribution. Similarly to the two-layer case, learning a harmonic function of frequency is therefore expected to require iterations.
Conclusion
The main contribution of our work is to show that insights about neural networks that have been derived with the assumption of uniformly distributed training data also apply, in interesting ways, to more realistic, non-uniform data. Prior work has shown that the Neural Tangent Kernel provides a model of real, overparameterized neural networks that is tractable to analyze and that matches real experiments. Our work shows that NTK has a frequency bias for non-uniform data distributions as well as for uniform ones. This strengthens the case that this frequency bias may play an important role in real neural networks.
We also quantify this frequency bias. We derive an expression for the eigenfunctions of NTK, showing that for piecewise constant data distributions the eigenfunctions consist of piecewise harmonic functions. The frequency of these piecewise functions increases linearly with the square root of the local density of the data. As a consequence, for 1D inputs, networks modeled by NTK learn harmonic functions with a speed that increases quadratically in their frequency and decreases linearly with the local density. Experiments indicate that these results generalize naturally to higher dimensions. These results support the idea that overparameterized networks avoid overfitting because they fit target functions with smooth functions, and are slow to add high frequency components that could overfit.
Acknowledgements
This material is based partly upon work supported by the National Science Foundation under Grant No. DMS1439786 while the authors were in residence at the Institute for Computational and Experimental Research in Mathematics in Providence, RI, during the Computer Vision program. We would like to thank the Quantifying Ensemble Diversity for Robust Machine Learning (QED for RML) program from DARPA for their support of this project.
References
Appendix A Eigenfunctions of NTK for a two layer-network for data drawn from a piecewise constant distribution
Combining Eqs. (9) and (10) in the paper we have
Next, we simplify and rearrange. We omit dependence on , note that and and respectively denote them by and .
Assume next that is constant around and , so its derivatives at these points vanish. Then,
We next make the assumption that has a period of (so ) in which case (i.e., ). These assumptions will be removed later. With these assumptions we have
It can be readily verified that this equation is solved by (25).
Finally, if does not have a period of we can preprocess the data in a straightforward way to make have a period of (by mapping the interval to ) without changing the function that needs to be learned. ∎
Appendix B The amplitudes of the eigenfunctions in different regions
In this section for the NTK of a 2-layer network for which only the first layer is trained we compute bounds on the amplitudes of its eigenfunctions. We first bound the ratios between the amplitudes in two neighboring regions, and use this in the following section to bound the amplitude in any one region.
where . In this part we characterize the amplitudes the different regions for .
We notice that the eigenfunctions appear to be continuous and differentiable. Without loss of generality, assume that the boundary between region to region happens at . Then the eigenfunction in the vicinity of 0 is defined as follows:
These allow us to bound the ratio . We have
On the other hand, from (28) we know that
WLOG assume that then
For a lower bound note that the denominator in (31) satisfies
where the inequality is due to the assumption that . Consequently, . In summary, we have bounded the ratios between the amplitudes of neighboring regions by
We next note that these bounds are tight and are obtained in the following setup. Assume we have an even number of regions of constant density each with equal size. Suppose that in each region the eigenfunction includes an integer number of cycles. For each we construct an eigenfunction, by choosing a phase for , and it holds that the border between region and lies at . As a result, at this point we have
But since each region contains an integer number of cycles we get for
As a result, for each we get one eigenfunction (up to a global scale)
We next construct a second eigenfunction for each . Since there is an integer number of cycles in each region, to keep the second eigenfunction of each orthogonal to the first one, we choose a phase of :
Next, to maintain differentiability, the derivative at the border between regions and must be equal. So at we have for
And we can choose for the second eigenfunction for each (up to a global scale)
In Figure 13 we show an example for this setup.
Assuming is constant in regions and that WLOG up to a global scale, the minimal amplitude is . Then for two neighboring regions and if and if . As a result in each transition between two regions we have
Starting from a minimal amplitude of magnitude . For regions there are no more than transitions so each amplitude is (loosely) bounded as follows
Next we bound the global scale factor. Let . Then we have that after normalizing the global scale factor
To simplify notation we denote the frequency of each region by . Then for we have:
So we get .
As a result all the amplitudes in an eigenfunction of order are bounded by
Appendix C Local convergence rate as a function of frequency
To derive the rate of convergence as a function of frequency and density we assume that forms a piecewise-constant distribution (PCD) with a fixed number of pieces of equal sizes, in , . Our proof will rely on a lemma that states informally that not too many eigenfunctions need to be taken into account for convergence – more precisely, only a number linear in and inversely linear in , where denotes the minimal density. Convergence rate is then determined by the eigenfunction with highest eigenvalue included in the approximation for .
Let be PCD. For any , there exist such that , where and is bound as in (39) below.
Given a target function and a basis function where . (We will assume for now.) Their inner product can be written as
where denotes the local frequency of at . Next, to derive a bound we will restrict our treatment to (and by that bound from below). With this assumption we obtain
Let and let , denotes the frequency associated with the corresponding region (which is the lowest within ). Our requirement that for all implies that , and therefore
where we denote by and the equality on the right is obtained by plugging in the definition of . Note that (since ), implying that , where and is bounded by (36).
Next, for a given we wish to bound the sum by starting from a sufficiently high index , i.e.,
By the definition of , , so
Let be chosen as in Lemma 2 with , i.e.
Using (Arora et al., 2019b)’s Theorem 4.1 adapted to continuous operators
Assuming is integer then and , so
In principle in every region we should have . Since
Appendix D Spectral convergence analysis for deep networks - proof of Theorem 2
where stands for element wise RELU activation function. For a tuple of matrices, we let and .
The parameters are initialized randomly from a normal distribution according to
where similarly to (Allen-Zhu et al., 2019) the layers and are initialized and held fixed.
The network functionality is summarized as follows
We write the eigen-decomposition of , where are the eigenvectors of and are their corresponding eigenvalues. The minimal eigenvalue is denoted by .
For any and , let , , . Then, with probability of at least over the random initialization after iterations of GD we have that
D.2 Proof strategy
The proof of Thm. 4 relies on a theorem, provided by (Allen-Zhu et al., 2019), stated in Thm. 5, and an observation, based the on the derivation of the proof to that theorem, which we state in Lemma 4.
Thm. 5 assumes that the data is normalized, so that , and there exists such that for every pair , we have and also it holds that .
In addition, we prove Lemma 3, which is the basis for the proof of our Theorem.
Suppose , , and also let . Then, with probability at least over the randomness of and we have
The proof of the Lemma is deferred, and will be given after the proof of the theorem.
D.3 Proof of Thm 4
By Lemma 3 we have the following relation
Adding and subtracting we have
where we denote . Then, by applying (52) recursively, we obtain
We first bound the quantity
Using Lemma 14 which states that .
Using the bound in Lemma 3, for
Using bound over the loss by, Lemma 4 (b).
By Lemma 11 the loss at initialization is bounded by .
Using the bound, derived above, (53) yields
is bounded by the maximal eigenvalue of the positive definite matrix , i.e, .
By Theorem 5,
where are the eigenvalues and eigenvectors of , respectively.
For the first term we use lemma 11 which states that , and by our choice of we obtain
Finally, by our choice of it holds that
D.4 Supporting Lemmas
We denote by , yielding
Now, we derive a bound for . We start by subtracting and adding the same term, yielding
To construct the bound for , we separately bound each of the above two terms. For the first term
We subtract and add the same term, use triangle inequality and the result provided in Lemma 10, .
Subtract and add from each coefficient that multiply .
Due to Lemma 4, it holds that . This enables us to use Lemma 6, implying that . Moreover, in conjunction with Lemma 5, this yields . Having that, we can apply Lemma 7, to obtain a bound for the first term.
As in the previous derivation, using Lemma 7.
Plug in .
Since , we can get a bound for using Lemma 9, yielding .
Taking into account the two bounds, and summing over the all layers and data points we obtain that
Using our choice of and the value of , we finally get
For any and , let , and are at random initialization (49). Then, starting from Gaussian initialization, with probability at least , gradient descent with learning rate achieves
Under the assumptions of Thm. 5, it holds that for every
Furthermore we have and and
(This Lemma follows Lemma 8.2 from (Allen-Zhu et al., 2019)) Suppose for some sufficiently large constant . With probability at least for every satisfying ,
(This Lemma follows Lemma 8.7 from (Allen-Zhu et al., 2019)) For , with probability at least over the randomness of
for every diagonal matrices with at most s non-zero entries
it holds
(This Lemma follows Lemma 7.4b from (Allen-Zhu et al., 2019)) Suppose If then with probability at least for all it holds that .
(This Lemma follows Theorem 3 from (Allen-Zhu et al., 2019)) Let . With probability at least over the randomness of , it satisfies for every and with that
(This Lemma is based on Lemma 7.1 and Lemma 8.2c from (Allen-Zhu et al., 2019)) With high probability over the randomness of we have
Let and then with probability at least it holds that and as a consequence by using the triangle inequality
Conditioned on it holds that and since by Lemma 10 we have that , this yields . Then by Markov’s inequality, with probability . ∎
(Based on Theorem 3.1 (Arora et al., 2019a))The formulation given in (Arora et al., 2019a) considers training w.r.t all layers. The proof can be extended trivially to the case where the first and last layers are held fixed. Fix and and assume . Then for any pair of inputs such that with probability we have
(Based on Theorem 5c (Allen-Zhu et al., 2019)) Let be at random initialization. For any pair of inputs and parameter with probability at least over with we have
Let and be at random initialization. Then, for and parameter with probability of at least over with it holds that
We prove the first claim. Then, the second claim is obtained by plugging into Lemma 12. The third claim is a direct consequence of the two claims using triangle inequality.
By the definition of we have that
where the last inequality is obtained by applying Lemma 8 and Lemma 10. Applying the obtained bound for and yields a bound for , using (58). Finally, . ∎
Appendix E Experiment setup
Below we provide our experimental setup for all the figures in the paper.
Figure 7. Convergence times are measured by training a two-layer network with bias. The weights of the second layer are set randomly to or (with probability ) and remain fixed throughout training. The bias is initialized to zero. The network parameters are set to , , , and . Convergence for region is declared when with .
Figure 9. We used the same setup as in Figure 7 with the parameters: , , and . Here varies between the three plots. We sampled 300 points from a uniform distribution on one hemisphere, and points on the other hemisphere, where .