Scientists have developed a new artificial intelligence algorithm called MERLIN that can reconstruct the spatial “memory” of immune cells — in other words, determine which part of an organ they originally came from, even after the cells have been isolated and analyzed individually.
The study describing the breakthrough was published in Advanced Science.
When individual immune cells are typically studied, information about their original location within tissue is lost. In complex organs such as the kidney or the brain, however, spatial distribution is crucial for understanding both health and disease processes.
Researchers from University Hospital Bonn and the University of Bonn discovered that macrophages — large immune cells involved in inflammation and tissue protection — retain traces of their origin at the level of gene activity even after isolation.
The MERLIN algorithm uses this information to reconstruct where in an organ the cells were located by analyzing gene activity profiles and identifying characteristic biological signals linked to environmental conditions, such as oxygen or salt concentration.
The team tested MERLIN on mouse models and human kidney samples, demonstrating that the algorithm can accurately match immune cells to their original tissue regions. This is particularly important for understanding how immune responses vary across specific areas of an organ — for example, in conditions such as inflammation, sepsis, ischemia, or diabetic kidney disease, where immune activity can differ significantly between regions.
The algorithm confirmed previously known mechanisms and revealed new details of region-specific immune responses, making it a powerful tool for studying diseases and evaluating drug effects.






