Making Friends with AI

Using AI as a perception-altering drug

Four AI art techniques to help bring out your creativity

Cassie Kozyrkov

--

There I was in Amsterdam, thinking about ways to alter the mind, augment perception, overcome the limitations of human memory, see the past and present simultaneously… and I know what you’re thinking: drugs, right? Guess again! I’m talking about AI for artists.

This article is a look at the nature of machine-augmented art and a brief introduction to 4 of the most popular AI art techniques.

To art is human

If you want to cause a reliable spike in my blood pressure, utter a gratuitously anthropomorphized sentence about AI in my vicinity. You can probably do it without even trying. Just pull up an AI art-icle at random, for example AI Art at Christie’s Sells for $432,500, and start reading out loud: “Last Friday, a portrait produced by artificial intelligence was hanging at Christie’s New York opposite an Andy Warhol print…” (Meanwhile, I’m turning an alarming shade of puce.)

“Edmond de Belamy, from La Famille de Belamy,” by the French art collective Obvious, sold for $432,500. Credit: Christie’s

Here’s why it rubs me the wrong way: AI is a tool, not a person. It’s about as creative as a paintbrush. Excuse me if I don’t share the authorship for this blog post with my USB keyboard. The human is always the artist, everything else is just a tool. But I spent this weekend in Amsterdam and people keep asking me what role AI plays in the creative process. Let me explain in, ahem, local color: Take the drugs-and-art stereotype and replace “drugs” with “artificial intelligence” — much of the same logic applies. AI allows you to perceive reality in new ways, without the side effects.

AI is a tool, not a person. It’s about as creative as a paintbrush.

Plenty of art is created under the influence of something — a tradition since time immemorial. For example, Aeschylus (523–456 BCE) is said to have written his best plays blind-drunk, Picasso went through a long Opium Period, and the Beatles had an enthusiastic dalliance with LSD.

Artificial intelligence lets you perceive reality in new ways.

Creative work boils down to seeing the world in a new way and sharing your insights with the rest of us. Ingested chemistry is one path to an altered perspective, but there are plenty of others, including going to a retreat in the mountains or your favorite cafe to “get yourself in the zone.” Come to think of it, I’m writing this post in an espresso-fueled haze, with lighting and music just so, optimized for getting these words out of my brain and into yours.

Creativity goggles

AI is one more way to get hold of some creativity goggles. If you have a thousand photographs, your eyes force you to take them in one at a time… but software lets you leapfrog your natural perception. If you feel like it, you can experience the blue shadows of all those images at once, with zero side effects. (Except a bit of bulk in your coding muscles, which is a good look this season.)

Computers have been around for a while, so we’ve all had time to get bratty about the incredible ways they can extend our ways of seeing, hearing, and feeling. For proper reverence, try imagining it all through the eyes of Medieval Man…

The things you can do are incredible! You could see every work your creative idol has ever made in a single instant, in parallel, remembering the first and last works with equal clarity. (Meanwhile, your poor unaided memory has forgotten the first one by the time you’ve made your way halfway down the list.) You can hear songs backwards. You could see how your favorite painter’s palette evolves with age. You could lay your hero’s entire body of work bare on your laptop screen. You could hallucinate alterations to your images. You could make new exemplars of a category of your choice. Or, if you share my dedication to keeping forays into art history scholarly, you might be up all night tripping puppies with Hieronymus Bosch.

So there I was, at 1 AM, feeding some of Bosch’s feedings into my puppy-loving neural network… well, I dunno. Is it art? ¯\_(ツ)_/¯ Whatever it is, you probably haven’t seen Hieronymus Bosch from this particular angle.

Is unsupervised learning “real” machine learning?

The fastest way to AI’s creativity googles is through unsupervised learning. If you’re unfamiliar with the term, here’s my cuddly intro with cuddly cats. Talking about unsupervised learning as a sister thing to supervised learning has always left me taxonomically disgruntled — they both involve pattern finding, but that’s really where the similarity ends.

Image result for dog mop classifier

Supervised learning is about the search for a recipe that connects data with correct answers. Tell the algorithm which images are chihuahuas and which are muffins, and if you give it enough examples it’ll eventually learn to make the dog/muffin classification on its own, but if you want it to tell a cat from a canary you need to start from scratch.

That’s the crux of supervised learning — if you want it to perform a task, you have to first tell it exactly what the right answer is and isn’t. Using a tool like that for creativity is doable (necessity is the mother of invention?) but it’s not my first choice for making art. After all, creativity’s right answers are whatever the artist feels right about, and often you only know them after you see them.

Demonstration of k-means with a simulated dataset in R. (If you’re not seeing anything move, then your browser has decided it isn’t a friend to GIFs right now.) We begin with a dark cloud of points and end with two highlighted clusters. See if you can puzzle out what this unsupervised learning algorithm is doing…

This is where unsupervised learning comes in. Simply put: Unsupervised learning is a technique for extracting patterns from unlabeled data. So, you could feed it thousands of images, and it’ll return back to you a pattern that it found in them. If this sounds familiar, that’s good: Google engineers demonstrated this technology a few years ago, feeding an algorithm tons of images off the internet. The first thing it learned? There is something that resembles what we might call “cats.”

Your internet is made out of Cat. Behold His true form. Source: Jim Wilson/The New York Times.

Many people think of unsupervised learning as a type of machine learning and AI. I’d argue, however, that from the perspective of the user, unsupervised learning belongs in its own separate category. While supervised learning can help you classify whether a painting is a Picasso or a Monet (after you show it examples with correct answers), unsupervised learning can help you find new inspiration by showing you patterns in Picasso’s work that you might not have detected with the naked eye.

Creativity’s right answers are whatever the artist feels right about, and often you only know them after you see them.

Sure, some of the underlying math is the same in unsupervised and supervised machine learning, but from an application perspective they’re so completely unrelated that I almost wish they were called “creativity goggles” and “decision automators” respectively.

Before I launch into a discussion, it’s worth briefly mentioning a few more popular techniques whose names are nice to invoke while you lean knowingly against your easel…

Neural Style Transfer

Another popular AI tool you could use in your creative process is Neural Style Transfer (NST), which is best explained with the thousand words below:

Image result for style transfer
Learn more here if you’re curious, though this might be a more current code intro since it uses TensorFlow 2.0.

GANs

I’d be remiss in discussing creative AI if I didn’t mention GANs, which give you a way of hallucinating something that doesn’t exist in the real world.

Generative adversarial networks (GANs) deserve their own separate blog post, but in excessively broad strokes… you can think of them as a dashing duo of yoked models.

This “Rembrandt” was not painted by the Dutch master. Learn more in the video below.

One is an aspiring forger of a category of your choice (Rembrandt, anyone?), while the other tries to separate the real items from the fakes. The idea is that if these two battle it out over and over, both learn to get better at their jobs… until the fakes are so good that they convince you!

Want intuition for why the Generator and Discriminator need to be yoked to learn together, rather than just using two independent models? If you’ve never played chess before, you probably won’t learn very well if your first game is against a grandmaster playing like her life depends on it. No move you make will seem more effective than any other because she’ll smoke you every time. Playing against similarly-skilled beginners and progressing together helps you learn more effectively.

Some GAN-generated portraits of your author.

Enough with the serious stuff, go check out aiweirdness.com for a great laugh. There’s lots of goodness there, including this gem where GANs generate art to fit custom titles. I was cracking up by the time I got to the One (1) Clock. I’ve pasted a one below to whet your appetite (salad, get it?). And no, the art isn’t always good art.

Deep Dream

One of my favorite techniques is Deep Dream, which I used in this article to make the trippy puppy-Bosch and the self-portrait at the top of the page. To make images like this, you hack a neural network created for classifying images and run it in reverse to adjust the original image in a way that triggers parts of the network to yield a higher confidence score for, say, puppies. The result is deliciously exaggerated patterns.

Behind the scenes of my self-portrait at the top of this page. It took ~700 dial-twiddling runs (and some cunning partial masking) to produce two portraits I was happy with. They look just like me!

You’re the artist

Whether you’re using unsupervised learning’s creativity goggles to see new patterns or you’re hallucinating new a logo with GANs, behind the scenes of pretty much every good piece of AI art is a huge graveyard of duds. The pattern-finding algorithm suggested something and the artist said, “Nah, run it again.” Hundreds of times, if not thousands.

Behind the scenes of pretty much every good piece of AI art is a huge pile of duds.

Whenever the AI art crowd makes it sound like whatever they’re showing you was the first thing their algorithm spat out, they’re sweeping most of the story under the rug. (Don’t make me launch into a treatise on creative process parallels between AI art and found art!)

Who is the artist?

Because the human artist’s taste ultimately drives most of the work in selecting which of the pattern-finding attempts is compelling, asking whether AI deserves some credit for the piece is like asking, “Did I write that poem or was it the glass of wine?” Giving credit to a vineyard for poetry seems about as necessary as giving credit to an AI system. And, of course, if the terms and conditions for drinking the wine gave the vintner ownership rights for your content, you’d weigh the choice yourself. Personally, I believe it’s always the human creative — the artist, the musician, the analyst — who is the real author when they select an AI system’s output for use.

AI can’t be creative, but you can… and you might just find your creativity inspired by AI.

Who owns your creativity?

If we keep up the drugs-vs-AI analogy, let me remind you that you probably don’t expect two artists drinking a glass of the same wine to suddenly create identical art. At best, AI in art (or wine in art, for that matter) is a tool some people might find useful for fostering their creativity. Tools don’t really get credit for helping their users.

AI tools give an artist a shifted lens through which to see, but inspiration is uniquely human.

Even so, it might be appropriate to ask whether the artist could do the work unaugmented. That’s slippery ground that involves delving into what we believe is the nature of creativity. Could I have written this blog post without coffee? (So much of it that it’s seeping out of my eyeballs?) Would it have been the same if the interior design team hadn’t done such a great job on the lighting in the cafe where I’m sitting? What about the songs playing in the background? They all had some effect, surely. Could I have done it without them? Hang on, what *is* the it that I wouldn’t have done? Real life usually lacks counterfactuals. I sense this topic could add some spice to the discussions of those who have been asking about the role of psychoactive substances in art since time immemorial, though the AI component adds nothing fundamentally new.

You wouldn’t expect two artists drinking the same wine to make the same art as a result.

I’d better stop here — I’m giving myself a headache thinking about situations in which ML is no longer used as a tool in the creative process, but as a tool to infringe on prior intellectual property. Consider a case in which you feed in all the works of a popular novelist who writes about teenage wizards and produce a manuscript that you then edit and sell to a publisher for millions. If that happened, and a legal team looked at your cloud-training logs, would they have grounds to sue for infringement?

Would they be able to do the same with a glass of wine?

Thanks for reading! How about an AI course?

If you had fun here and you’re looking for an applied AI course designed to be fun for beginners and experts alike, here’s one I made for your amusement:

Enjoy the entire course playlist here: bit.ly/machinefriend

Liked the author? Connect with Cassie Kozyrkov

Let’s be friends! You can find me on Twitter, YouTube, Substack, and LinkedIn. Interested in having me speak at your event? Use this form to get in touch.

--

--

Cassie Kozyrkov

Chief Decision Scientist, Google. ❤️ Stats, ML/AI, data, puns, art, theatre, decision science. All views are my own. twitter.com/quaesita