Keywords

1 Introduction

Spiking neural networks have been used successfully to model spatiotemporal data, especially neurological data. The present study utilizes the spiking neural network setup within NeuCube [1] developed at the Knowledge Engineering and Development Research Institute (KEDRI), at Auckland University of Technology. NeuCube has been used to model not just brain data but a number of other types of temporal based data, for example stroke prediction [2], ecological data [3], and seismic data which is currently under investigation by KEDRI researchers. The power within this system lies in the customization available in many aspects of its execution, from the neuron locations, the spike encoding method, the combination of supervised and unsupervised learning, to the visualization of interactions within the network and predictive results. The full capabilities of this type of infrastructure within NeuCube are yet to be realized, with continual development and improvement from the researchers within KEDRI.

2 Background

Digestion is facilitated by the motility of the stomach, which in turn is governed by an electrophysiological event called slow waves. Dysrhythmias of slow waves have been associated with a number of digestive diseases, including gastroparesis, unexplained nausea and vomiting, and functional dyspepsia [4]. Electrogastrography (EGG) is a non-invasive method of recording the resultant body surface potential of gastric slow wave propagation. EGG has the ability to convey information about gastric slow wave activity in terms of frequency, amplitude and propagation, therefore it holds potential as a routinely deployable tool to aid the diagnosis of gastric functions.

The present study investigates the spatiotemporal data recorded by EGG as it relates specifically to functional dyspepsia. Functional dyspepsia is the condition where the gut does not function as it should but this is not caused by biological or bacterial factors. An efficient way of measuring what is occurring in the gut in a non-invasive manner is to utilize EGG, where a patient wears mesh of sensors on around their torso that records the resultant surface electrical potentials due to gastric slow waves. The patient was asked to stay still and the movement recorded at 100 Hz. EGG readings are able to reflect a number of different types of functional dyspepsia as it relates to the dysrhythmic slow waves, which in turn cause digestive difficulties. EGG is less invasive than the alternative of endoscopic investigation where a scope is introduced into the stomach via the mouth. Although this is an effective method of investigation for visual inspection and biopsy taking, it is generally deployed for a limited time and does not perform functional measurements on the stomach.

Personalised modelling utilizes a different focus than that of global or local modelling, for a description of the differences see [5]. This approach not only allows for the prediction of outcomes and model development for an individual, but functions well in situations where low numbers of samples are present where more traditional modelling and statistical methods are not applicable. This type of modelling also allows for more accurate modelling of subgroups within a large population space.

3 Investigation

EGG recordings were acquired using a mesh of sensors on the torso. The sensors detect the far-field potential of the sequential activation of gastric slow waves generated by the stomach as it contracts to digest food. With this in mind, retaining the spatiotemporal relationships is vitally important. Each trial was sampled at 100 Hz and a total of 400 time units were recorded. This covered two repeated cycles of the gastric functionality being tracked. There were 7 samples available for each of the 4 classes (28 samples in total). The samples represented the baseline data: normal (N), and three common cases of slow wave dysrhythmias: re-entry (R), conduction block (C) and ectopic pacemaker (E).

To determine the best way of encoding the original signal into spikes for the SNN three different methods were tested. Firstly thresholding the difference between two consecutive variables (TR), secondly Ben’s Spiking Algorithm (BSA), and thirdly Moving Window (MW). Each of these methods captures different components of the input signals in a different way and it was not known beforehand which would best capture the idiosyncrasies of the input data.

As NeuCube has the functionality to allow user specification of node location this facility was used to determine the configuration of both input and computational nodes within the cube itself. As Fig. 1 shows the input nodes are arranged as they are spatially on a person retaining their relationship and allowing the visualization of input node activation sequences which directly reflect the actual movement of the subjects’ muscles. The computational portion is represented as a cube of nodes located away from the input nodes to determine the type of input pattern received. The visualization of the connections between the calculation nodes and their activation levels gives a representation of the nature of the computation required.

Fig. 1.
figure 1

NeuCube node layout. Yellow are input, blue are computational nodes (Color figure online)

4 Results and Discussion

The classification results of each sample computed individually are grouped and reported in Table 1. With 7 samples of each type being tested the result of 81.71 % for Ectopic pacemaker under BSA spike encoding, represents only one sample having been misidentified.

Table 1. Testing all 4 classes in one model - modified configuration

As this is a “proof of concept” investigation several combinations of neural structure, encoding method and class combination were tried. The best classification ac-curacy is listed in Table 1 which exceeded that if any of the two class tests. In the two class testing each dysrhythmia was tested against the normal data. Some dysrhythmias, for example re-entry, returned a 100 % accuracy level for each of the spike encoding methods. Other dysfunctions, for example ectopic pacemaker, re-turned mixed results for each encoding method which were much lower than the four class situation. The worst of these was a result of 57.14 % under TR encoding. Comparing the various spike encoding methods over all testing scenarios the moving window (MW) method gave the most consistent and accurate classification results. Viewing the spike encoding versus the original signal (Fig. 2) for this method shows that it represents the physical activity under investigation very closely. Figure 2 represents a single input node of the 851 total input nodes. Each node reveals a slightly different pattern of spikes relating to the placement of the sensor.

Fig. 2.
figure 2

Moving window spike encoding representation.

Fig. 3.
figure 3

Input node activation. Brighter neurons show a higher activation. Each condition is represented as follows; top left, normal; top right, re-entry; bottom left, Ectopic pacemaker; bottom right, Conduction block.

NeuCube has the capability to retain the activation sequence for the input nodes. Replaying this allows the user to watch repeatedly the sequence of node activation which represents the physical activity of the patient; to stop at any point, replay sections, and concentrate on individual points of interest whilst the patient need only be recorded once. This allows the reviewer, be it physician or trainee doctor, to look more deeply into what is happening at any point in time and to follow any sequences of interest. This is especially useful when dealing with irregular irregularities, as dysrhythmias may occur infrequently and often at unpredictable intervals [6].

From the computational perspective the final version of node layout and size (see Fig. 1) resulted in a reduction in the number of nodes needed, the computational time, and memory overhead. The first version had over 4000 nodes which included the input nodes; whereas this final version contains the 851 input nodes and 1000 computational nodes. Spatially separating the input nodes from the computational ones was done in an attempt to increase accuracy. Retesting each of the previous scenarios of classification, both 2 class and 4 class setups, resulted in each class re-turning better results, or at the minimum remaining the previous accuracy. The best overall result (Table 1) is the only one where a full 100 % accuracy was achieved for all dysrhythmias and exceeded that of the two class versions. Analysis of the computational nodes reveals a very active matrix where a large number of connections are present between nodes (Fig. 4). Node activation is seen as light and dark shading of the node as in the input node activation of Fig. 3, and connections by joining lines. Connection direction is represented by a blue line if the connection is exhibitive of the next node and red if it is inhibitive of the node. The strength of this connection is seen in the strength of each line.

Fig. 4.
figure 4

Connections in the computational nodes (Color figure online)

The current parameter settings available in NeuCube have not been optimized at this point in time. The results so far indicate that this method of analysis has great potential for further development. Parameter optimization is left to a later stage as the next version of the input sensor mesh is very likely to contain fewer sensors which will necessitate alterations to the structure of the current design and parameter settings. These early results reveal both the computational and visual representational sides of NeuCube as being integral to the development of diagnostic aids and increased knowledge of the individual patients.

4.1 Implications of This Research

To our best knowledge this is the first study in which neural network algorithms were applied to relate EGG to specific types of underlying slow wave spatial dysrhythmias. Prior to the current analysis, most previous neural network EGG studies focused on the temporal variations of slow waves, which might have missed certain spatial dysrhythmias that could occur at the same frequency as the normal activity [6]. By analyzing EGG over sustained dysrhythmias, the algorithms were able to detect exact intervals when irregularities occurred, which would be useful as slow wave dysrhythmias have often been reported to be dynamic, as demonstrated by the re-entry case. Furthermore, because the current practice of EGG is to record from a few channels, only limited information could be obtained from the recording. The present study analyzed data recorded from multiple sensors placed over the torso surface, thus ensuring a greater accuracy in pinpointing the type of spatial dysrhythmia occurring in the stomach. The increased amount of EGG data could also offer a way for further analysis after each recording session for greater details of gastric slow waves and functions, in order to minimize patient’s time in hospital. Once trained and validated, the algorithms should allow clinicians a relatively quick and accurate way of analyzing EGG data with greater insight, and ability to monitor gastric functions before and after treatment. This technology has the potential to also be used as a teaching aid for clinicians increasing their understanding of the various dysrhythmias, especially irregular dysrhythmias.

The ability of NeuCube to encase two, or possibly more, distinct neural node structures bodes well for future investigation into multi-structured neural nets within the same overall network. The use of the different structures resulted in a vast increase in both the classification accuracy and repeatability of the results. The improved “stability” of both network and result indicates that further investigation is warranted.

5 Conclusion

To our best knowledge this is the first study in which neural network algorithms were applied to relate EGG to specific types of underlying slow wave spatial dysrhythmias. Prior to the current analysis, most previous neural network EGG studies focused on the temporal variations of slow waves, which might have missed certain spatial dysrhythmias that could occur at the same frequency as the normal activity [6]. By analyzing EGG over sustained dysrhythmias, the algorithms were able to detect exact intervals when irregularities occurred, which would be useful as slow wave dysrhythmias have often been reported to be dynamic, as demonstrated by the re-entry case. Furthermore, because the current practice of EGG is to record from a few channels, only limited information could be obtained from the recording. The present study analyzed data recorded from multiple sensors placed over the torso surface, thus ensuring a greater accuracy in pinpointing the type of spatial dysrhythmia occurring in the stomach. The increased amount of EGG data could also offer a way for further analysis after each recording session for greater details of gastric slow waves and functions, in order to minimize patient’s time in hospital. Once trained and validated, the algorithms should allow clinicians a relatively quick and accurate way of analyzing EGG data with greater insight, and ability to monitor gastric functions before and after treatment. This technology has the potential to also be used as a teaching aid for clinicians increasing their understanding of the various dysrhythmias, especially irregular dysrhythmias.

The ability of NeuCube to encase two, or possibly more, distinct neural node structures bodes well for future investigation into multi-structured neural nets within the same overall network. The use of the different structures resulted in a vast increase in both the classification accuracy and repeatability of the results. The improved “stability” of both network and result indicates that further investigation is warranted.