Home

Home#

chatter: a Python library for applying information theory and AI/ML models to animal communication

Mason Youngblood

pypi python size license tests doi



The study of animal communication often involves categorizing units into types (e.g. syllables in songbirds, or notes in humpback whales). While this approach is useful in many cases, it necessarily flattens the complexity and nuance present in real communication systems. chatter is a new Python library for analyzing animal communication in continuous latent space using information theory and modern machine learning techniques. It is taxonomically agnostic, and has been tested with the vocalizations of birds, bats, whales, and primates. By leveraging a variety of different architectures, including variational autoencoders and vision transformers, chatter represents vocal sequences as trajectories in high-dimensional latent space, bypassing the need for manual or automatic categorization of units. The library provides an end-to-end workflow—from preprocessing and segmentation to model training and feature extraction—that enables researchers to quantify features like:

  • Complexity: path length of sequences in latent space per unit time.

  • Predictability: predictability of a transition in latent space.

  • Similarity: cosine similarity between units or sequences in latent space.

  • Novelty: inverse of predicted density of units or sequences in latent space.

Below is a basic diagram of the chatter workflow, showing the progression from spectrograms to latent features to visualizations in 2D space.

workflow

Additionally, chatter makes it easy to explore the latent space of a species’ vocalizations, either statically or with an interactive plot like the one below (of syllables in Cassin’s vireo song).

embeddings

This project is heavily inspired by the work of folks like Nilo Merino Recalde and Tim Sainburg. Here is a list of related projects:

Please cite chatter as:

@article{youngblood_chatter_2025,
   author = {Youngblood, Mason},
   title = {chatter: a Python library for applying information theory and AI/ML models to animal communication},
   date = {2025},
   journal = {arXiv},
   doi = {10.48550/arXiv.2512.17935},
   url = {https://doi.org/10.48550/arXiv.2512.17935}
}

Full Vignettes

Reference

chatter

Chatter: a Python library for applying information theory and AI/ML models to animal communication.