Proceedings of APSIPA Annual Summit and Conference 201516-19 December 2015

SVM Classification Study of Code–modulated
Visual Evoked Potentials
Daiki Aminaka∗ , Shoji Makino∗ , and Tomasz M. Rutkowski∗,†,5∗ Department of Computer Science and Life Science Center of TARA

University of Tsukuba
Tsukuba, Ibaraki, Japan† RIKEN Brain Science InstituteWako-shi, Saitama, Japan
E-mail: tomek@bci-lab.info (5 corresponding author)
Website: http://bci-lab.info/
Abstract—We present a study of a support vector machine(SVM) application to brain–computer interface (BCI) paradigm.
Four SVM kernel functions are evaluated in order to maximize
classification accuracy of a four classes–based BCI paradigm utilizing a code–modulated visual evoked potential (cVEP) response
within the captured EEG signals. Our previously publishedreports applied only the linear SVM, which already outperformeda more classical technique of a canonical correlation analysis(CCA). In the current study we additionally test and compareclassification accuracies of polynomial, radial basis and sigmoid
kernels, together with the classical linear (non–kernel–based)
SVMs in application to the cVEP BCI.

I. I NTRODUCTION
A code–modulated visual evoked potential (cVEP) is a brain
ordinary response to a visual stimulus with determined code–
modulated sequence [1], [2], [3]. The cVEP is occurring EEG
captured on a scalp when a user gazes at a light source
which blinks with a designed code–modulated pseudo–random
sequence.
The cVEP response gained recently popularity in application to brain computer interfaces (BCIs) [1], [2], [3], whichenable a control of a computer or any machine without bodymuscular activities [4]. The cVEP is easily evoked by a humanbrain, thus the BCI–based on this paradigm shall potentiallyresult with higher information transfer rate (ITR) [4], which isa measure commonly used to compare interfacing prototypes.
There are several contemporary approaches to classify
multi–class cVEP response–based EEG signals. A canonicalcorrelation analysis (CCA) has been extensively tested already [5], which is a method employing a pattern matchingapproach to calculate multichannel correlation coefficientsused next for the attended stimulus pattern identification. In
our previous project we also tested the CCA methods [2] toreproduce the previously mentioned results. We could observethat a support vector machine (SVM) [6] method could improve additionally and statistically significant the results of the
CCA as tested on the same user group [3].
The SVM is a classification method, which finds a hyperplane located between the classes [6]. It performs usually well
as a general classification method, but the classifier performance depends on many parameters, which have to be tuned

978-988-14768-0-7©2015 APSIPA

in order to optimize resulting accuracies. The SVM’s kernel
function is one of the critical settings and it highly affects classification accuracy. In our previously reported projects [2] only
linear SVM without consideration of alternative kernels for a
possible classification accuracy boosting. The kernel function
allows for a transformation of the EEG cVEP features to a
hyperplane space resulting with more simple discriminability.
The above mentioned transformation is very critical in casethe original feature space cannot result with linear function
based discriminability.
In this paper, we report various SVM kernels’ study for
cVEP classification accuracy improvement in application tovisual BCI paradigms. The tested kernels are: linear (non–kernel); polynomial; radial basis (RBF); and sigmoid [7]. We
employ a library LibSVM [7], which is an open source SVM
project suitable for our comparison study.
In this study, four types of cVEPs are evoked by visual
stimulation using the RGB LEDs, which flash in green–
blue and white–black color options. Additionally two carrier
frequency are tested of 30 Hz (to compare with regularcomputer screen–based SSVEP experiments) and 40 Hz (tocheck feasibility of higher frequency–based BCI paradigms).
The four combinations of stimuli are tested and reported in thispaper. Additionally, to verify an effect of cVEPs’ averaging
on the final classification accuracy scores, we also test the
numbers of averaging steps in a range of 1 ∼ 5. The averaging
procedure usually contributes to a removal cVEP’s unrelated
noise, which is usually captured together with the EEG signals.
From now on the paper is organized as follows. In thenext section we present materials and methods of the study.
Results follow and finally conclusions are presented together
with future research perspectives.
II. M ATERIALS AND M ETHODSThe experiments reported in this paper were performed in
the Life Science Center of TARA, University of Tsukuba,
Japan. All the experimental procedure details and the researchtargets of the developed within the presented project’s visual
BCI (cVEP–based) paradigm were explained carefully to thenine participating users. All the users agreed voluntarily to1065

APSIPA ASC 2015

Proceedings of APSIPA Annual Summit and Conference 201516-19 December 2015
Spectrum of cVEP stimulus based on 40 Hz carier modulated by the m-sequence-2

10log(magnitude)

participated in the study and they signed informed consents.
There were no monetary compensations for the participating
users.
The EEG cVEP–based BCI experiments were conductedin accordance with The World Medical Association Declaration of Helsinki - Ethical Principles for Medical Research
Involving Human Subjects. The experimental procedures werealso approved and peer–reviewed by the Ethical Committee ofthe Faculty of Engineering, Information and Systems at University of Tsukuba, Tsukuba, Japan (experimental permission
no. 2013R7).
The average age of the users was of 26.9 years old (standard
deviation of 7.3 years old). A single female and eight maleusers participated in the study.

10-3

0

5

10

15

20

25

30

35

40

frequency [Hz]Spectrum of cVEP stimulus based on 30 Hz carier modulated by the m-sequence

10-2

To evoke the cVEP responses, captured in the continuously
recorded EEG signals, the visual stimuli were presented tothe user as blinking light sources using the red–green–blue(RGB) LEDs. During the cVEP–based BCI EEG experiments
the user was seated on a comfortable chair in front of the four
LEDs attached to a rectangular frame as depicted in Figure 1.
A distance between user’s eyes and the LEDs was about 30 ∼50 cm. The exact distance setting was chosen by each user for
a comfortable view of the all the four LEDs. The experimentalroom had an ambient light as in an usual office.
In order to remove power line interference from EEG anotch filter was applied in a frequency band of 48 ∼ 52 Hz.
Additionally a band–pass filter to remove eye blinks and highfrequency muscle–originating noise was applied in a band of
5 ∼ 100 Hz. Details of the EEG experimental set–up aresummarized in Table I. To remove any possibility of capturinguser’s eye blinks, each trial to gaze at a single LED was
separated with several seconds long and user–paced pauses.

log(magnitude)

A. Experimental Settings

10-3

0

5

10

15

20

25

30

35

40

frequency [Hz]Fig. 2. Spectra of the two visual stimuli generated with the same m −sequence and presented to subjects with two carrier frequencies of 30 Hz
and 40 Hz.

The 60 cVEPs were collected for each of four LED blinking
with m − sequences0 generated targets.
The m − sequence is a binary pseudorandom generated
signal, which could be calculated for each latency n as follows,
x(n) = x(n − p) ⊕ x(n − q),(p > q),(1)thwhere x(n) is the n element of the m − sequence obtainedby the exclusive–or (XOR) operation, denoted by ⊕ in theequation (1), using the two preceding elements indicated bytheir positions (n − p) and (n − q) in the string. In this projectp = 5 and q = 2 were chosen. An initial binary sequence
was decided, to create the final m − sequence, used in theequation (1), as follows,
xinitial = [0, 1, 0, 0, 1].

Fig. 1. A user holding a frame with four LEDs attached to each edge. The
user is wearing the EEG cap and g.USBamp amplifier on the left together
with a trigger capturing box g.TRIGbox, all by g.tec medical instruments
GmbH, Austria, are also presented. The photograph is reproduced with theuser’s consent.

978-988-14768-0-7©2015 APSIPA(2)

Finally, the 31 bits long m−sequence was generated basedon the above initial string as in equation (2). The spectra of
the m − sequence obtained from the equation (1) using initialvalues listed in (2) have been depicted in Figure 2 clearlysupporting a hypothesis of broadband frequency nature of thistype of visual stimulus.
The LEDs were controlled from ARDUINO UNO micro–
controller board which send square waves reproducing the1066

APSIPA ASC 2015

Why%only%single%command%data%is%enough%for%training?
Data%for%classification%testingcode

Averaged cVEP responses for four m-sequence delays

6

②
shift

③

②
shift

4

①

③
shift

Data%for%classifier%training

shift

2

②’
③’

Fig. 3. A procedure of generation cVEP features used in a subsequent SVM
classification. The original m − sequence generated by the equation (1) isdenoted by 1 . In the SVM classifier training session only cVEP features
obtained in response to 1 were used together with circularly shifted features
2 0 and 3 0 , based on an assumption that the responses 2 ≈ 2 0 and 3 ≈3 0 . In the cVEP classification accuracy testing session using the above trained
SVM the user gazed at each stimulator to evoke separate cVEPs (no morealgorithmically shifted).

four m − sequences obtained from circular shifts of theoriginal one. The circular shift on τ = 7 bits was additionallymultiplied for the remaining sequences of 2 · τ and 3 · τ ,respectively. The micro–controlled program was written in C–
language by our team.
The m − sequence autocorrelation has a single dominant
peak. This feature is beneficial to evoke separable cVEPs(easy to discriminate due to non–periodic patterns by SVM
classifiers).
B. The cVEP Responses Classification
Interestingly, only one command dataset is enough for
SVM classifier training as shown in Figure 3. The remaining
TABLE IEEG SIGNALS RECORDING CONDITIONS
Experimental setting

DetailNumber of users

9 (8 males and 1 female)

Average age of users

26.4 years old(standard deviation of 7.0 years)

Single session length

8 or 11 secondsm − sequence length T

516.7 or 38.75 ms (31 bits)m − sequence shifts τ

116.7 or 87.5 ms (7 bits)

EEG amplifierg.USBamp with wet active g.LADYbird
electrodes by g.tec medical instruments
GmbH Austria

Electrode locations

O1, O2, P o3, P o4, P 1, P 2, Oz, P oz

Reference electrode position

Left earlobe

Ground electrode position

FPz

Sampling frequency

512 HzNotch filter

Butterworth 4th order with rejection
band of 48 ∼ 52 Hz

Band–pass filter

Butterworth 8th order with passband 5 ∼ 100 Hz

EEG [µV]

①

①

0
8

-2

-4

-6

-8
0

96

193

289

386

time [ms]Fig. 4. Averaged cVEP responses with circular shifts. The star symbols (∗)
on a horizontal axis depict the ANOVA estimated statistically significant
differences among the latencies (p < 0.01) of circularly shifted cVEPs.

classifier training patterns can be generated by circular shift ofthe cVEP EEG responses similarly as the m−sequences could
be obtained using the same process illustrated in Figure 3.
The 60 cVEP responses for only single command #1(located at the top of the frame presented in Figure 1) wererecorded twice in order to use them for classifier’s training andtesting separately. The remaining 60 cVEP features (responses
to the bottom, right and left stimulators as shown also in
Figure 1) were captured only once for the classification testingprocedure. Totally 300 responses were recorded in the single
experimental session.
In the SVM classifiers’ training and testing sessions (forall kernels including linear, polynomial, radial basis, andsigmoid), the averaged cVEPs formed a single feature as
follows,l+M −11 X
ȳi,l =
yi,j ,(3)M
j=lwhere M = 1, 2 . . . 5, and yi,l was the averaged cVEP evokedby the stimulator i = (1, 2, 3, 4). l = 1, 2, . . . , N − M + 1 was
the dataset number. In the both SVM classifier training andtesting sessions the same number of M = 1, 2 . . . 5 of cVEP
averages were used for features’ generation.

Proceedings of APSIPA Annual Summit and Conference 201516-19 December 2015

Comparison of different SVM classifiers

100

90

BCI classification accuracy [%]90

BCI classification accuracy [%]Comparison of different SVM classifiers

100

80
70
60
50
40
30
linearpolynomialradial basis
sigmoid

20
10

80
70
60
50
40
30
linearpolynomialradial basis
sigmoid

20
10
0

0
1

2

3

4

1

5

Fig. 5. Classification results of the four SVM kernel function types inapplication to cVEP responses using green–blue LEDs and carrier frequencyof 40 Hz. The mean line scores are surrounded by standard error bars
calculated from averaged responses. The horizontal axis represents the numberof cVEP averages (M = 1, 2 . . . 5) used to remove EEG noise.

BCI classification accuracy [%]BCI classification accuracy [%]

80

60

40

0

linearpolynomialradial basis
sigmoid

1

2

3

4

5

80

60

40

Fig. 6. Classification results of the four SVM kernel function types inapplication to cVEP responses using green–blue LEDs and carrier frequencyof 30 Hz. The mean line scores are surrounded by standard error bars
calculated from averaged responses. The horizontal axis represents the numberof cVEP averages (M = 1, 2 . . . 5) used to remove EEG noise.

III. R ESULTS
The classification results of the presented evaluation of four
SVM classifiers for cVEP–based BCI prototype have beenpresented in form of error–bar plots in Figures 5, 6, 7, and 8
and averaged accuracies in Table II.
The results have shown that the linear SVM scored the best

linearpolynomialradial basis
sigmoid20

05

Number of averaged responses used

978-988-14768-0-7©2015 APSIPA

4

Comparison of different SVM classifiers

100

20

3

Fig. 7. Classification results of the four SVM kernel function types inapplication to cVEP responses using white–black LEDs and carrier frequencyof 40 Hz. The mean line scores are surrounded by standard error bars
calculated from averaged responses. The horizontal axis represents the numberof cVEP averages (M = 1, 2 . . . 5) used to remove EEG noise.

Comparison of different SVM classifiers

100

2

Number of averaged responses used

Number of averaged responses used

1

2
3
4
Number of averaged responses used

5

Fig. 8. Classification results of the four SVM kernel function types inapplication to cVEP responses using white–black LEDs and carrier frequencyof 30 Hz. The mean line scores are surrounded by standard error bars
calculated from averaged responses. The horizontal axis represents the numberof cVEP averages (M = 1, 2 . . . 5) used to remove EEG noise.

for of the all tested cVEP cases (see Figures 5, 6, 7, and 8). The
polynomial, sigmoid and radial basis kernels scored with lower
accuracies. Especially, the sigmoid kernel SVM classification
accuracy with non averaged cVEP (number of cVEPs equal
to one in Figures 5, 6, 7, and 8) resulted with theoreticalchance level of 25%. The larger the number of averaged cVEPs

1068

APSIPA ASC 2015

Proceedings of APSIPA Annual Summit and Conference 201516-19 December 2015
TABLE IIIP– VALUES OF MULTI – COMPARISON CALCULATED BY T UKEY–K RAMER
METHOD IN CASE OF LINEAR SVM ( THE “∗” SYMBOLS MARK THE
RESULTS WITH p ≤ 0.05)

Comparison of different stimulations

BCI classification accuracy [%]100

LED light
colors andstimulation
types

80

60

40

20

0

high−gb
low−gbhigh−wk
low−wk

1

2

3

4

5

Number of averaged responses used
Fig. 9. Classification results of the four stimulation types using linear SVM.
The mean line score are surrounded by standard error bars calculated fromaveraged responses. The horizontal axis represent the number of cVEP
averages used to remove EEG remove noise.

were used, the better SVM classification accuracy results wereobtained for all the tested kernels as clearly visualized with apositive trend of averaged results in Figures 5, 6, 7, and 8.
The classification results of the linear SVM have been also
compared among the stimulation types as depicted in Figure 9
and summarized in Table III. The results have shown thatwhite–black cVEP with 30 Hz carrier frequency scored thebest for any number of response averages used.
TABLE IIF IVE ERP AVERAGES – BASED C VEP CLASSIFICATION ACCURACYRESULTS WITH FOUR KERNEL FUNCTIONS AND FOUR VISUAL
STIMULATION TYPES

LED light colors
and visual

polynomialradial basis

sigmoidkernelkernelkernel72.64%

67.46%

41.20%

58.88%

82.44%

78.62%

44.37%

71.16%

lineargreen & blue withfrequency
green & blue with
30 Hz carrier
frequency
white & black with40 Hz carrier

80.38%

74.16%

51.36%

62.62%

90.08%

85.86%

51.39%

69.49%

frequency
white & black with
30 Hz carrier

No

2

3

4

5

green & blue
with 40 Hz
carrier versus
green & blue
with 30 Hz

0.111

0.030∗

0.102

0.046∗

0.043∗

green & blue
with 40 Hz
carrier versus
white & blackwith 40 Hz

0.047∗

0.014∗

0.013∗

0.007∗

0.005∗

green & blue
with 40 Hz
carrier versus
white & blackwith 30 Hz

0.000∗

0.000∗

0.000∗

0.000∗

0.000∗

green & blue
with 30 Hz
carrier versus
white & blackwith 40 Hz

0.986

0.994

0.873

0.927

0.898

green & blue
with 30 Hz
carrier versus
white & blackwith 30 Hz

0.019∗

0.009∗

0.002∗

0.008∗

0.006∗

white & blackwith 30 Hz
carrier versus
white & blackwith 40 Hz

0.051

0.021∗

0.026∗

0.052

0.047∗

SVM kernel type and resulting accuracies

stimulation types

40 Hz carrier

Multi–comparison Tukey–Kramer calculated p–values
using different numbers of averaged cVEP responses

frequency

978-988-14768-0-7©2015 APSIPA

On the other hand, the green–blue cVEP with 40 Hz carrier
frequency resulted with lowest accuracies. There were no
statistically significant differences of classification accuracies
among the white–black cVEPs with 40Hz carrier frequencies
and green–blue with 30 Hz, respectively, as summarized inTable III.
IV. C ONCLUSIONSIn this paper we have shown a comparison of four SVM
kernel function–based classification accuracy results of thecVEP brain responses in application to the visual BCI. As aclear result of the conducted study the linear SVM was identified as the best classifier of cVEP responses in comparison topolynomial, radial basis and sigmoid kernels. Additionally, theBCI classification accuracies in case of the white–black and
30 Hz carrier frequency cVEPs resulted with the best scores

1069

APSIPA ASC 2015

Proceedings of APSIPA Annual Summit and Conference 201516-19 December 2015

in case of linear SVM application.
Also the averaging procedure of cVEP responses clearlyenhanced the SVM classification outcomes for all of the tested
kernels.
We plan to continue this line of research to develop safe,
non–annoying and possibly benefiting the future users ofvisual BCIs in need.
ACKNOWLEDGMENTS
We would like to thank Dr. Andrzej Cichocki from RIKEN
BSI, Japan, and Dr. Koichi Mori from Research Instituteof National Rehabilitation Center for Persons with Disabilities, Japan, for very stimulating discussions about chromatic
SSVEP–based BCI which stimulated this project.
R EFERENCES[1] G. Bin, X. Gao, Y. Wang, B. Hong, and S. Gao, “VEP-based braincomputer interfaces: time, frequency, and code modulations [Research
Frontier],” Computational Intelligence Magazine, IEEE, vol. 4, no. 4, pp.
22–26, 2009.
[2] D. Aminaka, S. Makino, and T. M. Rutkowski, “Chromatic andhigh–frequency cVEP–based BCI paradigm,” in 2015 37th Annual
International Conference of the IEEE Engineering in Medicine andBiology Society (EMBC), IEEE Engineering in Medicine and Biology
Society. IEEE Press, August 25–29, 2015, pp. 1906–1909. [Online].
Available: http://arxiv.org/abs/1506.04461[3] ——, “Classification accuracy improvement of chromatic and high–frequency code–modulated visual evoked potential–based bci,” in Brain
Informatics and Health, ser. Lecture Notes in Computer Science,
Y. Guo, K. Friston, F. Aldo, S. Hill, and H. Peng, Eds. Springer
International Publishing, 2015, vol. 9250, pp. 232–241. [Online].
Available: http://dx.doi.org/10.1007/978-3-319-23344-4 23[4] J. Wolpaw and E. W. Wolpaw, Eds., Brain-Computer Interfaces: Principles and Practice. Oxford University Press, 2012.
[5] G. Bin, X. Gao, Y. Wang, Y. Li, B. Hong, and S. Gao, “A high-speed
BCI based on code modulation VEP,” Journal of Neural Engineering,
vol. 8, no. 2, p. 025015, 2011.
[6] V. Vapnik, The Nature of Statistical Learnig Theory. Springer Verlag,
1995.
[7] C.-C. Chang and C.-J. Lin, “LIBSVM: A library for support vector
machines,” ACM Transactions on Intelligent Systems and Technology,
vol. 2, pp. 27:1–27:27, 2011, software available at http://www.csie.ntu.
edu.tw/∼cjlin/libsvm.

978-988-14768-0-7©2015 APSIPA

1070

APSIPA ASC 2015