Tag Archives: Ravelry

Machine learning, neural networks, and knitting

In a recent (Tuesday, March 6, 2018) live stream ‘conversation’ (‘Science in Canada; Investing in Canadian Innovation’ now published on YouTube) between Canadian Prime Minister, Justin Trudeau, and US science communicator, Bill Nye, at the University of Ottawa, they discussed, amongst many other topics, what AI (artificial intelligence) can and can’t do. They seemed to agree that AI can’t be creative, i.e., write poetry, create works of art, make jokes, etc. A conclusion which is both (in my opinion) true and not true.

There are times when I think the joke may be on us (humans). Take for example this March 6, 2018 story by Alexis Madrigal for The Atlantic magazine (Note: Links have been removed),

SkyKnit: How an AI Took Over an Adult Knitting Community

Ribald knitters teamed up with a neural-network creator to generate new types of tentacled, cozy shapes.

Janelle Shane is a humorist [Note: She describes herself as a “Research Scientist in optics. Plays with neural networks. …” in her Twitter bio.] who creates and mines her material from neural networks, the form of machine learning that has come to dominate the field of artificial intelligence over the last half-decade.

Perhaps you’ve seen the candy-heart slogans she generated for Valentine’s Day: DEAR ME, MY MY, LOVE BOT, CUTE KISS, MY BEAR, and LOVE BUN.

Or her new paint-color names: Parp Green, Shy Bather, Farty Red, and Bull Cream.

Or her neural-net-generated Halloween costumes: Punk Tree, Disco Monster, Spartan Gandalf, Starfleet Shark, and A Masked Box.

Her latest project, still ongoing, pushes the joke into a new, physical realm. Prodded by a knitter on the knitting forum Ravelry, Shane trained a type of neural network on a series of over 500 sets of knitting instructions. Then, she generated new instructions, which members of the Ravelry community have actually attempted to knit.

“The knitting project has been a particularly fun one so far just because it ended up being a dialogue between this computer program and these knitters that went over my head in a lot of ways,” Shane told me. “The computer would spit out a whole bunch of instructions that I couldn’t read and the knitters would say, this is the funniest thing I’ve ever read.”

It appears that the project evolved,

The human-machine collaboration created configurations of yarn that you probably wouldn’t give to your in-laws for Christmas, but they were interesting. The user citikas was the first to post a try at one of the earliest patterns, “reverss shawl.” It was strange, but it did have some charisma.

Shane nicknamed the whole effort “Project Hilarious Disaster.” The community called it SkyKnit.

I’m not sure what’s meant by “community” as mentioned in the previous excerpt. Are we talking about humans only, AI only, or both humans and AI?

Here’s some of what underlies Skyknit (Note: Links have been removed),

The different networks all attempt to model the data they’ve been fed by tuning a vast, funky flowchart. After you’ve created a statistical model that describes your real data, you can also roll the dice and generate new, never-before-seen data of the same kind.

How this works—like, the math behind it—is very hard to visualize because values inside the model can have hundreds of dimensions and we are humble three-dimensional creatures moving through time. But as the neural-network enthusiast Robin Sloan puts it, “So what? It turns out imaginary spaces are useful even if you can’t, in fact, imagine them.”

Out of that ferment, a new kind of art has emerged. Its practitioners use neural networks not to attain practical results, but to see what’s lurking in the these vast, opaque systems. What did the machines learn about the world as they attempted to understand the data they’d been fed? Famously, Google released DeepDream, which produced trippy visualizations that also demonstrated how that type of neural network processed the textures and objects in its source imagery.

Madrigal’s article is well worth reading if you have the time. You can also supplement Madrigal’s piece with an August 9, 2017 article about Janelle Shane’s algorithmic experiments by Jacob Brogan for slate.com.

I found some SkyKnit examples on Ravelry including this one from the Dollybird Workshop,

© Chatelaine

SkyKnit fancy addite rifopshent
by SkyKnit
Published in
Dollybird Workshop
SkyKnit
Craft
Knitting
Category
Stitch pattern
Published
February 2018
Suggested yarn
Yarn weight
Fingering (14 wpi) ?
Gauge
24 stitches and 30 rows = 4 inches
in stockinette stitch
Needle size
US 4 – 3.5 mm

written-pattern

This pattern is available as a free Ravelry download

SkyKnit is a type of machine learning algorithm called an artificial neural network. Its creator, Janelle Shane of AIweirdness.com, gave it 88,000 lines of knitting instructions from Stitch-Maps.com and Ravelry, and it taught itself how to make new patterns. Join the discussion!

SkyKnit seems to have created something that has paralell columns, and is reversible. Perhaps a scarf?

Test-knitting & image courtesy of Chatelaine

Patterns may include notes from testknitters; yarn, needles, and gauge are totally at your discretion.

About the designer
SkyKnit’s favorites include lace, tentacles, and totally not the elimination of the human race.
For more information, see: http://aiweirdness.com/

Shane’s website, aiweirdness.com, is where she posts musings such as this (from a March 2, [?] 2018 posting), Note: A link has been removed,

If you’ve been on the internet today, you’ve probably interacted with a neural network. They’re a type of machine learning algorithm that’s used for everything from language translation to finance modeling. One of their specialties is image recognition. Several companies – including Google, Microsoft, IBM, and Facebook – have their own algorithms for labeling photos. But image recognition algorithms can make really bizarre mistakes.

image

Microsoft Azure’s computer vision API [application programming interface] added the above caption and tags. But there are no sheep in the image of above. None. I zoomed all the way in and inspected every speck.

….

I have become quite interested in Shane’s self descriptions such as this one from the aiweirdness.com website,

Portrait/Logo

About

I train neural networks, a type of machine learning algorithm, to write unintentional humor as they struggle to imitate human datasets. Well, I intend the humor. The neural networks are just doing their best to understand what’s going on. Currently located on the occupied land of the Arapahoe Nation.
https://wandering.shop/@janellecshane

As for the joke being on us, I can’t help remembering the Facebook bots that developed their own language (Facebotlish), and were featured in my June 30, 2017 posting, There’s a certain eerieness to it all, which seems an appropriate response in a year celebrating the 200th anniversary of Mary Shelley’s 1818 book, Frankenstein; or, the Modern Prometheus. I’m closing with a video clip from the 1931 movie,

Happy Weekend!

Two subcultures: science knitters and graffiti knitters, could they come together?

I had no idea that there’s a whole subculture of scientists devoted to knitting. Not just any knitting, science knitting. Thanks to Andrew Maynard at 2020 Science blog (July 25, 2010 posting), I have discovered Woolly Thoughts a website devoted to knitting, crocheting, and mathematics.

In fact, there’s a plethora of websites, blogs, and a subset on Ravelry (social networking for knitters) devoted to science/math knitters, much of which you can find in Andrew’s posting.

One item that particularly my fancy was a piece of ‘illusion knitting’ designed by Alice Bell, a science communication lecturer at the Imperial College of London. Illusion knitting is where the same piece of knitting reveals of one of two different images depending on the angle of sight. Bell’s creation, the Rosalind scarf, can look like stripes from one angle and like a piece of DNA from another angle.

For anyone not familiar with Franklin (from the San Diego Super Computer Center at the University of Southern California web page),

There is probably no other woman scientist with as much controversy surrounding her life and work as Rosalind Franklin. Franklin was responsible for much of the research and discovery work that led to the understanding of the structure of deoxyribonucleic acid, DNA. The story of DNA is a tale of competition and intrigue, told one way in James Watson’s book The Double Helix, and quite another in Anne Sayre’s study, Rosalind Franklin and DNA. James Watson, Francis Crick, and Maurice Wilkins received a Nobel Prize for the double-helix model of DNA in 1962, four years after Franklin’s death at age 37 from ovarian cancer.

Here’s Bell in her Rosalind scarf,

Alice Bell in her Rosalind scarf

This is the angle for the stripes, to see the DNA go to the Feb. 7, 2010 posting on her Slipped Stitch blog or to Andrew’s posting where you can find more goodies like this,

Knitting and crocheting as a means of creating complex geometrical forms has a long and illustrious history. Alan Turing was often seen knitting Möbius strips and other shapes in his lunchtime apparently, according to this 2008 MSNBC [article]. The work of Taimina and others on exploring hyperbolic planes – and their relevance to biology – has been groundbreaking (I know it’s crochet, but Margaret Wertheim’s TED talk on crochet coral and complex math is excellent, [go here]).

Vancouver (Canada) is home to at least two members of another knitting subculture as I found out earlier this year with the publication of a book by two locals, Mandy Moore and Leanne Prain, Yarn Bombing; The Art of Crochet and Knit Graffiti. Their Yarn Bombing blog features projects from around the world. I took a particular liking to Bee Bombs,

Annie's bee bombs in Amsterdam

I wonder if we could get some science yarn bombs going for the 2012 annual meeting of the American Association for the Advancement of Science meeting to take place here in Vancouver?