استنتاج المعلمات بدون احتمال لنماذج بيولوجية عشوائية زمنية مكانية باستخدام تقدير الخلفية العصبية Likelihood-free parameter inference for spatiotemporal stochastic biological models using neural posterior estimation

شارك:
المجلة: Journal of Theoretical Biology، المجلد: 628
DOI: https://doi.org/10.1016/j.jtbi.2026.112475
PMID: https://pubmed.ncbi.nlm.nih.gov/41990966
تاريخ النشر: 2026-04-15
المؤلف: Tom Kimpson وآخرون
الموضوع الرئيسي: سلاسل ماركوف وطرق مونت كارلو

نظرة عامة

في هذا القسم، يتناول المؤلفون تحديات استدلال المعلمات في النماذج العشوائية المستخدمة عادة في البيولوجيا الكمية، لا سيما في سياق نماذج المشي العشوائي المعتمدة على الوكلاء. غالبًا ما تقدم هذه النماذج احتمالات غير قابلة للحل، مما يدفع الباحثين إلى اللجوء إلى طرق خالية من الاحتمالات مثل حساب بايزي التقريبي (ABC)، والتي يمكن أن تُدخل تحيزات وتتطلب ضبطًا دقيقًا، أو إلى نماذج بديلة قد لا تمثل العمليات الأساسية بدقة. للتغلب على هذه القيود، يقترح المؤلفون نهجًا جديدًا باستخدام تقدير الخلفية العصبية (NPE)، وهو إطار تعلم آلي يتعلم التوزيع الخلفي الكامل ويقدم تقديرات خلفية سريعة بمجرد تدريبه.

يطبق المؤلفون NPE على نموذج مشي عشوائي لتجربة اختبار الحواجز التي تحاكي هجرة الخلايا في المختبر، مما يوضح فعاليته في سيناريوهين: أولاً، باستخدام إحصائيات ملخصة أحادية البعد (عدد الأعمدة)، وثانيًا، من خلال دمج NPE مع شبكة عصبية تلافيفية (CNN) لتحليل البيانات المكانية الثنائية الأبعاد الخام. تشير نتائجهم إلى أن خط أنابيب NPE يقلل بشكل كبير من التكاليف الحاسوبية بينما يحقق دقة في التقديرات الخلفية تتماشى مع أو تتجاوز الطرق التقليدية. ومن الجدير بالذكر أن CNN تعزز قدرة NPE على إجراء الاستدلال مباشرة على الصور الخام، وهو أمر حاسم للنماذج المعقدة التي تفتقر إلى إحصائيات ملخصة واضحة. يقدم المؤلفون تنفيذًا مفتوح المصدر لخط أنابيبهم، مما يعزز استخدامه لاستدلال المعلمات في النماذج العشوائية المكانية دون الاعتماد على دوال الاحتمالات أو إحصائيات ملخصة مصنوعة يدويًا.

مقدمة

تؤكد مقدمة هذه الورقة البحثية على أهمية استدلال المعلمات في ربط النماذج الرياضية والرؤى البيولوجية، لا سيما في سياق البيانات التجريبية المليئة بالضوضاء. تسلط الضوء على فائدة طرق الاستدلال عبر مجالات علمية مختلفة، بما في ذلك علم الأوبئة، وعلم البيئة، وعلم الأعصاب، مع الإشارة إلى أن تقنيات الاستدلال التقليدية راسخة جيدًا للنماذج الحتمية التي تحكمها المعادلات التفاضلية العادية والجزئية. ومع ذلك، تحدد الورقة تحديات كبيرة في تطبيق هذه الطرق على النماذج البيولوجية العشوائية المحددة مكانيًا، مثل نماذج الوكلاء، التي غالبًا ما تتميز باحتمالات غير قابلة للحل، وأخطاء النماذج البديلة، وسوء تحديد نموذج الضوضاء، وعدم الكفاءة في الطرق الخالية من الاحتمالات، وفقدان المعلومات من الإحصائيات الملخصة.

لمعالجة هذه التحديات، يقترح المؤلفون نهجًا جديدًا باستخدام تقدير الخلفية العصبية (NPE)، وهو نموذج استدلال قائم على المحاكاة يتعلم مباشرة التوزيع الخلفي من البيانات التي تم إنشاؤها بواسطة المحاكي. يقدم NPE عدة مزايا: فهو خالٍ من الاحتمالات، يقضي على تحيز نموذج البديل، يتعلم العلاقات المعقدة دون الحاجة إلى نماذج ضوضاء صريحة، يوفر تقديرات خلفية سريعة بعد التدريب الأولي، ويمكنه معالجة البيانات عالية الأبعاد مباشرة. تقدم الورقة سير عمل تقدير الخلفية العصبية المتسلسل (SNPE) المتطور المطبق على نموذج مشي عشوائي قائم على الوكلاء الكنسي لهجرة الخلايا وتكاثرها، مما يوضح فعالية هذه الطريقة في الحفاظ على الواقعية البيولوجية وتعزيز دقة الاستدلال. كما يقدم المؤلفون شبكة عصبية تلافيفية (CNN) كمستخرج ميزات ضمن إطار عمل NPE، مما يسهل التعلم التلقائي للتمثيلات المفيدة من البيانات المكانية الخام. يهدف هذا النهج المبتكر إلى إنشاء نموذج جديد للاستدلال في النماذج العشوائية المحددة مكانيًا، مع آثار أوسع للبحث البيولوجي والبيئي.

طرق

في هذه الدراسة، يتبع المؤلفون البروتوكول الذي تم وضعه في S&P2025 لتوليد ملاحظات اصطناعية بناءً على نموذج مشي عشوائي عشوائي يتميز بمعلمات \( P = 0.7 \) و \( U = 0.3 \)، مما يؤدي إلى قابلية انتشار \( D = \frac{P}{4} = 0.175 \). تتكون البيانات المنتجة من متجه بُعده 201 من عدد الأعمدة. يقوم المؤلفون بإجراء استدلال على معلمات النموذج \( P \) و \( U \) مباشرة، ثم يقومون بتحويل \( P \) إلى \( D \) للمقارنة مع الطرق المعتمدة على المعادلات التفاضلية الجزئية (PDE). يستخدمون أولويات واسعة موحدة، تحديدًا \( P \sim U(0.0, 1.0) \) و \( U \sim U(0.01, 1.0) \)، والتي تستند إلى القيود الفيزيائية للنموذج، مما يضمن بقاء كلا المعلمين ضمن نطاق الاحتمالات من [0، 1]. تم تعيين الحد الأدنى لـ \( U \) عند 0.01 لتجنب حالة الوكلاء الأوليين صفر، مع السماح في الوقت نفسه بالمرونة في تقدير المعلمات.

تتطابق الإعدادات التجريبية للمرحلة الثانية مع المرحلة الأولى، باستخدام نفس الملاحظات الاصطناعية مع المعلمات الحقيقية \( P = 0.7 \) و \( U = 0.3 \). ومع ذلك، بدلاً من متجه بُعده 201، تقوم الشبكة بمعالجة صورة ثنائية الأبعاد كاملة \( 50 \times 200 \) تمثل مواقع الوكلاء على شبكة. يتم الحفاظ على نفس الأولويات الموحدة الواسعة لـ \( P \) و \( U \)، مما يضمن الاتساق في عملية الاستدلال عبر تمثيلات البيانات المختلفة.

نتائج

في هذا القسم، يقدم المؤلفون نتائج من نموذج عشوائي قائم على الوكلاء لتجربة اختبار الحواجز، كما هو موضح في S&P2025. يحاكي النموذج خلايا بيولوجية على شبكة مربعة ثنائية الأبعاد، حيث تنتشر الوكلاء للخارج عبر مشي عشوائي غير متحيز. تؤكد الدراسة على تقليل البيانات المكانية الثنائية الأبعاد إلى قياسات أحادية البعد، وتحديدًا عد الوكلاء لكل عمود، المشار إليه بـ \( N_i(t) = \sum_{j=1}^{J} n_{i,j}(t) \). تبسط هذه الطريقة توصيف الانتشار الزماني المكاني مع التقاط التقلبات العشوائية. يتم وصف السلوك المتوسط للوكلاء بواسطة معادلة تفاضلية جزئية (PDE) من الشكل \( \frac{\partial u}{\partial t} = D \frac{\partial^2 u}{\partial x^2} \)، حيث يمثل \( D \) معامل الانتشار الفعال.

يقارن المؤلفون بين طرق استدلال المعلمات المختلفة، بما في ذلك حساب بايزي التقريبي (ABC)، والتقريب الغاوسي، وسلسلة ماركوف مونت كارلو (MCMC)، مع تسليط الضوء على نقاط القوة والقيود الخاصة بكل منها. ومن الجدير بالذكر أن طريقة تقدير الخلفية العصبية (NPE) تظهر دقة متفوقة في استعادة التوزيعات الخلفية للمعلمات ذات الاهتمام، \( P \) و \( U \)، مع متوسطات تتماشى عن كثب مع القيم الحقيقية. تتجنب طريقة NPE التحيزات النظامية المرتبطة بالنماذج البديلة الحتمية وتوفر فترات موثوقة تعكس بدقة الطبيعة العشوائية للبيانات. بالإضافة إلى ذلك، تشير النتائج إلى أن الاستفادة من البيانات المكانية الكاملة من خلال شبكة عصبية تلافيفية (CNN) تحقق دقة مقارنة بالإحصائيات الملخصة التقليدية أحادية البعد، مما يبرز إمكانيات التعلم المباشر من البيانات الخام لاستدلال المعلمات في النماذج البيولوجية المعقدة.

مناقشة

في مناقشة الأساليب التقليدية للاستدلال للنماذج البيولوجية العشوائية، تسلط الورقة الضوء على قيود الطرق المعتمدة مثل حساب بايزي التقريبي (ABC) وطرق النماذج البديلة. يعاني ABC، على الرغم من بساطته، من عدم كفاءة حاسوبية كبيرة وتحاملات بسبب اختيار مستويات التسامح والإحصائيات الملخصة. تتأثر أداء الطريقة بشكل خاص في فضاءات المعلمات عالية الأبعاد، مما يتطلب محاكاة واسعة لتحقيق معدلات قبول مقبولة. يمكن أن تسرع النماذج البديلة، التي تستبدل المحاكاة العشوائية بالتقريبات الحتمية، من الاستدلال ولكنها تُدخل تحيزات سوء تحديد النموذج التي تضر بدقة تقديرات المعلمات وفترات التنبؤ.

يعالج إطار تقدير الخلفية العصبية (NPE) هذه التحديات من خلال تعلم التوزيع الخلفي مباشرة من محاكاة النموذج العشوائي دون الاعتماد على النماذج البديلة أو تحديد الضوضاء الصريحة. يستخدم NPE تدفقات طبيعية لتقريب التوزيعات الخلفية المعقدة بكفاءة، مما يسمح باستدلال سريع بعد مرحلة التدريب الأولية. لا تتجاوز هذه الطريقة قيود الأساليب التقليدية فحسب، بل تلتقط أيضًا العلاقات العشوائية المعقدة المتأصلة في الأنظمة البيولوجية. توضح الورقة أيضًا فعالية NPE من خلال التطبيقات على بيانات اختبار الحواجز الاصطناعية، مما يظهر قدرتها على إنتاج تنبؤات متوازنة جيدًا تحترم الطبيعة المنفصلة لبيانات العد البيولوجية، مما يعزز متانة استدلال المعلمات في النماذج المعقدة.

قيود

يسلط القسم الخاص بقيود تقدير الخلفية العصبية (NPE) الضوء على مزاياها والتحديات التي تقدمها للممارسين. يوفر NPE نهجًا مباشرًا لاستدلال المعلمات من المحاكيات العشوائية، مما يقضي على التحيزات الناتجة عن التقريبات المتوسطة والحاجة إلى نماذج ضوضاء صريحة. تتيح قدرته على معالجة البيانات عالية الأبعاد من خلال استخراج الميزات التلقائي تحليل الأنماط المكانية المعقدة دون فقدان المعلومات النموذجية في الإحصائيات الملخصة اليدوية. علاوة على ذلك، بمجرد تدريبه، يوفر NPE كفاءة حاسوبية كبيرة، مما يمكّن من استدلال خلفي سريع مقارنة بالطرق التقليدية المعتمدة على المحاكاة مثل حساب بايزي التقريبي (ABC). يعزز استخدام التدفقات الطبيعية أيضًا قدرته على نمذجة التوزيعات الخلفية المعقدة متعددة الأوجه.

ومع ذلك، فإن اعتماد NPE على بيانات تدريب كبيرة يمثل قيدًا كبيرًا، لا سيما في فضاءات المعلمات عالية الأبعاد حيث يمكن أن تعيق لعنة الأبعاد التطبيق العملي. بالنسبة للنماذج التي تحتوي على أكثر من 15-20 معلمة، قد تتجاوز ميزانيات المحاكاة المطلوبة الموارد الحاسوبية الممكنة. بالإضافة إلى ذلك، يمكن أن تتدهور أداء NPE عندما تنحرف الملاحظات الاختبارية عن توزيع التدريب، مما يتطلب تحديد أولويات دقيق وتوليد بيانات موثوقة. تضيف تعقيدات بنية الشبكة العصبية طبقة أخرى من الصعوبة، حيث يمكن أن تؤثر خيارات التصميم بشكل كبير على النتائج. على عكس الأساليب التقليدية، يفتقر NPE إلى ضمانات نظرية راسخة بشأن التقارب أو جودة التقريب، مما يجعل من الصعب تشخيص مشكلات الأداء ويتطلب من الممارسين تطوير فهم أعمق لسلوك الشبكة وديناميات التدريب.

Journal: Journal of Theoretical Biology, Volume: 628
DOI: https://doi.org/10.1016/j.jtbi.2026.112475
PMID: https://pubmed.ncbi.nlm.nih.gov/41990966
Publication Date: 2026-04-15
Author(s): Tom Kimpson et al.
Primary Topic: Markov Chains and Monte Carlo Methods

Overview

In this section, the authors address the challenges of parameter inference in stochastic models commonly used in quantitative biology, particularly in the context of agent-based random walk models. These models often present intractable likelihoods, leading researchers to resort to likelihood-free methods such as Approximate Bayesian Computation (ABC), which can introduce biases and require careful tuning, or to surrogate models that may not accurately represent the underlying processes. To overcome these limitations, the authors propose a novel approach using Neural Posterior Estimation (NPE), a machine learning framework that learns the full posterior distribution and provides rapid posterior estimates once trained.

The authors apply NPE to a random walk model of a barrier assay experiment that simulates in vitro cell migration, demonstrating its effectiveness in two scenarios: first, using one-dimensional summary statistics (column counts), and second, by integrating NPE with a convolutional neural network (CNN) to analyze raw two-dimensional spatial data. Their results indicate that the NPE pipeline significantly reduces computational costs while achieving precision in posterior estimates that matches or exceeds traditional methods. Notably, the CNN enhances NPE’s capability to perform inference directly on raw images, which is crucial for complex models lacking clear summary statistics. The authors provide an open-source implementation of their pipeline, promoting its use for parameter inference in spatial stochastic models without relying on likelihood functions or handcrafted summary statistics.

Introduction

The introduction of this research paper emphasizes the importance of parameter inference in bridging mathematical models and biological insights, particularly in the context of noisy experimental data. It highlights the utility of inference methods across various scientific fields, including epidemiology, ecology, and neuroscience, while noting that traditional inference techniques are well-established for deterministic models governed by ordinary and partial differential equations. However, the paper identifies significant challenges in applying these methods to spatially explicit, stochastic biological models, such as agent-based models, which often feature intractable likelihoods, surrogate-model errors, noise-model misspecification, inefficiencies in likelihood-free methods, and information loss from summary statistics.

To address these challenges, the authors propose a novel approach using Neural Posterior Estimation (NPE), a simulation-based inference paradigm that directly learns the posterior distribution from simulator-generated data. NPE offers several advantages: it is likelihood-free, eliminates surrogate model bias, learns complex relationships without requiring explicit noise models, provides rapid posterior estimates after initial training, and can process high-dimensional data directly. The paper presents a state-of-the-art Sequential NPE (SNPE) workflow applied to a canonical agent-based random walk model of cell migration and proliferation, demonstrating the efficacy of this method in preserving biological realism and enhancing inference accuracy. The authors also introduce a Convolutional Neural Network (CNN) as a feature extractor within the NPE framework, facilitating the automatic learning of informative representations from raw spatial data. This innovative approach aims to establish a new paradigm for inference in spatially explicit stochastic models, with broader implications for biological and ecological research.

Methods

In this study, the authors follow the protocol established in S&P2025 to generate synthetic observations based on a stochastic random walk model characterized by parameters \( P = 0.7 \) and \( U = 0.3 \), leading to a diffusivity of \( D = \frac{P}{4} = 0.175 \). The data produced consists of a 201-dimensional vector of column counts. The authors perform inference on the model parameters \( P \) and \( U \) directly, subsequently transforming \( P \) to \( D \) for comparison with partial differential equation (PDE)-based methods. They employ broad uniform priors, specifically \( P \sim U(0.0, 1.0) \) and \( U \sim U(0.01, 1.0) \), which are informed by the physical constraints of the model, ensuring that both parameters remain within the probability range of [0, 1]. The lower bound for \( U \) is set at 0.01 to avoid the degenerate case of zero initial agents while still allowing flexibility in parameter estimation.

The experimental setup for the second phase mirrors the first, utilizing the same synthetic observations with true parameters \( P = 0.7 \) and \( U = 0.3 \). However, instead of a 201-dimensional vector, the network processes a full \( 50 \times 200 \) binary image that represents agent locations on a lattice. The same broad uniform priors for \( P \) and \( U \) are maintained, ensuring consistency in the inference process across different data representations.

Results

In this section, the authors present results from a stochastic agent-based model of a scratch barrier assay, as exemplified in S&P2025. The model simulates biological cells on a two-dimensional square lattice, where agents spread outwards via unbiased random walks. The study emphasizes the reduction of two-dimensional spatial data to one-dimensional measurements, specifically counting agents per column, denoted as \( N_i(t) = \sum_{j=1}^{J} n_{i,j}(t) \). This approach simplifies the characterization of spatiotemporal spreading while capturing stochastic fluctuations. The mean behavior of agents is described by a partial differential equation (PDE) of the form \( \frac{\partial u}{\partial t} = D \frac{\partial^2 u}{\partial x^2} \), with \( D \) representing the effective diffusion coefficient.

The authors compare various parameter inference methods, including Approximate Bayesian Computation (ABC), Gaussian approximation, and Markov Chain Monte Carlo (MCMC), highlighting their respective strengths and limitations. Notably, the Neural Posterior Estimation (NPE) method demonstrates superior precision in recovering posterior distributions for the parameters of interest, \( P \) and \( U \), with means closely aligning with the true values. The NPE approach avoids the systematic biases associated with deterministic surrogates and provides credible intervals that accurately reflect the stochastic nature of the data. Additionally, the results indicate that leveraging full spatial data through a convolutional neural network (CNN) yields comparable precision to traditional one-dimensional summary statistics, underscoring the potential of direct learning from raw data for parameter inference in complex biological models.

Discussion

In the discussion of classical inference approaches for stochastic biological models, the paper highlights the limitations of established methods such as Approximate Bayesian Computation (ABC) and surrogate model approaches. ABC, while straightforward, suffers from significant computational inefficiencies and biases due to the choice of tolerance levels and summary statistics. The method’s performance is particularly hampered in high-dimensional parameter spaces, necessitating extensive simulations to achieve acceptable acceptance rates. Surrogate models, which replace stochastic simulations with deterministic approximations, can expedite inference but introduce model misspecification biases that compromise the accuracy of parameter estimates and prediction intervals.

The proposed Neural Posterior Estimation (NPE) framework addresses these challenges by directly learning the posterior distribution from simulations of the stochastic model without relying on surrogate models or explicit noise specifications. NPE utilizes normalizing flows to efficiently approximate complex posterior distributions, allowing for rapid inference after an initial training phase. This method not only circumvents the limitations of classical approaches but also captures intricate stochastic relationships inherent in biological systems. The paper further demonstrates NPE’s effectiveness through applications to synthetic barrier assay data, showcasing its ability to produce well-calibrated predictions that respect the discrete nature of biological count data, thereby enhancing the robustness of parameter inference in complex models.

Limitations

The section on limitations of Neural Posterior Estimation (NPE) highlights both its advantages and the challenges it presents for practitioners. NPE offers a direct approach to parameter inference from stochastic simulators, eliminating biases from mean-field approximations and the need for explicit noise models. Its ability to process high-dimensional data through automatic feature extraction allows for the analysis of complex spatial patterns without the loss of information typical in manual summary statistics. Moreover, once trained, NPE provides significant computational efficiency, enabling rapid posterior inference compared to traditional simulation-based methods like Approximate Bayesian Computation (ABC). The use of normalizing flows further enhances its capability to model complex, multimodal posterior distributions.

However, NPE’s reliance on substantial training data poses a significant limitation, particularly in high-dimensional parameter spaces where the curse of dimensionality can hinder practical application. For models with over 15-20 parameters, the required simulation budgets may exceed feasible computational resources. Additionally, NPE’s performance can deteriorate when test observations deviate from the training distribution, necessitating careful prior specification and robust data generation. The complexity of neural network architecture adds another layer of difficulty, as design choices can significantly influence outcomes. Unlike classical methods, NPE lacks well-established theoretical guarantees regarding convergence or approximation quality, making it challenging to diagnose performance issues and requiring practitioners to cultivate a deeper understanding of network behavior and training dynamics.