My Reflection on Cognitive Science Class.

This is almost end of the semester. I really think taking Cognitive science was a really good idea. I learned a lot from this course. Below is a summary of the things that I learned.

  1.  Human’s brain is crazy. There is no way to completely understand how someone’s brain is processing.
  2. Our brain is definitely working in parallel and not sequential.
  3. Emotion is the most complex concept in cognitive science. I would argue there is no logic behind emotion.
  4. Rule-based agents are normally not the most successful agents mainly because human brain is not working in the same way as rule-based agents.
  5. Learning was the most interesting and powerful concept in cognitive science. While it sounds very complicated concept, looking at the literature you will see there are many studies that did pretty amazing jobs in adapting learnability to their agents.
  6. Analogy is the easiest concept in Cognitive science. why? because it makes sense. We constantly mapping something that we don’t know to something we know. That is analogy.

 

Week 10 – Learning from our own Successes of failures

We are not always learning new information that we get (read/see/hear) from outside world. We very often learn from our failures and successes. For example, imagine Alex is a graduate student at Georgia Tech. He wants to take two courses in this fall. However, he is not sure what two courses are good options for him. So he will automatically remove some courses from his list because he did not have a good experience in those courses. In this case, Alex learned that those courses are not suitable by taking into account his previous experience and trying to learn from his failure.

This can be also applied to our soccer predictor agent. Of course we cannot have an agent that always make correct predictions. However, we can have a model that learns from its own failures and successes and try to adapt its underlying model over time.  One way of doing this is to check agent’s prediction with final results and update accordingly. You might be very confused by now but let me give you an example.

Suppose there is a game between Germany and France. We ask our agent to predict the game. Our agent predicts that Germany will win the game. However, after watching the game we see that France won the game. In this case, our agent was failed to predict the game. Now what our agent can do is to go back and check its prediction with the real result. In this case they are different so the agent needs to update its underlying cognitive model.

 

Week 9 – Learning completely new information from the outside world.

As I discussed in the previous post if we want to have a powerful cognitive agent, we need to add learning feature to our agent. One type of learning that I was thinking about is learning new information from outside world. In other words, our agent should be able to get input from the outside world and add it to its model (where applicable). This information might be new text-based input,  speech-based input or information in any other format. Imagine a cognitive agent that can get an speech-based input, extract semantic meaning, and add it to its model. Isn’t that amazing?

 

Speech-based input

So my idea is to add a feature where we could give speech-based input to the agent. The agent then will get the input, analyze it and checks if the current input is already exists in the model, if so it will ignore it. If not the agent will add the new information to its model. For example lets imagine in our current model we only know that Germany has start players.

Untitled presentation (12).jpg

Then a new user comes and tells the agent that Germany is also an amazing team. The agent should be able to decompose the given sentence. So as a results of such a decomposition we will have following nodes.

Team node : Germany

Hidden node: Amazing team

Status node : Positive

The agent should then compare the existing team and hidden nodes to see if they exist in the current model. IT then should add those node that are not exist to the model. For example, in this case we already have the node Germany but we do not have amazing team. So the system will add the amazing team to our model and connect it to positive.

 

Untitled presentation (13).jpg Although, it would be very challenging to decompose sentences. In my opinion, we should use natural language processing to decompose/tokenize the sentences. In addition, we should to sentiment analysis to extract status (positive or negative) of the given sentence.

Week 8 – Towards Adaptive Cognitive Agent

Human is constantly learning new information about different stuffs and add them to his/her knowledge. Human being keeps updating his knowledge and his models for different task over time by experiencing different things. We read articles, watch news, hear stories from our friends. Our brains is constantly receiving all these information, process, and add them to our knowledge. Obviously, if our goal is to create an cognitive agent which is as good as human brain, our agent should be able to learn and adapt itself over time. Otherwise, it cannot improve its knowledge over time.

While imagining an agent that can learn is fascinating, it is very hard to implement such a learnability feature. How should an agent even collect new information from outside world? How should an agent decompose the collected information and find semantic meaning among them? How should an agent adapt itself based on the collected data? these are all valid question and worth thinking.

We currently have an agent that predicts results of a soccer match between two teams. Our agent does not learn from the prediction mades or from the outside world information. So I can think of two types of learning feature that can be added to our cognitive agent. I would describe these two ways of learning below.

  1. Learning completely new information from outside world: This type of learning can be caused by new information that we collect from outside world. This type of information can be anything that help us to learn a new knowledge. This information will be directly added to our model. For example, suppose a friend of our agent tells him that Germany is an amazing team. If our model currently does not know that Germany is an amazing team, it should add this new knowledge to its model.
  2. Learning from our own success or failure: This type of learning is the results of our successes and failures over time. So if our agent predicts one game wrongly it should be able to understand that its prediction was wrong and improve its predictions over time.

We hope to be able to add both learnings to our cognitive agent in this project.

Week 7 – Visualizations add a lot…

After implementing the spreading activation method, we knew that spreading activation representation is similar to a graph where we have nodes and links but we could not see that graph… We decided to visualize the model using a graph so that would could add power of explanation. This is helpful because adding visualization allow us to see the  whole process that our agent followed to create the output. Now, we can pinpoint the exact route followed by our agent to convert the inputs to the outputs.

We used an awesome library called D3.js. This library allowed us to visualize our model  easily. So using visualization the teams and the features were all represented as nodes in a network. Two additional nodes namely, Win and Loss were added to represent the sinks of the network. Thus, while the teams represented the source where the activation started from, the Win and Loss nodes represented the sinks where the activation finally ended. Subsequently, teams were connected to features to represent the considerations taken into account by the interviewees. As mentioned before, the features were linked to the Win or the Loss node in the network and these links were weighted with the values.

Figure below shows a network representation with the nodes as teams and features. In the figure, the game under consideration is Spain vs Belgium. Thus, the nodes representing Spain and Belgium are highlighted in blue along with an increase in size of the node marker. Further, the Win and the Loss node are highlighted in green and red, respectively.

Screenshot 2016-07-18 16.51.38

The point that I would like to make in this post is that before adding visualization to our method we only had the result of our prediction which was which team will win or draw. However, after adding the visualization we were able to have a better reasoning of why an specific team will win or loss a game. Visualization was a perfect explanatory feature that we added to our system. Probably I would consider using visualization for all the projects that require a feature that helps with explanation. This is a very strong feature to add to our systems.

Week 6 – Moving from ANN to Local Network

After struggling for almost a week understanding the underlying concepts used in Artificial Neural Network (ANN), we came to agreement with the instructor that ANN is more like a black box. Although, people in different research areas tried to apply neural networks for variety of purposes, process of designing neural networks still involves trial and error and it require knowledge about low-level concepts applied to this model. That is, we thought this makes explaining this model in our final report really hard.

Based on instructor suggestions, we looked at local (spreading activation) network, we read more about it.  Spreading activation is a method for searching associative networks. The search process is initiated by labeling a set of source nodes (e.g., in our case two teams that we want to predict their result are initial source nodes) with weights or “activation” and then iteratively propagating or “spreading” that activation out to other nodes linked to the source nodes.

How did we apply spreading activation network to our  problem?

In the context of our soccer prediction task, the two teams competing are given node weights of 1.0 while all the other nodes in the network are weighted at 0.0. The weights on the links are as per those established during the feature extraction phase. As the spreading activation algorithm proceeds through the activation cycles, the feature nodes connected to the teams in question get activated according to the firing and decaying processes. The feature nodes connected to the ‘Win’ target node contribute their activated node weight to a Win score for both teams. On the other hand, the feature nodes connected to the ‘Loss’ target node contribute their activated weight to the loss score of both teams. The final score of a team is calculated as the Win score minus Loss score.

Finally, the prediction is made by comparing the final scores of both teams. If the final scores are equal, the teams are predicted to draw (or tie) the match.

Week 5 – Toward Neural Nets …

In the first version of our program, we fed our data into a cognitive agent fitted with a decision tree that is capable of predicting a winner for given a set of inputs. However, the instructor suggested us to use a more complex model such as neural nets mainly because they way human make decision is not as simple and straight forward as a decision tree.

300px-Colored_neural_network.svg
This photo is taken from Wikipedia page on Artificial neural network.

Artificial Neural Networks model is originally inspired by biological neural networks. The idea is that this model is an interconnected group of nodes, similar to a vast network of neurons in a brain. Each node represents and a link between to nodes represent connection between those two neurons. This model has input nodes, hidden nodes which are responsible for the main part of the computation and output nodes.

The idea is to use neural nets to create a cognitive model which allow us to predict the results of soccer games between two teams. In other words, input to this model would be name of the two teams and the output of the model would be the prediction of the match results between those two teams. However, after reading about this model I think this is more like a black box which is hard to implement. In fact, I was not very clear how does the computation between hidden nodes happen.