Original: Coordinate-VAE: Unsupervised clustering and de-noising of peripheral nervous system data 
Revised: Coordinate-VAE: Unsupervised clustering and de-noising of peripheral nervous system data BIOS thomas bios health

Original: Abstract
Revised: Lee, Susannah BIOS susie@bios.health Wernisch Lorenz

Revised: BIOS lorenz@bios.health

Revised: Fortier

Revised: Poisson

Revised: Pascal

Revised: BIOS pascal@bios health

Revised: Shunmugam, Sudha

Revised: BIOS sudha@bios.health

Revised: Hewage

Revised: Kalon

Revised: BIOS kalon@bios.health

Revised: Edwards, Tris

Revised: BIOS tris@bios.health

Revised: Armitage, Oliver

Revised: BIOS founders@bios.health

Original:  The peripheral nervous system represents the input/output system for the brain.
Revised: Emil BIOS founders bios health Abstract The peripheral nervous system represents the input/output system for the brain.

Original: Cuff electrodes implanted on the peripheral nervous system allow observation and control over this system, however, the data produced by these electrodes have a low signal-to-noise ratio and a complex signal content.
Revised: Cuff electrodes implanted on the peripheral nervous system allow observation and control over this system, however, the data produced by these electrodes have a low signal-to-noise ratio and a complex signal content.

Original: In this paper, we consider the analysis of neural data recorded from the vagus nerve in animal models, and develop an unsupervised learner based on convolutional neural networks that is able to simultaneously de-noise and cluster regions of the data by signal content.
Revised: In this paper, we consider the analysis of neural data recorded from the vagus nerve in animal models and develop an unsupervised learner based on convolutional neural networks that is able to simultaneously de-noise and cluster regions of the data by signal content.

Original:  Introduction
Revised:  Introduction

Original: Recent advances have made chronic observation [1] of, and limited control [2] over the peripheral nervous system possible.
Revised: Recent advances have made chronic observation [1] of, and limited control [2] over the peripheral nervous system possible.

Original: In order to characterise the dynamics of the signals passing to and from the brain, we wish to categorisethe patterns of activitywe observe within the peripheral nervous system.
Revised: To characterise the dynamics of the signals passing to and from the brain, we wish to categorise patterns of activity within the peripheral nervous system.

Original: However, consistent detection of single neuron activity remains a challenge with current cuff electrode technology suitable for in vivo neural data acquisition.
Revised: However, consistent detection of single neuron activity remains a challenge with current cuff electrode technology suitable for in vivo neural data acquisition.

Original: The relative position of an extracellular recording electrode and neuronal axons close enough to sit above the noise ﬂoor, affects the polarity of presented signal components [3]. Their summation at the electrode occludes the presence of individual action potentials during periods of neuronal activity.
Revised: The relative position of an extracellular recording electrode and neuronal axons close enough to sit above the noise ﬂoor affects the polarity of presented signal components [3], and their summation at the electrode occludes the presence of individual action potentials during periods of neuronal activity.

Original: Instead, local ﬁeld potentials, the combination of manyselective neuronal responses arriving concurrently at the electrode are observed.
Revised: Instead, local ﬁeld potentials (LFPs), the combination of many neuronal responses arriving concurrently at the electrode are observed.

Original: These population level responses are potentially informationally richer [4, 5], but preclude the use of conventional spike-sorting [6] methodologies on such data.
Revised: These population level responses are potentially informationally richer [4], but preclude the use of conventional spike-sorting [5] methodologies on such data.

Original: Instead, we develophere a method based on convolutional neural networks  that simultaneously de-noises the data and categorises the observed signals.
Revised: Instead, we develop a method based on convolutional neural networks (CNN) that simultaneously de-noises the data and categorises the observed signals.

Original: Weshow that we are able to train this model on approximately one hour of data taken from a single subject approximately twelve hours post surgical implantation.
Revised: We train this model on approximately one hour of data taken from a single subject approximately twelve hours post surgical implantation.

Original: Moreover, we show that it is applicable without further training to datataken from a second subject, sixty days post surgical implantation.
Revised: We further show that it is applicable without further training to data from a second subject thirty days post surgical implantation, demonstrating cross-time, cross-subject applicability of the trained models.

Original:  Methods
Revised:  Methods

Original: Neural data are collected from two nerve cuffs implanted on the vagus nerve, each recording local ﬁeld potential data ata sampling rate of 30000Hz using a chronically implanted ITX PNS (peripheral nervous system) implant (BIOS, Cambridge, UK).
Revised: Neural data are collected from two nerve cuffs implanted on the vagus nerve, each recording LFP data at 30000Hz using a chronically implanted ITX PNS (peripheral nervous system) implant (BIOS, [Table] whom

Original:  We begin by standardising the mean and standard deviation of the data coming from each cuff electrode, and applying a ﬁfth-order Butterworth bandpass (50-1000Hz) ﬁlter.
Revised: [Table] Cambridge, UK). We begin by standardising the mean and standard deviation of the data coming from each cuff, and applying a ﬁfth-order Butterworth bandpass (50-1000Hz) ﬁlter, before rescaling such that the training data lie in the range (-1, 1).

Original: Given an arbitrary starting time, we divide the data into small time windows of equal size w with a constant step size s between windows. If s < w , the windows will overlap. For each window, the goal is to reduce the data observed in that window toa one-hot latent vector. We train a variational auto-encoder [7] that encodes the information contained within a signal window into a sparse latent space vector using a Gumbel-Softmax distribution [8].
Revised: We then sample small time windows of equal size w from the data as input to the Coordinate-VAE.

Original: Models were trained in

Original: Tensorﬂow (v 1.12.2) on a single Nvidia Tesla K80. Hyperparameter tuning was carried out over one thousand evaluations for each model using a Tree-structured Parzen Estimator as implemented in the hyperopt package [9]. For the primary data set, the data were divided at random into training/validation/test sets comprising 70%, 20% and 10% of the data respectively. Models were trained over 2000 epochs, with training ending early if no improvement in the loss metric was seen for more than 200 epochs.
Revised: In the results shown here, w is at 256 samples that is at seconds.

Original: 2.1 Model architecture

Original: The basic model architecture is shown in Figure 1.
Revised: The basic model architecture is shown in Figure 1.

Revised: For each window, the goal is to reduce the observed data to a one-hot latent vector of size L .

Original: We begin with a standard auto-encoder architecture with a Gumbel-Softmax [8] activation on the latent space.
Revised: We achieve this by training a variational auto-encoder (VAE) [6] with a Gumbel-Softmax [7] activation on the latent space.

Original: Encoding to the latent space is done through a series of convolutional blocks, where parameters for each block in the encoder are kept constant except for the number of ﬁlters in each convolutional layer, which  with 
Revised: Encoding to the latent space is done through a series of convolutional blocks, where parameters for each block in the encoder are kept constant except for the number of ﬁlters in each convolutional layer, which doubles with each block.

Original: Pooling takes place in each block where this would not reduce the dimension of the data to less than the size of the convolutional layer.
Revised: Pooling takes place in each block where this would not reduce the dimension of the data to less than the size of the convolutional layer.

Original: Decoding similarly follows a standard upsampling/convolutional scheme, with a hyperbolic tangent activation following the ﬁnal convolutional layer.
Revised: Decoding similarly follows a standard upsampling/convolutional scheme, with a hyperbolic tangent activation following the ﬁnal convolutional layer.

Original: The temperature of the Gumbel layer is slowly annealed throughout training such that the temperature at epoch E is 2 e − 0 .
Revised: The temperature of the Gumbel layer is slowly annealed throughout training such that the temperature at epoch E is 2 e − 0 .

Original: 0003 E .
Revised: 0003 E .

Original: During inference, the temperature is ﬁxed at 0.1.
Revised: During inference, the temperature is ﬁxed at 0.1.

Original: We deﬁne the loss as a weighted sum of the mean squared error on the reconstruction and the negative of the Kullback–Leibler divergence.
Revised: We deﬁne the loss as a weighted sum of the mean squared error on the reconstruction and the negative of the Kullback–Leibler divergence.

Original:  With a small ( ≈ 20 dimensional) one-hot latent space, a standard auto-encoder is unable to reconstruct any signal (Fig 2(a)).
Revised: Models were trained in Tensorﬂow (v 1.12.2) on a single Nvidia Tesla K80. Hyperparameter tuning was carried out over one thousand evaluations for each model using a Tree-structured Parzen Estimator as implemented in the hyperopt package [8]. For the primary data set, the data were divided at random into training/validation/test sets comprising 70%, 20% and 10% of the data respectively. With a small ( L = 20 ) one-hot latent space, a standard VAE is unable to reconstruct any signal (Fig. 2(a)).

Original: Given a sufﬁciently large ( ≈ 50 ) latent space, there is sufﬁcient information to reconstruct the signal, but at the cost of retaining much of the noise, signal artefacts, and increasing the complexity of the latent space (Fig 2(b)).
Revised: Given a sufﬁciently large ( L = 50 )) latent space, there is sufﬁcient information to reconstruct the signal, but at the cost of retaining much of the noise, signal artefacts, and increasing the complexity of the latent space (Fig. 2(b)).

Original: We solve this by allowing the leakage of some information directly from the original signal to the decoder, bypassing the latent space.
Revised: We solve this by allowing the leakage of some information directly from the original signal to the decoder, bypassing the latent space.

Original: For each channel c , we ﬁnd the set of n time-coordinates at which the observed signal is closest to zero.
Revised: For each channel, we ﬁnd the set of n time-coordinates at which the observed signal is closest to zero.

Original: To prevent memorisation of the signal based on these coordinates, we randomly sample a subset n (cid:48) of these coordinates.
Revised: To prevent memorisation of the signal based on these coordinates, we randomly sample a subset n (cid:48) of these coordinates.

Original: Since these data can be ordered over time, we then apply a 1-d convolutional network to this input in a similar fashion to the encoder. Following these convolutional layers, we have a encoding of the signal as deﬁned by the sampling from the coordinates.
Revised: Since these data can be ordered over time, we then apply a 1-d convolutional network to this input in a similar fashion to the encoder, giving an encoding of the signal as deﬁned by the sampling from the coordinates.

Original: This ‘coordinate encoding’ is concatenated to the upsampled layers in each step of the decoder.
Revised: This ‘coordinate encoding’ is concatenated to the upsampled layers in each step of the decoder.

Original: This allows a small (20-dimensional) one-hot latent space to identify the signal present in the data while removing the noise (Fig 2(c)).
Revised: This allows a small ( L = 20 ) one-hot latent space to identify the signal present in the data while removing the noise (Fig. 2(c)).

Revised: For this analysis n = 5 and n (cid:48) = 1 , that is, a single value taken from the time-axis for each data channel and passed to the encoder via a

Revised: CNN is sufﬁcient to allow reconstruction of the latent space.

Revised: We are able to reduce the latent space further ( L = 10 and L = 5 ) maintaining identiﬁcation

Revised: [Figure]

Original:  Results
Revised:  Results

Original: Figure 2 demonstrates the ability of a Leaky-VAE model to effectively de-noise peripheral neural data and cluster the observed signals within a relatively simple latent space.
Revised: Figure 2 demonstrates the ability of a Coordinate-VAE model to effectively de-noise peripheral neural data and cluster the observed signals within a relatively simple latent space.

Original: Furthermore, we can apply the model trained on data from a single subject to other subjects.
Revised: Furthermore, we can apply the model trained on data from a single subject to other subjects.

Original: Figure 3 shows the latent space and reconstructed signal from vagus nerve recordings from a second subject taken sixty days post surgical implantation.
Revised: Figure 3 shows the latent space and reconstructed signal from vagus nerve recordings from a second subject taken sixty days post surgical implantation.

Original: Despite the increased noise levels in this data set, the trained model is able to de-noise the signal and characterise the signals within the data.
Revised: Despite the increased noise levels in this data set, the trained model is able to de-noise the signal and characterise the signals within the data.

Original: Data from this subject were human-labelled as containing regions of neural activity corresponding to respiration modulation.
Revised: Data from this subject were human-labelled as containing regions of neural activity corresponding to respiration modulation.

Original: There is a clear correlation between respiration modulation events and the amplitude of 
Revised: There is a clear correlation between respiration modulation events and the amplitude of the reconstructed signal, suggesting that the latent space is able to capture meaningful physiological signals from neural data. Furthermore, the latent space shows strong differences between the latent values prevalent within regions of respiration modulation and those without, with latent values 0, 7, 10, 13, 16 and 19 being signiﬁcantly ( χ 2 -test, moderated for dependence of neighbouring values) over-represented within the respiration modulation events. This suggests that, in the absence of labels, the latent space representation may still give useful information with which to identify physiological events. We explore the de-noising ability of this technique further through simulation studies (Figure 4).

Original: [Figure]
Revised: We simulate noise in each channel by independently sampling from Morlet wavelets, whose parameters are further sampled from independent normal distributions, and whose location on the time series are uniformly distributed. We combine this ‘noise’ with ‘signal’, also sampled from Morlet wavelets, but now located within short ‘impulse’ time periods and correlated between the two signal channels. We then reconstruct the combined waveform and estimate the ratio of the power of the reconstruction within the impulse regions to the power of the reconstruction outside the impulse regions. By varying the amplitude of the ‘noise’ signal, we acquire different values for the true signal-to-noise ratio (SNR) and compare this to the SNR post-reconstruction.

Original:  the reconstructed signal, suggesting that the latent space is able to capture meaningful physiological signals from neural data.
Revised: Particularly for low true SNR, the post-reconstruction data show a considerably improved SNR. [Figure] [Figure]

Original:  Discussion
Revised:  Discussion

Original: The recent developments of chronic neural interfacing implant systems that are able to record neural signals over period of months or years will create large sets of primarily unlabelled data, with numerous signals occurring over a range of time-scales.
Revised: The recent development of chronic neural interfacing implant systems that are able to record neural signals over period of months or years will create large sets of primarily unlabelled data, with numerous signals occurring over a range of time-scales.

Original: These data are currently largely uncharacterisable with standard methods (e.g. spike-sorting).
Revised: These data are currently un-characterisable with standard methods (e.g. spike-sorting).

Original: Previous work in this ﬁeld has relied on mixing categorical and real-valued latent vectors.
Revised: Previous work in this ﬁeld has relied on mixing categorical and real-valued latent vectors.

Original: Westhuizen et al [10] used an adversarial auto-encoder to project neural data to labels, incorporating an approximately one-hot encoding in the latent spacefrom which labels may be derived, but also includes an approximately Gaussian vector to allow reconstruction.
Revised: Westhuizen et al [9] used an adversarial auto-encoder to project neural data to labels, incorporating an approximately one-hot encoding in the latent space but also including an approximately Gaussian vector to allow reconstruction.

Original: Since both vectors are trained simultaneously, the Gaussian component of the latent space may contain the  labelling information for one or more true classes.
Revised: Since both vectors are trained simultaneously, the Gaussian component of the latent space may contain the relevant labelling information for one or more true classes.

Original: InfoGAN [11], [Figure] a GAN implementation in which the discriminator is required to identify components of the latent space, is similarly capable of one-hot latent representation of the data, but without constraints on the information carried within the one-hot encoding.
Revised: InfoGAN [10], a GAN implementation in which the discriminator identiﬁes components of the latent space is similarly capable of one-hot latent representation of the data, but without constraints on the information carried within the one-hot encoding.

Original: The Coordinate-VAE approach, in restricting the information available to the encoder creating the non-categorical portion of the latent space, allows unsupervised characterisation of the signals in timeseries data, while simultaneously de-noising the signal.
Revised: The Coordinate-VAE approach, in restricting the information available to the encoder creating the non-categorical portion of the latent space, allows unsupervised characterisation of the signals in timeseries data, while simultaneously de-noising the signal.

Original: Models are transferable between individuals, suggesting that we may gain the ability to pre-train large models for the reduction to latent space representations.
Revised: Models are transferable between individuals, suggesting that we may gain the ability to pre-train large models for the reduction to latent space representations.

Revised: As shown in Figure 3, there is some evidence to suggest that these latent space representations are also informative for physiological features.

Original: We might then rapidly train a ﬁnal classiﬁer or agent for monitoring or control of individual patients, as in Pandarianth et al [12] in which an auto-encoder is used as a dimension reduction technique on collections of neural spiking data acquired from macaque motor and pre-motor cortices, following which a GLM is used to map the complex latent space to spiking activity.
Revised: We might then rapidly train a ﬁnal classiﬁer or agent for monitoring or control of individual patients, as in Pandarianth et al [11], in which an auto-encoder is used as a dimension reduction technique on collections of neural spiking data acquired from macaque motor and pre-motor cortices, following which a GLM is used to map the complex latent space to spiking activity.