In the spirit of Valentine’s Day, we decided to write a Search Laboratory love song. And then we realised that – unlike digital marketing – maybe writing love songs is not something we specialise in.
Rather than give up, we decided if we couldn’t learn to write lyrics, we’d get a machine to do the learning for us. Specifically, we built a character-based Recurrent Neural Network using Google’s open-source machine learning software, TensorFlow, fed it the lyrics to 999 different love songs, and got it to write the lyrics to its very own love song.
A Recurrent Neural Network (RNN) is a type of artificial neural network that recognises patterns in sequential data. RNNs can be trained to use these patterns to predict what should come next.
Artificial neural networks are made up of network nodes (or artificial neurons). In a Feed Forward Neural Network, information is received by a network node and forwarded to other network nodes in one direction. Each node receives the data just once.
RNNs are able to process data in this way but can also cycle data in feedback loops – sending information back into earlier network nodes. Because RNN nodes can remember information from the data they received, they can ‘understand’ a sequence and its context (in this case, the lyrics and structure of love songs) and produce predictive results.
Without further ado, here is Search Laboratory’s Valentine’s Day song: Downtiration, Tender Love:
So we don’t get Feelin’ you say,
Why lf a lovely other need
And turned in sweetn smile and Sup
in ‘downtiration Tender love
Lamil’ like Love, love, love,
love beautiful waiting Will
keep us to the same,
you and me That’s what you go, woo,
I ask the curtains, it wasn’t fake
Pretend I don’t matter I’ve been tall
Soul wasted after for these
of L.A pringing Hey, hey, hey
Everyday is beautiful,
for but other manes
Baby, love, cho! nah
no, not girl But I know that you need
Okay, hit me, hit me when
I love you so softer If you run away,
drug away like a eat this time
There is all right hoy,
Sep all these feelings for trust,
Pretty little thing no wanna do
is pains to wrap my heart fell Sinking
Said we only got the lot
I think im in the coppenssence
She never compling papers of
my arms’s awake My eyes roof form,
just Sund a little loud
I’m a little bit out when he are em. Works
Writing the lyrics to a love song is just one of the many ways you can get creative with machine learning algorithms. We’d suggest checking out #PoweredByTf to see what else is possible, or even giving TensorFlow a go yourself.