CS4641 Project 3: Neural Networks Reflection

Read about machine learning!

Introduction

If you have read my last article, you know that we have been here before. Although I talked about the process of completing and submitting Project 2, I wanted to write about Project 3 but focus on more of the content I learned from it.

Project 3 was completely different to Project 2- not only in terms of difficulty, but also what it meant it to me. In high school, I remember binging YouTube videos on neural networks for hours upon hours. I thought they were extremely interesting and powerful- but still had no idea how they really worked. Another reason that the algorithm caught my attention firstly was due to the relation the name has to the human brain, which has always fascinated me. Below is a picture that shows the relation between a brain’s neurons and a computer neural network.

Neural networks and their allure were part of the reason that I wanted to study the Intelligence thread as CS major- so this particular project in Machine Learning was going to be important for unveiling the black box of how they work.

What is a Neural Network?

Neural networks seem extremely complicated, and they definitely can be. However, there are simple ways to think about them that makes the understanding much easier. Simply put, a neural network is a set of algorithms working together to show relationships in a dataset and try its best to mimic the behavior of human brains. They represent one of the most popular algorithms and can be programmed to do almost anything.

This particular project was focused on one of the algorithms potential uses- text classification. Text classification is when a computer model is able to categorize words based on a certain trait they possess. For example, for this assignment, we were given the iMDB dataset of movie reviews that the computer model would take in and break down to analyze. The model is also fed training data and testing data- the training data is what the computer uses to learn how things are classified and the testing data is used to test the model’s accuracy. The computer model must be accurate on classifying movie reviews as either positive or negative on both sets of data. The coolest part of implementing a neural network like this is when it can accurately predict whether it is reading a nice review or bad review just like a human.

Neural Bag of Words

For the sake of length, I will only discuss one of the algorithms we implemented for Project 3, Neural Bag of Words. NBOW represents the situation in which a bag contains a bunch of words; think of someone reaching into a bag and fetching a word, but only paying attention to the amount of times a word appears and disregards grammar and word ordering from the word’s original sentence. This means that every single word in the bag is treated the same, it doesn’t matter what the word’s meaning or significance is.

The Neural Bag of Words model works like any other neural network- with an input and output layer, and a hidden layer in between.

This algorithm works its magic by using an embedding layer, which helps convert words to vectors that can be used in the neural network. In our situation the input layer consists of the IMDB review dataset and the output we get is an accuracy of the computer’s prediction on the nature of the reviews.

Conclusion

Although I have only scratched the surface of what a neural network is made up of and does, the message of how strong it can be should be clear. Using neural networks, computer scientists can train any computer to predict anything at all using just an established dataset and training time! The possibilities of functions are endless!

Ivana is currently an undergraduate at Georgia Tech studying computer science. On a day off, you may find her binge-watching her new favorite TV show, playing with her two dogs, or playing solitaire/doing a crossword.