CoRecursive: Coding Stories - Tech Talk: Beautiful and Useless Coding with Allison Parrish
Episode Date: November 16, 2019Tech Talks are in-depth technical discussions. Generative Art involves using the tools of computation to creative ends. Adam talks to Allison Parrish about how she uses word vectors to create unique p...oetry. Word vectors represent a fundamentally new tool for working with text. Adam and Allison also talk about creative computer programming and building twitter bots and what makes something art. "Computer programming is beautiful and useless. That's the reason that you should want to do it is not because it's going to get you a job, because it has a particular utility, but simply for the same reasons that you would pick up oil paints or do origami or something. It's something that has like an inherent beauty to it that is worthy of studying." "For my purpose as an artist and as like someone who teaches programming to artists and designers, I want to emphasize that it's not only a vocational thing, it's not only a way for building things like to do apps for that matter. It's not only a way to, you know, write useful applications that help to organize communities or help to do scientific work and other like good applications of programming and software engineering. But there is this like very essential, very core part of computer programming that is just joyful. Um, that's about understanding your own mind in different ways and understanding the world in different lands." Experimental Creative Writing with the Vectorized Word Every Icon Word2Vect Allison Parrish's Website Tracery Articulations Every Word
Transcript
Discussion (0)
Computer programming is beautiful and useless.
That's the reason that you should want to do it.
It's not because it's going to get you a job,
not because it has a particular utility,
but simply for the same reasons
that you would pick up oil paints
or do origami or something.
It's something that has like an inherent beauty to it
that is worthy of studying.
Hello, this is Adam Gordon-Bell.
Join me as I learn about building software
this is code recursive that was allison parish i've been trying to get her on the podcast for a
while she is a teacher at nyu she teaches a class called computational approaches to narrative
she's also a game maker she's a a computer programmer, and she's a poet. Her poetry is generative. She uses the tools of NLP and
computers to create her poetry. So today we talk about word vectors and also about poetry and art.
Allison was nice enough to answer my somewhat blunt questions about the nature of art,
and she also does a couple readings of her computer generated poetry. And we end with some tips on how people can get started creating things with text.
Her thoughts on computer programming for just the pure beauty of it.
They also really resonate with me. So, I hope you enjoy the interview.
Allison, thanks for coming on the podcast. So, I have this quote from you here that I think
this is reason enough for me to try to get you on the podcast. It says,
I want to punch language in the face and I want to use a computer to do it. So what does that mean?
I don't know. I think it's pretty clear. There are a couple of parts to that quote. So I call myself a poet.
And one of the roles of poetry, in my opinion, is to sort of destabilize language or call to
attention the ways that language shapes the way that we think, the ways that language enforces
particular worldviews, the ways that language shapes the world, right?
The English language in particular has a history of being a force for particular forms of power.
And that comes in lots of different forms, you know, notably in things like movements in the
United States of making English the first or like the official language of the country is like one example of like language being used as a platform for politics in particular kinds of projections of power.
So that ability of language to do things to facilitate power, the kinds of power that I'm not interested in facilitating, that's the kind of language that I want to punch in the face, right? Anything about language that forces us to see the world in a particular way, maybe not with our consent, anything that limits the expressiveness of language, that's a little bit more difficult to explain. I think there's, among poets, there's kind of, I would say, a Luddite-ism, which I think in a lot of ways is justified. project certain forms of power and not good forms of power. So I understand like the skepticism
surrounding computation and its use in the arts. But on the other hand, I like computers,
I like programming, that is my expressive medium, when I do things intuitively, the way that I do
things intuitively is through computer programming. And I also think that computational thinking and
the tools that it gives you for breaking the world down and thinking through processes,
rethinking processes, I think that has the potential to be a really interesting artistic
tool. And so when I say, you know, I want to punch language in the face and I want to do it with
computers, that's what I'm getting at. It's like, I think language needs to be punched in the face.
It needs to be
cut down to size so that we realize the ways in which it is arbitrary. And I want to do it
computers because that's what I like. That's what I think is an effective tool, especially
for the kinds of ways the languages are languages used in this contemporary context.
So were you a computer programmer first who became a poet? Is that your medium? Or how
did you come to this approach? I got my first computer as a Christmas present when I was five.
And it came with a programming manual and I started doing computer programming for it.
I've always been interested in language since I was a kid. My dad gave me a copy of The Hobbit
to read when I was 10. And I loved reading me a copy of The Hobbit to read when I was
10. And I loved reading it. And the thing that I loved especially about it was
Tolkien's invented languages. And I think those two interests and like, you know, I was captivated
with computer programming. And I loved the way that Tolkien used language in his books. That plus
in high school, my creative writing teacher had us read Gertrude
Stein, the modernist poet. And so I think like those three interests like combined together to
make this the inevitable outcome of my artistic practice. So I wouldn't say like none of the
things like came before any of the other things, just sort of like this bubbling up of all of
these interests simultaneously. I have the computer science degree from a really, really long time ago,
but my main undergraduate degree was in linguistics. And I think only more recently
in the past like five to 10 years have I been calling myself a poet, you know, like actually
as like thing that I would put in my bio. But my interest in language and creative uses of language
comes way, way, way before that. How do you combine the worlds of poetry and computer programming?
Mad Libs, I think, sort of count in the realm of computational language. If you look at the
history of computational poetics, some of the earliest projects were sort of canonicalized
that became part of art history and literary history are things that superficially resemble Mad Libs.
Well, actually, deeply resemble Mad Libs.
They don't superficially resemble Mad Libs.
They resemble Mad Libs formally, but have a very different tone.
Like Alison Knoll's House of Dust is a poem that was generated by like a Fortran program.
So things like randomizing words is a really
simple technique that you can do computationally. And that just adds new energy to a text.
But it's also a simple language model. So a language model is like a statistical model
that predicts what the next word in a text is going to be. So something like autocomplete on
your phone is an example of that. Or GPT-2 is a really sophisticated example of that.
Its only goal is to take an existing corpus and predict the next word.
Tristan Sara's How to Make a Dada's Phone is also a language model.
It just predicts the next word by the frequency of all of the words in the text, right?
So those techniques are sort of a number of well-known techniques. So something like a Madlib or word replacement, things like language models, and then more
mechanical operations on language like randomizing and stuff like that.
Those are kind of all of the techniques that you have at your disposal in one form or another.
Does that answer help or does that just make it more confusing?
Can I say both?
Yeah, sure.
That's probably the best answer, actually.
No, it is helpful.
What makes something poetry?
I mean, you're not going to be able to answer this in our time.
But if I select randomly from a bag of words made out of an article, I mean, what makes it art?
That's a difficult and fraught question.
I'm asking it in the kindest way, by the way.
I don't care if you're being kind about it.
With this question, it can be asked in a kind way.
It can be asked in an aggressive way. But I have confidence in my techniques as an artist,
like I think that the things that I do are art. And I'm also not like attached to the label of
art. Like it's still important and interesting, even if people choose to say that it's not art.
But art is literally like things that you have made, right? Art is the same root as an artificial,
it's like a thing that has been created, right?
So anything that meets that bare definition counts as art. It's like a word that it has
like connotations of being like high society or high status. And that I think is kind of a useless
thing to attach to it. Poetry is the same way. Like the word poetry has this like sort of genteel, academic, educated feeling to it.
And a way that you might complement a text is by saying that it's poetic, right?
It's like considered to be this like higher form of language.
That's not what I mean when I talk about poetry.
When I talk about poetry, I'm talking about forms of language that call attention to language's
materiality. They call attention to the surface form of language
rather than to just its semantics,
semantics being the meaning,
the so-called meaning of a text.
There are multiple ways for me to ask you
to pass me the salt shaker, right?
I can mean that same thing in multiple ways.
And I would say like narrative art forms like the novel and things like that call attention to the underlying story
structure and like characters and plots and things like that. So to contrast like narrative,
creative writing from poetry as a creative writing form, poetry would be forms of creative writing
that aren't about underlying
structures of meaning necessarily, but are about what actually happens on the page when language
is written, what actually happens in the mouth when language is spoken out loud, things like that.
A creative language is more poetic to the extent that it calls attention to those dimensions of
language by that definition. There are lots of
poets who don't care about that stuff and their practice. I'm not saying that it's not poetry,
but for me, when I'm talking about poetry, that's what I'm talking about.
The talk I saw of yours, you used word vectors, which I wasn't familiar with,
to do some neat things with text. So what are word vectors?
One of the main operations that people want to do in
natural language processing, and this has been the case since even since like the 50s,
is determine how similar two documents are or two units of language, whatever that unit happens to
be. Or they want to be able to say, these documents are all like one another.
They form a cluster versus this other set of documents or units of language or whatever form a different cluster.
And the main mathematical operations that we have for operating on things like similarity and clustering and classes for categorization is Euclidean distance or other measures of distance between
points, right? So if you want to know how similar two points on a Cartesian plane are,
you just get the distance or the length of the line that connects those points, right?
And that math is the same thing. If you wanted to, any data that you can represent as two spreadsheet
columns, as two dimensions of data, you can use that same math to figure out whether those two
items are similar or whether things are in clusters or so forth. So that's like the underlying
statistical and mathematical need is to take phenomena in the world and represent them as points on a plane or points in three
dimensions or points in however many dimensions there are, however many features there are of the
data that you're looking at. So word vector is exactly that. It's like a way of representing
a word as a point in space of some number of dimensions. And there are lots of ways of making
word vectors. Like I said, if you go back through the literature, you can find stuff from the 50s, 60s, and 70s that
are trying to like hand assign values to spreadsheets of words, you know, say like,
put a one in this column, if it's a word for an animal, put a one in this column, if it's a noun,
so that they can do these distance operations to do things like
clustering. In the more contemporary machine learning, those word vectors aren't constructed
by like building the data set carefully. They're constructed through processes like a neural
network, building a generative model and taking the calculated latent space value for each of
those words, or just doing something like principal components analysis on a word
co-occurrence matrix or something like that to give you a vector representation of that word.
So that you could say, for example, once you have a vector representation for the word,
you can say like, what are all of the words that are most similar to blue? And it would give you
green and sad and purple and sky, all of the words that occur in similar contexts.
And then you can do weird mathematical operations on them, like classification and categorization
is one thing. But the big finding from the famous Word2Vec paper from the Google researchers
was you could do things like analogies, like the same line that connects
France and Paris. If you draw a line from France and Paris and you transpose that line to start
on Germany, the line will point to Berlin. So there's this like space that gets generated.
And they were presenting this as like a finding specifically about their method of making word
vectors. But I think it probably applies more generally. Some of the research that I've been doing has been using much less sophisticated
techniques that still show some of those properties. So we cast all this thing into
this multidimensional space and an arrow in that space represents some sort of relationship.
Is that what your Berlin example? Yeah. Just like imagine on a two-dimensional plane,
it's the line that connects two points, plus the direction.
So like the direction and the magnitude of that line.
You can easily think of it as just like the line that connects two points.
That's the way that I usually explain it, at least.
Yeah, it makes sense.
It's not a way I had thought about words before.
Right.
That's what's interesting.
Talk that I saw you gave, you started off with a very simple example, which was RGB colors.
So you had, I think that you took each color and mapped it to an RGB value.
And then you answered some strange questions about like,
what is the average color of the book Dracula?
And I remember thinking, that doesn't seem like a type of question that,
first of all, I would know to ask or that could have a logical answer.
Right.
And for me, that's the, when I say that I want to punch language in the face with computers,
that's the utility of doing these things computationally is that if you're critical
about what computers can do and about where these data sets come from, you can let kind of the
natural affordances of computation lead you to these unusual questions that can reveal things
about the world and about texts like Dracula, but you know, just any anything in the world,
it can reveal things about those things that you might not have otherwise known to look for,
right? But the way that a computer program or the way that a data set casts those phenomena,
you know, their results of particular decisions that people have made. But in that combination, in that synthesis, you can end up with these like really amazing and
bizarre questions and ways of looking at the world that other techniques can't do. It's their
worldviews and things that you notice that I think are particular to computation in some ways.
So are there other interesting questions you have asked of text?
Well, so one of the things that I talked about in that talk that's on my mind, because I was preparing a little bit for this interview, is a phonetic similarity between texts. And that's one of the big things that I've been working on in my research for the past couple of years is how to determine whether two stretches of text, whether it's a word or a sentence or a line in poetry sound similar to each other. And that's something like approaching that question without computation,
I think would be interesting, but difficult. Like the way that answering these questions
might happen like back in the middle ages is you would just get a whole monastery of monks
on the question. Like if you wanted to do something like
find me every verse of the Bible that has to do with clouds, you would have to like feed a monk
for a couple of days to like go through the book and like find all of the verses that have to do
with clouds. If I wanted to answer the question, like what sounds similar to something else without
a computer, I would have to like established criteria and then make a database of those words
and then pay a grad student to go through and say,
like, does each of these lines match these criteria?
With computation, I can do it much faster
and I can iterate on ideas of what sounding similar means, right?
And because it's like kind of easy to do that
or more or less easy,
like it's a one person job instead of a monastery's job, I can pick and choose my techniques and develop the technique in a way that ends up being most aesthetically pleasing to me.
Aesthetically pleasing because I'm a poet and an artist, and that's what I'm interested in.
So yeah, phonetic similarity has been the big thing lately.
It's a kind of thing that I don't think I would have been able to do as easily without computation. And it was definitely informed by the computational tools that I had at hand when
I was developing algorithms to do that kind of thing. Do you have wave samples of words and you
map them? Or how do you determine what a word sounds like? If you want to know how to pronounce
a word, let's say in a paper dictionary or on Wiktionary or something like that, there's like
the phonetic transcription that shows you how to pronounce the word. So if you look up a word like
twerk, for example, T-O-R-Q-E, how do you pronounce that word? Well, you don't like
sound it out letter by letter, really, because that doesn't work for those last two letters,
right? Those letters are silent. How do you know that? Well, you learn it in school. And if you're
not sure, you look it up in a dictionary and you look at the phonetic transcription, right? Those letters are silent. How do you know that? Well, you learn it in school. And if you're not sure, you look it up in a dictionary and you look at the phonetic transcription,
right? There's a big database of phonetic transcriptions for English words called the
CMU Pronouncing Dictionary. And I use that as a data set for a lot of this work because it's
computationally readable. It has the word and then also a language for transcribing the phonetics of
those words.
My own personal view of what's interesting to me is that we can talk about sounds and qualities of sounds without resorting to like audiophiles, right?
Like I can tell you this poem has a really whispery feel or that talk was really, they used a lot of words that were really heavy or something like that. Or we can
even talk about individual sounds like the sound in English or the nasal sounds of French or the
trilled R of Spanish. We don't have to resort to like audiophiles to know what we're talking about,
right? We have like a language we're discussing that's not purely based on recall or imitation. So there's this level of
thinking about language that's more about like an internal mental representation of the sounds
than it is about the audio itself. So what do you do with that? If you have this mapping of words,
I mean, you personally, what excites you and what can you do with this information?
So I use it a lot. It's a file that I basically always have open on my computer in one form or another.
I think for this stuff that was in the talk that you watched, I was just making word vectors using the features in the CMU pronouncing dictionary as the dimensions of the spreadsheet. So counting basically co-occurrence phonemes,
but not just phonemes, but underlying phoneme features as a way of like basically making
spreadsheets where every word had a different vector associated with it. And that gives me a
really easy way to tell whether two words sound similar or whether two sentences sound
similar, just based on like counting up the phonetic features from the phonetic transcription
of the words that comprise that sentence or that line of poetry or that individual work.
Other ways that I've used it, one is just like finding words that rhyme in English, right? Which
sort of the naive solution to finding words that rhyme is like,
well, we find words that have like the same last couple of letters, right? Here and there,
those are really good examples, right? Like here and there both end with the same four letters,
but they don't rhyme. So to know whether two words rhyme, you need a phonetic transcription.
And then you can look at like everything from the last stressed syllable up to the end of the word of two words, share that then they rhyme.
And the CMU pronouncing dictionary gives you the ability to find words that look like that.
So are you willing to like share an example of something with us?
So one of the things that you can do with word vector is a sort of like,
tint a word. And the way that you can do that is say that I have,
if we were working with semantic word vectors, like the, like word to back or, or glove,
I could say like, I want a word like basketball, but I want it to be, be basketball um i want a word like computer but i want it to be a little bit
more sad or something so you'd find the word for computer and the word for sad and then like
basically draw a line between the two and find a point on that line and see if there are any words
that are close to that point on the line and then you might end up with like, I can't think of a word that's like computer, but more sad, maybe like abacus or calculator or something like that. And I call
this like tinting, tinting words. With the word vectors that I've made, they're based on sound.
So you can tint a word by saying, I want you to find a word that's like this word,
but it sounds more like some other word. The words that I
use as examples a lot for tinting are kiki and booba. And these are nonsense words, but they've
been shown in different studies like anthropological and psychological studies to have this sort of
constant emotional valence across cultures. So the word kiki is perceived as sharp,
and word booba is perceived as round. And people like match up pictures to these words. It doesn't
matter where you grew up or what language you spoke when you grew up. They're almost always
seen in that way. You can hear it, right? Like Kiki sounds very crunchy or angley. I don't know.
Yeah. And Boobas seems like round bulbous, right? So there may be these universals in phonesthetics
where language has particular synesthetic properties, right? Which I think is super
interesting. So one of the exercises that I did is that I took Robert Frost's The Road Not Taken,
which is the two roads diverged in a yellow wood. I took the one that has been less traveled by and that has made all the difference.
Well known if you're primary or secondary education in the United States and took like
an English class here. It's one of like canonical texts. And rewrote it with the phonetic word
vectors, replacing words that sound two versions of this one version where it's replacing words
that sound replacing every word with a word that sounds more like kiki and then another version where it's
replacing words with words that sound more like booba so we'll do a little experiment here and
i'll read i'll read all three versions um so the first is without any modifications and it goes
like this two roads diverged in a yellow wood, and sorry I could
not travel both and be one traveler, long I stood and looked down one as far as I could to where it
bent the undergrowth, then took the other, as just as fair, and having perhaps the better claim because
it was grassy and wanted wear, though as for that the passing bear had warned them really about the same. And both that morning equally lay and leaves no step had trodden black.
Oh, I kept the first for another day.
Yet knowing how way leads on to way, I doubted if I should ever come back.
I shall be telling this with a sigh somewhere ages and ages hence.
Two roads diverged in a wood and I, I took the one less traveled by, and that has made
all the difference. So that's the original. Thank you, Robert Ross. So here is the version of that
poem, plus the word kiki. So tinting all of the words to sound a little bit more like kiki.
It goes, cookie roads diverged in a yellow wood key, and Sarti I Goki pecan cable booth,
and P1 traveler, long I Stuki,
and Lokai down, one as far as I Goki,
Taki Waikiki, Ik Biki, and the undergrowth.
Then Kupek the other as Chiki, as Pichera,
and having perhaps the Becky came,
Piki Ik was Kisi and Waikiki Waki.
Though as for Pique, the kiki and kiki,
haki warn them ki likubuki, the safekeeping.
Then booth peak morning, kiki lay,
and teaves no teki haki, tea garden black.
Oh, I kaki the thirsty for another ki.
Piki tikion hawe teaks on taki way.
I tiki if I should kiber kambaki.
I kishi pi laki, keith w a psyche squeaky kazi and kazi hence.
Kuki roads diverged in a woodki and I, I kupec the one leki kival pi.
And peak has pig all the difference.
It's wild, right?
I don't know.
It makes me smile.
I don't know.
I don't know how to process that.
It's super interesting though.
It makes me smile.
It definitely like highlights the sound things. I don't know how to process that. It's super interesting though. It makes me smile. It definitely like highlights the sound things.
I don't know.
Do you feel as though language has been punched in the face?
I definitely feel like that you have computationally represented some sort of mouth sound.
You're saying it's above the level of mouth sound, but like that's how I appreciate it
is like some sort of you've kicked the poem in a certain
direction in some weird dimensional space well that's part of what i think is so interesting
about it right is i'm not i didn't use any audio data to make this happen right i just use like
the phonetic transcription it's the data the phonetic transcription yeah i think it's it's
cool should i read the other one yeah let's do it the booba one let it. Okay, so this is the same poem plus booba. Jubu roads, barbers fill in a yellow wood,
and bari, Ikova knob, travel both,
and bobby one, bosler, dom, I stowa,
and jukebox bode, one as fod as Ikova,
to bowel it font in the bogard.
Babu, bo cook the bother as babu is fair,
and having perhaps the babet claim,
bagas, it's a bawa, barisi, and wamba bowel. Though as for bogach, the babu babu is fair and having perhaps the babet claim bagas it's a bawa barisi and wamba bowel
though as for bogach the babu babu have warmed them bodily aboot the same and both bogach booming
equally lay and bobs no babet ha baden blob oh i bobcat the first for bother joy babet knowing
baha way bobs on to way i bowed if I should ever kebab Bob.
I shall Bobby,
Bobby,
Bobby,
Bobby,
Bobby's and Bobby's.
Hence Chubu roads,
barbersville and a wood.
And I,
I both cook the one Bible traveled by and Bogach has by Babo,
all the balance.
That's very good.
Thank you so much.
Yeah,
you're welcome.
I had a computer when I was a kid too.
I built some things.
And I feel like the world is a little bit,
the world of people who computer program is like constrained
and everything's like about building to-do apps
or like making super optimized web services or something.
And so you're doing something super different.
And that impresses me.
And I don't know how,
do you think that the world
should be more creative in the use of computer programming? I'm trying to pick through that
question. Cause I mean, the answer is obviously yes. Right. Like, and it's yes. In a way I have
come to see, or I've come to feel as like fairly unproblematic, right. I have strong opinions about
this that are maybe not backed up by anything practical but
one of the things that i tell my students you know i teach in a program that's a combination
of design and technology and the arts and i teach our introduction to computer programming class
it's called introduction to computational media one of the things that i tell them on the first
day is like computer programming is beautiful and useless like that's the things that I tell them on the first day is like, computer programming is beautiful and useless.
Like, that's the reason that you should want to do it.
It's not because it's going to get you a job, not because it has a particular utility, but simply for the same reasons that you would pick up oil paints or do origami or something.
It's something that has like an inherent beauty to it that is worthy of studying.
And that beauty stems from a whole bunch of things.
One is just like the pure mathematics of computer programming. I think they're super interesting.
Like to the extent that pure mathematics is a field of practice that lends itself to that
same kind of artistic thinking that is joyful just for the purpose of just for doing it. I
think computer programming is like that.
And I mean, when you're making a to-do app,
you are doing something creative
in the sense that you're like applying your skills
and your skills and your interests
and making those kinds of decisions.
It's just, they're attached
to this very uninteresting problem, right?
The same way that like you might be really good
at oil painting and you could still use
oil painting to paint portrait of a dictator right that's not a good use of that skill but it is a
use that you can put it towards so yes i think in general the world would be a better place if
we used computer programming for what to me seems like its intended purpose of being artistic of
being creative of building communities of being citizens, of being creative, of building communities,
of being citizens of the world, of trying to make the world like a good and beautiful
place to be.
And I think it's like a real shame that this delicate artistic process, delicate even though
I'm proposing it can be used to punch someone in the face, you can punch someone in the
face delicately and still do a lot of damage, I have to say. It has been turned towards these other applications that, let's say, at best
are uninteresting and at worst are much worse than that.
It's a great answer. So, I know a ton of people who will be writing computer programs,
whether you paid them to or not, but they get paid well to do it. It's like the world of oil painting, if everybody could get a
job, you know, for a hundred plus thousand dollars doing portraits of people on like
tourist portraits, right? That would negatively influence the world of oil paintings, I assume.
I mean, maybe it's hard to speculate about that precisely. I'm certainly not trying to say like,
if computer programming is something that you do for a job, that it also needs to be your passion. Like that's not part of this equation. Like it can
be interesting to you for other reasons, other than it's like something that you feel fixated
on for whatever reason. And that's also true for artists, right? Like there are lots of professional
artists who feel passionate about their medium, but who don't necessarily feel like they have to
do it after office hours or after their day
of the office is over. Like something can be your professional practice and you can feel really
passionate about it without it being something that consumes your soul in this very like romantic
era artist kind of way. I just mean that it's not a bad thing to just program for your job.
Oh yeah, totally. And also I would say like you can have very practical things that you
do and they can be super fun and interesting and intellectually stimulating. Oh yeah, absolutely.
Absolutely. But for my purpose as an artist and as like someone who teaches programming to artists
and designers, I want to emphasize that it's not only a vocational thing. It's not only a way for building things like to do apps. For that matter,
it's not only a way to, you know, write useful applications that help to organize communities
or help to do scientific work and other like good applications of programming and software
engineering. But there is this like very essential, very core part of computer programming that is
just joyful. That's about
understanding your own mind in different ways and understanding the world in different ways.
Yeah, that's a great sentiment. That was my big tangent. So that was a vector space
of the sounds that we did. What other vector spaces are useful in creation?
Usually the way that word vectors are used is for semantics because most
often for whatever reason, people want to say cluster documents or sentences based on how
similar they are in meaning. So you can say like, here are all of the tweets that mentioned Pepsi
and here are all the tweets that mentioned Coke, right? And you can do that without paying someone
to read every tweet. So it's more about meaning than about other aspects of language. So that's like the original,
like the word to back research or other word vector stuff, like the blood vectors from the
Stanford Natural Language Processing Lab, or more recent things like Google's Universal Sentence
Encoder, which is a neural network that turns similar sentences with similar meanings into similar vectors. So that's the actual like academic research in this era,
academic and corporate research in that area. And I just sort of like hijacked some of those
techniques to make my phonetic vectors because it was like, that was more interesting to me as a
poetic thing. But I've also done stuff with like, you know, word to back pre-trained vectors, like,
like the glove vectors and so forth. We're doing things like grouping lines of poetry by meaning
and doing things just like chatbots are easy to make. Once you have, once you have a way of like
judging the semantic similarity of two sentences, you can make really easy chatbot just by having a
corpus of conversation and then always responding to the user with a response that is
semantically similar to whatever the response was for something that's semantically similar to that
user's contribution to the conversation. It's a convoluted thing to try to explain,
but that's basically how it works, right? So it's like, if I said to the chatbot,
I'm feeling sad, then it would find some statement near that and say like,
I'm feeling down or something.
Is that the idea?
Well, it would find whatever the response was to something that is similar to what you said.
So if you're saying I'm feeling sad, it looks through its corpus and it says like,
what's the closest sentence to I'm feeling sad? And that might be like, I'm feeling down.
And then it responds with whatever the line that comes after that was, right? So if you train it on a movie script, instead of saying, it wouldn't say I'm feeling down. And then a response with whatever the line that comes after that was,
right? So, if you train it on a movie script, instead of saying, it wouldn't say, I'm feeling down, it would say like, buck up, chat, or whatever, whatever the response was to that.
And then you can go back and forth like that, right? That's like a very elementary application
of this technology, but still shows how effective it can be.
So, one thing I don't get is like, how do you get meaning
out of this? Like, how do you group words by their meaning in this multi-dimensional space?
So the way that it's generally done is through co-occurrence matrices. So it'd be like,
if you go through an entire text, make a really big spreadsheet that has one row for every word,
and then one column for
every possible context that a word can occur in and that might just be like the word before and
the word after and then just calculate for every word how many times does it occur between
the and of how many times does it occur between abacus and alphabet how many times does it occur between this and going or whatever. So you have
all of the possible contexts, and then every word, and then you just count how many times the word
occurs in that context. That number then in every row is then a vector that corresponds to what
words occur in similar contexts, right? So if two words have similar contexts, that's like a key,
according to this theory of semantics, that those two words share a meaning or have similar semantic
characteristics. And that bears out if you think of words like, like days of the week, right? So
I'll say something like, this Tuesday, I am, or last Wednesday, we will. So those contexts of like
this and last and next, those are shared by days of the week and maybe not with other things. Like
you would never say this puppy, I'm going to the store or this yesterday, I'm going to the store,
right? With those day of the week examples, though, like they don't actually mean the same thing.
They in fact mean different things,
but I guess they're related.
But they are semantically related, right?
And this is one of the benefits of word vectors
that once you calculate these things automatically,
one of the drawbacks is that
there's no way for it to understand
those really subtle differences
between the meanings of words,
except by like making the window of the context much bigger.
So the idea would be like,
if the context is just like one word before and after,
I'm never going to get that meaning.
But if the context was like a million words before and after,
then you would by necessity,
like almost come to capture the unique context of those words.
I mean, a million is impractical, but there are other ways of getting around it.
And all of the more recent research in this field has basically been about
how do you find tricks to make that window bigger and bigger
without actually using up all of the RAM in the universe.
It makes me wonder if in this vector representation,
where you have like a whole bunch of numbers,
if there's one, like the 73rd one in is like whether it's a time and place or something. Yeah, there's been some research with the prebuilt vectors because the dimensions don't
actually mean anything on their own. The researchers have shown that like some of
the individual dimensions of the vector do actually correspond to particular semantic
properties, which is interesting to think about. But it's,'s you know just sort of like an epiphenomenon of the way that the
dimensional reduction works whether it's done with a neural network or with a technique like
principal components analysis or something like that oh there's no like stability to what these
dimensions are each process produces some different yeah exactly. Because there's the big five personality test
has like five dimensions.
And I believe that the way that they were come up with
was using like principal component analysis.
And then they retrospectively gave them names
like this one is extraversion.
Yeah, that kind of thing I imagine is like fairly common.
Even something like t-sneed, right?
Like you're retroactively assigning
these dimensions don't actually mean anything, Like you're retroactively assigning these dimensions
don't actually mean anything, but you're assigning, well, this means the x-axis and this means the y-axis,
right? With what? Sorry, what was your example? t-SNE. It's the dimensional reduction algorithm
that's used commonly for doing 2D visualizations of bi-dimensional data. And it makes like weird
swirly patterns. It was popular four years ago i guess but for doing often when
you're doing a visualization of gan results or something and you want to show them well
gan isn't a good example because that's a cleaner latent space but like you're doing results of your
your auto encoder for handwriting digits or whatever and the underlying model has like 50 dimensions,
but obviously our screens only show two dimensions. So you want to show it in two dimensions.
t-SNE is a good way of taking 50 dimensional data and reducing it to just two dimensions.
So you can easily show it as a visualization.
Oh, very cool.
Yeah, I didn't invent it or anything like that. It's something that I know about. So another thing you do is make Twitter bots. That is a form of your art.
I haven't made Twitter bots in a while, actually. But for a while, it was pretty important. The
benefit of a Twitter bot is that it's like a really easy way to publish, to publish any kind
of writing, really, but especially generative, like computer generated
writing, it's really easy way to publish that, because it has sort of like a low barrier of
attention, but it can still reach a wide audience. What is Every Word, Twitter bot?
So Every Word is a Twitter bot that I started when I was in grad school in 2007. I was inspired by a piece called Every Icon by John Simon, which is a piece, it's like a 32
by 32 monochrome grid. And it's gradually iterating through every possible permutation of that grid.
So basically, like every possible combination of those pixels being on or off. And it's doing like
one every thousandth of a second. And it's going to keep doing it obviously for millions of years because a 32 by 32 grid is two to the 32 by 32.
So it's a huge, huge number. So we were learning about that in class. And that was about at the
same time that Twitter was kind of kicking off. And then people are saying like, well, Twitter
is useless. People just talk about their sandwiches or whatever dismissive thing people
are saying about it then. So I was like, well, I'm going to do this really small
project. It's going to be like every icon, but it's going to be every word. I'll tweet every
word. So if people think language on Twitter is useless, we'll see whether that's the case. I'll
just tweet every possible word and thereby make every possible statement. So it lasted for seven
years. It ended in June, 2014. It went through every word in a word list that I
happened to find somewhere. I don't remember where the word list was. At its peak, it had a little
bit more than a hundred thousand followers, which isn't, doesn't seem like a big deal now because
Seems like a big deal to me.
But like the standard for Twitter now is much higher. Like Barack Obama has like a hundred
million followers or something like that.
But for an experimental writing project made by a grad student, it was a pretty big following.
So yeah, and then I published a book version of Every Word with Instar Press a couple of years ago that has every word that the Twitter bot tweeted along with the number of favorites and retweets that I got.
I feel like I need to unpack this.
So you have on this bot a hundred times the number of followers that I have and you tweet
each word and then you also published it.
Like it sounds a little bit a successful joke that's taken off.
I don't know.
Yeah, it was, it was a tongue in cheek project, right?
Like there was like a lot of arts projects that are kind of in the avant-garde. It has its roots in a little bit of satire, a little bit of just like,
what if we did this, right? Let's see what happens. So yeah, it was definitely a joke
and it was funny and I had fun. And I think it, it showed a lot of different things. Like it was
successful experiment as well. I think in the sense that it words, when you, it was sort of
like this ultimate project in the decontextualization of words. What do words actually do when you
forcefully take them out of language? How do people respond to them in that context? And
the fact that people have used every word, like people still favorite and retweet the words even
to today. What was interesting while it was running is that
this was back before Twitter really leaned into the algorithmically moderated feeds is that the
tweets would just would just come up like in the middle of your feed, right? Like your friend
might be tweeting about their sandwich or it's hard to imagine anybody using Twitter for anything
except either spreading fascism or being unhappy about fascism right now. But back in the day,
if you cast your minds back to 2009, like people actually use Twitter for actual purposes and not
for self-promotion and trying to either destroy or save the world. So, you know, these words would
come up between two people's tweets and you might have like the tweet for happy might come up.
And the next tweet after that might be a friend that got good news or a tweet might come up between two people's tweets and you might have like the tweet for happy might come up and the next tweet after that might be a friend that got good news or a tweet might come up and it'd
be like lunch and you'd be like oh maybe i do want to get lunch so it's sort of this like heartbeat
it was tweeting every half hour so it's kind of this like weird heartbeat that was injecting your
twitter feed with a little bit of um not randomness but serendipity. So I think it was successful from that perspective.
I would totally take a clock that just had,
instead of actual time with just words.
I think that would be interesting.
And it was also about like,
how does reading on Twitter actually work?
Can Twitter be used as an artistic medium?
Every word was one of the first,
maybe not one of the first Twitter bots,
but like is
sometimes recognized as one of the first specifically artistic Twitter bots. So it
kind of, you know, was participating in this idea of can social media be a canvas for artworks?
Yeah, that's amazing. I remember there used to be this thing. I mean, it probably still exists. I
was just trying to Google it. It was like Garcocoff it was like garfield with markov chain written text have you ever yes i
think i know at least josh millard made a version of that there might be others but yeah yeah no
you're right it's josh millard yeah okay yeah josh is brilliant josh is another like internet
prankster slash artist who makes really great work.
So you teach students and if somebody is fluent in computer programming and wants to make things
using text, where would they start? Do you have a recommended like what they should play around
with? What should they try to create? So there are a couple of really interesting and easy
resources. All of my class material I put online.
So if you go to decontextualize.com, which is my website, there's a whole bunch of materials,
mainly in Python.
That's the language that I work with the most.
For like a really easy and really powerful tool for working with generative text, I would
recommend Tracery, which is a tool that Kate Compton made. Kate Compton's
a recent PhD graduate from UC Santa Cruz's computational media program, and also just
like a brilliant all-around person. So she made this kind of a simple programming language
called Tracery that makes it really easy to write Madlib style text generators,
but also text generators that have like recursive syntactic
linguistic structure. And there's a tool that goes along with that called Cheap Bots Done Quick,
which makes it really easy to turn your tracery grammar into a Twitter bot. And that workflow of
like, I learned tracery, and then I learned Cheap Bots Done Quick, and then I made Twitter bots.
That's like, to me, it's sort of like the gateway drug path of getting involved in this kind of work. I think that gives me more context to some things you said earlier,
because that would be very easy for me to just take somebody I don't like and build some bot
that constantly harasses them. Yeah, I mean, that's what you have just described is contemporary
global politics. And that's part of the reason I don't make Twitter bots anymore is first of all,
because Twitter closed down the developer rules to make it more difficult to make Twitter bots.
For good reasons, right? Because bots are like a huge vector for harassment and gaming engagement algorithms and stuff like that.
But it just made it harder for me as an artist.
And also because Twitter is not good anymore. Twitter is not a good influence on the world. And it's still, I think, an important place for arts and
for experimental artists to publish their work and for artists to intervene and make things that
question the way that the social media is supposed to be used.
And you mentioned this word computational media. If I want to learn more, is that what I should
be Googling? Or what's the term of phrase for this area? I don't know.
I shouldn't have that.
Computational media is more of a broad phrase
that includes just like, you know,
anywhere the computation and media intersect.
My own interest is in generative stuff.
It's usually, that's the word that's usually used with it,
even though that term has different meanings
and different contexts.
Generative art is art that's like generated with computer algorithms. So that's sort of like the phrase
that I would go for is like generative text, generative poetry, things like that.
Generative art. That's awesome. I heard the old story about Brian Eno and he would like get
sound loops that all had different lengths and he would like get them all playing. So it was
just like constantly generating music. And a lot of times it would be bad but sometimes it would get in a weird
offset and produce something cool yeah exactly and the thing that i like to emphasize when talking
about this kind of work is that it's not new right i mean you're talking about brian eno who
was making art that you see techniques before he had his hands on computers but then even before
that you had steve reich you had artists like John Cage, Alison Knowles,
who I mentioned earlier, Jackson Mackler, Tristan Zara.
Going back even before the 20th century,
you had artists working not necessarily with computers,
but with techniques that we could label as computational.
So it's not like this new thing,
like the first computer-generated poem didn't happen yesterday when the newest model from Google came out.
It happened like 100 years ago when Tristan Zara was pulling words out of a hat and maybe even earlier than that.
Oh, that's awesome.
I mean, it's obviously not new, but it's a bit new to me.
So I'm learning and I think it's something.
Oh, that's fine.
Yeah.
I think I just want people to make more weird stuff.
That's my perspective. Yeah, I think I just want people to make more weird stuff. That's my perspective.
Yeah, I agree.
So you mentioned your book.
I think we're running out of time.
I was wondering, is there anything you'd like to share with us from the book?
Okay.
Yeah, so I'll read...
I will read a short selection from Articulations,
which is the book that I wrote as part of Nick Montford's Using Electricity series,
which is a series of books that are computer generated.
So it's from Counterpath Press.
You can buy it online at Small Press Distribution or Amazon.
And it's just a short section from it.
A shape of the shapeless night, the spacious round of the creation shake,
the seashore, the station of the Grecian ships.
In the ship the men she stationed, between the shade and the shine, between the sunlight and
the shade, between the sunset and the night, between the sunset and the sea, between the
sunset and the rain, a taint in the sweet air when the setting sun, the setting sun.
The setting day, a snake said, it's a cane a cane it's a kill it's like a stain like a
stream like a dream and like a dream sits like a dream sits like a queen shine like a queen
when like a flash like a shell fled like a shadow like a shadow still lies like a shadow still i
like a flash oh by shall i like a fool quote? You shine like a lily, like a mute.
Shall I languish and still?
I like Alaska.
Lies like a lily white is, like a lily white, like a flail, like a whale, like a wheel,
like a clock, like a pea, like a flea, like a mill, like a pill, like a pill, like a
paw, hangs like a paw, hands like a bowl, bounds like a swallow, falls like a
locust swarm on boughs whose love was like a cloak for me, whose form is like a wedge,
but I was saved like a king, was lifted like a cup or leave a kiss, but in the cup, the
cup she fills again, up she comes again, till she comes back again, till he comes back again,
till I come back again.
That was great. Thank you very much, Allison. Thank you for punching language with computers.
Sure. Anytime.
All right. That was the talk with Allison. I hope you liked it. Back in 2017, I went to
Strange Loop Conference. This is the first time I've been there. The only time
so far. And I was kind of doing a little bit of podcasting then, but not for co-recursive. I did
some episodes for SE radio. And so podcasting was kind of on my mind and the conference was super
interesting because there was a lot of people talking about like scaling X or like type level
programming, but then also
people just doing like interesting things, you know, just building fun things with computer
programming and like showing the code and walking through it. And Allison was one of those people.
She did a talk that included manipulating text using pronunciations and, you know,
some of the readings that we did today. And at the time I was thinking like, this is just something that's very well suited to an
audio format, like a reading, you know, manipulating the pronunciations of words,
coming up with this multi-dimensional representation of words, and then kind of like
moving things in certain directions in that multi-dimensional space. And then hearing the
results, I thought, you know, this is something that would work great in an audio format. So I hope everybody enjoyed
it. I think it was a little bit of a different type of show, but I hope it encourages people
to play around with creating art with computers, computer programming without a specific purpose.
Yeah, let me know what you think. I thought it was a great episode.