Imagine Kanye West standing up on stage, furiously spewing out lyrics to his best song. There’s poetic wordplay, there’s rhyming, there’s emotion, and there’s passion. Now imagine a computer onstage trying to do the same thing.

Doctoral student Eric Malmi and colleagues at the University of Aalto in Finland have created DeepBeat, a computer that uses a complex algorithm to search through and analyze a database of over 10,000 songs by 100 different rap artists to create its own lyrics.

Rap music has never sounded so technological.

To write its lyrics, DeepBeat recognizes assonance rhyme from its song database. Assonance rhyme is the repetition of a series of similar vowels. It’s different from consonance rhyme, which gathers similar consonants, or so-called perfect rhyme that matches words that share the exact same ending.

As an example, let’s take hip-hop artist Inspectah Deck, who was the top-ranked rapper based on rhyming density in DeepBeat’s database. In bold below are the assonance rhymes from the first five lines of his first verse in the Wu-Tang Clan track, “Triumph”:

I bomb atomically / Socrates’ philosophies and hypotheses / Can’t define how I be dropping these mockeries / Lyrically perform armed robbery / Flee with the lottery, possibly they spotted me /

As you can see they’re mostly vowel sounds, but they’re strung together based on their repetition and rhyme sounds packed tightly together into each line. This sort of thing is a key part in what gives rap music its poetic force, or what most rappers call a flow.

Here are a few more literary examples of assonance:

“…on a proud round cloud in a white high night…” - from ee cummings’ “if a cheerfulest Elephantangelchild should sit”

Do not go gentle into that good night,/ Old age should burn and rave at close of day;/ Rage, rage, against the dying of the light./ Grave men, near death, who see with blinding sight,/ Blind eyes could blaze like meteors and be gay,/ Rage, rage against the dying of the light./ - from Dylan Thomas’ “Do Not Go Gentle Into That Good Night”

“And stepping softly with her air of blooded ruin about the glade in a frail agony of grace she trailed her rags through dust and ashes, circling the dead fire, the charred billets and chalk bones, the little calcined ribcage.” - from Cormac McCarthy’s Outer Dark

It’s this highly structured linguistic force that Malmi and his colleagues attempted to capture with DeepBeat. They taught the program to recognize and rank the complexity of phonemes, or distinct units of sound, in the songs collected in the database by having it look for them in multiple lines of each verse. This taught the computer how to recognize rhyming complexity in order to begin to try and string its own lyrics together.

After having explored and ranked all of the entries based on rhyming complexity, they then began feeding it introductory lines from songs within the database to test its lyrical knowledge. DeepBeat would then choose a next line from a list of randomly collected lyrics that also included the correct next line from the song. 

It chose the correct line 82 percent of the time —The rapping robot was becoming at least moderately self-aware. It also eventually gained enough rhyming expertise to gain a density higher than humans, outperforming us regular old people by 21 percent. 

So does this mean that in the future rap battles will just consist of two laptops spewing out lyrics back and forth to each other? All the aspiring rappers out there won’t have too much to worry about. Despite DeepBeat’s circuit-based lyrical prowess, it doesn’t really know what to do once it comes up with the lyrics. Its rhymes may be densely packed together, but it’s unable to tell a coherent narrative with the parts it puts together. 

Until DeepBeat or similar programs like it learn to actually tell a story with their lyrics, human creativity trumps computer analytics every time. But once someone like Malmi actually does inject some narrative sense into a computer, that’ll be the real test for rap supremacy. Something tells me Kanye would be up for the challenge.

Photos via www.flickr.com/photos/rodrigoferrari