Ssvep Analysis Essay

Drosophila Stocks and Maintenance

Responses were measured from ten different Drosophila genotypes. We chose five ‘PD genotypes’–four with early-onset PD-related mutations and one with a loss-of-function mutation in the Drosophila LRRK (dLrrk) gene associated with late-onset PD. All the mutant strains had white eyes. Our control group consisted of four different wildtype ‘white eyed’ strains originating in different laboratories. As an additional control we tested a well characterised model of non-PD neurodegeneration, a mutation in the eggroll gene (eggroll1). eggroll1, w1118, w1, PINK15 and dLrrkEx1 fly stocks were obtained from the Bloomington Drosophila Stock Center (Indiana, USA). PINK1B9, DJ-1αΔ72 and DJ-1βΔ93 stocks were generously gifted by Dr Alex Whitworth (The University of Sheffield, UK). wDahomey(wDah) flies were a kind gift from Dr Susan Broughton (The University of Lancaster, UK)35. The second w1118 stock (here referred to as wT ü) was a kind gift from Dr Tobias Rasse (University of Tübingen). The DJ-1αΔ72,DJ-1βΔ93, dLrrkEx1and eggroll1were tested as homozygotes. The PINK15 and PINK1B9 were tested as hemizygotes as the gene is on the X-chromosome. All D. melanogaster lines were raised in a 12 hr:12 hr light:dark (LD) cycle at 25 °C on standard cornmeal-yeast-sucrose medium.

Preparation of Flies for Assaying

Male flies were collected within 8 hours of eclosion and transferred onto standard yeast-sucrose-agar medium for 24 hours (12 hr:12 hr LD, 25 °C). After 24 hours, unanesthetised flies were aspirated into shortened pipette tips and restrained, with the head protruding, using nail varnish as described recently27,36 (Fig. 1A). Pipette tips holding the flies were mounted upon the apparatus, positioning the flies 0.22 m from the display monitor. Electrophysiological recordings were made using blunt glass pipette electrodes containing Drosophila simple saline (130 mM NaCl, 4.7 mM KCl, 1.9 mM CaCl2)37. Electrodes were placed gently into the mouthparts and onto the surface of the eye, for the reference and recording electrodes respectively (Fig. 1A).


Stimuli were contrast-reversing sine-wave gratings at 98% contrast presented at a variety of spatial and temporal frequency combinations on a 144 Hz LCD monitor (XL2420T, BenQ, Taiwan). Stimuli were generated using the Psychophysics Toolbox38 on a Windows 7 PC and the monitor was gamma corrected for each LCD primary separately using a fibre optic photospectrometer (USB2000, Oceanoptics, Dumolin, FL). Temporal frequencies were chosen so that single reversal cycles comprised an integer number of monitor frames.

We tested all possible combinations of 8 temporal frequencies (1, 2, 4, 6, 8, 12, 18 and 36 Hz) and 8 spatial frequencies measured in ‘cycles per degree’ (0.014, 0.028, 0.056, 0.11, 0.22, 0.44, 0.88 and 1.76 cpd) in a random order. Each stimulus combination was presented for an 11 second trial during the randomized sequence with at least four seconds between each trial. The first one second ‘bin’ of each trial was discarded to eliminate onset transients and the remaining 10 bins were analysed using coherent (phase sensitive) frequency-domain average.


Contrast reversing grating patterns generate frequency- and phase-locked responses in the Drosophila VEP time series at integer multiples of the input frequency. When the spatial frequency of the stimulus is very low, most of the display will have a similar polarity at any one moment. In this case, the photoreceptor responses (the hyperpolarization and depolarization of the photoreceptors themselves) will track the reversal frequency ‘F’ while the responses from deeper structures such as the LMCs, lamina and medulla will occur at 2F because the neuronal transients generated by photoreceptor modulation occur for both on- and off- transitions27. However, at moderate to high spatial frequencies, the pooled photoreceptor responses also occur at twice the input frequency because different photoreceptors see different spatial locations and on average half the photoreceptors are looking at a positive-negative transition on each half of the reversal cycle (Fig. 1B,C). We restricted our analyses to the second harmonic (2F) of the input frequencies and computed the coherently averaged Fourier amplitude for each condition. In other words, for the 1, 2 and 4 Hz inputs we analyzed responses at 2, 4 and 8 Hz respectively.

The fly visual system is highly sensitive to motion which can be decomposed into spatial frequency and temporal frequency components and tuning for both spatial and temporal frequency appears to be matched to environmental statistics in wild organisms39,40. While temporal frequency tuning to contrast reversing stimuli can be based on local inputs, tuning for spatial frequency requires long-range spatial computations that cannot be achieved at the level of individual photoreceptors or the large monopolar cells (LMCs). However, spatial frequency sensitivity can arise in deeper structures such as the medulla and lobular and elementary motion detectors (a fundamental part of the fly visual system) depend on long-range integrative mechanisms found in these locations41,42,43. Individual EMDs can respond to the spatiotemporal structure of our contrast-reversing gratings but because these stimuli contain no net motion, downstream integrative mechanisms will be largely silenced. Previous work from our lab indicates that our electrophysiological recordings can detect signals from deeper layers in the fly visual system (specifically, neurons in which two different frequency-tagged inputs are combined in a non-linear manner generating intermodulation terms). These signals are weak compared to the contributions from photoreceptors and initial synaptic transients but are statistically significant (see, e.g. Afsari et al.27Fig. 2). We therefore sweep both temporal frequency and spatial frequency in our stimuli so that both superficial retinal layers and deeper structures can contribute to the classification performance.

Each randomized set of 64 trials was repeated in a different order 10 times for each fly resulting in a single recording session that lasted approximately one hour. Our recording rig ran two flies simultaneously to increase throughput and reduce inter-session variance. The data presented here are averages across all repetitions for each condition in individual flies. Within-fly averaging was performed coherently (i.e. by averaging complex frequency-domain data). In this type of data averaging, stimulus-evoked signals from different trials tend to combine additively because they have the same temporal phase. Conversely, non-stimulus-locked components tend to cancel to zero because, on average, the noise in different trials will have random phase. 20 flies of each genotype are represented in the classification datasets.


We used a machine-learning discrimination analysis to assess our ability to assign flies to different genotypes based solely on their visual responses. Our SSVEP measurements provided 64 amplitude measurements per fly–one for each combination of spatial and temporal frequency. These 64 numbers can be thought of as locating each fly in a 64-dimensional feature space. If flies with similar genotypes have similar visual responses, then they will cluster together in this high-dimensional space. In addition, if flies with different genotypes have different visual responses, each genotype will form a separate cluster. The machine learning algorithm can then attempt to draw a boundary between clusters and use this to assign new datasets to a particular class.

This is illustrated in Fig. 2. Here, we imagine a simpler situation in which we measure two hypothetical variables (x1 and x2 – perhaps representing the maximum response amplitudes to gratings flickering at 2 Hz and 10 Hz) from flies of two different genotypes. It is clear that flies from genotype “A” (blue triangles) fall into a single cluster while flies of genotype “B” (red squares) fall into another cluster. Discriminant analysis will place a single, linear boundary between the two groups and, given a new measurement from an unidentified fly, we can assign it to a particular group with high accuracy by asking which side of the boundary it lies on.

In real life, the situation is not necessarily as simple as this. Firstly, the differences between the two groups might be very subtle–in our example this could manifest itself as an overlap of the two clusters (Fig. 2B) which, in turn, means that the overall accuracy of the classification is lower. We can still generate a linear boundary and assign any given ‘test’ data set to one class or another but there is an increased chance of a mis-classification because the boundary does not separate the two training sets cleanly.

Other factors that might compromise our classification accuracy include overfitting of the training data set (which will compromise our ability to generalize to new data) and the possibility that the boundary between the sets is non-linear (for example, in Fig. 2C the two classes are clearly separate in 2D space but the boundary between them is not a straight line). Mathematical pre-processing of the data (particularly dimensionality reduction) and more complex classification procedures can often be used to address overfitting and nonlinear boundaries but similarities between the responses from the target classes represents a fundamental and obvious limit on our ability to perform discrimination. Figure 2D illustrates an example of a situation in which even the best performing classification algorithm will perform at chance.

In the results section we show results from two slightly different classification procedures. In both cases we use Matlab’s (R1014a, Mathworks, MA) ‘classify’ algorithm to perform a simple linear discrimination between data in a high-dimensional space, as described above. In the first case, we perform classification on the raw data with no pre-processing. For each fly, all 64 data points contribute to the computation and no regularization is applied.

In the second case, we allow Matlab to perform regularization of the dataset before classification. Matlab’s regularization optimization procedure ‘cvshrink’ allows us to iterate over many possible combinations of a pair of variables (‘gamma’ – a smoothness’ constraint and ‘delta’: a noise threshold) to estimate the optimum number of components to include in the classification procedure (see also44). For the n by n pairwise classifications (Table 1) we applied this estimation for each pair of genotypes that we examined. For the n-way classification we applied this procedure once to the entire ensemble. Regularization always reduced the number of components used in the pattern classifier with the mean number of components or dimensions being 12 (min 9, max 24).

We note that the purpose of this paper is to demonstrate that discriminant analysis is a useful tool in the analysis of SSVEP datasets obtained from Drosophila. We are aware that more sophisticated pattern classification algorithms exist–for example, non-linear classifiers that permit the generation of curved boundaries in feature space or support vector machines (SVMs) that can map datasets into higher-dimensional spaces to optimize separation. However, as we show below, even simple linear classifiers perform well on our datasets and, in almost all cases, distinguish between flies of different genotypes successfully.


The accuracy of a machine learning algorithm can be assessed in several ways. One robust method is to perform a ‘leave one out’ analysis: training the classifier on data from all flies but one and then measuring its performance in assigning the remaining fly to a particular category. This can be repeated over all the flies in the dataset to obtain a score indicating the accuracy of the classifier for that particular dataset.

The ability of the classifier to generalize to other datasets can be assessed by Monte Carlo resampling methods: Training and test data can be synthesized repeatedly using random sampling with replacement from the original dataset. The performance of the classifier on each synthetic dataset is noted and the distribution of accuracies can be computed to provide an unbiased estimate of the mean score with confidence intervals45 or the probability of achieving the estimated performance level by chance (a ‘p’ value). In our results section we perform this bootstrapping using 10,000 iterations of the classification procedure drawing different samples from the same dataset with replacement and computing the ‘k fold loss’ of that sample each time. The distribution of performance estimates generated by this procedure is always unimodal and approximately normal. We consider classification to be statistically above chance if fewer than 1% of the bootstrapped 2-way classification probabilities are .5 or greater: the accuracy expected from a binary classifier operating at random. Similarly, we consider the 10-way classification performance to be significant if fewer than 1% of the bootstrapped classification trials have an accuracy less than .1 (1/10).

In Table 1 we show the results of this conservative classification performance estimate for each pair of genotypes that we measured.

Can I Think of Something Else when Using a BCI?: Cognitive Demand of an SSVEP-based BCI

Authors: Andéol EvainUniversité de Rennes 1, Rennes, France
Ferran ArgelaguetInria, Rennes, France
Nicolas RousselInria, Lille, France
Géry CasiezUniversité de Lille, Lille, France
Anatole LécuyerInria, Rennes, France
2017 Article
· Citation Count: 0
· Downloads (cumulative): 134
· Downloads (12 Months): 134
· Downloads (6 Weeks): 14

Published in:

· Proceeding
CHI '17 Proceedings of the 2017 CHI Conference on Human Factors in Computing Systems
Pages 5120-5125

Denver, Colorado, USA — May 06 - 11, 2017
ACMNew York, NY, USA ©2017
table of contents ISBN: 978-1-4503-4655-9 doi>10.1145/3025453.3026037

bcicognitive loadhuman computer interaction (hci)n-back taskssvep

Powered by

The ACM Digital Library is published by the Association for Computing Machinery. Copyright © 2018 ACM, Inc.
Terms of Usage   Privacy Policy   Code of Ethics   Contact Us

0 thoughts on “Ssvep Analysis Essay

Leave a Reply

Your email address will not be published. Required fields are marked *