An Algorithm Gets Rhythm

A machine-learning algorithm does rap in Finland, drawing on the thousands of songs by leading rap performers to develop lyrics for new works.

Ariella Brown, Ariella Brown

July 8, 2015

4 Min Read

Most of us have heard of DeepBlue, the computer that harnessed artificial intelligence to beat a chess champion back in 1997. Now there’s DeepBeat, a machine learning algorithm that raps.

Algorithms that compose are not new. In fact, services like Narrative Science replace authors with algorithms that can extract the story told by data and present it in various narrative forms, according to its intended audience. But that was more of a business application without demands for rhyme and rhythm that are required for rap.

That was the challenge that Eric Malmi set for himself at the University of Aalto in Finland. Working with some colleagues, he developed an algorithm that mines a data base of rap songs and then builds its own from lines it extracts based on rhymes and key words. Malmi presented his findings in DopeLearning: A Computational Approach to Rap Lyrics Generation.

Like other students of the arts, DeepBeat begins by studying the masters. In this case, that amounts to more than 100 rappers who produced over 10,000 songs. As the abstract of the paper explains, their “approach is based on two machine learning techniques: the RankSVM algorithm, and a deep neural network model with a novel structure.”

The songs are scanned to identify rhymes indicated by the vowels and ranked for “quantitative rhyme density.” The greater the number of syllables that rhyme, the higher the rank. This criterion was internalized by the algorithm for its own compositions so that the researchers could boast that DeapBeat’s “lyrics outperform best human rappers by 21%.”

Those lyrics, however, are not truly original compositions but based on ready-made lines that the algorithm selects to string together to create the song. With respect to the juxtaposition of lines that fit better than random ones, it achieves 82% accuracy. We employ the resulting prediction method for creating new rap lyrics by combining lines from existing songs.

The application of AI to creative endeavors raises new possibilities for computer-generated entertainment. Perhaps the next project will be an algorithm that produces films. In fact, it may be possible to set up a seamless production with a computer-generated script that produces the film through CGI. I doubt it would be any more formulaic than a lot of popular films today.

The final table in Malmi’s paper showed an example of automatically generated verse with keyword “love” and the source of each line:

  • For a chance at romance I would love to enhance (Big Daddy Kane -- The Day You’re Mine)

  • But everything I love has turned to a tedious task (Jedi Mind Tricks -- Black Winter Day)

  • One day we gonna have to leave our love in the past (Lil Wayne -- Marvin’s Room)

  • I love my fans but no one ever puts a grasp (Eminem -- Say Goodbye Hollywood)

  • I love you momma I love my momma -- I love you momma (Snoop Dogg -- I Love My Momma)

  • And I would love to have a thing like you on my team you take care (Ghostface Killah -- Paragraphs Of Love)

  • I love it when it’s sunny Sonny girl you could be my Cher (Common -- Make My Day)

  • I’m in a love affair I can’t share it ain’t fair (Snoop Dogg -- Show Me Love)

  • Haha I’m just playin’ ladies you know I love you. (Eminem -- Kill You)

  • I know my love is true and I know you love me too (Everlast -- On The Edge)

  • Girl I’m down for whatever cause my love is true (Lil Wayne -- Sean Kingston I’m At War)

  • This one goes to my man old dirty one love we be swigging brew (Big Daddy Kane -- Entaprizin)

  • My brother I love you Be encouraged man And just know (Tech N9ne -- Need More Angels)

  • When you done let me know cause my love make you be like WHOA (Missy Elliot -- Dog In Heat)

  • If I can’t do it for the love then do it I won’t (KRS One -- Take It To God)

  • All I know is I love you too much to walk away though (Eminem -- Love The Way You Lie)

It makes you wonder if DeepBeat can be sued for copyright infringement or if the mixing of lines suffices to make the computer-generated rap count as a new work.

Law suits aside, what do you think of the quality of the composition?

Read more about:

2015

About the Author(s)

Ariella Brown

Ariella Brown

Ariella holds a PhD in English and has taught writing to college and graduate students. Since 2005 she has served as a scorer for the SAT essay. She is the owner of Write Way Productions, which publishes Kallah Magazine. Her freelance writing services include articles, press releases, letters, blogs, Web content development, editing, and ad copy, as well as ad design.

Never Miss a Beat: Get a snapshot of the issues affecting the IT industry straight to your inbox.

You May Also Like


More Insights