Neural Defence

TLDR: I started it as a tutorial project to make myself familiar with RNN and Tensorflow — teach the neural network to generate a poetry in style of some famous authors. Suddenly it gave some results with a reasonable quality and we with my colleague and friend Ivan Yamschikov spontaneously decided to record a tribute album to our favorite cult Russian punk-rock singer Egor Letov. The release got 300 000 listeners in the first week and a considerable attention of Russian media and IT community.

the album cover based on a draft by Pavel Gertman

When back in 2016 I decided to dive into a contemporary neural network technology, I started with this project without any hesitation from the poetry generation since in my past I already made several NLG projects with the poetry, for example, Yandex.Autopoet. The friend of mine, my ex-colleague Ilya Edrenkin gave me several valuable lessons on today’s neural networks technologies and some links on online courses and tutorials to start with.

The core of the Neural Defence project is a language model built as LSTM-based RNN with some bells and whistles. Some of the important tricks were the conditioning with the metainformation like the author and the poem. Another useful technique was the usage of hybrid word-based and char-based embeddings together with the phonetic transcription — to give the network the idea of rhymes and rhythm.

Altogether each word representation looked like this:

Then I used 130 Mb of Russian classical poetry and Russian song lyrics as a learning data with approximately 400K unique words. After something like 15 epochs, it has obtained certain compatibility of the words that could be regarded as some kind of a morphology model and poetry rhymes. The network also was able to learn specific features of individual authors. The more poems of a given author there were in the learning dataset the better it was “represented” by the network.

As far as I showed the results to the other friend of mine, Ivan Yamshchikov, he was very excited and proposed to record a tribute album to our favorite cult Russian punk-rock singer Egor Letov. Ivan wrote and played all the music on the album and we record the voices together in his home studio in Leipzig.

You can listen to the whole album on Apple Music or Google Music.

The release got 300 000 listeners in the first week and a considerable attention of Russian media and IT community. Later we used the same network to produce several poems in style of some classic Russian poets.