Rhyming is hard

Although many people have generated AI poetry and lyrics, you’ll notice that they generally don’t rhyme. That’s because generating a decent rhyme is super hard.

You can get an inkling of this if you prompt the neural net GPT-2 with rhymes to complete. It will fail almost every time.

In part, this is because English spelling is so nonuniform. How would a model trained on just written English know that it can rhyme throw with dough but not with brow? Not to mention stress patterns and syllable counts.

A few people have attempted to get neural nets to rhyme, and one of them is a new online demo by Prof. Mark Riedl of Georgia Tech. Give it example lyrics to a song - for example, the first two verses to the Gilligan’s Island theme - and it’ll try to fit the number of syllables and rhyming scheme, as well as take inspiration from a short phrase you supply.

Prompt: “If I knew you were coming, I’d have baked a cake”
Tune: Gilligan’s Island theme

Ok, but this is terrible. It’s TERRIBLE. One of the problems is a complete disregard for emphasis, making this inhumanly awkward to sing. It also does a rather cheap shortcut of rhyming words with themselves.

Prompt: “The mighty pudding god will devour you.”
Tune: Gaston’s Waltz from Beauty and the Beast

Here we are not only off-topic and awkward but absolutely bonkers. It has made the rather daring move of incorporating a reference to Alusuisse, which wikipedia informs me is a defunct Swiss chemical company. In fact, looking back over the program’s output, it made this decision when looking for a rhyme for “this”, and it skipped past “bliss”, “dismiss”, and “Chris” in favor of the former aluminum manufacturer. When choosing rhymes it scores potential words according to their similarity to the prompt, and there must have been something about Alusuisse that screamed “vengeful pudding god”.

Its syllable counting also breaks in weird ways.

Prompt: “Destroy all humans”
Tune: “Baa baa black sheep”

Looking back over the logs, it did correctly count 11 syllables for “baa baa black sheep have you any wool.” But this AI is built of lots of carefully-coordinated sub-programs, each of which only does a small piece of the puzzle, and apparently the sub-program that was supposed to suggest 11-syllable lines shrugged and went “on…. august? that’s all i got”.

Prompt: I am a turnip
Tune: The wonderful thing about tiggers

This makes the world’s worst karaoke, and yes, Riedl has built a karaoke-making function for this. If you want to weird someone out, just casually sing a song with the AI lyrics instead of the real ones.

Botnik Studios also recently built a karaoke-generating algorithm (“The Weird Algorithm”) that instead of generating lines from scratch, picks them from some other source file, trying to match meter and rhyme. (for example, rewriting The Rainbow Connection with lines from X-files scripts). Here’s Jamie Brew demonstrating the system, including singing the lyrics as they pop up onscreen - if you tried to sing any of the lyrics above, you’ll know how darn impressive his singing is. Each line is independent, though, so if the song makes sense as a whole, it’s by accident.

So today’s AI can only sort of generate rhyming poetry. “Sigh. Natural language is hard,” Riedl tweeted, when he saw the Turnip hoowelp welp results. AI won’t be beating humans at rap battles anytime soon.

You can generate your own inadvisable karaoke using Riedl’s app.

AI Weirdness supporters get bonus content: more terrible AI lyrics than would fit in this blog post. Or become a free subscriber to get new AI Weirdness posts in your inbox!

Subscribe now

My book on AI is out, and, you can now get it any of these several ways! Amazon - Barnes & Noble - Indiebound - Tattered Cover - Powell’s - Boulder Bookstore