Abstract
To assess cell migration in complex spatial environments, microfabricated chips, such as mazes and pillar forests, are routinely used to impose spatial and mechanical constraints, and cell trajectories are followed within these structures by advanced imaging techniques. In systems mechanobiology, computational models serve as essential tools to uncover how physical geometry influences intracellular dynamics; however, decoding such complex behaviors requires advanced inference techniques. Here, we integrated experimental observations of dendritic cell migration in a geometrically constrained microenvironment into a Cellular Potts model. We demonstrated that these spatial constraints modulate the motility dynamics, including speed and directional changes. We show that classical summary statistics, such as mean squared displacement and turning angle distributions, can resolve key mechanistic features but fail to extract richer spatiotemporal patterns, limiting accurate parameter inference. To solve this, we applied neural posterior estimation with in-the-loop learning of summary features. This learned summary representation of the data enables robust and flexible parameter inference, providing a data-driven framework for model calibration and advancing quantitative analysis of cell migration in structured microenvironments.
Introduction
Dendritic cells (DCs) are the sentinels of the immune system, migrating through dense tissues and narrow gaps to reach lymph nodes. Understanding how these cells navigate complex "obstacle courses" is a classic problem in systems biology. To study this, researchers use microfabricated "pillar forests" and "mazes" to track cell trajectories. However, translating these raw trajectories into biological insights is difficult. Scientists use the Cellular Potts Model (CPM) to simulate this behavior, but the model has several parameters—like chemotactic attraction strength and random motility—that are impossible to measure directly. Traditionally, researchers use Approximate Bayesian Computation (ABC) to find these parameters, but ABC relies on "hand-crafted" statistics (like average speed) that often miss the subtle spatiotemporal patterns created by complex environments.
Methods
We implemented a simulation-based inference pipeline using Neural Posterior Estimation (NPE) within the BayesFlow framework. The core model is a 2D Cellular Potts Model (CPM) that simulates cells as flexible domains on a lattice, influenced by energy constraints, chemokine gradients, and persistent random walks.
Instead of picking statistics like "mean squared displacement," we utilized a summary network (combining CNNs, GRUs, and Attention mechanisms) to automatically extract the most informative features from raw cell coordinate data. The inference engine used Conditional Normalizing Flows to map these learned features to a probability distribution of the model parameters. The model was trained on a synthetic set of 32,000 simulation-parameter pairs and validated against 143 individual trajectories of bone marrow-derived dendritic cells migrating through a microfabricated PDMS pillar array with 10 µm gaps, stimulated by a CCL19 chemokine gradient.
Results
Our results demonstrate that amortization is a significant advantage: once the NPE network is trained (taking approximately 4 hours), performing inference on a new dataset takes only one second. In contrast, traditional ABC methods took up to 20 hours per dataset. Furthermore, NPE achieved the lowest error in parameter recovery, with a Normalized Root Mean Squared Error (NRMSE) of 0.20, compared to 0.23 for standard ABC.
Key insights revealed by the model include the "Persistence Paradox," where persistence (the tendency to keep moving in the same direction) is the primary driver of cell dispersal rather than chemokine gradient strength alone. Additionally, the simulations suggested that a constant chemokine gradient can actually "trap" cells behind obstacles, whereas a transient or pulsed signal might allow cells to reorient and navigate complex mazes more efficiently.
Discussion and Future Work
While the NPE-calibrated model produced simulations that closely matched experimental data, several limitations remain. The current model assumes a static environment, whereas cells in vivo actively remodel the extracellular matrix and consume chemokines. Additionally, while 2D microfluidic chips are computationally efficient, real-world migration occurs in 3D tissues with higher geometric complexity. Future work will focus on hierarchical models to quantify individual cell heterogeneity and the transition to 3D simulation environments to better capture the physiological reality of immune cell navigation.
Summary updated