We have quite an eclectic collection of people seeking to occupy the nation's highest office. Here, artificial intelligence learns about the peculiarities of the Republican candidates.
What it does
A web app that attempts to construct a coherent debate from the predictions of a Recurrent Neural Network trained on political speeches.
How I built it
I trained a Recurrent Neural Network (RNN) with the Long Short-Term Memory (LSTM) architecture on ~1 million characters from political speeches. The RNN has two layers and 128 LSTM internal states, with a total of 256346 parameters to train. LSTM is well-suited to classify and predict texts, as its internal gates can accommodate time lags between characteristic events, whereas the error gradients decay exponentially in a regular convolutional network. The training, cross-validation, and sampling are done using Torch link.
I then used Node.js to build a server to parse and select the next lines from the RNN output, depending on the context of the previous arguments in the debate. I then created a frontend to process user input and interactively display the debate.
Challenges I ran into
Long training times on a CPU as opposed to a GPU.
Accomplishments that I'm proud of
Funny debates that can make sense (when interpreted liberally).
What I learned
What's next for RepublicanDebate
I want to train on a larger dataset for more sensical sentences and coherent debates. Also incorporate the previous arguments in the debate as seed context for the next argument in the RNN.