## Abstract

Marked point process models have recently been used to capture the coding properties of neural populations from multiunit electrophysiological recordings without spike sorting. These clusterless models have been shown in some instances to better describe the firing properties of neural populations than collections of receptive field models for sorted neurons and to lead to better decoding results. To assess their quality, we previously proposed a goodness-of-fit technique for marked point process models based on time rescaling, which for a correct model produces a set of uniform samples over a random region of space. However, assessing uniformity over such a region can be challenging, especially in high dimensions. Here, we propose a set of new transformations in both time and the space of spike waveform features, which generate events that are uniformly distributed in the new mark and time spaces. These transformations are scalable to multidimensional mark spaces and provide uniformly distributed samples in hypercubes, which are well suited for uniformity tests. We discuss the properties of these transformations and demonstrate aspects of model fit captured by each transformation. We also compare multiple uniformity tests to determine their power to identify lack-of-fit in the rescaled data. We demonstrate an application of these transformations and uniformity tests in a simulation study. Proofs for each transformation are provided in the appendix.

## 1 Introduction

A critical element of any statistical modeling procedure is the ability to assess the goodness-of-fit between a fitted model and the data. For point process models of sorted spike train data, effective goodness-of-fit methods have been developed based on the time-rescaling theorem (Papangelou, 1972; Brown, Barbieri, Ventura, Kass, & Frank, 2002). Previously, we developed an extension of the time-rescaling theorem for marked point processes that, given the correct model, rescale the observed spike and mark data to a uniform distribution in a random subset of a space of the marks and rescaled times (Tao, Weber, Arai, & Eden, 2018). We can then use established statistical tests for uniformity to assess whether the model used for rescaling is consistent with the observed data. However, several challenges still limit the efficient application of these methods to marked-point process models in some cases. For models with high-dimensional marks representing the waveform features, computing the space in which the rescaled data should be uniform can be computationally expensive (Tao et al., 2018). Since this space is random and typically not convex, the number of statistical tests for uniformity is limited to those that can be applied in general spaces. Finally, of the multitude of uniformity tests, it is often not clear which should be applied to the rescaled data.

Here, we propose several extensions to this goodness-of-fit approach based on combinations of time and mark scaling, which for a correct model transform the observed spike and waveform data to uniformly distributed samples in a hypercube. This in turn simplifies and opens up more options for assessing uniformity. We discuss the properties of each transformation and demonstrate which aspects of model lack-of-fit are better captured using each. Finally, we perform a simulation analysis to compare and contrast the transformations proposed here, along with the multiple uniformity tests, to assess different models' fit to the simulated data. Using these simulated data, we are able to visualize the transformation results and study different aspects of the model including factors that affect the fit and also uniformity tests' results. For neural data, we might have a higher dimension for the mark. For instance, the mark can be the amplitudes of potentials being recorded from a tetrode for each event. In appendix D, we demonstrate the transformations and uniformity tests' results applied to neural data recorded from the hippocampus area of a rat brain traversing a W-shaped maze.

Our goal here is not to identify one single, best transformation and uniformity test for assessing goodness-of-fit of marked point process models; instead, we aim to provide a toolbox of methods to identify multiple ways in which a model may fail to capture structure in the data and provide guidance about which methods are most likely to be useful in different situations. We also developed an interactive and easy-to-use toolbox for the transformations and uniformity tests described here to assist other researchers in applying these goodness-of-fit techniques in their analysis of neural spike trains.

The letter is organized as follows. We first introduce each transformation in detail and briefly discuss their core properties. We then discuss different uniformity tests and their main attributes. We next go through a simulation example and compare goodness-of-fit results for the true and a set of alternative generative models. We finish with theoretical proofs that the transformations under the correct model yield uniform samples. We developed an open source toolbox that implements different transformations and uniformity tests discussed in this letter. The toolbox is written in Matlab, and it is available through our GitHub repository (Yousefi, Amidi, Nazari, & Eden, 2020).

## 2 Marked Point Process to Uniform Transformation

In this section, we introduce two transformations that take a data set of spike times and waveforms from a marked point process model to a set of identically distributed uniform samples on the hypercube $[01]d+1$, where $d$ is the dimension of the mark used to describe the spike waveform features in the model. We also discuss the properties of both transformations and explain which features of the model lack-of-fit can be better captured by each transformation.

For an observation interval, $[0,T]$, we observe a sequence of spike events at times $0=s0<s1<s2<\cdots <si<\cdots <sN(T)<T$ with associated marks $m\u2192i$, for $i=1,\u2026,N(T)$ with joint mark intensity function $\lambda (t,m\u2192)$. We assume this joint mark intensity function is integrable over both time and mark space. The notation we use to define the data and model components is listed in Table 1.

Name . | Mathematical Notation . |
---|---|

Joint mark intensity function | $\lambda (t,m\u2192)$ |

Ground intensity | $\Lambda (t)$ |

Mark intensity | $\Gamma (m\u2192)$ |

Full spike event | $(si,m\u2192i)$ |

Spike time | $si$ |

Spike mark | $m\u2192i$ |

Conditional mark distribution | $m\u2192i|si$ |

Conditional intensity | $si|m\u2192i$ |

Name . | Mathematical Notation . |
---|---|

Joint mark intensity function | $\lambda (t,m\u2192)$ |

Ground intensity | $\Lambda (t)$ |

Mark intensity | $\Gamma (m\u2192)$ |

Full spike event | $(si,m\u2192i)$ |

Spike time | $si$ |

Spike mark | $m\u2192i$ |

Conditional mark distribution | $m\u2192i|si$ |

Conditional intensity | $si|m\u2192i$ |

In the following sections, we present the transformations and associated uniformity tests.

### 2.1 Interval-Rescaling Conditional Mark Distribution Transform (IRCM)

This algorithm requires the computation of the ground intensity, $\Lambda (t)$, followed by the conditional mark distribution, $m\u2192|si$. We first rescale the interspike intervals across all observed spikes based on the ground intensity. We then rescale each mark dimension sequentially using a Rosenblatt transformation (Rosenblatt, 1952) based on the conditional mark distribution given the spike time. The order of conditioning for the mark features can be specified directly or selected randomly. The dimension of new data samples is $d+1$, where $d$ is the dimension of mark space. The transformed data samples are independent and identically distributed (i.i.d.) with a uniform distribution in the hypercube $01d+1$. (See algorithm 1.)

No matter which ordering we select for the mark components, the i.i.d. and uniformity properties will hold for the true model. The theoretical proof of IRCM transformation is in section A.1.

### 2.2 Mark Density Conditional Intensity Transform (MDCI)

Algorithm 2 requires rescaling time separately for each spike, based on its joint mark intensity. This can potentially break the ordering of spikes with different waveform features, while spikes with similar waveforms will tend to maintain their relative ordering. Next, the algorithm sequentially rescales each mark dimension, again based on a Rosenblatt transformation (Rosenblatt 1952). Like IRCM, we can choose any ordering for the mark features or select a random ordering. Distinct from IRCM, this transformation does not depend on the time of the spike, only on its mark value. Algorithm 2 describes this mapping.

The key difference between the IRCM and MDCI transforms is that the IRCM transforms the interspike intervals independent of their marks and then transforms each mark based on the intensity of spikes with that waveform at the observed time, while the MDCI transforms the marks independent of when the corresponding spikes occur and then transforms time differently for each spike waveform. For neural spiking models, the IRCM examines the intervals between spikes and tends to mix the marks so that spikes with similar waveforms may end up far apart in the transformed mark space; inversely, the MDCI tends to leave spikes with similar waveforms nearby in the transformed mark space while mixing up the spike timing from different neurons. Another important difference is that for the correct model, the IRCM generates i.i.d. uniform samples while the MDCI samples are not independent. However, the set of all the unordered MDCI samples does have a joint uniform distribution. We therefore expect these transforms to allow us to determine separate aspects of lack-of-fit. The lack-of-fit associated with the model of individual neurons or particular waveform features might be better assessed using MDCI, while lack-of-fit associated with interactions between neurons might be better assessed using IRCM. We investigate these expectations in section 4.

In this section, we described two algorithms that take marked point process data and map them to uniformly distributed samples in a hypercube, $[01]d+1$, based on their joint mark intensity. These methods allow for marks of arbitrary dimension. In appendix B, we describe one additional transformation, which applies in the specific case where the mark is scalar.

## 3 Uniformity Tests

There are a multitude of established uniformity tests for one-dimensional data; however, the number of established, robust, multidimensional uniformity tests is more limited. Pearson's chi-square test can be used to assess uniformity by partitioning the space into discrete components and computing the number of samples in each (Pearson, 1938; Greenwood & Nikulin, 1996). Another approach is to apply a multivariate Kolmogorov-Smirnov (Rosenblatt) test (Justel, Peña, & Zamar, 1997), which uses a statistic based on the maximum deviation between the empirical multivariate CDF and that of the uniform to build a distribution-free test for multidimensional samples. Other test statistics are derived from number-theoretic or quasi–Monte Carlo methods for measuring the discrepancy of points in $[01]d$ (Liang, Fang, Hickernell, & Li, 2001; Ho & Chiu, 2007). Using Monte Carlo simulation, it is known that the finite-sample distribution of these statistics can be well approximated by a standard normal distribution (Liang et al., 2001; Ho & Chiu, 2007). Two other approaches to assessing multivariate uniformity are based on distances between samples and the boundary of the hypercube (Berrendero, Cuevas, & Vjosázquez-grande, 2006) and distances between nearest samples, which leads to the computation of Ripley's K function (Ripley, 2005; Lang & Marcon, 2013; Marcon, Traissac, & Lang, 2013). Fan (1998) describes a test based on the $L2$ distance between the kernel density estimate of the underlying probability density and the uniform distribution. Other tests include those built on order statistics (Chen & Ye, 2009), Friedman-Rafsky's minimal spanning tree (Friedman & Rafsky, 1979), or a weighted $K$-function (Veen & Schoenberg, 2006; Jafari Mamaghani, Andersson, & Krieger, 2010; Dixon, 2014). There are several other multivariate uniformity tests which are not presented here; a comprehensive discussion of scalar and multivariate uniformity tests can be found in Marhuenda, Morales, and Pardo (2005). There are also uniformity tests specifically designed for two- and three-dimensional spaces including complete spatial randomness or bivariate Cramer-von Mises tests that are described in Zimmerman (1993), Chiu and Liu (2009), and Csörgő (2014).

Here, we investigate a few of these approaches in terms of their ability to detect model lack-of-fit in rescaled samples from the spike transformations described above; the tests are a Pearson's chi-square test (Pearson, 1938), a multivariate KS test (Justel et al., 1997), the distance-to-boundary method (Berrendero et al., 2006), a discrepancy-based test (Liang et al., 2001), a test based on Ripley's $K$-function (Ripley, 2005; Lang & Marcon, 2013; Marcon et al., 2013), and a test using minimum spanning trees (MST) (Smith & Jain, 1984; Jain, Xu, Ho, & Xiao, 2002). The tests are described in detail in the cited literature and are expressed algorithmically in Table 2. These tests tend to be straightforward to implement with a few exceptions: Ripley's $K$-function becomes computationally expensive to test in more than two dimensions, and Pearson's chi square requires defining a set of subregions of the hypercube. The remaining tests do not require any parameters to be selected except for the test significance level.

Test Name . | Method . |
---|---|

Pearson $\chi 2$ test (Pearson, 1938) | 1. Define $M$ subregions, $Rjj=1,\u2026,M$ in the hypercube $R$.2. Let $pj=|Rj|/|R|$, where $|R|$ represents the volume of region $R$.3. Calculate $X2=\u2211j=1M(rj-npj)2/npj$ using the rescaled data samples, where $rj$ is the number of samples in $Rj$.4. If $X2>\chi M-12(1-\alpha )$, reject the null hypothesis, where $\chi M-12(1-\alpha )$ is the inverse of the chi-square cdf with $M-1$ degrees of freedom. |

Multivariate Kolmogorov-Smirnov test (Justel et al., 1997) | 1. Define $DKS=supn|F(vn(1),\u2026,vn(d),un)-un\u220fl=1dvn(d)|$, where $F(\xb7)$ is the empirical multivariate CDF.2. Use Monte Carlo simulation to find the critical value, $C\alpha $, for the test at the significance level of $\alpha $.3. Calculate $DKS$ using transformed data samples.4. If $DKS>C\alpha $ reject the null hypothesis. |

Distance to boundary test (Berrendero et al., 2006) | 1. Define $D(u,\delta S)=minx\u2208\delta S\u2225x-u\u2225$, where $\delta S$ is the boundary of the hypercube and $\xb7$ is the Euclidean norm on $Rd$.2. Calculate $yi=D(ui,\delta S)/max(D(uj,\delta S))$ for $j=1,\u2026,n$ samples.3. Calculate $DKS=supi|F(yi)-1+(1+yi)d|$, where $F(\xb7)$ is the empirical CDF.4. If $DKS>C\alpha /n$, where $C\alpha $ is the KS critical value, reject the null hypothesis. |

Discrepancy test (Liang et al., 2001) | 1. Calculate $An=n[(U1-Md)+2(U2-Md)]/(5\xi 1)$; section C.1 provides the definitions for $M,\xi 1,U1$, and $U2$. Under the null hypothesis, $An$ has a standard normal distribution.2. If $|An|>z\alpha /2$, reject the null hypothesis, where $z\alpha /2$ is the critical value of a standard normal at significance level $\alpha $. |

Ripley statistics test (Ripley, 2005; Lang & Marcon, 2013) | 1. Compute the distance from each rescaled point to its nearest neighbor, $r\u2192={r1,\u2026,rs}$.2. For each $rk$, calculate Ripley's $K$-function statistics by $K^(rk)=\u2211ui\u2260ujI{d(ui,uj)\u2264rk}$.3. Let $K^=(K^(r1)-B(r1),\u2026,K^(rs)-B(rs))$ where $B(rk)=-83rk3+12rk4$.4. Calculate $T2=\u2225\Sigma 12(K^-\pi r\u21922)\u2225$. Under the null hypothesis, $T2$ has a chi-square distribution with $d$ degree of freedom. Section C.2 provides the definition for $\Sigma $.5. If $T2>\chi d2(\alpha )$, where $\chi d2(\alpha )$ is the chi-square critical value, reject the null hypothesis. |

Minimal spanning tree (MST) test (Smith & Jain 1984; Jain et al., 2002) | 1. Draw $m$ multivariate uniform sample points.2. Calculate the number of degree pairs, $C$, in the MST that share a common node.3. If $di$ is the degree of the $ith$ node, $C$ is defined by $C=1/2\u2211i=1Ndi(di-1),N=m+n$.4. Calculate the number of edges linking a point from the generated data to uniform sample points – $T$.5. Under the null hypothesis assumption, calculate $Var[T|C]=2mnN(N-1)(2mn-NN+C-N+2(N-2)(N-3)[N(N-1)-4mn+2])$ and $E[T]=2mnN+1$.6. Calculate $D=(T-E[T])/Var[T|C]$.7. If $D<z\alpha $, reject the null hypothesis, where $z\alpha $ is the $\alpha $-quantile of the standard normal distribution |

Test Name . | Method . |
---|---|

Pearson $\chi 2$ test (Pearson, 1938) | 1. Define $M$ subregions, $Rjj=1,\u2026,M$ in the hypercube $R$.2. Let $pj=|Rj|/|R|$, where $|R|$ represents the volume of region $R$.3. Calculate $X2=\u2211j=1M(rj-npj)2/npj$ using the rescaled data samples, where $rj$ is the number of samples in $Rj$.4. If $X2>\chi M-12(1-\alpha )$, reject the null hypothesis, where $\chi M-12(1-\alpha )$ is the inverse of the chi-square cdf with $M-1$ degrees of freedom. |

Multivariate Kolmogorov-Smirnov test (Justel et al., 1997) | 1. Define $DKS=supn|F(vn(1),\u2026,vn(d),un)-un\u220fl=1dvn(d)|$, where $F(\xb7)$ is the empirical multivariate CDF.2. Use Monte Carlo simulation to find the critical value, $C\alpha $, for the test at the significance level of $\alpha $.3. Calculate $DKS$ using transformed data samples.4. If $DKS>C\alpha $ reject the null hypothesis. |

Distance to boundary test (Berrendero et al., 2006) | 1. Define $D(u,\delta S)=minx\u2208\delta S\u2225x-u\u2225$, where $\delta S$ is the boundary of the hypercube and $\xb7$ is the Euclidean norm on $Rd$.2. Calculate $yi=D(ui,\delta S)/max(D(uj,\delta S))$ for $j=1,\u2026,n$ samples.3. Calculate $DKS=supi|F(yi)-1+(1+yi)d|$, where $F(\xb7)$ is the empirical CDF.4. If $DKS>C\alpha /n$, where $C\alpha $ is the KS critical value, reject the null hypothesis. |

Discrepancy test (Liang et al., 2001) | 1. Calculate $An=n[(U1-Md)+2(U2-Md)]/(5\xi 1)$; section C.1 provides the definitions for $M,\xi 1,U1$, and $U2$. Under the null hypothesis, $An$ has a standard normal distribution.2. If $|An|>z\alpha /2$, reject the null hypothesis, where $z\alpha /2$ is the critical value of a standard normal at significance level $\alpha $. |

Ripley statistics test (Ripley, 2005; Lang & Marcon, 2013) | 1. Compute the distance from each rescaled point to its nearest neighbor, $r\u2192={r1,\u2026,rs}$.2. For each $rk$, calculate Ripley's $K$-function statistics by $K^(rk)=\u2211ui\u2260ujI{d(ui,uj)\u2264rk}$.3. Let $K^=(K^(r1)-B(r1),\u2026,K^(rs)-B(rs))$ where $B(rk)=-83rk3+12rk4$.4. Calculate $T2=\u2225\Sigma 12(K^-\pi r\u21922)\u2225$. Under the null hypothesis, $T2$ has a chi-square distribution with $d$ degree of freedom. Section C.2 provides the definition for $\Sigma $.5. If $T2>\chi d2(\alpha )$, where $\chi d2(\alpha )$ is the chi-square critical value, reject the null hypothesis. |

Minimal spanning tree (MST) test (Smith & Jain 1984; Jain et al., 2002) | 1. Draw $m$ multivariate uniform sample points.2. Calculate the number of degree pairs, $C$, in the MST that share a common node.3. If $di$ is the degree of the $ith$ node, $C$ is defined by $C=1/2\u2211i=1Ndi(di-1),N=m+n$.4. Calculate the number of edges linking a point from the generated data to uniform sample points – $T$.5. Under the null hypothesis assumption, calculate $Var[T|C]=2mnN(N-1)(2mn-NN+C-N+2(N-2)(N-3)[N(N-1)-4mn+2])$ and $E[T]=2mnN+1$.6. Calculate $D=(T-E[T])/Var[T|C]$.7. If $D<z\alpha $, reject the null hypothesis, where $z\alpha $ is the $\alpha $-quantile of the standard normal distribution |

Note: $d$ is the dimension of the data, $n$ is the number of data samples, and $\alpha $ is the significance level.

The data transformations require the selection of an ordering of the mark dimensions; the uniformity tests can be applied to one particular ordering or can be modified to allow for assessment across multiple permutations of orderings. In such cases, the test procedures should be adjusted for multiple comparisons (Miller, 1977).

## 4 Simulation Study

In this section, we demonstrate an application of the IRCM and MDCI transformations, along with the multiple uniformity tests described in Table 2 to assess their ability to measure goodness-of-fit in simulated data. We first describe how the simulated data are generated and then examine the transformations and goodness-of-fit results.

### 4.1 Simulated Data

Parameter . | Value . | |
---|---|---|

$a1$ | Neuron 1 peak firing rate | $log(0.18)$ |

$a2$ | Neuron 2 peak firing rate | $log(0.18)$ |

$a3$ | Peak excitatory influence | $log(0.3)$ |

$\mu 1,x$ | Mean of receptive field model for neuron 1 | $-$2 |

$\mu 2,x$ | Mean of receptive field model for neuron 2 | 2 |

$\sigma 1,x2$ | Variance of receptive field model for neuron 1 | 0.5 |

$\sigma 2,x2$ | Variance of receptive field model for neuron 2 | 0.5 |

$\mu 1,m$ | Neuron 1 time-independent marks' mean | 11 |

$\mu 2,m$ | Neuron 2 time-independent marks' mean | 12 |

$\rho $ | Mark time dependency drift parameter | 0.8 |

$\sigma 1,m2$ | Variance of neuron 1 mark distribution | 0.09 |

$\sigma 2,m2$ | Variance of neuron 2 mark distribution | 0.09 |

$\sigma 12$ | Excitatory term variance | 2 |

$\sigma 22$ | Inhibitory term variance | 14 |

r | Lag time of the excitatory influence | 10 |

Parameter . | Value . | |
---|---|---|

$a1$ | Neuron 1 peak firing rate | $log(0.18)$ |

$a2$ | Neuron 2 peak firing rate | $log(0.18)$ |

$a3$ | Peak excitatory influence | $log(0.3)$ |

$\mu 1,x$ | Mean of receptive field model for neuron 1 | $-$2 |

$\mu 2,x$ | Mean of receptive field model for neuron 2 | 2 |

$\sigma 1,x2$ | Variance of receptive field model for neuron 1 | 0.5 |

$\sigma 2,x2$ | Variance of receptive field model for neuron 2 | 0.5 |

$\mu 1,m$ | Neuron 1 time-independent marks' mean | 11 |

$\mu 2,m$ | Neuron 2 time-independent marks' mean | 12 |

$\rho $ | Mark time dependency drift parameter | 0.8 |

$\sigma 1,m2$ | Variance of neuron 1 mark distribution | 0.09 |

$\sigma 2,m2$ | Variance of neuron 2 mark distribution | 0.09 |

$\sigma 12$ | Excitatory term variance | 2 |

$\sigma 22$ | Inhibitory term variance | 14 |

r | Lag time of the excitatory influence | 10 |

### 4.2 Transformation Results

Figure 5D shows the rescaled data using the alternative model missing the drift in the mark structure. Here, there is no apparent lack of uniformity among the points, but there is a clear pattern where the yellow and green points from the end of the simulation session tend to cluster near the origin, and the red and blue points from earlier in the session tend to cluster near the opposite corner of the square. This suggests that simple tests of uniformity might be insufficient to detect this lack-of-fit based on the IRCM transformation. In this case, including tests for independence between rescaled samples may provide a more complete view of model fit to the observed data.

Figure 6B shows the rescaled points for the misspecified model lacking refractoriness. Visually, there is no clear evidence of lack of uniformity among the samples, suggesting that tests based on this transform may lack statistical power to reject this model. When the excitatory influence of neuron 2 on neuron 1 is omitted from the model (see Figure 6C), a subtle deviation from uniformity is observed in the resulting transformed data; the fewer spikes from neuron 2 (blue to green points) occupy as much area as the more prevalent spikes from neuron 1 (red to yellow points) suggest a lack of uniformity for $v$. Figure 6D shows the rescaled points for the model lacking the drift in the marks. This leads to an apparent drift in the rescaled points, with earlier spikes producing larger values of $v$ and later spikes producing smaller values of $v$. Unlike the IRCM transformation, the lack of uniformity is visually clear for this misspecified model.

Figures 5 and 6 suggest that different forms of model misspecification may be better identified using different transformations; the missing refractoriness model shows clear lack-of-fit based on the IRCM but not the MDCI transformation, while the missing mark drift model shows more apparent lack-of-fit through the MDCI transformation. It remains to be seen whether this apparent lack-of-fit is captured quantitatively using each of the uniformity tests described previously; we explore this in the following section.

### 4.3 Uniformity Test Results

Tables 4 and 5 provide the results of the uniformity tests described in Table 2, along with their corresponding $p$-values on the rescaled data shown in Figures 5 and 6 using the IRCM and MDCI transformations. A small $p$-value indicates strong evidence against the null hypothesis; here, we set the significance level $\alpha $ of 0.05. The null hypothesis is that the sample data are distributed uniformly in a unit square; this hypothesis would be true if the original marked point process data are generated based on the joint mark intensity model used for the transformation.

Uniformity Test . | True Model . | Missing Refractoriness Model . | Missing Neural Interaction Model . | Constant Mark Model . | ||||
---|---|---|---|---|---|---|---|---|

Pearson $\chi 2$ statistic test with different degree of freedom | $M=N=3,X82(\alpha )=15.51$ | |||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

3.109 | 0.9273 | 746.55 | $\u223c$0 | 396.30 | $\u223c$0 | 4.7398 | 0.785 | |

$M=N=4,X152(\alpha )=24.99$ | ||||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

10.571 | 0.7823 | 838.08 | $\u223c$0 | 707.02 | $\u223c$0 | 15.346 | 0.4267 | |

$M=N=5,X242(\alpha )=36.41$ | ||||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

23.461 | 0.4927 | 920.33 | $\u223c$0 | 1029.4 | $\u223c$0 | 20.910 | 0.644 | |

Multivariate Kolmogorov-Smirnov (KS) test | $n=784,C\alpha ^/n=0.053$ | |||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

0.0314 | 0.462 | 0.4316 | 7.1e-05 | 0.2291 | 3.1e-05 | 0.0314 | 0.462 | |

Distance-to-boundary test | $n=784,C\alpha /n=0.048$ | |||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

0.0420 | 0.251 | 0.1359 | 3.5e-04 | 0.2252 | 2.1e-05 | 0.0563 | 0.013 | |

Discrepancy test | $z\alpha /2-1=\xb11.6449$ | |||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

0.5435 | 0.3442 | 4.1766 | 6.5e-05 | $-$3.312 | 0.0017 | 0.7858 | 0.2930 | |

Ripley statistics test | $d=2,\chi d2(\alpha )=5.9915$ | |||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

4.3124 | 0.1158 | 31.084 | 1.77e-7 | 123.54 | 1.4e-27 | 4.731 | 0.09387 | |

Minimal spanning tree (MST) test | $z\alpha -1=\xb11.64$ | |||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

0.9367 | 0.2573 | $-$6.770 | 4.4e-11 | $-$4.60 | 9.9e-06 | $-$0.86 | 0.2756 |

Uniformity Test . | True Model . | Missing Refractoriness Model . | Missing Neural Interaction Model . | Constant Mark Model . | ||||
---|---|---|---|---|---|---|---|---|

Pearson $\chi 2$ statistic test with different degree of freedom | $M=N=3,X82(\alpha )=15.51$ | |||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

3.109 | 0.9273 | 746.55 | $\u223c$0 | 396.30 | $\u223c$0 | 4.7398 | 0.785 | |

$M=N=4,X152(\alpha )=24.99$ | ||||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

10.571 | 0.7823 | 838.08 | $\u223c$0 | 707.02 | $\u223c$0 | 15.346 | 0.4267 | |

$M=N=5,X242(\alpha )=36.41$ | ||||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

23.461 | 0.4927 | 920.33 | $\u223c$0 | 1029.4 | $\u223c$0 | 20.910 | 0.644 | |

Multivariate Kolmogorov-Smirnov (KS) test | $n=784,C\alpha ^/n=0.053$ | |||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

0.0314 | 0.462 | 0.4316 | 7.1e-05 | 0.2291 | 3.1e-05 | 0.0314 | 0.462 | |

Distance-to-boundary test | $n=784,C\alpha /n=0.048$ | |||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

0.0420 | 0.251 | 0.1359 | 3.5e-04 | 0.2252 | 2.1e-05 | 0.0563 | 0.013 | |

Discrepancy test | $z\alpha /2-1=\xb11.6449$ | |||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

0.5435 | 0.3442 | 4.1766 | 6.5e-05 | $-$3.312 | 0.0017 | 0.7858 | 0.2930 | |

Ripley statistics test | $d=2,\chi d2(\alpha )=5.9915$ | |||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

4.3124 | 0.1158 | 31.084 | 1.77e-7 | 123.54 | 1.4e-27 | 4.731 | 0.09387 | |

Minimal spanning tree (MST) test | $z\alpha -1=\xb11.64$ | |||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

0.9367 | 0.2573 | $-$6.770 | 4.4e-11 | $-$4.60 | 9.9e-06 | $-$0.86 | 0.2756 |

Note: Bold numbers show cases where the test identified lack-of-fit at a significance level of $\alpha =0.05.$

Uniformity Test . | True Model . | Missing Refractoriness Model . | Missing Neural Interaction Model . | Constant Mark Model . | ||||
---|---|---|---|---|---|---|---|---|

Pearson $\chi 2$ – statistic test with different degree of freedom | $M=N=3,X82(\alpha )=15.51$ | |||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

1.997 | 0.981 | 2.788 | 0.946 | 54.33 | 5.9e-9 | 94.510 | $\u223c$0 | |

$M=N=4,X152(\alpha )=24.99$ | ||||||||

10.22 | 0.805 | 10.693 | 0.774 | 77.87 | 1.7e-10 | 117.79 | $\u223c$0 | |

$M=N=5,X242(\alpha )=36.41$ | ||||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

21.202 | 0.626 | 18.423 | 0.782 | 82.900 | 2.08e-8 | 139.15 | $\u223c$0 | |

Multivariate Kolmogorov Smirnov test | $n=784,C\alpha ^/n=0.053$ | |||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

0.038 | 0.307 | 0.0152 | 0.834 | 0.120 | 9.1e-04 | 0.079 | 0.007 | |

Distance-to-boundary test | $n=784,C\alpha /n=0.048$ | |||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

0.0162 | 0.814 | 0.023 | 0.661 | 0.035 | 0.368 | 0.028 | 0.524 | |

Discrepancy test | $z\alpha /2-1=\xb11.6449$ | |||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

$-$0.209 | 0.390 | $-$0.169 | 0.393 | 0.245 | 0.387 | 0.037 | 0.398 | |

Ripley statistics test | $d=2,\chi d2(\alpha )=5.9915$ | |||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

1.862 | 0.394 | 2.376 | 0.304 | 3.920 | 0.140 | 4.903 | 0.086 | |

Minimal spanning tree (MST) test | $z\alpha -1=\xb11.64$ | |||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

0.128 | 0.395 | $-$0.150 | 0.394 | $-$1.341 | 0.162 | $-$2.561 | 0.0150 |

Uniformity Test . | True Model . | Missing Refractoriness Model . | Missing Neural Interaction Model . | Constant Mark Model . | ||||
---|---|---|---|---|---|---|---|---|

Pearson $\chi 2$ – statistic test with different degree of freedom | $M=N=3,X82(\alpha )=15.51$ | |||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

1.997 | 0.981 | 2.788 | 0.946 | 54.33 | 5.9e-9 | 94.510 | $\u223c$0 | |

$M=N=4,X152(\alpha )=24.99$ | ||||||||

10.22 | 0.805 | 10.693 | 0.774 | 77.87 | 1.7e-10 | 117.79 | $\u223c$0 | |

$M=N=5,X242(\alpha )=36.41$ | ||||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

21.202 | 0.626 | 18.423 | 0.782 | 82.900 | 2.08e-8 | 139.15 | $\u223c$0 | |

Multivariate Kolmogorov Smirnov test | $n=784,C\alpha ^/n=0.053$ | |||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

0.038 | 0.307 | 0.0152 | 0.834 | 0.120 | 9.1e-04 | 0.079 | 0.007 | |

Distance-to-boundary test | $n=784,C\alpha /n=0.048$ | |||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

0.0162 | 0.814 | 0.023 | 0.661 | 0.035 | 0.368 | 0.028 | 0.524 | |

Discrepancy test | $z\alpha /2-1=\xb11.6449$ | |||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

$-$0.209 | 0.390 | $-$0.169 | 0.393 | 0.245 | 0.387 | 0.037 | 0.398 | |

Ripley statistics test | $d=2,\chi d2(\alpha )=5.9915$ | |||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

1.862 | 0.394 | 2.376 | 0.304 | 3.920 | 0.140 | 4.903 | 0.086 | |

Minimal spanning tree (MST) test | $z\alpha -1=\xb11.64$ | |||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

0.128 | 0.395 | $-$0.150 | 0.394 | $-$1.341 | 0.162 | $-$2.561 | 0.0150 |

Note: Bold numbers show cases where the test identified lack-of-fit at a significance-level of $\alpha =0.05$.

The results in Tables 4 and 5 suggest that no single combination of transform and uniformity test will identify all forms of model lack-of-fit. For this simulation, the IRCM transformation makes it simple to identify lack-of-fit due to incorrect history dependence structure—either missing refractoriness or neural interactions—using any of the uniformity tests. However, it remains difficult to detect lack-of-fit due to missing the mark dynamics; while the distance-to-boundary test detects the lack-of-fit at the $\alpha =0.05$ significance level, this result would not hold up to correction for multiple tests. The MDCI transformation is not able to detect lack-of-fit in the missing refractoriness model using any of the uniformity tests, but both the Pearson and multivariate KS tests are able to detect lack-of-fit due to missing neural interactions and missing mark dynamics at very small significance levels.

These results also suggest that certain uniformity tests may achieve substantially higher statistical power over others for the types of lack-of-fit often encountered in neural models. While all of the tests were able to identify the misspecified models missing history-dependent components via the IRCM transformation, the Pearson and multivariate KS tests provided much lower $p$-values for detecting the missing interaction and constant mark models' lack-of-fit under the MDCI transformation. This suggests that different combinations of transformations and uniformity and independence tests can provide different views on goodness-of-fit that can be used together to provide a more complete picture of the quality of a model.

## 5 Discussion

A fundamental component of any statistical model is the ability to evaluate the quality of its fit to observed data. While the marked point process framework has the potential to provide holistic models of the coding properties of a neural population while avoiding a computationally expensive spike-sorting procedure, methods for assessing their goodness-of-fit have been lacking until recently. Our preceding work to extend the time-rescaling theorem (Brown et al., 2002) to marked point process neural models has provided a preliminary approach to address this problem (Tao et al., 2018), but further work was necessary to make the approach computationally efficient in higher dimensions, enable the use of more statistically powerful test methods, and understand which tests are most useful for capturing different aspects of model misspecification.

In this letter, we have proposed two new transformations, IRCM and MDCI, that combine rescaling in both the time and mark spaces to produce samples that are uniformly distributed in a hypercube for the correct marked point process model. This removes one of the most troublesome issues with our prior method: the time-rescaling solution produced uniform samples in a random space that made performing multiple uniformity tests computationally challenging. The integrals and transformations derived as a part of IRCM and MDCI algorithms can be solved analytically for some simple classes of the joint mark intensity function, $\lambda (t,m\u2192)$. For all of the analyses in this letter, we have used simple numerical techniques to solve the integrals and implement these transformations. Numerical solutions can be accurate and computationally tractable when the dimension of the mark process is low. However, the computational cost of the transformations becomes more expensive as the dimension of the mark grows. Different approaches can be taken to reduce the computational cost of the integrals in IRMC and MDCI. For instance, the toolbox we developed (Yousefi et al., 2020) adjusts the width of summand in the Riemann sum integral algorithm to control the algorithms' computational cost. This solution trades off the accuracy with the computational cost. While the focus of this letter is not on minimizing the computational cost of these methods, we note that judicial selection or approximation of the joint mark intensity process can lead to closed-form solutions or approximations, which can substantially reduce the computational costs of these algorithms in higher dimensions.

While both the IRCM and MDCI transformations produce samples that are uniformly distributed in a hypercube for the true model, each transformation can capture different attributes of the quality of the model fit to the observed data. The IRCM rescales the interspike intervals between all observed spikes, regardless of their waveforms, and then rescales the marks in a time-dependent manner. For correct models, this causes mixing between the spike marks from different neurons. This transformation is likely to be particularly sensitive to misspecification of interactions between neurons as in our simulation example. The MDCI transformation rescales the spike waveform features regardless of when they occur and then rescales the spike times in a manner that depends on their waveforms. This transformation tends to keep spikes from a single neuron nearby and is likely to be sensitive to misspecification of the coding properties of individual neurons. The fact that the IRCM makes the rescaled samples independent allows us to use correlation tests as further goodness-of-fit measures. The fact that the MDCI keeps marks from individual neurons nearby allows us to identify regions of nonuniformity in the hypercube to determine which waveforms have spiking that is poorly fit by the model. Together, these transformations provide complementary approaches for model assessment and refinement.

In addition to having multiple, complementary transformations for the data, we have multiple tests for uniformity and dependence with which to assess the transformed samples. Here, we explored six well-established uniformity tests to examine how different forms of model misspecification could be captured using combinations of these transforms and tests. As expected, the true model did not lead to a significant lack of uniformity in either transformation based on any of the tests we explored. Similarly, for the true model, our correlation test did not detect dependence in the IRCM transformed samples. For the misspecified models, different combinations of transformations and uniformity tests were able to identify different sources of lack-of-fit. The missing refractoriness and missing neural interaction models were easily identified as lack-of-fit under the IRCM transform using all of our tests, but the constant mark model could not be identified by any of the tests using this transform. The constant mark model was identified as lack-of-fit under the MDCI using the Pearson and multivariate KS tests but not the other uniformity tests.

Across these simulations, the Pearson chi square, multivariate KS, and MST tests proved to be statistically more powerful in capturing the particular forms of model misspecification that we examined. However, these simulations were limited by using a simple two-neuron population model and only a one-dimensional mark. While more systematic exploration of uniformity tests is necessary to know which combinations of transforms and tests are most useful for determining different aspects of model goodness-of-fit, these results suggest that no one combination is likely to work in all cases. Relatedly, goodness-of-fit for marked point process models should not be limited to rescaling methods; deviance analysis and point process residuals can provide additional, complementary goodness-of-fit measures. A toolbox that includes multiple approaches, including different rescaling transformations and tests provides substantially more statistical power than any one approach on its own.

Ultimately, insight into which goodness-of-fit methods are most useful for these clusterless coding models will require extensive analysis of real neural population spiking data. Based on the many advantages of the clusterless modeling approach—the reduction of bias in receptive field estimation (Ventura, 2009), the ability to use spikes cannot be sorted with confidence (Deng et al., 2015), the ability to fit models in real time for during the recording sessions—and the experimental trend toward recording larger populations and closed-loop experiments, we anticipate that clusterless modeling approaches and methods to assess their quality will become increasingly important. In order to enable experimentalists to apply these algorithms in their data analysis, we have made the Matlab code for these transformations along with the uniformity tests explored here available through our Github repository (Yousefi et al., 2020).

## Appendix A: Rescaling Theorem Proofs

In this letter, we introduce IRCM and MDCI algorithms. In this appendix, we present the theoretical proof for these algorithms.

### A.1 Interval-Rescaling Conditional Mark Distribution

Note that the last element becomes a sure event in $u$ space. The last term can be also projected back to $uis$; with this assumption—when it is not compensated—the transformed $uis$ are uniformly distributed on a scaled space of $0exp\u222bSnT\Lambda (t)dt1n$.

The marginalization steps over the mark dimension described in theorem ^{1} are valid on any arbitrary sequence of the mark space dimension.

The $ui$ samples generated by equation A.6a given the ground conditional intensity defined in equation A.2 are independent and uniformly distributed over the range 0 to 1 and independent of the $vi$ samples. The $ui$ samples correspond to the time rescaling theorem (Brown et al., 2002) samples over the full event's time intervals.

### A.2 Mark Density Conditional Intensity

In this section, we provide a proof for algorithm 2 using theorem ^{4}. In theorem ^{4}, we use an established theorem, the Rosenblatt transformation (Rosenblatt, 1952), which is a mapping from a $d$-dimensional random vector to one with a uniform distribution on the $d$-dimesnional hypercube.

**Rosenblatt Transformation,**Let $X=(X1,\u2026,Xd)$ be a random vector with distribution functions $F(x1,\u2026,xd)$. Let $z=z1,\u2026,zd=Tx=T(x1,\u2026,xd)$, where $T$ is the transformation considered. Then $T$ is given by

Now we define theorem ^{4}, which constructs the MDCI transformation.

## Appendix B: Mark-Rescaling Conditional Intensity

The MRCI algorithm starts by building the mark intensity function, $\Gamma (m)$, which is followed by deriving the conditional intensity function, $f(t|mi)$. This transformation corresponds to a time rescaling on the mark and the CDF of conditional intensity on spike time. Algorithm 3 describes the steps being taken to map the full spike event data to a unit square.

In the MRCI algorithm, we can use any permutated sequence over mark, and the resulting $vi,ui$ samples still hold uniformity. We provide the theoretical proof of MRCI transformation in section B.2. Like the previous algorithms, we can use multiple uniformity tests, described in section 3, to assess the accuracy of model fit.

In contrast to IRCM and MDCI, where we marginalized the conditional mark distribution over the mark space, marginalizing of $\Gamma (m)$ to construct uniformly distributed variables is not easy. When the mark is a scalar variable, we can use $ui$ and $vi$ samples to draw further insight into the model fit. $ui$ samples, when they are constructed using sorted marks, reflect how properly the temporal properties of the full events are captured using the model.

A challenge with MRCI, when the observed mark is multidimensional, is the interpretation of full spike events in the multidimensional spaces. There is no unique solution on how to sort the multidimensional marks. As a result, MRCI can be a proper transformation under two circumstances: (1) when the mark, independent of its dimension, is treated as one element, and (2) when the dimension of the mark is one.

The uniformity test results for the MRCI algorithm are reported in Table 6. Given the result in the table, chi-square Pearson and multivariate KS tests reject the null hypothesis for all alternative models. The distance-to-boundary, discrepancy, Ripley statistics, and MST tests reject the null hypothesis only for the inhibitory independent model and fail to reject the null hypothesis for other misspecified models.

Uniformity Test . | True Model . | Missing Refractoriness Model . | Missing Neural Interaction Model . | Constant Mark Model . | ||||
---|---|---|---|---|---|---|---|---|

Pearson $\chi 2$ statistic test with different degree of freedom | $M=N=3,X82(\alpha )=15.51$ | |||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

8.6071 | 0.3765 | 279.07 | $\u223c$0 | 44.452 | 4.65e-7 | 33.484 | 5.03e-5 | |

$M=N=4,X152(\alpha )=24.99$ | ||||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

15.931 | 0.3867 | 357.77 | $\u223c$0 | 53.061 | 3.7e-6 | 45.469 | 6.45e-5 | |

$M=N=5,X242(\alpha )=36.41$ | ||||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

22.452 | 0.5523 | 453.36 | $\u223c$0 | 67.658 | 4.92e-6 | 74.035 | 5.26e-7 | |

Multivariate Kolmogorov-Smirnov test | $n=784,C\alpha ^/n=0.053$ | |||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

0.0510 | 0.0510 | 0.2974 | 7.25e-5 | 0.0857 | 0.003 | 0.0820 | 0.005 | |

Distance-to- boundary test | $n=784,C\alpha /n=0.048$ | |||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

0.0282 | 0.536 | 0.1843 | 2.29e-4 | 0.035 | 0.366 | 0.0432 | 0.232 | |

Discrepancy test | $z\alpha /2-1=\xb11.6449$ | |||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

$-$0.667 | 0.3193 | $-$1.720 | 0.0408 | $-$0.893 | 0.2677 | $-$1.351 | 0.1602 | |

Ripley statistics test | $d=2,\chi d2(\alpha )=5.9915$ | |||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

2.3306 | 0.3118 | 23.374 | 8.4 e-9 | 4.2077 | 0.122 | 4.5260 | 0.104 | |

Minimal spanning tree (MST) test | $z\alpha -1=\xb11.6449$ | |||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

0.9616 | 0.2513 | $-$5.133 | 7.5e-07 | $-$1.492 | 0.1311 | $-$1.111 | 0.2151 |

Uniformity Test . | True Model . | Missing Refractoriness Model . | Missing Neural Interaction Model . | Constant Mark Model . | ||||
---|---|---|---|---|---|---|---|---|

Pearson $\chi 2$ statistic test with different degree of freedom | $M=N=3,X82(\alpha )=15.51$ | |||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

8.6071 | 0.3765 | 279.07 | $\u223c$0 | 44.452 | 4.65e-7 | 33.484 | 5.03e-5 | |

$M=N=4,X152(\alpha )=24.99$ | ||||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

15.931 | 0.3867 | 357.77 | $\u223c$0 | 53.061 | 3.7e-6 | 45.469 | 6.45e-5 | |

$M=N=5,X242(\alpha )=36.41$ | ||||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

22.452 | 0.5523 | 453.36 | $\u223c$0 | 67.658 | 4.92e-6 | 74.035 | 5.26e-7 | |

Multivariate Kolmogorov-Smirnov test | $n=784,C\alpha ^/n=0.053$ | |||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

0.0510 | 0.0510 | 0.2974 | 7.25e-5 | 0.0857 | 0.003 | 0.0820 | 0.005 | |

Distance-to- boundary test | $n=784,C\alpha /n=0.048$ | |||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

0.0282 | 0.536 | 0.1843 | 2.29e-4 | 0.035 | 0.366 | 0.0432 | 0.232 | |

Discrepancy test | $z\alpha /2-1=\xb11.6449$ | |||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

$-$0.667 | 0.3193 | $-$1.720 | 0.0408 | $-$0.893 | 0.2677 | $-$1.351 | 0.1602 | |

Ripley statistics test | $d=2,\chi d2(\alpha )=5.9915$ | |||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

2.3306 | 0.3118 | 23.374 | 8.4 e-9 | 4.2077 | 0.122 | 4.5260 | 0.104 | |

Minimal spanning tree (MST) test | $z\alpha -1=\xb11.6449$ | |||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

0.9616 | 0.2513 | $-$5.133 | 7.5e-07 | $-$1.492 | 0.1311 | $-$1.111 | 0.2151 |

The bold numbers show cases where the test identified lack-of-fit at a significance-level of $\alpha =0.05$.

The results here are in accordance to the previous results in Tables 5 and 6, where chi-square Pearson and multivariate KS tests are shown to be statistically stronger tests. The statement that we should try a combination of uniformity tests to build a stronger confidence in the goodness-of-fit result holds for this transformation as well.

### B.1 Mark-Rescaling Conditional Intensity Theoretical Proof

The $vi$ samples generated by equation A.26a given the ground conditional intensity defined in equation A.24 are uniformly distributed over the range zero to one independent of $v$ samples.

Here, we build a point process over the mark space, $m$; thus, if the marks are sorted in ascending order, under the time-rescaling theorem (Brown, Barbieri et al., 2002), $vi$s are independent and uniformly distributed random variables. The result will be like corollary ^{3}.

## Appendix C: Uniformity Tests

Here, we describe different terms used in the discrepancy and Ripley statistic tests.

### C.1 Discrepancy Test

### C.2 Ripley Statistics Test

## Appendix D: Rat Hippocampus Data and Transformation Results

Besides the visual inspection, we applied two uniform tests on the rescaled data, the Pearson and multivariate KS tests. Table 7 shows the uniformity test results that indicate the lack-of-fit under both IRCM and MDCI transformations for both mark dimension orders.

. | Mark Permutation Order $\Theta (1)=$ . | Mark Permutation Order $\Theta (2)=$ . | Mark Permutation Order $\Theta (1)=$ . | Mark Permutation Order $\Theta (2)=$ . | ||||
---|---|---|---|---|---|---|---|---|

. | ${1,2,3,4}$ . | ${2,1,3,4}$ . | ${1,2,3,4}$ . | ${2,1,3,4}$ . | ||||

Uniformity Test . | IRCM . | MDCI . | ||||||

Pearson $\chi 2$ statistic test | $di=2,i=1,..,4,X312(\alpha )=20.07$ | |||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

96.61 | $\u223c$0 | 107.39 | $\u223c$0 | 101.28 | $\u223c$0 | 103.94 | $\u223c$0 | |

Multivariate Kolmogorov-Smirnov test | $n=967,C\alpha ^/n=0.011$ | |||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

0.10 | $\u223c$0 | 0.201 | $\u223c$0 | 0.067 | 0.012 | 0.730 | 0.015 |

. | Mark Permutation Order $\Theta (1)=$ . | Mark Permutation Order $\Theta (2)=$ . | Mark Permutation Order $\Theta (1)=$ . | Mark Permutation Order $\Theta (2)=$ . | ||||
---|---|---|---|---|---|---|---|---|

. | ${1,2,3,4}$ . | ${2,1,3,4}$ . | ${1,2,3,4}$ . | ${2,1,3,4}$ . | ||||

Uniformity Test . | IRCM . | MDCI . | ||||||

Pearson $\chi 2$ statistic test | $di=2,i=1,..,4,X312(\alpha )=20.07$ | |||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

96.61 | $\u223c$0 | 107.39 | $\u223c$0 | 101.28 | $\u223c$0 | 103.94 | $\u223c$0 | |

Multivariate Kolmogorov-Smirnov test | $n=967,C\alpha ^/n=0.011$ | |||||||

Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | Metric | $p$-value | |

0.10 | $\u223c$0 | 0.201 | $\u223c$0 | 0.067 | 0.012 | 0.730 | 0.015 |

Note: The bold numbers show cases where the test identified lack-of-fit at a significance-level of $\alpha =0.05$.

As suggested, the MOG model might lose some temporal dynamics present in the spike events. The test information can be used in revising the joint mark intensity functions derived to characterize the spike data.