Wednesday, March 22, 2017

Thoughtflow.io - connecting people by sentence sentiment clustering

To present the idea and implementation of Thoughtflow, I start off by asking the following. What is common between an Overwatch server outage rage forum, a terrorist nest, a Bruce Lee quote enthusiasts gathering place, a puppy death cry-over, a chat group full of people who just farted, an ad hoc hiking trip or swingers party organizing interface and whatever you can imagine where resonating thoughts meet and empathy flourishes? Let me cut the BS and get to the answer.

Thoughtflow is designed to extract sentiment (meaning) out of sentences and group them according to similarity. Think of a search bar, you type in your thought as a sentence and you get grouped up with others who typed in analogous sentences.

One level deeper: Thoughtflow uses machine intelligence to turn human readable text to a numerical vector, which is then used to address a high dimensional space. In this metric space, distances between vectors can be defined and used to tie close ones together, hence to establish groups of related sentences - that is, cluster them.

Outline of Thoughtflow: web UI accepts sentences, forwards it to Skip-Thought, which then spits out the encoded sentence as a numerical vector. The sentence vector is consumed by DBSCAN and is grouped up by semantic similarity with other live sentences/thoughts in the system. In groups, users may post on the wall, comment, or vote - at the moment.

So, how could you turn a sentence into a vector, while holding onto the meaning? Or a (simpler) alternative, how could you turn a word into a vector in the same manner? That's what word2vec models are for! Here's how they work.

Sunday, March 13, 2016

EEG feature of fear downregulation

How do you identify fear immediately? How do you classify fear from EEG? How would you quantify fear? These questions bothered me in the beginning when I started researching the intersection of emotions, affective physiological responses and EEG signal processing. I imagined a biofeedback computer game / therapy program that helps people conquer their fears by rewarding them in the process. As time went on, my empirical knowledge and experimental data were extended, which, though changed the questions, not the vision. Here I'd like to outline how it all happened, what are the results and prospects of the research.

Experiment

While reading papers on EEG response upon fear stimulation, I was quite annoyed that the stimuli used in previous experiments were mostly IAPS images or video clips from horror movies (yeah, The Shining) completely taken out of context. To this day I believe that such stimuli are not sufficient to evoke strong enough emotional responses in a time period higher than a couple of seconds, and thus unable to provide insight into the big picture of fear regulation.

The experimental design hasn't changed much since my previous measurements, but gameplay and webcam videos were also recorded this time, in addition to EEG, heart rate (HR), and galvanic skin response (GSR) vital signals. First open-, then closed-eye measurements were taken for Individual Alpha Frequency estimation. Participants then played the "daylight" version of a computer FPS game as the baseline measurement. Only the "night" version contained fear inducing stimuli.

Wednesday, January 27, 2016

Bit of insight into payment habits - a Bitcoin blockchain investigation

As a project work, I looked at the dynamics of transactions in the Bitcoin cryptocurrency system. Delay times between consecutive payments were analysed to investigate their distribution - a distribution that could predict the next time an individual intends to spend money. This study is inspired by (Barabási 2005), a paper showing that human dynamics follow a fat-tailed power-law distribution in terms of certain tasks, like e-mail communication. It is yet to be examined if payment habits exhibit the same behavior or not. [Note: a fat-, or heavy-tailed distribution in this case is characterized by long waiting times, and burst like activities - e.g. we usually send e-mails in batches, time to time, and not in every hour a mail.]

Transactions, or payments, of 59490 accounts were fetched from the Bitcoin blockchain by calling the API of blockchain.info. Accounts were then filtered by the amount of payments initiated – minimum number of 60 transactions was required – in order to leave out bitcoin addresses used once (“Protect Your Privacy - Bitcoin” 2016) or just a few times. Account information of 6729 Bitcoin addresses made to the analysis phase in the end.

Inter-payment delay times of two accounts. Tall spikes suggests a heavy-tailed distribution - long waiting times (delay time in seconds).

Thursday, October 29, 2015

Brainstorming about brainstorming techniques

I'm about to attend a hackathon in Helsinki where I study right now. The team has already brought together, but finding an idea to hack the hell out of is not that simple. That's why I started thinking how to make brainstorming easier, how can I help my brain in the process. Here I share two approaches that I came up with - I'm not saying I was the first to figure these out, though; I have no clue.

Montage brainstorming

For the hackathon, the team had to choose, which gadget(s) to use - if more, than which combination - to build a creative, promising product. There was 20 of them so this decision alone was far from trivial. We agreed to try out a neuro headband, but still, there are a again a million ways to hack further brain signals with the other devices. There, it came to my mind, what if I constitute a montage, images of all devices cut and pasted side by side in a single image to view. It's so much easier to make associations between devices - or more abstractly, between choices of a parameter of an idea - than keeping your mind updating over and over again of the choices available. You just look at the montage and let your brain connect the dots for you. This technique, of course, is only convenient when you have all the possible choices available and their number doesn't exceed, let's say, 30. For most parameters of a hackathon / startup idea, montage brainstorming is not applicable. Don't worry, the other brainstorming method I'm going to show is just for those difficult cases.

The actual montage of devices that I assembled. Lots of tools to hack!

Wednesday, April 29, 2015

Analogy recovery from the Wikipedia corpus - a natural language processing task

Natural language processing is a field of science aiming at teaching machines the hectic human language, whether it is spoken or written. On the lowest level of abstraction computers talk to each other in sequence of bits, which in chunks forms instructions. The instruction set is limited, as well as well-defined - not any like human language. We can express rather complex concepts by a single word, while a computer would struggle spending a great amount of its words (1 word usually consists of a few bytes) to tell the same stuff. Also, families of human languages are results of thousands years of evolution, thus often neglect logic as much as are built upon traditions. All in all, getting machines understand our most innate communication form is not an easy sport. In fact, it's difficult as hell. So complex that so far we could only rely on heuristics; not even close to a full blown neural net, which would imitate our language processing brain parts, functions.

Saturday, April 4, 2015

Existence of an ideal time capsule

Let's say, you want to hide, or make inaccessible some data (e.g. video of yourself, a secret) till a given time - or in other words, send a message to the future. The problem is how would you prevent yourself, or in that matter, anybody else, to read that peace of data before the given time? How do you make absolutely sure that there's no way to open the time capsule prematurely?

You'd say let's put that secret inside a platinum chest, inside a platinum chest, inside a platinum chest ... with a self-destruction function, so if someone peeked into those boxes before intended, then the data would be wiped out of existence. Oh and do not forget to bury that matryoshka platinum chest deep down the crust of earth where platinum is at the limits of melting.

A modern time capsule feeding on solar energy.

Monday, January 19, 2015

Acquiring fear intensity from EEG

My bachelor's thesis project is about the measurement of fear using EEG signals, similarly to my previous lab work. In this case though I made the participants to play a horror game instead just inducing fear by the means of audio stimuli. Also, I attempted to obtain the intensity of the emotion not just whether it is present or not - in addition to EEG signals, self-assessment, heart rate (HR) and skin conductance (GSR) data were gathered to verify the intensity. If you are interested in the whole thing in detail you can read it here (or at the end of this post). Team of the Synetiq neuromarketing research company supervised my thesis. They helped me a lot in putting together the measurement layout, the preprocessing of HR, EEG, and GSR signals and in the analysis of results.

Course of measurement

The experiment consisted of six main parts: 1) first, baseline self-assessment, 2) open-, and closed-eye baseline measurements, 3) baseline gameplay, 4) second self-assessment, 5) fear inducing gameplay, and 6) the last self-assessment. In total, the experiment took about 30 to 40 minutes with the time spent on the placement of the measurement tools excluded.

Parts of the 30-minute measurement as of time – width of the boxes are proportional to the length of the corresponding events.

Thursday, November 27, 2014

Tóth's food serving game

Recently I've dived into game theory by attending a course. I've always been haunted by a dilemma while serving food to my guests at my apartment and now I'd like to introduce this problem in the formal terms of game theory - just for fun :D

Let's have a grill party G(N, f), where N is the set of hungry participants (|N| is the number of them), and f is the amount of food available that is divided among p1, p2, ... p|N| plates. Let hN be the host of the party, g1, g2, ..., g|N|-1N the guests. h serves the food for all the participants including h, as well as divides the f amount among the plates while, being a kind host, lets the guests to choose which plate they want to take. In the end h takes the last one left. Actions of the players' are as follows (a1, a2, ..., anAx denotes the set of actions player x is able to take):

Thursday, August 14, 2014

Parameter fitting tool for MOOSE

During my last week in India, I contributed to the MOOSE project by providing an interface to a parameter fitting tool. Now parameters of MOOSE models can be searched by doing some tiny Python scripting.

When you have experimental data on a phenomenon, and you intend to create a computational model of it, usually you need to apply parameter fitting/searching techniques. These methods help you determine those parameters of your model that you have no reference on. Parameter fitting using MOOSE models are accomplished through utilizing Optimizer [1], a parameter fitting tool developed for neural simulations, which I came across by pure chance.

Results 'layer' from the Optimizer tutorial. Optimizer has a simple GUI to guide the user to a successive parameter fitting.

[1] P. Friedrich, M. Vella, A. I. Gulyás, T. F. Freund, and S. Káli, A flexible, interactive software tool for fitting the parameters of neuronal models, Front. Neuroinform, vol. 8, p. 63, 2014.