{'fraction_non_alphanumeric': 0.01720165050104496, 'fraction_numerical': 0.006805637425647071, 'mean_word_length': 4.679245283018868, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Cognitive Workload Assessment using Neuro Headset

This research aims to provide an easy way to visualize attention levels of a subject through neural interface device and to demonstrate the potential of a neural interface at low cost. A neuroheadset device can play an important role in measuring a subject’s attention and inform the subject about his/her attention levels. For few people, it would be better to measure the attention levels before doing an activity that could end up in bad results due to lack of attention which is a common problem in everything ranging from medical errors during operation to driving errors. In the research the attention level of the brain activity is measured to capture the mood of subjects more specifically which is based on two test cases the first test is carried out with a set of questions which includes logic puzzles and mathematical problems and the second test is with a game to measure subject’s attention. The system is organized with a set of assessment measures adopted by covariance matrix and cosine similarity metric. Experimental results demonstrate that our approach provides highly correlation among similar attributes under subjects with identical background.


Introduction
We know how humans communicate with each other, how they observe each other's facial expressions and the ability to detect psychological changes in another person, how a person behaves when he is happy or sad and how others are adapting with these psychological changes in this person. If robots have the same capability to detect and adapt with changes in the human psychology that can be open a way to subtle interaction between human and robots. It would be very difficult to handle the full complexity and diversity of human psychology, so our objective is cognitive workload assessment that can be used to accurately capture the mood of subjects more specifically, this project will investigate the extent that attention changes reflecting subjective changes in mood.
The paper explains the basic idea of the project and the motivation of the project, proceeding to explaining the problem. Further the baseline requirements and expected outcome are presented along with the analysis to related work. The last section of the paper presents the detailed project requirements, details of proposed design the findings and the results are being discussed. Brain Computer Interaction (BCI) is a way to provide a direct way of communication between the user's brain and the machine they are interacting with. Which provides more useful functions to the developer of the machine to ensure the machine is working the way it is intended to or preventing it from making a move that might endanger the user 1 . Mainly BCI was used in aiding people with disability making controllable neuro prostheses to help the user resume his life with fewer problems than before. Measuring brain waves in the past was a complicated procedure. It contains a lot of expensive piece of equipment and numerous electrodes were attached to the subject's skull with copious amounts of gel. This approach has continued is still used in a wide range even recently seen the emergence of a much simpler brain-wave sensor that uses dry (i.e., no gel) without use electrodes. These brain-wave sensors can be reducing the size commensurate with the size of the head; one can easily imagine could be conveniently worn throughout the day and support mobile application.
Cognitive workload is the effort put by the mind to interpret the coming signals through human sensors (i.e. eyes, ears… etc.) and translate them into information and act upon them. This workload is affected by various things like drowsiness and tiredness 2 .The measurement of cognitive workload is physiological measure. Subjective and performance methods of measurements can be used to complement the results. For this research we used new brain-wave sensors by using Neurosky mind wave mobile, to measure cognitive workload assessment values based on brain wave that are detected by the neuroheadset.
In 2012 a study was conducted to detect fatigue and sleepiness among drivers. The study was carried out using neurosky headset and it was made on 40 subjects who were awake for more than 24 hours and were asked to drive on a driving simulator. The study showed that it was able to detect more than 85% of sleepiness states where the subject tends to sleep while driving 3 . In 2012, at the thirteenth International Conference on Software Engineering, Yoshihito Maki with other five professors have done calculations in estimating subjective assessment of people using a bio-signal sensor and found out that it can achieve impressing results exceeding 90% in the accuracy of the device 4 . In 2014, at the seventh IEEE International Conference Jeffrey Cheng and his partners have done an experiment on people using Mindwave Neurosky while driving vehicles in a game and being distracted by other things (like mobile phone, changing radio stations, etc.) to find out which of these affects the attention of the driver and steer him from doing what they should be doing which is driving the car. It showed that people who are calmer while driving and aware of their surrounding and environment but not shifting their focus to the distraction source can achieve better results 5 .
Mind Wave Neurosky device also have been used by game developers to further enhance the interaction between the player and the game where the game has been modified to get input from the Neurosky headset and the user can interact with the game environment using it. One example is a game called Flappy Mind 6 The game is based on a famous game called Flappy bird. The user must control his attention level while wearing the Neurosky headset and connecting it to his mobile phone. The bird (which is represented by a mind with wings) will fly higher when attention is high otherwise, the bird will keep falling. This should be done while avoiding obstacles in the game. This game needs a lot of training and practicing for the user to get used to the interaction between the environment of the game and his mind. From this experiment, we can conclude that we are able to interact with a system using an electroencephalography (EEG) device 7 .

System Architecture
In this section, the core requirements of the project and the functionality of each component or tool and the system architecture is presented.

Arduino
Arduino is a microcontroller device used to read input from a source, convert it with the code given and then produce output 8 .

Mindwave Neurosky
The Mindwave Neurosky is a low cost easy to use Brain-Computer-Interaction (BCI) device. This device can measure the brain activity of the person wearing it by using two sensors 9 .

Arduino Bluetooth Module HC-05
It is a small module that can be connected to the Arduino to establish Bluetooth connection. It is capable of working as a master or slave (i.e. sending or receiving) 10 .

System Architecture
The system is built using the equipment mentioned above and the system architecture is presented in the Figure 1. The user will wear the MindWave Neurosky, which will read alpha and beta brain waves and send them to the Arduino Uno using Bluetooth then the Arduino using the code uploaded in it will visualize that input by lighting LEDs on the breadboard as shown in the above Figure 1 and the steps are : Turning on the Neurosky headset, Establishing connection between the Neurosky and the Arduino, User wears the headset, Headset starts to read brainwaves of the user, Headset sends the data to the Arduino via Bluetooth, Arduino with the code in it starts to analyze the data, Data representation done using LEDs. Figure 2 presents the sequence diagram which presents how each object's interact with other objects and the flow. Starting from the Neurosky Headset where it sends brain wave data input to the Arduino controller which reads the input, analyzes it and then sends output data to the breadboard. Establish Connection is the first step where the connection between the Bluetooth module of the Arduino and the Neurosky will start communicating with each other, the second step is to send the input being read from the sensors in the Neurosky to the Bluetooth module the next step is that the Bluetooth module will send the data it has received from the Neurosky to the Arduino to be read. Further, Arduino will convert the input from hexadecimal to decimal to decide the attention level. Generate output: in the last part the converted input received will be converted again into ten binary digits representing its value (i.e. 7 = 111 1111 000) where 1 means high and 0 means low. Display Generated output: each digit in the binary converted input will be sent to its coordinated port on the Arduino board which is connected to LEDs representing its value. As shown in the Figure 3, there are many areas where it is possible to measure brainwaves depending on the location of the electrode. The location to measure the attention of a subject is above the left ear leaning slightly towards the front of the head. The higher the flow in that area means more attention is being paid by the subject. The Arduino works as intermediary between Neurosky headset and LEDs which is installed on the breadboard. Arduino provides the processing power to run the code using Arduino Software which analyzes the input taken from the Neurosky and translate it into a number that can be visualized. Then each LED gets either High or Low voltage depending on the input taken from the Neurosky. Neurosky headset provided that by putting a highly sensitive electrode in that position. With that we use an Arduino Uno connecting it with a Bluetooth module to establish communication between the headset and the Arduino board to visualize the subject's attention with LEDs. Colored LEDs will be used to differentiate between highly attentive subject, more relaxed subject and a subject in between.
Cognitive Workload Assessment using Neuro Headset

Testing Cases
The testing cases we chose were puzzles or mathematics related.

Testing Case 1: Testing with questions
In this test, we used questions that include logic puzzles and mathematical problems so we are able to monitor the attention levels of the user, monitor partial brain activity during the time the test is being taken. This test has shown if the user is solving/thinking, giving up or just guessing. Time allowed for this test was 10 minutes.

Testing Case 2: Testing with a game
In the second test, we used a famous AI problem called "Missionaries and cannibals" which is a river crossing problem. In this game, the player's job is to get everyone (3 missionaries and 3 cannibals) from point A to point B safely. There is one condition for losing which is having more cannibals in one side more than missionaries. Time allowed for this test was 3 minutes.

Testing Subjects
Our testing subjects who volunteered to help us achieve the results are 32 males, age ranging from 20 to 39. Some of them were wearing reading spectacles and some of them were not. Majority of them have high school degree and are native Arabic speakers but more or less good in English. Eliminating the outliers in our results gave us a total number of 23 subjects. Some results were eliminated due to either the subject being disturbed by his phone while taking the test or being disturbed by his friends.

Testing Environment
Most of the tests were conducted in College of Computer Science and Information Technology, King Faisal University in the main campus. Test subjects were not allowed to look at the LEDs in the system while experiments were conducting.

Results and Outcome
This section addresses the data analysis and discusses the experimental results.

Mathematical Modeling for Subjective Assessments
Subjective assessments have been performed over a number of subjects (s=1, 2, …, N). In order to justify the human attention behavior focusing on different issues, experiments have been conducted sequentially with a number of mathematical puzzles (p=1, 2, …, M). We have chosen these methods because we are calculating a class of data. Calculating a class of data has to consider each and every point in it, while some equations like Manhattan distance Euclidean distance -which both are considered cases of Minkowski distance-takes the difference between two points rather than two different classes.
Where p is the parameter and when p = 1 it is considered Manhattan distance while p=2 is considered Euclidean distance. This formula will show distance between two points but doesn't consider the difference between two classes While the formulas we chose calculate the difference of classes by measuring the variation of each point from the centroid.

Covariance Matrix Calculation
With two numeric attributes x and y and a set of N observations, the expected values of x and y are given by: The covariance between x and y is defined as: The relation between two attributes x and y can be expressed in terms of Pearson's product moment coefficient, given by: Thus for two attributes x and y that tend to change together, i.e., if x is larger than (the expected value of x), then y is likely to be larger than (the expected value of y), the covariance between x and y is positive. The similarity matrix for p attributes (p=1, 2, …, M) can be represented as follows: Covariance matrix is used in pattern recognition to identify patterns in human faces with different poses and angles. Also it is used for gait analysis 11 . Another example is real space visualization 12 .

Cosine Similarity
Cosine similarity measures the similarity between two vectors of an inner product space. It is measured by the cosine of the angle between two vectors and determines whether two vectors are pointing in the same direction 13 . With two attributes x and y the cosine similarity can be expressed as: Where, ||x|| is the Euclidean norm of vector ) ..., , , Cosine similarity matric is well known to be used by Google along with Term Frequency (TF) and Inverse Document Frequency (IDF) which provides optimal search results for the user 14 .

Covariance Similarity Table
In this test we found the results of the attention level for 23 test subjects with 6 puzzle problems. We have applied the similarity covariance measure and got the results as shown in Table 1. In Table 1, behavioral attention is measured between questions answered by subjects where the less the number means most subjects achieved similar results to each other. In questions 4 and 5 the results between subjects answering them were very similar. In questions 1 and 3 the results are less similar between subjects. Since all the covariance results are positive in all cases, it reveals that the attributes are identical. Table  In Table 2, the similarity of results can be seen. The further the number from 1 means it is less similar, while being closer to 0 means it is less similar in comparison.

Histogram Charts
Histogram charts are used to show the data distribution and how many subjects achieved the same level of attention. In Figure 4 we can see the distribution of the data. For most of the puzzles, the subjects had the attention level 7-8 whereas for the third puzzle their attention level was less. This might happen due to the fact that the subjects felt boring or relaxed for that test. From the Figure 4 it can be observed that Question 1 had a high number of students with attention level of 9. This may be as a result of them being intrigued since most of them were trying the neuro headset for the first time. In the second question, attention levels were lower than the first mainly due to the question's answer was obvious and they were calculating instead of thinking how to tackle the question. The third question had more than one way of solving it, which made the results vary compared to other questions. Question 4 data shows the highest amount of students getting the same result of attention levels 7 and 8. Question 5 had watches in it, which might be an explanation for the high amount of students averaged on attention level 8. The last question contained an imaginary narrative of birds with a mathematical puzzle; most of the subjects got it wrong. However it had the same effect as the first question, where the subjects got high results.

Test Case 2
In the second test case, the comparison was made between the game and question 6 from test case 1 because they had similar way of solving.

Covariance Similarity
Applying covariance metric, we found that Cov (G,Q6) ≈0.934 2 Cosine Similarity Table  Applying Cosine Similarity we found that Sim (G,Q6)≈ 0.986 3. Histogram Charts In Figure 5, results average ≈ 7.349 which indicates the attention level of subject during game play was high. Compared to the average of test case 1, results in general were similar. Test Subjects were attentive throughout both test cases. Tackling a non-familiar puzzle requires high attention. During that period each subject was thinking of multiple ways to figure how to solve the problem. However our results showed that during calculation, test subjects were less attentive. This means that most of them rely on memory for calculating numbers like memorizing what is the product of 5 times 6 and so on.

Conclusion
The cognitive workload assessment using Neuro Headset has been successfully implemented. In order to justify the effectiveness of the assessment policy, experiments were conducted on a number of subjects studying at King Faisal University with mathematical puzzles and the popular artificial intelligence game called "Missionary Cannibal". The results have been analyzed with covariance matrix, cosine similarity measure and histogram analysis. Experimental results indicate that the attention level of the given subjects for all puzzles and games changes synchronously.
The experimental results also reveal that people who were able to shift their focus to the question rather than thinking about other things have achieved higher score in alpha and beta waves measurement regardless of their answers.
Our next target is to extend the current work by analyzing data using data mining techniques and fuzzy association rules and include more testing subjects and different types of testing cases. Also adding an activity to the test that requires both cognitive and physical abilities to work simultaneously like driving a car and asking the driver/test-subject to answer some mathematical equations, this idea definitely requires a safe area to be conducted in which we cannot currently afford.