Scientists Discover How the Thymus Builds Its Maze to Train the Immune System

Deep within the chest of every human lies a strangely shaped, often overlooked organ—the thymus. Though it tends to shrink with age, this gland plays a vital, early role in sculpting the immune system, training T cells to recognize the body’s own tissues so they don’t mistakenly attack them. Without this crucial education, our own immune system could turn against us.

But the thymus has long posed a riddle to scientists. Its inner structure, particularly in the region known as the medulla, looks wildly convoluted—like an elaborate maze, all folds and creases. Why should this organ, with such a straightforward purpose, need such a complex shape? Is the twisty architecture just biological happenstance—or does it serve a purpose?

Now, a new theoretical model developed by a team of biophysicists at LMU Munich, led by Professor Erwin Frey, has pulled back the curtain on this mystery. Their research, published in Proceedings of the National Academy of Sciences (PNAS), reveals that the thymus’s bizarre form is not an evolutionary accident. Instead, it emerges directly from the biological processes that make it so vital.

The model shows that form follows function—and in the thymus, that function is the very foundation of immune self-tolerance.

Where T Cells Learn Who’s Who

The thymus is not just an immune organ; it’s a school for T cells. These immune cells are born in the bone marrow but travel to the thymus to be educated. Here, they undergo rigorous training to learn how to distinguish between what is “self” (your own body’s cells and proteins) and what is “non-self” (invaders like viruses or bacteria). The stakes are high: any T cell that mistakenly identifies your own tissue as foreign could cause autoimmune diseases like type 1 diabetes, lupus, or multiple sclerosis.

Inside the medulla, the final and most critical phase of this training takes place. T cells are exposed to a buffet of the body’s own proteins—like a security guard studying a long list of employees’ faces. If any cell reacts inappropriately, it’s destroyed on the spot. This testing process is what keeps the immune system honest and precise.

But how does the thymus arrange itself to carry out such a monumental task?

The Feedback Loop That Shapes the Maze

Frey’s team, blending biology with physics, developed a mathematical model that captures a unique kind of biological feedback—known as thymic cross-talk—that governs how the medulla evolves its shape. This cross-talk happens between two key players: the developing T cells and the surrounding thymic epithelial cells that form the tissue structure.

Here’s how the cycle works: as immature T cells are exposed to the body’s antigens in the medulla, those that react too strongly are slated for elimination. But before they die, they emit chemical signals. These signals, like a parting whisper, instruct nearby tissues to grow outward. That growth in turn affects where new T cells will migrate, altering how the next generation of cells is tested. Over time, this interaction creates an ever-more convoluted architecture—one that optimizes the surface area for T cell screening.

“It’s a self-organized system,” said Frey. “The convolutions aren’t programmed in like blueprints—they emerge from the biological dialogue between cells and tissues.”

In other words, the thymus literally shapes itself to do its job better. A smoother, rounder organ wouldn’t have the same testing efficiency. More folds mean more surface area, and more surface area means more rigorous immune training.

Biology Woven from Mathematics

The researchers validated their model through experimental studies in mice. What’s more, their model not only replicates known patterns of thymic growth, but also predicts new ones. It offers insights into how the thymus changes shape when key genetic mutations disrupt cross-talk, and it suggests experiments that can now be conducted to test how those changes influence immune outcomes.

This represents a powerful step forward—not just in immunology, but in our broader understanding of how form arises from function in living systems.

“The implications go beyond the thymus,” said Frey. “This model gives us a window into how organs can evolve complex geometries through functional demands. It’s a principle we suspect applies to other organs as well.”

Indeed, organs like the brain, lungs, and intestines also exhibit highly folded internal structures, and their shapes, too, are likely driven by the need to maximize functional interfaces—neural connections, oxygen exchange, or nutrient absorption.

A New Lens on Autoimmunity

The research could have important clinical implications as well. Autoimmune diseases are notoriously difficult to treat and understand. If the thymus’s architecture is key to eliminating self-reactive T cells, then disruptions in that architecture—caused by genetic mutations, age-related degeneration, or disease—could be a root cause of immune malfunction.

By understanding the mechanisms that shape the thymus, scientists may eventually learn how to restore or enhance its function in aging adults, or even design bioengineered thymuses for therapeutic purposes.

When Shape Tells a Story

What this research ultimately reveals is a deeper truth about biology: that even the twist and tangle of an organ’s inner surface can tell us a story about how life sustains itself. The thymus isn’t just twisted for the sake of complexity—it’s twisted because evolution has written a functional necessity into its walls.

It’s a quiet marvel, hidden beneath the sternum, molding the soldiers of the immune system with a geometry born not from design, but from dialogue—between cells, tissues, and time.

Thanks to the tools of mathematical physics and the ingenuity of the LMU team, that dialogue is now a little less mysterious—and the maze of the thymus a little more meaningful.

Reference: David Muramatsu et al, Basic interactions responsible for thymus function explain the convoluted medulla shape, Proceedings of the National Academy of Sciences (2025). DOI: 10.1073/pnas.2415288122