Field Notes: (Machine) Learning about Baboons

The baboons search for roots to eat when the sun comes out after a rainstorm over Mpala. (Credit: Grace Davis)

With a view of vast acacia woodlands amid the second highest mountain in Africa (Mt.Kenya) and various herds of grazing zebra, giraffe, impala, and elephants, the Mpala Research Center was a not a bad place to spend the summer! As part of an interdisciplinary team of biologists from UC Davis and computer scientists from University of Illinois, Chicago, we were there to figure out how much we can learn about animals from remote-sensing biologgers. That’s a mouthful – to break that down, ‘biologgers’ refer to devices and sensors, such as GPS units similar to those in your smart phone, that collect data on animals, and ‘remote-sensing’ refers to the fact that these devices collect their data even when researchers are not physically present to monitor the data collection. Using biologgers, such as GPS units and accelerometers (which measure changes in speed), has become very common for studying animal behavior (Kays et al. 2015). Why are biologgers useful? They have allowed behaviorists to discover that the bar-tailed godwit (Limosa lapponica) literally flies halfway around the world without stopping when it migrates (Gill et al.2009), that we might have pumas (Pumaconcolor) living inconspicuously in our neighborhoods (Blecha et al. 2018), and that baboons (Papio anubis) can actually make group decisions quite democratically (Strandburg-Peshkin et al. 2015).

Biologgers allow researchers to understand social behavior. (Credit: Grace Davis)

Even with these discoveries, there are limitations to what we can learn with the current tools and methods in remote-sensing. For example, when two baboons are sitting next to each other, are they grooming each other, or just minding their own business? Information on the position and general activity state of animals is not sufficient to answer questions such as these. Since our research team is interested in social behaviors in baboons, our goal was to develop techniques to identify detailed behavior with remote-sensing. Our general plan? Well, in theory it’s simple: fit animals with the best sensor technology available, collect data live about everything they do (and I mean everything), and feed this information into the best machine learning programs available. What’s machine learning? Machine learning is when a computer takes raw data and tries to predict something from the data. For us, this involved feeding the computer measurements collected by the baboon biologgers so that the computer could predict what the baboon is doing at each point in time just based off of these biologger measurements. By giving the computer examples of what the biologger measurements look like for every kind of behavior that a baboon does, we should be able to teach the computer to be pretty good at predicting the behavior of a baboon when it’s given new biologger data. The behaviors that the computer can’t learn to predict from the biologger data are behaviors that we simply cannot study with remote-sensing.

The day started early for the biologists on the project team. We headed out at 5 AM to find the baboons every morning and were usually able to see beautiful views, such as this one, of the sun rising over Mpala as we looked for the baboons. (Credit: Carter Loftus)

Our team worked like a well-oiled machine. Every morning at 5 A.M., Grace Davis, Dr. Roi Harel, Dr. Meg Crofoot, and I – the biologists – would go out looking for the baboons in a safari van. Once we found them, we would quickly start taking notes on the intricacies of the baboons’ behaviors and discuss the fastest way to record these behaviors. To give the computer examples of what the biologger data would look like when a baboon performed a certain behavior, we needed our notes on the behaviors to perfectly match up with the time that the behavior actually happened. This took practice. A lot of practice. What a simpler note-taking protocol may have recorded as ‘juveniles playing in trees; juveniles move to ground’, became ‘arboreal walk, arboreal run, climb up, arboreal run, jump tree-to-tree, arboreal stand, touch other juvenile, receive bite from other juvenile, lunge at other juvenile, climb down, jump tree-to-ground, terrestrial run, chase other juvenile’. All of this could happen within a few seconds, so actually writing down these behaviors was absolutely out of the question; but even just saying all this in real-time into a voice recorder was not trivial.

The whole team of biologists and computer scientists takes a field trip to Ol Pejeta Conservancy to see the last Northern White Rhinos in existence. (Credit: Carter Loftus)

While we were out practicing our data collection methods for much of the day, the computer scientists were perfecting the biologging sensors. For the past year, they have been developing sensors that are extremely sensitive to different kinds of motion to try to perfectly capture the movements and behaviors of the baboons. These sensors contain GPS units, tri-axial accelerometers, magnetometers, gyroscopes, and even microphones – if most of that sounds like gibberish to you, you’re not alone! Bottom line, the computer scientists developed sensors to go in both collars and wristbands on the baboons to be able to monitor the baboons’ exact motions at all times. Yup, they made a baboon Fitbit! While they were putting the finishing touches on these devices, they were also perfecting the computer program that was going to predict what the baboons were doing based on their biologger data. These programs were the machine learning programs – they would try to match our behavioral observations with the data output from the sensors to be able to predict what behavior the baboon was performing based on its movements captured by the sensors.

Fit with the biologging collar, I am ready to do my best baboon impression. One perk of testing the collars on ourselves is that we could keep the sensor unit (pictured here hanging below my left shoulder) out of its casing to make sure it was working properly. (Credit: Carter Loftus)

Doing field work with computer scientists definitely has its perks! If we thought there was an app that would help us collect data more accurately or efficiently, they could make it for us right then and there. One day, we decided that the audio recording apps were not going to work, because we needed our behavioral observation notes recorded in GPS time to synchronize them with data from the collars and wristbands, whose clocks were on GPS time. Our recording apps were time-stamping our audio recordings with our phones’ time. We were at a loss for how to get around this issue. The computer scientists had overheard our discussion of the problem, and before we got to the field the next day, we all had an app on our phones that recorded audio with GPS time.

Despite the fact we could not put our new technology on baboons, we were determined to test out our new devices. So, we fitted ourselves with the devices and acted out our best baboon impressions. (Video credit: Tanya Berger-Wolf)

With data collection protocol complete and biologgers tested, we were ready to put the loggers on the baboons and collect real data. But, as is typical with field research, things didn’t go as planned. Mere days before we were supposed to fit the baboons with their collars and wristbands, animal anesthetization (which is needed for the safety of both the baboons and the researchers!) was temporarily banned in Kenya. We were all quite disappointed but had not given up on making the trip a productive one. So we hatched a plan: what do field biologists do particularly well aside from researching their study system? Pretend to be their study system! We suited up with collars and wristbands, got down on our hands and knees and proceeded to run around the research station like monkeys, occasionally stopping to lay in the grass, or pretend to forage on some roots, or groom each other for a while. The success of the computer programs at predicting what a biologist’s current behavior is when he is pretending to be a baboon remains to be tested, but I’ll be sure to report back when I know how successful my “babooning” was. Until then, we will have to sit tight and anxiously await our return trip to Kenya this winter to try out these devices and our protocols on real baboons!

While we continue taking behavioral notes on the baboon, a baboon family looks out over the valley to survey their surroundings just before settling in for the night. (Credit: Carter Loftus)

Carter Loftus is a 2nd year PhD student in the Animal Behavior Graduate Group at UC Davis. He is in Dr. Meg Crofoot’s lab and he studies how animals, such as baboons, embedded within complex social structures make decisions in their daily lives. 


Blecha, K. A., Boone, R. B., & Alldredge, M. W. (2018). Hunger mediates apex predator’s risk avoidance response in wildland–urban interface. Journal of Animal Ecology87(3), 609-622.

Gill, R. E., Tibbitts, T. L., Douglas, D. C., Handel, C. M., Mulcahy, D. M., Gottschalck, J. C., … & Piersma, T. (2009). Extreme endurance flights by landbirds crossing the Pacific Ocean: ecological corridor rather than barrier? Proceedings of the Royal Society of London B: Biological Sciences276(1656), 447-457.

Kays, R., Crofoot, M. C., Jetz, W., & Wikelski, M. (2015). Terrestrial animal tracking as an eye on life and planet. Science348(6240), aaa2478.

Strandburg-Peshkin, A., Farine, D. R., Couzin, I. D., & Crofoot, M. C. (2015). Shared decision-making drives collective movement in wild baboons. Science348(6241), 1358-1361.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s