dash

Beyond Top Down?
A discursive (that is to say long and rambling) essay remembering the author's primitive attempts to program his computer to write poems, and asking to what extent AI can do better. Probably of interest to nerds only.

fr leavis
Grok imagines Dr Leavis being confronted by a robot.

Sometime back in the seventies the philosopher Dorothy Emmett, (who had been my tutor briefly at Manchester) met the great, and often abrasive, literary critic F.R. Leavis at a party. Making conversation, she asked: ‘Did you know that there is now a computer that can write a poem?’ I’m sure she relayed the news enthusiastically. (She could be very enthusiastic, and was even enthusiastic about one of my essays once.)

Leavis was unimpressed, and returned to this conversation in several of his late writings, declaring that anyone who thought a computer could write a poem could have no idea what a poem is.  He valued poems that were the deepest and subtlest expression of human thought and feelings; to suggest that a mere machine could create one was a kind of blasphemy.

There is much to be said for Leavis’s attitude, but there is definitely another side to the question. Yes, yes, a poem can be ‘the precious lifeblood of a master spirit, embalmed and treasured up on purpose to a life beyond life’, but a poem is also an arrangement of symbols. Computers were invented to organise and arrange symbols – so why can’t they write a poem?
zx spectrum

It’s a question that strongly intrigued me at one period in my life. When I first owned a computer (a Sinclair Spectrum, back in 1982) I learned the basics of programming, and became interested in the way that a simple program, given a vocabulary of words whose grammatical function was defined, could generate English sentences. I enjoyed the nonsense sentences it produced: ‘The greengrocer strangled the cold fish slowly.’; ‘A rancid aunt likes bananas.’ I would set the machine to print out random sentences. Then it printed one that brought me up short:

                    ‘My knife imagined a death.’

This sentence had a resonance missing from the other, sillier products of the program. It almost had a poetic feel to it, you might say.

Which set me thinking about why it sounded poetic to me. Was it the dramatic subject-matter? Was it the personification of the knife? Was it the apparent compression of so large an idea into five words? Or was it just that it seemed to fit into a classification of sentences that might sound poets?
If it was poetic, who was the poet?
Was it the computer? But that picked ‘knife’ and ‘death’ from a list of random nouns, with no notion of what they meant. The computer did not even know what a noun was. It just selected items from the array it was instructed to pick from.
Was it the programmer? But ‘knife’ and ‘death’ were there with nouns like greengrocer’, ‘aunt’ and ‘fish’. And ‘imagined’ was just one of a jumble of transitive verbs. The programmer was, if you like, the creator of a mini-language that included the possibility of the sentence, but he had not written this sentence.
Was it the reader? Is poetry in the eye (or ear) of the reader? One thinks of poets who divide opinion. T.S. Eliot’s work is now very highly valued, but in the 1920s there were intelligent readers who thought it was not poetry at all. William Blake got very small attention in his lifetime, and only after his death did some critics begin to teach the world that writings previously dismissed contained great poetry. John Donne was valued in his lifetime, neglected as ’not proper poetry’ for two hundred years, and then rediscovered.  Those who did not see the poetry in these authors were not necessarily stupid. They had other criteria for poetry that these did not meet.

Now remember – this was all ‘Top down’ programming. The computer blindly chose words from lists I offered, arbitrarily as anything.

I moved on from creating sentences to creating verses. I was inspired by the French Oulipo writers – especially Raymond Queneau and his Cent Mille Milliards de Poemes, which shuffled alternative lines of a sonnet to produce an almost interminable collection of possible poems.

100000000000 poems

My homage to this appeared in Snakeskin – The Collaborative Sonnets. In these poems lines by Linda Crespi and William Shakespeare are randomly interleaved to produce alternative versions of the poem. (This was written in JavaScript, a language which has evolved since then. Like a number of my other JavaScript works, the sonnets still work on some browsers, but not on many. Things change.)

Those sonnets came later; my key experiments were almost all in the pre-Snakeskin days. When I had moved on from the Sinclair Spectrum to a PC I used Microsoft QuickBasic, a very easy-to-use and adaptable language. I gather that it is still kept alive by enthusiasts.

robot poet
Grok imagines a robot poet

What I was wondering was: Could I go on from generating sentences to generating poems? After a fair bit of work, I got my computer turning a list of words into iambic pentameters – quite tricky. Syllables had to be labelled strong or weak. The first results were very clunky indeed, until instead of a binary strong/weak system, I used Trager-Smith notation, which gives four possible values for the strength of a syllable’s emphasis. If the second syllable of a foot has a higher number than the first, then it’s passed as iambic. Single iambic lines were achieved eventually. Putting these together in a poem produced end-stopped horrors, however.  Making a programme that could manage enjambment was trickier still, but I managed it.

As poetry the verse these programs produced was negligible. I fashioned simple narratives that could be told in millions of ways. I made a simple program that told the story of how Cleopatra walked into a restaurant, tasted the food and walked out.  The restaurants she visited were many and various, as were her possible reactions. It was silly, but with it I learned to craft convincing pentameters.

Alas, over thirty-odd years and computer crashes and house-moves, I no longer have the QuickBasic programs I worked so patiently at. Maybe some are on a floppy disk I can’t now play.  Just possibly some are recorded on a CD. Some day perhaps I'll hunt for them, but almost the only remnant I can lay my hands on is a collection of poems written by my ‘GothicVerse’ program, a more sophisticated experiment in writing an iambic verse narrative. A
few years after I’d written the program, an e-pamphlet of thirty-four typical pieces of output appeared   in Snakeskin 147 in 2008, It is credited to my alter ego, Linda Crespi.

These poems tell a story that is constructed by the permutation of narremes (little narrative fragments, as explained in S/Z by Roland Barthes. The sequences of narremes  describe the progress of a group of travellers, the worsening of the weather, the illness of Sir John, and things they see along the way. The various sequences are all in narrative order, but can be interleaved in any way. Each narreme can be constructed in a variety of ways from a bank of suitable phrases.The tone of the poem I based on Robert Browning’s paranoid mediaeval narrative Child Roland to the Dark Tower Came. The phrases the  program randomly selected from were all grim. But then, writing grim poems is always easier than writing happy ones.)

Here’s a typical example:


Our silver-haired companion groaned. We all
Observed a glowing crystal. Air was foul,
And therefore dirty thoughts disturbed our minds.
The afternoon was cold as hate. Our path
Led nowhere. We had stumbled on the way.
Our gallant band - I'm joking - had to pause
Before a corpse, whose boots we stole. Sir John
Was dead, we all decided. Finally
We stopped at something brutish. Our crusade
Had reached its pointless end. The godless sky
Grew dark, and bitter snow fell silently.

grok's version

I asked Grok to make a picture of the poem; this is what it produced.

If you want to read thirty-three more examples of the program's versifying, a pamphletful can be found at: https://www.snakeskinpoetry.co.uk/147gothp.pdf

So is this computer-fashioned thing a poem? If I took it along to a poetry workshop, concealing its origins, I’d expect it to be challenged in all sorts of ways, about its quality, its attitude and its limitations, but I don’t think it would be automatically rejected as machine-made. And if it’s a poem, who is the poet?

  • The computer? As with the knife sentence, no. The computer makes random placements of phrases, as programmed. There is no intention at work there.
  • The programmer? Maybe. The programmer chose the phrases, non-randomly, to set a certain mood and tone. The programmer certainly set a limit on what the poem could say. On the other hand, the programmer had no idea that this precise poem would be the output. Perhaps we should say that the programmer created a genre, of which this is an example.
  • The reader: Yes, I think so. The reader brings expectations of what a poem is – lines that don’t reach the right-hand margin; iambic lines that make it sound like a poem; there is some alliteration; it has a consistency of tone; it has dramatic content. These factors nudge the reader into reading it as a poem (whether or not he or she thinks it is a good one).

That’s almost the limit of where I got to with programming poetry. I had vague plans for a much bigger program that  would somehow adapt Vladimir Propp’s ideas about the morphology of the folk-tale to generate stories that could then be expressed in verse. I think I made a small start on it, but other projects got in the way.  I also considered the problem of programming rhyme; not impossible, but one would need to make a large word-hoard available.

Just as my sentence programs had got the grammar right according to the rules, but with random disregard of what the words might actually mean, so in the poetry programs I had dealt moderately well with the syntax of poetry, but not at all with the semantics. In other words, the program arranged the phrases nicely, but with no regard to what they meant. It was top-down writing, with no notion connection of a reality rooted in experience.

A couple of years back, when I first heard that ChatGPT was offering to compose poems I had to try it out. Our local Zoom group had been talking about trigger warnings, so I asked for a poem on the subject; here’s the result:


A word that stings, a memory that burns
A feeling that creeps, a fear that returns
A sight that haunts, a sound that jars
A touch that triggers, old battle scars

The heart races, the breaths shorten
The mind replays, the past threatens to darken
The body trembles, the eyes tear
The soul whispers, a plea for a safe sphere.

The trigger pulled, the damage done
The aftermath felt, by everyone
May we be gentle, may we be kind
For we never know, what triggers we might find.

The verse is clunky, and the idea of what a poem is has not got far past the Hallmark cards stage of  sophistication. What it does have is a good vocabulary; it has looked up th idea of triggering, and has produced an impressive list of synonymous phrases, arranged in more-or-less iambic tetrameters, and rhyming in couplets. The thing disintegrates rather in the third stanza. The metaphorical trigger now seems to be on an actual gum, and the punctuation gives one no confidence that the poem knows what it’s on about (why those commas after ‘felt’ and ‘know’?)

One gets the idea of the program fishing for things it could say, and striving to say them in a way that could be taken for a poem.

ChatGPT, Grok and others use Large Language Models. They have been given access to vast amounts of writing, from which they get a vocabulary, and also patterns of writing and expression. They find a consensus that has been expressed on a subject, and treat it as a collection of facts. But it's not facts; it's documents.

It’s all words. They have no experience of life. The poet Lucretius saw the problem with this two thousand years ago; what we know for certain comes from what we actually see, hear and feel. The rest is hearsay – sometimes based on sound authority, sometimes not, but we can’t be sure.


Unless we place
Our firm faith in sensation, we shall have nothing to base
Conclusions on concerning what lies hidden from our view,
 Nor could our reasoning confirm that anything is true.
Lucretius -translated by A.E. Stallings

Large language Model programs use reasoning to try to work out what is true. When we ask them question, they often come up with accurate answers. Sometimes, though, they can seem like the student who has done all the reading, but has missed the point. They scour large numbers of documents to come up with an answer, but know nothing outside those documents. They therefore reflect the attitudes of those documents. They can’t venture outside the world created by the language of the documents. Except that on occasion, it seems, they can be tempted; lawyers ask AI to help them make a case, and sometimes, too helpful, the program creates references to case law that would be very helpful if it were not fictitious. Seeing that the genre of legal argument needs to have cases as proof, it invents, or hallucinates them. In this kind of instance, AI is like the rather too helpful person from whom you ask directions. He doesn’t want do seem ignorant or unhelpful, so he says something that might be true. ‘Go up to the church and turn left,’ he says, in a helpful voice. So off you go in entirely the wrong direction.

But hallucinations and false trails are a problem with factual AI. Poetry has different problems. Keats, like Lucretius, felt that: ‘..axioms in philosophy are not axioms until they are proved upon our pulses.’ Experience is the guide to truth, in poetry or philosophy. AI has no experience – it can only fake it.

For an example of faking, let’s see what Grok makes of the ‘Write a poem about trigger warnings’ prompt, two years after ChatGPT came up with the Hallmark-style rhyming:


Trigger Warnings

Before the poem begins
 a small white gate is placed
across the path of words
Here be dragons
 says the sign
 here be memories wearing someone else’s skin
Proceed with care
 the management is not responsible
for what your nervous system
decides to recognize
We have catalogued the usual suspects:
blood (graphic)
child (harmed)
knife (held to throat)
father (returning home drunk)
mirror (telling the truth)
Yet no warning exists
for the smell of rain on warm asphalt


This is a much more sophisticated poem. It is in the chopped-up-prose style of free verse that is the norm in Poetry Review and such places. It has significant-sounding phrases like ‘memories wearing someone else’s skin’. (I’m not quite sure what that means, but I can imagine things that it might mean, and they are more or less relevant.) It has a rather drab catalogue of things that might be triggers, but they climax with a good one, the mirror, which does suggest a universal human experience. Then the last line gives us a most effective sensual reminder of petrichor, that special smell of rain on hot ground. This AI model has grasped that a personal sensation is a good way to end a poem. An internet search tells me that there are plenty of contemporary poems that refer to this. Grok has selected well, and has used something that others have told him humans respond to strongly. But he is proving it on what he’s been told about other people’s pulses, not his own. This is a reasonably thought-out poem, but thought is divorced from feeling.  If it reads like a poem - well, that's in the eye of the reader again. It reads just like a huge number of other inoffensive twenty-first century poems. It's very easy to accept.
But this poem strives for the impression of being experience-driven  (bottom-up), while in fact is a pastiche, therefore top-down. Which must be the fate of all computer-made poetry. Its fate is to be an imitation. (Yet isn't this also true of all too many human-made poems? As an editor I frequently receive submissions from people who doubtless think of themselves as utterly original. Often it's all to easy to see who they are (perhaps inadvertently) copying.

To return to F R Leavis, that challenging man: he had a normative idea of poetry – what poetry ought to be. Not much came up to his standards. He notoriously dismissed much of modern poetry, and large swathes of the traditional canon, for not coming up to the mark.  He praised poets like Keats and Blake whose thought was inextricable from feeling, and for whom poetic form was not an optional extra, but was the only way in which such a union could be expressed. He was critical of poets who allowed their writing to become mechanical, divorced from their keenest intelligence and feelings. He felt that Milton had been a bad influence of poets for two centuries because he often used his immensely effective verse as a way of conveying existing ideas, rather than deeply engaging with them. ‘‘A good deal of Paradise Lost strikes me as mechanical as bricklaying.’  Perhaps one or two poets in an age come right up to his standards, and he could always change his mind and deem them insufficient, as he finally seems to have done with Eliot.

keats

Grok pictures (rather romantically) John Keats uniting thought and sensation when he bites into a peach.

My QuickBasic programs were deliberately mechanical; they wanted to see how far mechanical poetising could take one. Today’s AI blurs the picture. It gives the illusion of being bottom-up, arising from experience. But it isn’t, and it can’t be. It is made of text, made of other people’s ideas. It is faking. As a writer of light verse, I often write parodies, pastiches and homages that are to some degree imitations. Is machine poetry on a different level from that. And does that matter?

I would argue that the big task of literary criticism in the coming years will be to discriminate between the fake and the real. Or, putting it another way, to redefine what human writing is. A hundred and fifty years ago the invention of photography posed a challenge to artists and critics. Much of painting since the Renaissance had been devoted to the precise rendition of detail. Now photography could do that better. The art history of the past century and a half has been the history of artists responding to this challenge in different ways. There is an intellectual and artistic battle, and it's not over yet.

I’m not discouraged. I’m sure that AI will be useful, and may even drive out the human producers in some genres – advertising slogans, the more formulaic kind of romantic novel or action thriller, or pornography, or grievance poetry. Otherwise I think we’ll all get better at telling what is AI and what isn’t. Already we’ve reached the stage with Grok’s amazing artworks where we will say of them: ‘Oh, that’s just AI.’ We can tell the difference. Now I greatly enjoy playing with Grok, as you can probably tell from the illustrations to this issue, but I have come to see its limitations. It works well in a limited range of styles. It is good at photo-realism and anime-style, and a style similar to magazine illustration. Not so good at Impressionism. It will doubtless develop a wider range of styles, but they will all be imitations of human styles. 
Today AI designs seem new and refreshing, but that is because they put an old style (generally photographic realism ) to new purposes, introducing fantasy of one kind or another that will be portrayed literally. It's fun - but I think will soon begin to look very old-fashioned. To develop a radically new artistic style of its own would be beyond it, because a radically new style would have to come from a new way of perceiving and feeling about the subject-matter and the medium. It would have to come from contact with something real.

Which is why I'm very interested in Robin Helweg-Larsen's experiment of offering AI his own poems to feed on. The seed of his own poetry has been enough to raise the game of the AI program considerably. And a game it is - which we'll be playing for the next century, whether we like it or not.

Simmers cyborg
George Simmers imagined as a cyborg made mostly of glass.

If you've actually reached he end of this over-long essay, and have any thoughts about it, George Simmers would be pleased to hear them.







logo