Johns Hopkins University researchers discovered precisely how spiders build webs by using night vision and artificial intelligence to track and record every movement of all eight legs as spiders worked in the dark.

Their creation of a web-building playbook or algorithm brings new understanding of how creatures with brains a fraction of the size of a human’s can create structures of such elegance, complexity, and geometric precision.

“I first got interested in this topic while I was out birding with my son,” said senior author Andrew Gordus, a behavioral biologist in the Department of Biology in the Krieger School of Arts and Sciences. “After seeing a spectacular web, I thought, ‘if you went to a zoo and saw a chimpanzee building this you’d think that’s one amazing and impressive chimpanzee.’ Well this is even more amazing because a spider’s brain is so tiny and I was frustrated that we didn’t know more about how this remarkable behavior occurs. Now we’ve defined the entire choreography for web building, which has never been done for any animal architecture at this fine of a resolution.”

Web-weaving spiders that build blindly using only the sense of touch have fascinated humans for centuries. Not all spiders build webs but those that do are among a subset of animal species known for their architectural creations, like nest-building birds and puffer fish that create elaborate sand circles when mating.

The first step to understanding how the relatively small brains of these animal architects support their high-level construction projects is to systematically document and analyze the behaviors and motor skills involved, which until now has never been done, mainly because of the challenges of capturing and recording the actions, Gordus said.

Here his team studied a hackled orb weaver, a spider native to the western United States that’s small enough to sit comfortably on a fingertip. To observe the spiders during their nighttime web-building work, the lab designed an arena with infrared cameras and infrared lights. With that set-up they monitored and recorded six spiders every night as they constructed webs. They tracked the millions of individual leg actions with machine vision software designed specifically to detect limb movement.

“Even if you video record it, that’s a lot of legs to track, over a long time, across many individuals,” said lead author Abel Corver, a graduate student studying web-making and neurophysiology. “It’s just too much to go through every frame and annotate the leg points by hand so we trained machine vision software to detect the posture of the spider, frame by frame, so we could document everything the legs do to build an entire web.”

They found that web-making behaviors are quite similar across spiders, so much so that the researchers were able to predict the part of a web a spider was working on just from seeing the position of a leg.

“Even if the final structure is a little different, the rules they use to build the web are the same,” Gordus said. “They’re all using the same rules, which confirms the rules are encoded in their brains. Now we want to know how those rules are encoded at the level of neurons.”

The findings, now available online, are set to publish in the November issue of Current Biology.

Future work for the lab includes experiments with mind-altering drugs to determine which circuits in the spider’s brain are responsible for the various stages of web-building.

“The spider is fascinating because here you have an animal with a brain built on the same fundamental building blocks as our own, and this work could give us hints on how we can understand larger brain systems, including humans, and I think that’s very exciting,” Corver said.