Manuscript Offprint
arXiv:2610.02954Hyperparameter selection for equation learning with biologically-informed neural networks
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
Biologically-informed neural networks (BINNs) have emerged as a flexible subclass of physics-informed neural networks (PINNs) for learning terms in partial differential equations from data. BINNs are particularly suited for biological systems, where the governing equations are highly nonlinear and only partially known a priori, and where data observations are often sparse, noisy, and incomplete. However, applying BINNs effectively in practice depends critically on hyperparameter selection, which remains a central challenge in equation-learning frameworks. Hyperparameters are often chosen heuristically and only cursorily documented, which limits the reproducibility of results and the transferability of methods. We present a diagnostic workflow for hyperparameter selection that can be used when the ground-truth equations are not known. The workflow is guided by three main questions: (1) Are the benefits of greater network capacity worth the cost? (2) Do more training epochs keep reducing the validation loss? (3) Do the learned terms stop changing as network capacity and training increase? We apply our workflow to synthetic systems of varying complexity with known ground truth, spanning diffusion and growth right-hand side terms and data ranging from 1D+t to 2D+t. We demonstrate that the validation loss generally follows the true error in the learned terms and distil practical rules of thumb for selecting hyperparameters in the BINN architecture. By providing a structured workflow, practical guidelines, and suggested starting values for hyperparameter selection, this work lowers the barrier to BINN-based equation learning.
1 Introduction
BINNs were introduced by Lagergren et al. [8] to model cell migration as a 1D+t reaction-diffusion process. We state the governing equation here in the general d-dimensional form,
where is the density at position and time , is a bounded spatial domain of dimension , and is the final time. The EQL problem then becomes learning the density on the left-hand side of Eq. (1) with a state network, and the diffusion and growth coefficient functions and with separate RHS networks. All networks are fully connected feedforward neural networks, also known as multilayer perceptrons (MLPs), interconnected within the BINN. Since their introduction, BINNs have been extended, for example to jointly learn observation noise [10] and to systems with symbolic-regression equation discovery [11], and applied to tasks such as forecasting stochastic agent-based model data [12].
1.2 Hyperparameter selection
Hyperparameter selection is a challenge faced by every practitioner of neural-network-based EQL, and the settings chosen strongly affect both the accuracy of the recovered functions and the cost of training. State networks in PINNs are notoriously sensitive to architectural and training choices, motivating a body of work on principled hyperparameter and architecture selection that ranges from tuning dominant hyperparameters individually [13], to joint Bayesian optimisation [14], to gradient-based and evolutionary architecture-search methods [15–17], and to multi-objective treatments of the data–physics loss balance [18]. The networks for the unknown RHS terms, in contrast, have received less systematic study. Nonetheless, they are usually kept small, as they typically represent low-complexity functions [19–23]. Reflecting both the difficulty and importance of these choices, systematic hyperparameter-selection procedures have begun to emerge for particular subclasses of PINNs [24–26].
Compared to standard PINNs, BINNs face an additional challenge: because the state and RHS coefficient functions are learned simultaneously, their hyperparameters interact and cannot necessarily be tuned in isolation. Moreover, the coefficient functions being learned are never observed, so selection cannot fall back on held-out accuracy against a ground truth. On top of this, hyper-parameter selection for BINNs remains largely understudied and underreported, which raises the barrier to using them and limits the reproducibility of results.
To address this, we present a practical, ground-truth-free workflow for hyperparameter selection in BINNs. The workflow focuses on selecting the capacities (primarily width and depth) of the state and RHS MLPs and the early-stopping patience, which controls how long training continues without sufficient improvement in the validation loss. We:
-
Present a diagnostic workflow for BINN hyperparameter selection that requires no ground truth and fixes the hyperparameters in an order dictated by the architecture.
-
Evaluate the workflow on a suite of synthetic systems with known ground truth, spanning a range of diffusion and growth terms and extending to noisy, data.
-
Distil transferable rules of thumb for hyperparameter selection: first, use narrow MLPs for the RHS terms, with their sizes chosen according to the expected complexity of each term, and employ a substantially wider state MLP. Second, set the early-stopping patience from the validation loss and the consistency of the learned functions.
The BINN pipeline implementation for hyperparameter selection is available in an open-access GitHub repository. The repository also includes user-friendly interactive notebooks for loading trained BINN models and reproducing all plots in this article. The pipeline can be readily adapted to new hyperparameters and other PDE-governed systems.
2 Background
2.1 The biologically-informed neural network architecture
The BINN architecture [8] is illustrated in Fig. 1. It comprises a state MLP and one or two RHS MLPs ( for diffusion and for growth). The networks output learned surrogate functions , , and for , , and in Eq. (1), respectively. Without loss of generality, the state can be considered a density evolving in space and time. During training, this density is evaluated on a gridded domain using bin-averaged values at grid points . In the full three-dimensional case ( ), the domain is discretised as
where denote the fixed numbers of bins in each spatial direction, and the number of observed time points. This yields discretised density data arranged as a tensor
which is then randomly split into a training set and a validation set. Subsequently, these two sets are used to train and validate the density MLP , with trainable parameters , which maps spatiotemporal coordinates to the predicted density surrogate for , . The surrogate is in turn passed into and , mapping a density to the learned diffusion and growth coefficient functions. All trainable MLP parameters , , and are jointly trained on the data while enforcing that the predictions adhere to the governing PDE and any user-defined biological constraints via corresponding loss terms.
BINN architecture for diffusion equations

BINN architecture for reaction-diffusion equations

Figure 1: Overview of the biologically-informed neural network (BINN) architecture. Schematic overviews of the network flow (left) and the corresponding network architectures (right) are shown for the diffusion equation and the reaction–diffusion equation. The ground truth is the diffusion function D for the former, and the diffusion function D together with the growth function G for the latter. Discretised state data and their spatiotemporal coordinates are input to the state multilayer perceptron (MLP) , which outputs the predicted state (blue). The right-hand side MLPs are trained jointly to recover the underlying biological mechanisms: the diffusion MLP ( , orange) learns the diffusion function and the growth MLP ( , green) learns the growth function . Training minimises a total loss comprising a data fitting term and a physics-informed term , the latter enforcing the governing partial differential equation and optionally incorporating user-specified biological constraints.
2.2 Biologically-informed learning
To infer and in Eq. (1), the BINN's MLPs are jointly trained by minimising the total objective function
with denoting the weights applied to the least-squares data loss, the PDE loss, and the biological constraint loss, respectively. This is schematically shown in Fig. 1 with and . For compactness, each loss is written in terms of the surrogate predictions , , and alone; the observed data , the loss weights, and the biological bounds enter as fixed inputs. Optimisation is performed over the network parameters , , and that generate these surrogates. Weights follow Lagergren et al. [8], and we set , as discussed in Supplementary Material SM1.1–SM1.2. The three loss terms in Eq. (2) are detailed below for the 2D+t case ( ); their non-dimensionalised forms used in the implementation are derived in Supplementary Material SM3.4.
Data loss. The data loss enforces agreement between the density predictions and the observed data. Observations are assumed to be corrupted by additive Gaussian noise with non-constant variance, consistent with statistical error models used in related studies [8, 27, 28]. Specifically,
where denotes the unknown PDE solution for the density, , controls how the noise magnitude scales with density, and are additional variance scaling coefficients.
Under this model, the negative log-likelihood weights each squared data residual by the inverse of its variance, leading to a generalised least-squares (GLS) formulation in which these discrepancies are divided by (see Supplementary Material SM3.4 for more information). Intuitively, this down-weights residuals in high-density regions and up-weights those in low-density regions. However, biological datasets frequently contain extended regions of very low population density, for which . To ensure robust optimisation, we therefore drop the density-dependent weighting, which corresponds to setting in the loss, yielding a standard least-squares objective,
In Supplementary Material SM2, the loss function in Eq. (4) is shown to outperform the GLS loss used in Lagergren et al. [8], even when the ground-truth noise scaling parameter is used.
PDE loss. The PDE objective function penalises deviations of the learned solution from the governing equation at a set of randomised collocation points . During learning, these points are repeatedly and independently sampled from the uniform distribution defined by the coordinate-wise minima and maxima of the observed data. The PDE loss is defined as the mean-squared residual evaluated at the collocation points,
(5) where , , and . The notation denotes evaluation of a function and its derivatives at the -th collocation point. The distinction between data points and collocation points is illustrated in Fig. 2 for a case.
Data points

Collocation points


Figure 2: Data points versus collocation points in 1D+t. Left: data grid for , comprising points. Right: collocation points sampled over 1 and 10 training minibatches, coloured by minibatch. For 1 minibatch, a single set is sampled; for 10 minibatches, the sets illustrate how repeated resampling of random collocation points progressively fills the spatiotemporal domain.
Biological constraint loss. Biological plausibility is enforced through an additional loss term imposing explicit constraints on diffusion and population growth. For example, in many cell-based experiments, the diffusion function is assumed to be non-decreasing with respect to density and bounded as , while the per-capita growth rate is assumed to be non-increasing with respect to density and bounded as . In this setting, the biologically motivated penalty is imposed on a fixed, equally spaced grid of density values , where and denote the minimum and maximum density values observed in the data, producing the biological loss
(6)
where the indicator function equals 1 if the condition holds and 0 otherwise. The coefficients and weight the penalties enforcing the prescribed bounds on and , respectively, while and weight the corresponding derivative-constraint penalties.
2.3 Training-validation split
In BINNs, state data are randomly partitioned into training and validation sets by assigning grid points independently of space and time, with the point selection varying across random seeds [8]. The training set is used to fit the BINN parameters, while the validation set is used to monitor overfitting via early stopping (Supplementary Material SM3.6); throughout, we use an 80/20 training–validation (TV) split. Predictions of the state and RHS MLPs are then performed on the combined training and validation data. This reflects our aim to learn accurate RHS terms over the observed range of the state quantity, rather than extrapolating to unseen state-quantity regimes.
Partitioning at the level of individual grid points, rather than whole trajectories or repeats, is particularly suited to the sparse-data settings that motivate BINNs [8]. In many biological experiments only a handful of repeats are available, and in fields such as ecology the observed dynamics may correspond to a real-world process that unfolds only once, so that training on one complete run and validating on others is not possible. Randomly holding out individual grid points allows a TV split to be formed even from a single realisation. Illustrations of TV splits, and how the contents of the training and validation sets depend on the random seed, are shown in Fig. 3.
Training–validation (TV) splits for first initial condition
TV split 1

TV split 2

Training–validation split 1 for second initial condition

Figure 3: Training and validation sets under different training–validation (TV) splits and initial conditions. Panels are generated using 1D+t data sampled at 38 spatial and 5 temporal points with an 80/20 TV split. Top row shows spatial density profiles at 3 time points. Bottom row shows the corresponding training and validation distributions over density. The two boxed panels use a cosine initial condition and differ only in the random seed defining the TV split, while the stand-alone panel uses an inverted cosine initial condition with the same seed as TV split 1.
3 Methods: hyperparameter-selection workflow
3.1 Hyperparameters in BINNs
We categorise BINN hyperparameters into three groups based on how practitioners set them. The first group comprises generic neural-network settings that practitioners typically leave at standard defaults rather than tune: the optimiser, the batch size, the TV split, and the early-stopping threshold (the relative improvement in validation loss that counts as sufficient, and so resets the early-stopping patience). The second group comprises BINN-specific settings that practitioners typically set from domain knowledge and practical considerations rather than tune: the loss weights, the number of collocation points, and the activation functions. The third group comprises the BINN hyperparameters that must be tuned for each new combination of data and RHS structure: the MLP capacities (width and depth) and the early-stopping patience.
In this work we present a workflow for selecting the third group, controlling capacity primarily through width. For completeness, we also demonstrate how to evaluate the second group's choices in Supplementary Material SM1. The first group we set once and leave untouched, though one could readily carry out checks analogous to those for the second group.
3.2 Diagnostic hyperparameter-selection workflow
In a BINN, the MLP capacities and early-stopping patience are interdependent: their effects on accuracy and cost interact. Therefore, tuning each hyperparameter in isolation risks a selection that is optimal only for the particular settings of the others, while a full joint sweep over all hyperparameters is usually infeasible. As a practical middle ground, we design a semi-sequential workflow whose order is dictated by the BINN architecture, so that it follows the network's data flow: the density predicted by the state network is the input to the RHS networks, and the coefficient functions can only be recovered once the density is adequately represented. Accordingly, we fix the state network capacity first, then the RHS capacities, and finally the early-stopping patience. Each choice is then confirmed to hold as the downstream hyperparameters are selected. To mitigate the stochasticity introduced by the TV split, every configuration is run across several random seeds (here, 3), and each diagnostic is read from the resulting spread rather than from a single training run. The workflow is illustrated in Fig. 4 and reads its decisions from three ground-truth-free diagnostics:
- Cost-performance trade-off charts show the final validation loss and runtime, with a subset of the hyperparameters varied and the rest held fixed. Reading across a swept hyperparameter, a saturation point marks where further increases cease to be worth their cost.
• Training dynamics trace plots show the validation loss over epochs. These reveal whether performance differences between hyperparameter configurations are systematic rather than artefacts of where training stopped, and whether further training is expected to reduce the loss.
- Consistency plots show the learned RHS coefficient functions over the data-supported range of the density u, overlaid across hyperparameter configurations. The hyperparameter value beyond which these functions stop changing signals convergence.
Runtimes are measured on an Apple M3 Pro (CPU-only) up to the saved model ( ; Algorithm 1, Supplementary Material SM3.6). Because machine load varies, runtimes should be compared only within individual case studies.
3.3 Synthetic data generation
To ensure suitability for biological applications, we evaluate the BINN architecture on biologically relevant simulation data generated from known ground-truth functions so that the learned functions can be assessed against a known reference. The ground-truth coefficient functions are restricted to a biologically admissible space, with bounds mm days for diffusion and days for growth. These values are set from observations in scratch-assay experiments [29] with some additional flexibility following Lagergren et al. [8], yielding a suite of physically plausible diffusion and reaction-diffusion equations that are summarised in Table 1 and visualised in Fig. A.1 of Appendix A.

Figure 4: The hyperparameter-selection workflow. A semi-sequential procedure: the hyperparameters are decided in an order determined by the biologically-informed neural network architecture. The capacity—network width and/or depth—of the state multilayer perceptron (MLP), which must learn the data, is proposed first, and is confirmed and selected once it is robust to the downstream MLP capacities and early stopping, and otherwise re-proposed (dashed loop). The capacities of the RHS MLPs are then selected, followed by the early-stopping patience; if the RHS capacities prove not robust to that patience they are reselected (second dashed loop).
All simulations are performed subject to no-flux boundary conditions at the domain boundaries. The governing equations are first solved on a fine spatiotemporal grid. To match realistic experimental resolution, spatial data are then obtained by binning and averaging the solution, and temporal data are sampled at discrete time points. The space and time resolutions are chosen to reflect previous BINN studies with microscopy data in 1D+t [8] and 2D+t [11] settings. Initial conditions resemble a smooth scratch in the 1D+t case and a low-amplitude cosine-squared profile matching a localised seeding of cells on a plate in the 2D+t case. The data-generating settings are summarised in Table 2. Biological constraint weights are set to and , with in Eq. (6). The biological constraint weights are selected to enforce the constraints without impeding training during early epochs, as shown in Supplementary Material SM1.2. For enforcing the PDE constraint, we use collocation points in 1D+t and in 2D+t (Eq. (5)). The value of is chosen to balance the increased runtime associated with larger against the greater stochasticity arising from evaluating the PDE at fewer points when is smaller, as demonstrated in Supplementary Material SM1.3.
Table 1: Ground-truth diffusion and growth functions used to generate the simulated data. Functions are defined on the dimensionless density ; cells mm.
| PDE term | Function | Expression | Parameters (units) |
|---|---|---|---|
| Diffusion | |||
| Growth | |||
Table 2: Data-generation settings. Normalised spatial coordinates are defined as in and in . MPE denotes mean percentage error.
| 1D+ | 2D+ | |
|---|---|---|
| Spatial grid points | ||
| Spatial domain | ||
| Time points | ||
| Duration | ||
| Noise (MPE, ) | — | |
| Initial condition |
4 Results
We apply the workflow to four cases of increasing complexity, each highlighting a different aspect of hyperparameter selection. We first demonstrate the full workflow on a system with a single RHS term: a constant diffusion coefficient function (Section 4.1). Subsequent cases then isolate harder sub-problems: a non-trivial diffusion coefficient function that may require increased MLP capacity (Section 4.2); two coupled RHS MLPs—diffusion and growth—requiring joint selection (Section 4.3); and noisy data that tests the workflow's robustness to measurement noise in a second spatial dimension (Section 4.4).
4.1 Case I: demonstrating the full workflow (constant diffusion in )
We first consider a system with constant diffusion and no growth (Table 1), and use it to demonstrate the full hyperparameter-selection workflow, following the steps of Fig. 4. Here, the state (density) capacity is controlled through , and the RHS (diffusion) capacity through . To streamline the workflow, we hold the MLP depths—the numbers of hidden layers , and —fixed at three, a decision justified in the note on MLP depth.
Step 1: propose . We first fix the diffusion network at a deliberately small width, , to limit its flexibility and ensure that the learning is driven primarily by the density network width, . We then sweep across early-stopping patiences and visualise the cost-performance trade-off (Fig. 5a). Here, across values, the validation loss improves consistently with , and the runtime per unit of validation loss continues to favour wider networks. However, by the absolute cost becomes excessive, with a single run at taking roughly s. We propose , the largest tested width whose runtime remains reasonable while the validation loss still improves appreciably.
Step 2: confirm and select . Using two separate plots, we investigate whether the proposed is robust to different choices of and . For inspecting the effect of early stopping, we trace the validation-loss trajectories over epochs (Fig. 5b). Here, the curves stay separated by throughout training for every tested , confirming that the ranking reflects itself, not when training happened to stop. For -inspection, we plot the cost-performance trade-off across (Fig. 5c), i.e., the -based counterpart of the early-stopping-focused sweep in Step 1. The trade-off shows that performs well across the tested . On both counts, the proposed in Step 1 therefore stands. Had a different been preferable at some , we would loop back to Step 1 (dashed loop in Fig. 4) and re-plot the cost-performance trade-off over at that .
(a) Cost-performance across and ES ( )

(b) Validation loss over epochs across , ES ( )

(c) Cost-performance across and (ES=2000)

(d) Diffusion predictions across ES ( , )

Figure 5: Diagnostics of the hyperparameter-selection workflow. Exemplified on data generated from a simple PDE with one term—constant diffusion—on the RHS. (a) Trade-off between validation loss and runtime across varying widths ( ) of the state network and the early-stopping patience (ES), with the RHS network width fixed (here at ). Bars and whiskers respectively show mean values and min-max ranges across 3 repeats with different training-validation (TV) splits. (b) Validation-loss trajectories over training epochs, with the stopping points for the investigated early-stopping values marked. (c) The same trade-off as in (a) across varying values for and , with early stopping fixed (here at ES = 2000). (d) The learned function at successive early-stopping values (for , ). Regions outside the central 90% of the density support are shown in grey. The dashed ground-truth line and bands play no role in the selection workflow and are shown only for reference. In (b) and (d) filled bands show min-max ranges across 3 repeats with different TV splits.
Step 3: select . With now locked in, we select the diffusion width . Here, since Step 2 already varied , we can reuse those cost-performance plots (Fig. 5c). Varying between 1 and 4 has little impact on either validation loss or computational cost. Since the choice is therefore largely inconsequential, we select as a low-cost safeguard, retaining slightly more flexibility than affords.
Step 4: select early stopping. Finally, we select the early-stopping patience by reading the validation loss and the consistency of the learned functions together. The validation loss (Fig. 5a) continues to drop reasonably systematically with increasing early-stopping patience, so on its own it gives no clear stopping point. We therefore turn to the consistency of the diffusion predictions (Fig. 5d): the learned diffusion function varies only mildly across ES; beyond the continuing fall in validation loss no longer changes the learned diffusion appreciably. We select , a conservative choice that captures the gains that matter for function recovery at modest extra training time.
A note on MLP depth. The depth of each network is set empirically, but the choices are consistent with a simple expectation. The RHS coefficient functions, such as the diffusion , are low-dimensional and smooth, so we expect them to require little depth: universal-approximation results guarantee that even a single hidden layer suffices in principle [30, 31], and the targets lack the complex, compositional structure for which added depth is known to give substantial gains [32, 33]. The same approximation guarantees apply to , but its target is the richer density field, so whether depth helps there is a genuinely empirical question. We resolve both by sweeping depth and width. Figure 6 compares validation loss and runtime across widths and depths for (panel a) and (panel b), and shows the consistency of the recovered diffusion function across depths of both networks (panels c,d). Two observations stand out: (i) for the density network (Fig. 6a), validation loss drops markedly from depth two to three but plateaus from three to four for widths ; and (ii) validation loss is largely insensitive to the depth of the diffusion network, as depth two already suffices for the simple constant-diffusion ground truth. Balancing runtime against performance, and retaining headroom for harder RHS forms, we use depth 3 for both.
(a) Cost-performance across density depth ( , , ES=2000)

(b) Cost-performance across diffusion depth ( , , ES=2000)
(c) Consistency of diffusion predictions across ( , , )

(d) Consistency of diffusion predictions across ( , , )


Figure 6: Impact of MLP depth on the fit and the recovered function. Exemplified on the Case I problem, with data generated from a simple PDE with one term—constant diffusion—on the right-hand side (RHS). is fixed. (a) Trade-off between validation loss and runtime across the width and depth of the state network . (b) The same as (a) for the diffusion network . (c) Consistency of the learned diffusion function across the depth of with width . ( , ) is fixed. (d) The same as (c) across the depth of with width . ( , ) is fixed. The dashed ground-truth line and bands play no role in the selection workflow and are shown only for reference.
Verification. Because the data are synthetic, we can verify the ground-truth-free selections resulting from the workflow against the known diffusion function. Revisiting the sweep, we see that the diffusion-function mean-squared error (MSE) saturates with in the same way as the validation loss, and that its trajectory over epochs mirrors that of the validation loss (Fig. 7a,b). From this we gather that the validation loss, which needs no ground truth, serves as an observable proxy for the otherwise-unobservable MSE. The sweep shows the same agreement. Notably, for all and , the diffusion-function MSE stays below the level that a uniform 1% error in the learned function would produce (Fig. 7b,c); this is the sense in which all mean percentage error (MPE) reference lines in this work are defined (Supplementary Material SM3.2). This illustrates that a small diffusion network recovers the true function; taken together with the runtimes in Fig. 5c, it further shows that larger carries little additional cost.
(a)

(b)

(c)

Figure 7: Ground-truth verification of the learned function in the synthetic Case I study. Data generated from a simple PDE with one term—constant diffusion—on the right-hand side (RHS). Mean-squared error (MSE) of the learned diffusion coefficient function against the ground-truth . (a) MSE over training epochs, for different and early-stopping patiences ES with . Filled bands show min-max ranges across 3 repeats with different training-validation (TV) splits. (b) MSE across varying widths ( ) of the state network and the early-stopping patience (ES), with the RHS network width fixed (here at ). (c) The same MSE across varying values for and , with fixed ES = 2000. In (b) and (c), the bars and whiskers respectively show mean values and min-max ranges across the different TV splits, and mean percentage error (MPE) levels of 0.25%, 0.5%, and 1% are indicated by horizontal lines.
4.2 Case II: selecting by consistency (non-constant diffusion in )
We now apply the hyperparameter-selection workflow to diffusion functions that are more complicated than constant, and thus may require more capacity in the diffusion MLP. Specifically, we consider linear , quadratic , and exponential diffusion (Table 1). The state network, however, fits data of comparable complexity to Case I, so the same remains appropriate. We can therefore reuse and enter the pipeline directly at Step 3, producing cost-performance plots at fixed over varying and ES, whose smallest values are those selected in Case I. Here we test and . Doing so, we find that the cost-performance trade-off charts alone do not pin down a preferred for any of the three diffusion functions (Fig. 8a). Across the tested widths, neither the validation loss nor the runtime changes systematically with : for each diffusion function, the differences between widths are small relative to the spread across TV splits, and the wider networks do not improve on . Both metrics instead depend mainly on the early-stopping patience, with the validation loss decreasing and the runtime increasing as ES grows. Since the charts show no clear saturation point in , we must also inspect the consistency of the learned diffusion function across configurations of and early-stopping patiences (Fig. 8b).
Here, the consistency plots show that the predictions for the different widths agree closely, with the degree of agreement across ES depending on the form of the true diffusion function. For linear diffusion, and result in near-identical predictions that are stable across ES. The predictions initially deviate from the and 8 predictions outside the central 90% density support but become consistent at ES = 5000. Hence, and ES = 2000 are favoured.
For quadratic diffusion, the predictions are predominantly stable across all tested configurations, so the cheapest setting, at , is preferred. For exponential diffusion, the predictions stabilise across values for . Taken together, consistency selects as the smallest configuration at which the learned functions have converged across all three diffusion forms. Although the validation loss keeps falling at larger settings, the recovered function no longer changes significantly, while the runtime continues to rise. Furthermore, the ground truth confirms that this consistency-based selection is accurate: the recovered functions match the true diffusion within 5% MPE across all three forms (Fig. A.2, Appendix B.1).
(a) Cost-performance across

(b) Learned diffusion functions across ES
Figure 8: Selecting for non-constant diffusion. Data are generated from three diffusion functions of increasing complexity: linear, quadratic, and exponential. (a) Trade-off between validation loss and runtime across varying widths ( ) of the diffusion network and the early-stopping patience (ES), with the state network width fixed (here at ). Bars and whiskers respectively show mean values and min-max ranges across 3 repeats with different training-validation (TV) splits. (b) The learned diffusion function across these widths, shown at , 3000 and 5000. Filled bands show min-max ranges across the 3 TV splits. Regions outside the central 90% of the density support are shown in grey. The dashed ground-truth line and bands play no role in the selection workflow and are shown only for reference.
4.3 Case III: selecting early stopping for coupled functions (diffusion and growth in )
We next apply the workflow to a PDE with two RHS terms, diffusion and growth, so that hyperparameter selection must account for learning both functions at once. Specifically, we consider constant diffusion coupled with one of constant , linear , quadratic , or exponential growth (Table 1). The data are of comparable complexity to Cases I and II, so the same remains appropriate. The growth functions are no more complex than the diffusion functions of Case II, so the RHS widths carry over as well, giving . In Appendix B.2 (Fig. A.3a,b), we show that increasing beyond 2 does not consistently improve performance across growth functions. We can therefore enter the pipeline directly at Step 4 to select early stopping. As in Case II, the smallest tested value is the one selected in Case I, giving .
Also, as in Case II, the cost-performance trade-off alone does not pin down a preferred ES (Fig. A.4, Appendix B.2), so we turn to the consistency plots (Fig. 9). With two coupled functions to recover, neither can be judged alone because an ES at which one function appears converged may still leave the other changing. Consistency must therefore be read on and simultaneously. Read jointly (Fig. 9), these RHS functions are generally consistent across all four combinations and all ES. By ES = 2000, the learned RHS functions have largely stabilised, except for quadratic growth, where the diffusion prediction only becomes consistent from ES = 3000 onwards. We therefore adopt the more conservative ES = 3000: the larger patience guards against premature stopping, at little additional cost for the constant, linear and exponential growth functions, where it is not needed. This selection is supported by comparing the learned diffusion and growth functions against the ground truth, as shown visually in Fig. 9 and quantitatively in Appendix B.2.
Learned diffusion and growth functions
Constant growth

Linear growth
Quadratic growth
Exponential growth
Growth
Figure 9: Selecting hyperparameters under coupled diffusion and growth. Data are generated from constant diffusion ( ) paired with four growth forms—constant ( ), linear ( ), quadratic ( ), and exponential ( ). Consistency of the learned diffusion and growth functions across early-stopping patiences with fixed and is shown. Filled bands show min-max ranges across 3 repeats with different training-validation splits. Regions outside the central 90% of the density support are shown in grey. The dashed ground-truth line and bands play no role in the selection workflow and are shown only for reference.
4.4 Case IV: selecting ES on noisy data (diffusion and growth in )
Finally, we ask whether the workflow holds up under noisy and higher-dimensional data. To this end, we apply it to data generated with constant diffusion ( ) and linear growth ( ), corrupted by 5% MPE noise with . Moving to , we carry the density MLP width forward at and re-run the pipeline over the RHS widths only, testing . We select as the smallest width whose learned and agree with those of the next width tested, , while and 16 each deviate significantly.
(Fig. A.5, Appendix B.3). We enter the pipeline at Step 4 to select ES from . Here, the smallest tested ES value is lower than in the previous cases. This is because we expect noise to make the validation loss plateau earlier. The PDE regularisation discourages the network from fitting the noise, so it recovers only a smoothed density fit, and once that fit is reached, which happens sooner at higher noise levels, the validation loss stops improving.
In two spatial dimensions we use a coarse spatial grid to keep training computationally tractable. Even so, compared with the equivalent 1D+t problem in Case III, the data volume grows by a factor of 5.7 (Table 2), making this a data-richer but noisy regime. Despite the added noise, the cost-performance trade-off alone can motivate the choice of ES. The validation loss drops between ES = 500 and 1000 and then plateaus (Fig. 10a), motivating ES = 1000. This plateau is also reflected in the learned diffusion and growth functions (Fig. 10b), confirming the choice. Furthermore, MSE plots against the ground-truth functions and support this selection and, by extension, the workflow's applicability in noisy 2D+t settings (Fig. A.6, Appendix B.3).
(a) Cost-performance across ES

(b) Learned functions across ES
Figure 10: Selecting the early-stopping patience on noisy 2D+t data. Data generated from constant diffusion ( ) and linear growth ( ), with 5% MPE noise added, at fixed widths ( , ). (a) Cost-performance trade-off between validation loss and runtime across the early-stopping patience (ES). Bars and whiskers respectively show mean values and min-max ranges across 3 repeats with different training-validation (TV) splits. (b) Consistency of the learned diffusion and growth functions, and , across varying ES. Regions outside the central 90% of the density support are shown in grey. The dashed ground-truth line and bands play no role in the selection workflow and are shown only for reference.
5 Discussion
We have presented a diagnostic workflow that selects BINN hyperparameters from training-time signals alone, with no access to the ground truth. We applied the workflow to four synthetic systems of increasing complexity. In the noise-free cases, the validation loss and the consistency of the learned functions selected hyperparameters whose recovered diffusion and growth functions came within 5% of the ground truth, at reasonable training cost. Because these tests are carried out in a controlled setting where the truth is known, they lend credence not only to the workflow but to BINNs themselves.
The workflow yields four transferable rules of thumb, each grounded in the case studies. First, the state (density) MLP should be made substantially wider than the RHS MLPs, since the density MLP must capture the full spatiotemporal dynamics of the data, whereas the RHS MLPs need only represent the comparatively simple coefficient functions considered here. Second, keep the RHS MLPs narrow and scale their widths with the expected complexity of each term: was sufficient from non-constant diffusion through coupled diffusion and growth (Cases II–III, Figs. 8–9), increasing only modestly to in the higher-dimensional 2D+t setting (Case IV,
Fig. 10). Third, capacity is better spent on width than on depth: three hidden layers sufficed for all networks, with the validation loss and recovered functions largely insensitive to further depth, consistent with the simple targets of the RHS (Case I, Fig. 6). Fourth, the early-stopping patience should be selected using both the validation-loss curve and the consistency of the learned terms, judging all coupled terms simultaneously (Cases III and IV, Figs. 9 and 10). Underpinning all four rules of thumb, the trend in the validation loss, which needs no ground truth, tracks the otherwise-unobservable joint error in the recovered functions (Case I, Figs. 5 and 7), and this is what makes these ground-truth-free selections trustworthy.
Recent work by Crossley et al. [34] studies how architecture and optimisation choices affect BINN performance on 1D+t advection–diffusion–reaction models, finding that moderately expressive architectures, intermediate learning rates, and balanced data and PDE losses are key to reliable recovery of the RHS functions. Whereas their study surveys the influence of individual optimisation hyperparameters, our contribution is an architecture-ordered workflow for jointly selecting network capacity and early-stopping patience, extended here to noisy two-dimensional data. The two studies' conclusions agree in the areas where they overlap, namely network capacity and loss weighting (the latter considered in our Supplementary Material SM1.1–SM1.2).
We anticipate that a range of researchers looking to apply BINNs will find this work useful. Recall from Section 3.1 that hyperparameters are grouped by how they are set: group 1 consists of generic neural-network settings typically set at standard defaults, group 2 consists of BINN-specific settings typically set from domain knowledge and practical considerations, and group 3 consists of the problem-specific hyperparameters (network capacities and early-stopping patience) that the workflow in Fig. 4 tunes. How the hyperparameters from this work can be reused depends on how closely the considered problem resembles the reaction–diffusion setting studied here: (i) researchers with a closely related problem (reaction–diffusion dynamics on 1D+t or 2D+t data) can adopt the values reported here directly; (ii) those with an in-between problem (a PDE whose RHS terms are of comparable functional complexity to those studied here) re-derive the group 3 hyperparameters on their own data while reusing those from group 2; and (iii) researchers tackling a new problem (a PDE that differs substantially from the setting studied here) re-derive both group 2 and group 3 hyperparameters via an analogous study. Figure 11 summarises these recommendations and lists the hyperparameter values.
Our workflow is deliberately geared towards practical use on real problems, and this pragmatic focus comes with limitations. Because a full sweep over all hyperparameters would be computationally infeasible, the workflow adopts a semi-sequential approach: it selects the state MLP width, then the RHS MLP widths, then the early-stopping patience, following the network's data flow and focusing on widths rather than examining the MLP depths in comparable detail. Although earlier selections are re-checked as the downstream hyperparameters are chosen, this semi-sequential approach may miss well-performing hyperparameter configurations that a full joint optimisation would uncover. A further practical aspect is that some practitioner judgement is inevitable in evaluating workflow outputs. No fixed quantitative thresholds would transfer across application problems, and the diagnostics are therefore read qualitatively, by identifying where a cost-performance curve saturates or where the learned functions stop changing.
A limitation of the study itself is that we validate the workflow against synthetic ground truth rather than experimental data, and at only modest noise levels (up to 5%). This lets us assess the recovered functions against a known reference, but it leaves open how the procedure behaves under the additional confounders of real measurements, including higher noise levels and model misspecification. However, to demonstrate applicability, we apply the workflow to real 2D+t microscopy data in a concurrent study [11]. Future work could investigate the workflow's robustness to extensions of the BINN setting, including PDEs with additional or different RHS terms (for example, advection), and RHS terms that depend not only on density but also on covariates such as space, time, or background environmental factors.
The work presented in this study lowers the barrier to BINN-based equation learning by making hyperparameter selection for BINNs systematic, documented, and ground-truth-free, with its choices verified against synthetic ground truth. It thereby supports wider and more reproducible use of BINNs across biological modelling problems.

| Closely related problems | In-between | General problems | ||
|---|---|---|---|---|
| group 1 | Optimiser | Adam with learning rate | ||
| Batch size | in 1D+; in 2D+ | |||
| TV split | 80/20 | |||
| Early-stopping threshold | 0.05 | |||
| Hyperparameters | Loss weights | ; monotonicity: ; bounding: | ||
| Collocation | in 1D+; 100 in 2D+ () | |||
| Hidden activation | SiLU | |||
| group 3 | Density width | |||
| RHS widths | in 1D+; in 2D+ | |||
| Depths | ||||
| Early-stopping patience | ||||
Figure 11: A user guide to hyperparameter selection. Top. Which hyperparameters a researcher is recommended to reuse from the table below, and how the remaining ones are obtained, depend on how closely their problem matches the reaction–diffusion setting. Bottom. Hyperparameters categorised by groups and problem; grey cells mark hyperparameters that must be re-derived on the user's own data.
Code
Full code is available on GitHub:
https://github.com/williamlavery/binn-hyperparam-selection
Acknowledgements
JAC and SH were supported by the Kjell och Märta Beijer Foundation. SH was supported by the Swedish Research Council (project 2024-05621).
References
[1] G. Camps-Valls, A. Gerhardus, U. Ninad, et al. “Discovering causal relations and equations from data”. In: Phys Rep 1044 (2023), pp. 1–68. DOI: 10.1016/j.physrep.2023.10.005.
[2] M. Schmidt and H. Lipson. “Distilling Free-Form Natural Laws from Experimental Data”. In: Science 324.5923 (2009), pp. 81–85. DOI: 10.1126/science.1165893.
[3] M. Cranmer, A. Sanchez Gonzalez, P. Battaglia, et al. “Discovering Symbolic Models from Deep Learning with Inductive Biases”. In: Advances in Neural Information Processing Systems. Ed. by H. Larochelle, M. Ranzato, R. Hadsell, et al. Vol. 33. Curran Associates, Inc., 2020, pp. 17429–17442. URL: https://proceedings.neurips.cc/paper_files/paper/2020/file/c9f2f917078bd2db12f23c3b413d9cba-Paper.pdf.
[4] M. Cranmer. Interpretable Machine Learning for Science with PySR and SymbolicRegression.jl. 2023. arXiv: 2305.01582 [astro-ph.IM].
[5] S. L. Brunton, J. L. Proctor, and J. N. Kutz. “Discovering governing equations from data by sparse identification of nonlinear dynamical systems”. In: Proc Natl Acad Sci U S A 113.15 (2016), pp. 3932–3937. DOI: 10.1073/pnas.1517384113.
[6] S. H. Rudy, S. L. Brunton, J. L. Proctor, and J. N. Kutz. “Data-driven discovery of partial differential equations”. In: Sci Adv 3.4 (2017), e1602614. DOI: 10.1126/sciadv.1602614.
[7] M. Raissi, P. Perdikaris, and G. E. Karniadakis. “Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations”. In: J Comput Phys 378 (2019), pp. 686–707. DOI: 10.1016/j.jcp.2018.10.045.
[8] J. H. Lagergren, J. T. Nardini, R. E. Baker, et al. “Biologically-informed neural networks guide mechanistic modeling from sparse experimental data”. In: PLoS Comput Biol 16.12 (2020), e1008462. DOI: 10.1371/journal.pcbi.1008462.
[9] R. E. Baker, J. M. Peña, J. Jayamohan, and A. Jérusalem. “Mechanistic models versus machine learning, a fight worth fighting for the biological community?” In: Biol Lett 14.5 (2018), p. 20170660. DOI: 10.1098/rsbl.2017.0660.
[10] R. M. Crossley and R. E. Baker. A likelihood-based framework for simultaneously learning both noise and growth dynamics using biologically-informed neural networks. 2026. arXiv: 2606.13475 [q-bio.QM].
[11] W. Lavery, J. A. Cochrane, C. Olesen, et al. Physics-Informed Neural Networks for Biological 2D+t Reaction-Diffusion Systems. 2026. arXiv: 2604.18548 [cs.LG].
[12] J. T. Nardini. “Forecasting and Predicting Stochastic Agent-Based Model Data with Biologically-Informed Neural Networks”. In: Bull Math Biol 86.11 (2024), p. 130. DOI: 10.1007/s11538-024-01357-2.
[13] Y. Wang, X. Han, C.-Y. Chang, et al. “Auto-PINN: Understanding and Optimizing Physics-Informed Neural Architecture”. In: NeurIPS 2023 AI for Science Workshop. 2023. URL: https://openreview.net/forum?id=xJFITn0hRx.
[14] P. Escapil-Inchauspé and G. A. Ruz. “Hyper-parameter tuning of physics-informed neural networks: Application to Helmholtz problems”. In: Neurocomputing 561 (2023), p. 126826. DOI: 10.1016/j.neucom.2023.126826.
[15] Y. Wang and L. Zhong. “NAS-PINN: Neural architecture search-guided physics-informed neural network for solving PDEs”. In: J Comput Phys 496 (2024), p. 112603. DOI: 10.1016/j.jcp.2023.112603.
[16] B. Zhang and C. Yang. “Discovering physics-informed neural networks model for solving partial differential equations through evolutionary computation”. In: Swarm Evol Comput 88 (2024), p. 101589. DOI: 10.1016/j.swevo.2024.101589.
[17] J. C. Wong, A. Gupta, C. C. Ooi, et al. “Evolutionary Optimization of Physics-Informed Neural Networks: Evo-PINN Frontiers and Opportunities”. In: IEEE Comput Intell Mag 21.1 (2026), pp. 16–36. DOI: 10.1109/MCI.2025.3607749.
[18] F. M. Rohrhofer, S. Posch, C. Gößnitzer, and B. C. Geiger. “Data vs. Physics: The Apparent Pareto Front of Physics-Informed Neural Networks”. In: IEEE Access 11 (2023), pp. 86252–86261. DOI: 10.1109/ACCESS.2023.3302892.
[19] L. Podina, B. Eastman, and M. Kohandel. “Universal Physics-Informed Neural Networks: Symbolic Differential Operator Discovery with Sparse Data”. In: Proceedings of the 40th International Conference on Machine Learning. Ed. by A. Krause, E. Brunskill, K. Cho, et al. Vol. 202. Proceedings of Machine Learning Research. PMLR, 2023, pp. 27948–27956. URL: https://proceedings.mlr.press/v202/podina23a.html.
[20] M. Philipps, N. Schmid, and J. Hasenauer. “Current state and open problems in universal differential equations for systems biology”. In: npj Syst Biol Appl 11.1 (2025), p. 101. DOI: 10.1038/s41540-025-00550-w.
[21] J. Bolibar, F. Sapienza, F. Maussion, et al. “Universal differential equations for glacier ice flow modelling”. In: Geosci Model Dev 16.22 (2023), pp. 6671–6687. DOI: 10.5194/gmd-16-6671-2023.
[22] B. Kuwahara and C. T. Bauch. “Predicting Covid-19 pandemic waves with biologically and behaviorally informed universal differential equations”. In: Heliyon 10.4 (2024), e25363. DOI: 10.1016/j.heliyon.2024.e25363.
[23] M. Philipps, A. Körner, J. Vanhoefer, et al. “Non-Negative Universal Differential Equations With Applications in Systems Biology”. In: IFAC Pap OnLine 58.23 (2024), pp. 25–30. DOI: 10.1016/j.ifacol.2024.10.005.
[24] M. De Rosa, L. Pompameo, A. Litvinenko, and S. Cuomo. “HOMO-PINN: Hyperparameter Optimization of a Multi-output Physics-Informed Neural Network”. In: Oper Res Forum 6.4 (2025), p. 153. DOI: 10.1007/s43069-025-00561-7.
[25] P. Sharma, L. Evans, M. Tindall, and P. Nithiarasu. “Hyperparameter selection for physics-informed neural networks (PINNs) – Application to discontinuous heat conduction problems”. In: Numer Heat Transf B Fundam 85.10 (2024), pp. 1304–1318. DOI: 10.1080/10407790.2023.2264489.
[26] W. Zhou, H. Song, and X. Chu. “Automated design for physics-informed modeling with convolutional neural networks”. In: Commun Phys 8.1 (2025), p. 509. DOI: 10.1038/s42005-025-02414-5.
[27] H. T. Banks, K. L. Sutton, W. C. Thompson, et al. “Estimation of Cell Proliferation Dynamics Using CFSE Data”. In: Bull Math Biol 73.1 (2011), pp. 116–150. DOI: 10.1007/s11538-010-9524-5.
[28] J. H. Lagergren, J. T. Nardini, G. M. Lavigne, et al. “Learning partial differential equations for biological transport models from noisy spatio-temporal data”. In: Proc R Soc A 476.2234 (2020), p. 20190800. DOI: 10.1098/rspa.2019.0800.
[29] W. Jin, E. T. Shah, C. J. Penington, et al. “Reproducibility of scratch assays is affected by the initial degree of confluence: Experiments, modelling and model selection”. In: J Theor Biol 390 (2016), pp. 136–145. DOI: 10.1016/j.jtbi.2015.10.040.
[30] G. Cybenko. “Approximation by superpositions of a sigmoidal function”. In: Math Control Signals Syst 2.4 (1989), pp. 303–314. DOI: 10.1007/BF02551274.
[31] K. Hornik. “Approximation capabilities of multilayer feedforward networks”. In: Neural Networks 4.2 (1991), pp. 251–257. DOI: 10.1016/0893-6080(91)90009-T.
[32] M. Telgarsky. “benefits of depth in neural networks”. In: 29th Annual Conference on Learning Theory. Ed. by V. Feldman, A. Rakhlin, and O. Shamir. Vol. 49. Proceedings of Machine Learning Research. Columbia University, New York, New York, USA: PMLR, 2016, pp. 1517–1539. URL: https://proceedings.mlr.press/v49/telgarsky16.html.
[33] R. Eldan and O. Shamir. “The Power of Depth for Feedforward Neural Networks”. In: 29th Annual Conference on Learning Theory. Ed. by V. Feldman, A. Rakhlin, and O. Shamir. Vol. 49. Proceedings of Machine Learning Research. Columbia University, New York, New York, USA: PMLR, 2016, pp. 907–940. URL: https://proceedings.mlr.press/v49/eldan16.html.
[34] R. M. Crossley, Y. Yin, S. L. Waters, and R. E. Baker. Reliable mechanistic operator recovery with biologically-informed neural networks: principles for architecture and optimisation design. 2026. arXiv: 2607.07425 [q-bio.QM].
[35] M. Almanstötter, R. Vetter, and D. Iber. PINNverse: Accurate parameter estimation in differential equations from noisy data with constrained physics-informed neural networks. 2025. arXiv: 2504.05248 [cs.LG].
[36] J. Abbasi and P. Ø. Andersen. “Physical activation functions (PAFs): An approach for more efficient induction of physics into physics-informed neural networks (PINNs)”. In: Neurocomputing 608 (2024), p. 128352. DOI: 10.1016/j.neucom.2024.128352.
[37] S. Elfwing, E. Uchibe, and K. Doya. “Sigmoid-weighted linear units for neural network function approximation in reinforcement learning”. In: Neural Networks 107 (2018), pp. 3–11. DOI: 10.1016/j.neunet.2017.12.012.
[38] P. Ramachandran, B. Zoph, and Q. V. Le. Searching for Activation Functions. 2017. arXiv:1710.05941 [cs.NE].
A Synthetic data scenarios and BINN architecture overview

Figure A.1: Schematic overview of diffusion and reaction–diffusion models for synthetic dataset generation. Top. The diffusion-only BINN architecture handles Case I (constant diffusion) and Case II (linear, quadratic, and exponential diffusion). Bottom. The reaction–diffusion BINN architecture handles Cases III and IV (1D+t and 2D+t, respectively). Cases I–III are 1D+t and use a cosine initial condition with noise-free cell-density data. Case IV is 2D+t and uses a cosine-squared initial condition with 5% additive Gaussian noise ( ), illustrated by a representative constant- cross-section.
B Ground-truth verification of the learned functions
Comparisons between the predicted and true data-generating functions for case studies II–IV are provided below.
B.1 Case II: non-constant diffusion

Figure A.2: Ground-truth verification for Case II. Mean-squared error (MSE) of the learned diffusion function with respect to the known forms, across the diffusion-network width ( ) and the early-stopping patience (ES), one panel per form: (a) linear ( ), (b) quadratic ( ), (c) exponential ( ).
B.2 Case III: coupled diffusion and growth
(a)

(b)
(c)

(d)
Figure A.3: Cost-performance and function-error diagnostics for Case III across right-hand side (RHS) network widths. Constant diffusion ( ) paired with four growth forms—constant ( ), linear ( ), quadratic ( ), and exponential ( ). Diffusion and growth network widths are always equal ( ). Early-stopping patience is fixed at 3000 epochs. Panel (a) shows the validation loss across the four ground-truth growth functions and the RHS network widths, (b) the corresponding runtimes, (c) the diffusion-function error, and (d) the growth-function error.
(a)

(b)
(c)

(d)


Figure A.4: Cost-performance and function-error diagnostics for Case III across early-stopping patiences. Constant diffusion ( ) paired with four growth forms—constant ( ), linear ( ), quadratic ( ), and exponential ( ). Early-stopping patience across , and right-hand side network widths . (a) shows the validation loss across the four ground-truth growth functions and early-stopping patience, (b) the corresponding runtimes, (c) the diffusion-function error, and (d) the growth-function error.
B.3 Case IV: coupled diffusion and growth with noisy data
(a) Performance

(b) Learned diffusion and growth across (ES = 3000)
Figure A.5: Performance for Case IV across right-hand side (RHS) widths. Constant diffusion ( ) paired with linear growth ( ). Panel (a) shows the validation loss across four joint RHS MLP widths and four early-stopping patience values . Panel (b) shows the corresponding diffusion and growth predictions for .


Figure A.6: Ground-truth verification for Case IV with . Mean-squared error (MSE) of learned functions against the known and , across the early-stopping patiences (ES), for the noisy 2D+t data. (a) Diffusion-function error. (b) Growth-function error.
Supplementary Material
In Section SM1 we motivate our choices for the group 2 hyperparameters, and in Section SM2 we motivate our choice of the data-loss objective. All selections can be made using the ground-truth-free hyperparameter-selection strategy. However, to provide insight into why specific hyperparameters exert their observed effects, we present errors with respect to the ground-truth diffusion and growth functions side by side with the metrics available in experimental settings.
To ensure transparency and reproducibility of the BINN architecture used, we provide a detailed description of the noise implementation, the ground-truth error metrics, data preprocessing, loss function definitions, MLP design, and early-stopping implementation in Section SM3.
Contents
SM1 Group 2 hyperparameters ..... 2
SM1.1 PDE and data loss weights ..... 2
SM1.2 Weights in biological loss ..... 4
SM1.3 Number of collocation points ..... 7
SM1.4 Activation functions ..... 9
SM2 Least-squares versus generalised least-squares data losses ..... 11
SM3 Implementation details ..... 14
SM3.1 Noise implementation ..... 14
SM3.2 Ground-truth error metrics ..... 14
SM3.3 Data preprocessing ..... 15
SM3.4 Loss definitions ..... 16
SM3.5 Network design ..... 19
SM3.6 Early-stopping algorithm ..... 20
SM1 Group 2 hyperparameters
SM1.1 PDE and data loss weights
Here we motivate why we set . To do this we use synthetic Case I with the addition of noise ( ). The noise level is set to 1% MPE. We use , , and early-stopping patiences . We investigate , with fixed in Eq. (2). The motivation for increasing is to examine whether bringing the smaller PDE loss closer to the data loss in magnitude at the start of training improves performance. We set , with and ; see Section SM1.2 for the rationale behind these values.
Figure S.1a–b shows that increasing does not qualitatively alter the running-minimum validation-loss or diffusion-function MSE profiles, although both are systematically shifted upward in value. The increase in validation loss is expected, since a larger directly increases the weighted contribution of the PDE residual to the total loss. By contrast, the associated slowdown in diffusion-function recovery is more subtle and is difficult to diagnose from the total validation loss alone. To remove the dependence on the loss weights and aid comparison of the training dynamics, we therefore plot the data and PDE loss components normalised by and , respectively (Fig. S.1c,d). We also examine the difference between the data and density predictions for a given TV split as a function of density to provide further information (Fig. S.1e).
Figure S.1c shows that during the early stages of training, larger values of impede recovery of the density, as evidenced by the substantially higher data loss. This delayed density recovery is accompanied by slower diffusion-function recovery. Beyond approximately 500 epochs, however, the data loss curves for become very similar. Although the normalised PDE loss is substantially lower for than for , the corresponding diffusion predictions (Fig. S.1f–i) show that this reduction does not materially improve recovery by the end of training. This suggests that accurate density matching is the main bottleneck limiting diffusion-function recovery.
For , more than 1000 epochs are required before the data loss becomes comparable to that obtained with smaller PDE weights, and a similar delay is consequently observed in the diffusion-function recovery. Moreover, Fig. S.1i shows that approximately 4000 additional epochs are required before the diffusion predictions begin to stabilise, relative to the runs with small . Despite the data and PDE losses eventually reaching values comparable to those obtained for smaller , Fig. S.1f–i show that nevertheless produces the poorest final recovery of the diffusion function. To more carefully diagnose this discrepancy, we examine the difference between the observed and learned density profiles. This reveals a substantially larger error in the low-density regime for (Fig. S.1e). Since the initial condition is a cosine profile (see Table 2), these low densities correspond to the troughs of the early-time profiles, where the density is overestimated. This systematic density overestimation is associated with underestimation of the inferred diffusion function in the same density regime. In practice, pronounced and persistent discrepancies concentrated around particular density values may therefore provide a useful diagnostic warning sign, especially when those discrepancies can be linked to a specific feature of the underlying dynamics.
Overall, increasing the constant does not systematically improve diffusion-function recovery; instead, it can both slow optimisation and impair accurate recovery. Intuitively, strong enforcement of the PDE constraint is most beneficial only after the data have been fitted sufficiently well. Placing too much emphasis on the PDE term early in training can therefore hinder the data fitting needed for accurate subsequent recovery of the diffusion function.
The data and PDE terms compete along a Pareto front whose shape is skewed by how the system parameters scale the residual [18]. Among fixed weights, Fig. S.1 suggests that the naive choice of equal weights is a reasonable default. Dynamic weighting strategies instead balance the terms adaptively, which can be more effective, but can incur additional computational cost and typically require tuning. We retain fixed weights here, leaving more effective balancing, for instance via constrained-optimisation schemes such as PINNverse [35], to future work.
(a)

(b)
(c)

(d)
(e)

(f)
(g)
(h)
(i)
Figure S.1: Performance across PDE-loss weights for synthetic Case I with 1% mean percentage error noise. Ground truth: . Hyperparameters: , , , early-stopping patiences , and . (a), (b) consist of 3 training-validation (TV) splits: markers show the minimum for each ES, and shading shows the corresponding min-max range. (c)-(i) consist of the first TV split at . (a) running minimum validation loss. (b) running minimum diffusion-function mean-squared error (MSE). (c) running normalised mean validation data loss smoothed over the preceding 25 epochs. (d) running normalised mean validation PDE loss smoothed over the preceding 25 epochs. (e) mean difference between the density network and the data as a function of density (bin size of 100 cells mm ). Blocks (f)-(i) show diffusion predictions sampled every 100 epochs with light-to-dark shading corresponding to increasing epochs, with the final best model indicated by a solid black line. The mean percentage error (MPE) bands are shown for reference.
SM1.2 Weights in biological loss
Here we motivate the choice of the biological weights in Eq. (6): and . To do this we use synthetic Case I. We use , , and early-stopping patience . Since we enforce constraints on the normalised diffusion and growth predictions equally, we couple the corresponding weights such that and throughout.
To enforce constraints strictly, we initially set . However, this produces a persistent plateau in minimum validation loss (Fig. S.2a), indicating that the density network fails to learn the data while diffusion predictions remain fixed near throughout training (Fig. S.2b,c). This suggests excessively large penalty weights overly restrict optimisation, preventing the density network from accurately representing the data and consequently inhibiting diffusion learning.
Subsequently setting allows validation loss profiles to decrease rapidly across several orders of magnitude without pronounced plateaus (Fig. S.2d). This improvement is reflected in rescaled diffusion predictions, which quickly drop from initialised values near to approximately (Fig. S.2e,f) before converging. Visualising predictions across epochs suggests the bounding constraint is contextually redundant: because network outputs are initialised near one while the true normalised diffusion coefficient is substantially smaller, the network naturally moves below the upper bound without explicit enforcement. However, unlike the bounding constraint, the monotonicity constraint cannot simply be removed without undesirable consequences (evidenced in Fig. S.2e for ).





Figure S.2: Performance when using large weights in the biological loss for synthetic Case I. Ground truth: . Hyperparameters: , , and early-stopping patience . (a) Running minimum validation loss across 3 training-validation (TV) splits: markers show the minimum for , and shading shows the corresponding min-max range. (b) Diffusion predictions for sampled every 100 epochs for the first TV split. Light-to-dark shading corresponds to increasing epochs, with the best model indicated by a solid black line. The mean percentage error (MPE) bands are shown for reference. (c) Same as (b) for . (d)-(f) as in (a)-(c) for .
Since the bounding constraint is essentially redundant here, we set and look only at the effect of . In Fig. S.3a–b, smaller weights ( and ) keep the healthy validation-loss profiles seen when . In contrast, larger weights introduce a validation-loss plateau (Fig. S.3c–d), leading to slower convergence in the diffusion predictions (Fig. S.4). Even so, all give similar final diffusion predictions, especially for .
(a)

(b)

(c)

(d)

Figure S.3: Performance across monotonicity weights for synthetic Case I. Ground truth: . Hyperparameters: , , and early-stopping patience . All plots consist of 3 training-validation splits: markers show the minimum for , and shading shows the corresponding min-max range. Within each block (a)–(d), from left to right: running minimum validation loss, running minimum diffusion-function mean-squared error (MSE), and running mean monotonicity loss.
Across all six cases (three TV splits across ), the network satisfies the monotonicity constraint to machine precision at the best model—the saved checkpoint at epoch (Algorithm 1), which is the model carried forward (Fig. S.3). However, for , the diffusion function is non-monotonic at numerous points during training and for , this can occur near the end of training (Fig. S.3). Increasing the weight to fixes this issue. The weight is now large enough that every network quickly reaches and keeps monotonicity. Furthermore, this setting yields the best learned diffusion functions for both widths, but reintroduces the validation-loss plateau observed in Fig. S.2a.
The user therefore has three options: (i) strongly enforce the constraint and offset optimiser stiffness with a higher ES, at the cost of longer runtimes; (ii) use a smaller weight that promotes constraint satisfaction without hindering optimisation, while verifying that the constraint is met; or (iii) schedule the weight to combine both approaches, at the cost of an additional scenario-dependent hyperparameter. We adopt (ii), setting and .
(a)

(b)

(c)
(d)


Figure S.4: Diffusion predictions across monotonicity weights for synthetic Case I. Ground truth: . Hyperparameters: , , and early-stopping patience . All plots correspond to the first of the 3 training–validation splits. Blocks (a)–(d): columns show predictions for and 64. Light-to-dark shading corresponds to increasing epochs, with the final best model indicated by a solid black line. The mean percentage error (MPE) bands are shown for reference.
SM1.3 Number of collocation points
Here we examine the effect of the number of PDE collocation points per minibatch. To do this, we use the pairing from synthetic Case III with , , and early-stopping patiences . The collocation points set the quality of the PDE loss gradient at the cost of additional runtime; we investigate .
The PDE loss in Eq. (5) is a Monte Carlo estimate of the squared PDE residual integrated over the space-time domain (evaluated on points drawn each minibatch). At low , this estimate becomes sparse and noisy, providing the optimiser with a weak, unrepresentative signal of the global residual. While increasing stabilises optimisation, it increases per-epoch runtime—leading to saturating returns once is large enough to cover the domain sufficiently densely. Figure S.5a shows this saturation effect: the runs reach the main loss drop markedly later than and , while the latter two are nearly coincident, and reaching that drop earlier costs little. Runtimes for and are similar (Fig. S.5b), and only rise sharply at . The consequence of using too few collocation points is seen in the component losses (Fig. S.5c): the larger validation loss at is driven by the data term, while its PDE component is, in fact, lower than at . This is an under-sampling artefact. With only 10 points the BINN can drive the empirical residual small at those locations without necessarily satisfying the PDE elsewhere.
Function recovery shows the same saturation as the validation loss (Fig. S.5d,e): the diffusion- and growth-function MSE profiles are nearly indistinguishable for and . Turning to the diffusion and growth predictions at , the best model provides the most accurate recovery of the ground-truth diffusion and growth functions (Fig. S.5f), even though its data loss remains higher (Fig. S.5c), whereas the (Fig. S.5g) and (Fig. S.5h) predictions are highly consistent across epochs. The result is an identifiability issue: the BINN can recover diffusion and growth functions close to the ground truth while still carrying a larger systematic error in the density fit. We therefore do not select , since its accurate recovery is incidental rather than systematic and could not be identified as such without the ground truth.
The dominant effect of increasing appears to be the reliability of the PDE training signal and not necessarily a consistent improvement in the recovered functions. Moving from to 100 materially changes the optimisation trajectory, whereas 100 to 1000 yields diminishing returns. In this regime ( ), prediction quality appears to be limited primarily by optimisation dynamics and model-data properties rather than collocation error. Therefore, we use for the more computationally demanding 2D+t case, while the lower computational cost of 1D+t allows us to conservatively use .

(f)



(g)



(h)



Figure S.5: Performance across collocation points for synthetic Case III. Ground truth: and . Hyperparameters: , , early-stopping patiences and . (a)–(e) consist of 3 training-validation (TV) splits: markers show the minimum for each ES, and shading in (a), (d) and (e) shows the corresponding min-max range. (a) running minimum validation loss. (b) runtimes. (c) running minimum PDE and data loss components. (d) and (e) running minimum mean-squared error (MSE) for diffusion and growth predictions. Blocks (f)–(h) show , 100 and 1000 for ES = 3000, where predictions correspond to the second TV split. Within each block, from left to right: diffusion predictions over a wide interval, diffusion predictions on a narrow interval, and growth predictions over a wide interval. Light-to-dark shading corresponds to increasing epochs, with the final best model indicated by a solid black line. The mean percentage error (MPE) bands are shown for reference.
SM1.4 Activation functions
Here we examine how the choice of hidden-layer activation function (AF) affects performance, an effect that can be substantial for PINNs [36]. To do this, we use synthetic Case I. We use , , and early-stopping patiences .
We evaluate three smooth activation functions commonly used in PINN applications [13]: (i) sigmoid: ; (ii) hyperbolic tangent (tanh): ; (iii) SiLU (Sigmoid Linear Unit), also known as Swish [37, 38]: . Note that and are related by , so they span similar function classes; SiLU differs qualitatively in being unbounded above and non-monotone, decreasing for to a global minimum at , which can aid gradient flow during training [38]. Since the PDE residual involves second spatial derivatives of the density network, and both the residual and the monotonicity penalties involve first derivatives of the diffusion and growth networks, the AFs must be at least twice continuously differentiable in and continuously differentiable in and . Thus, piecewise-linear functions such as ReLU are excluded. In our setting, the primary bottleneck in the downstream recovery of the diffusion and growth terms is the quality of the density network's approximation of the density field: a poorly resolved density network propagates errors into the diffusion and growth networks regardless of their capacity. Because the density network is the limiting factor, we select the AF on it and share the choice across all three as a single hyperparameter.
As shown in Fig. S.6a,b, SiLU and tanh achieve similar final validation losses and exhibit comparable loss trajectories for widths up to . Beyond this point, the mean validation loss for tanh plateaus and the min-max spread across TV splits increases, whereas the validation loss for SiLU continues to decrease. In contrast, sigmoid performs substantially worse (Fig. S.6c), with validation losses significantly larger and markedly greater variability across . Furthermore, its performance does not improve for . The diffusion predictions across epochs for , are generally consistent with the validation losses. SiLU reaches its best model fastest and recovers a near-constant diffusion in close agreement with what tanh attains, though tanh requires nearly twice as many epochs (Fig. S.6a,b). sigmoid is both the slowest and the least well-behaved: although close to constant through the central density range, its prediction turns sharply upward at high densities (Fig. S.6c). This discrepancy in the diffusion predictions aligns with the poorer validation loss achieved compared to the other AFs.
Turning to the diffusion MSE profiles, we see that SiLU exhibits a steady reduction in error with both epoch and (Fig. S.6a). tanh attains comparably accurate diffusion estimates only at the largest widths, while its MSE trajectory is markedly non-monotonic: following an initial sharp decrease, the error rises again for narrower networks (Fig. S.6b). This behaviour is not apparent from the validation-loss profiles alone, but can be deduced by examining the consistency of the diffusion predictions across epochs and relative to the final SiLU predictions (Fig. S.6a,b). By comparison, sigmoid converges substantially more slowly, with the diffusion MSE remaining near for many epochs and training generally terminating only after considerably more epochs (Fig. S.6c). This poorer convergence is consistent with the higher validation losses obtained with sigmoid relative to tanh and SiLU.
Taken together, SiLU yields competitive final validation losses, consistent loss profiles across epochs, relatively fast convergence, and superior diffusion-function recovery for . While tanh achieves competitive final validation losses, its diffusion-function recovery improves only at larger widths and comes at the expense of heightened sensitivity to ES, whereas sigmoid is consistently the weakest AF across both validation loss and function recovery metrics. Consequently, we adopt SiLU as the default AF across all three networks.
(a) AF = SiLU

(b) AF = tanh

(c) AF = sigmoid




Figure S.6: Performance across activation functions SiLU, tanh and sigmoid for synthetic Case I. Hyperparameters: , , early-stopping patiences and activation functions . For all running-minimum plots across training–validation (TV) splits: markers show the minimum for each ES, and shading shows the corresponding min–max range. For each of (a)–(c) top to bottom: validation loss, running minimum validation loss, running minimum diffusion mean-squared error (MSE), and diffusion predictions across epochs for the first TV split of , . Light-to-dark shading corresponds to increasing epochs, with the final best model indicated by a solid black line. The mean percentage error (MPE) bands are shown for reference.
SM2 Least-squares versus generalised least-squares data losses
Here we compare the generalised least-squares (GLS) objective of Lagergren et al. [8] to the standard least-squares (LS) loss. To do this we use synthetic Case I with the addition of noise ( ). The noise level is set to 1% MPE. We use , , and early-stopping patiences .
From a statistical perspective, the GLS loss is the natural choice under the noise model in Eq. (3), assuming that the variance-scaling coefficients are uniform; see Section SM3.4.1 for details. Nevertheless, in practice we find that the standard LS loss often yields better performance. To understand why this is the case, we compare how each objective weights individual data points and how these weights can affect optimisation.
The density data lie on the grid (written for as in the main text; Case I here has )
with data points in total. As defined in Eq. (4), the LS data loss for is
and the GLS loss is
In practice, clipping is required to ensure that at all sampled points, and must typically be estimated from data. To isolate the effect of the loss itself, we instead consider the idealised setting in which is known a priori, and compare training under and . To interpret the difference between these objectives, we flatten the grid coordinates into a single row-major index , defining and . The GLS loss for a single point can then be written as
Thus, GLS induces prediction-dependent weights: each pointwise error's contribution to the total objective depends on the current prediction , with smaller predictions receiving greater weight.
We use three diagnostics based on these weights. First, the ratio measures the relative scale of the weighted and unweighted data losses. Second, the effective sample fraction quantifies how broadly a set of weights is distributed across the dataset. To compare the LS- and GLS-trained models on an equal footing, we evaluate it for both models using the data-generating exponent , i.e. with weights
where and are the density predictions of the models trained with and , respectively. For either set of weights , the effective sample size is defined by
Accordingly, when all points are weighted equally, whereas when nearly all weight is concentrated on a single point, so that measures how much of the dataset is effectively contributing. Third, we compute the fraction of each data loss contributed by its largest 1% of pointwise contributions.
Figure S.7a shows that the choice of data loss substantially affects the absolute scale of the total validation loss, and Fig. S.7b shows that this difference is driven by the data loss component. Because we train on normalised densities for Case I, the density predictions predominantly satisfy ; consequently, the GLS weights satisfy and inflate the weighted data term relative to the PDE component. Furthermore, the min-max shading across TV splits in Fig. S.7a reveals a clear difference between the loss functions: under GLS, one model maintains a markedly higher validation loss and terminates prematurely, indicating greater sensitivity to the specific split.
The running-minimum diffusion-function MSE in Fig. S.7c mirrors the overall behaviour of the validation loss. For both early-stopping patience values, yields better diffusion-function predictions than . In both the GLS and LS cases, the learned diffusion initially passes through the correct scale of the true constant diffusion , producing a transiently small MSE. Subsequently, however, the diffusion predictions become meaningful only as the density fit stabilises. The divergence in the diffusion-function MSE during these later stages of training highlights the impact of the chosen data loss on the learned diffusion.
Figure S.7d shows that the ratio is initially of order one but grows to values in the tens around 200 epochs, indicating that the GLS loss becomes substantially larger than the unweighted LS term. In Fig. S.7e, decreases for both models as the density fit resolves the low-density regions, but beyond approximately 100 epochs it falls further for the GLS-trained model, coinciding with the jump in the loss ratio. Hence, the GLS-trained model produces predictions whose weights are more unequally distributed, with a small number of low-density points carrying most of the weight. Figure S.7f confirms this concentration of the loss on a few data points, with the largest 1% of pointwise GLS contributions accounting for a large proportion of the total loss. Figure S.7g,h illustrates the effect on the diffusion predictions: under , the predictions change more rapidly across epochs and settle further from the ground truth, whereas yields more accurate final diffusion-function predictions.
Taken together, these results suggest that, relative to the LS loss, GLS changes the optimisation geometry in a significant way. Rather than simply accounting for heteroscedastic noise, the prediction-weighted GLS increasingly concentrates the data-fitting signal on low-density regions where is small and is therefore large. In the coupled BINN setting, this concentration appears to be detrimental: the density network must provide a globally good approximation of to support both the PDE residual and accurate learning of the diffusion (and growth) terms, whereas an overly concentrated data loss can distort that global fit. By contrast, LS distributes the data-fitting pressure more uniformly across the density surface, and this more even conditioning appears to yield a more favourable optimisation in practice.
(a)

(b)
(d)

(c)
(e)

(f)



(g) GLS


(h) LS


Figure S.7: Performance of generalised least squares (GLS) loss versus least squares (LS) loss for synthetic Case I with 1% mean percentage error noise. Ground truth: . Hyperparameters: , , early-stopping patiences . LS and GLS correspond to and objectives, respectively. (a)–(f) consist of 3 training–validation (TV) splits: markers show the minimum for each ES, and shading shows the corresponding min–max range. (a) running minimum validation loss. (b) running minimum validation data and PDE loss components. (c) running minimum diffusion-function MSE. (d) ratio across epochs. (e) effective sample size as a fraction of total sample size , computed from the weights and (data-generating ) for the LS- and GLS-trained models, respectively. (f) fraction of the total data objective formed by the largest 1% of pointwise contributions. Blocks (g)–(h) show, for the first TV split, diffusion predictions sampled every 100 epochs with light-to-dark shading corresponding to increasing epochs, with the final best model indicated by a solid black line. The mean percentage error (MPE) bands are shown for reference.
SM3 Implementation details
SM3.1 Noise implementation
All synthetic noise is implemented according to the following procedure, stated here for the case; the case follows analogously. The noisy observations are generated according to
following the error model of Eq. (3), with the truncation at zero enforcing nonnegativity of the density and the variance-scaling coefficient taken to be constant across all observations, i.e., .
Noise mean percentage error. To avoid division by (near-)zero densities at the domain boundary, the relative error is evaluated only over the index set
with the number of retained observations. For a prescribed noise level in , expressed as an (absolute) mean percentage error (MPE), the scalar is obtained numerically, for each realisation of the noise, such that the achieved MPE lies within a tolerance of the target, , where
and
SM3.2 Ground-truth error metrics
Because the synthetic data are generated from known coefficient functions, the learned functions can be compared directly against them. The metrics defined here quantify that comparison. They require the ground truth, are therefore unavailable in an experimental setting, and play no part in the selection workflow of Section 3; they are reported alongside the ground-truth-free diagnostics only to verify the selections that workflow makes.
Let denote a ground-truth coefficient function ( or ) and its learned surrogate, which corresponds to the network output. Both are evaluated on a fixed, equally spaced grid of scaled density values
where , and and are the minimum and maximum of the normalised densities, so that the comparison is restricted to the density range the data support. Note that the growth terms and drive the density to and 2.5, respectively, whereas in all other cases . The mean-squared error is
(S.1) where is the respective scaling factor ( or ; see Section SM3.3). Therefore, the MSE carries the squared units of ( days for diffusion, days for growth). No weighting or restriction by density occupancy is applied: every grid point contributes equally, and the 5th and 95th density percentiles marked in the profile figures are indicative only. Since the units of Eq. (S.1) differ between the two functions and the ground-truth magnitudes vary across the forms in Table 1, MSE values are not directly comparable. For context, we use the uniformly rescaled function , whose mean percentage error is
where , of size , since terms with are dropped from the summation. The mean-squared error is given by
In MSE plots, a line labelled marks from Eq. (S.2). In plots of the learned function against , the band is given by .
SM3.3 Data preprocessing
One should non-dimensionalise three components relevant to BINN training: (i) the inputs, (ii) the loss functions, and (iii) the outputs. The input scaling fixes the characteristic constants used throughout the non-dimensionalisation, and the loss functions must then be formulated consistently with this scaling. The outputs require no separate treatment: they are non-dimensional by construction once (i) and (ii) are applied, and are rescaled to physical units after training via the characteristic scales (e.g. and ). Accordingly, we address item (i) below and item (ii) in Section SM3.4.
Let denote characteristic length scales in each spatial direction , . Let be a representative time scale, a characteristic magnitude of the cell density , and let and denote characteristic values of the diffusion and growth functions and , respectively. In general, is chosen as a characteristic density of the observed data; for the scratch-assay setting considered here the natural choice is the biological density scale cells mm [29] used to define the ground-truth functions in Table 1. Under these assumptions, the physical variables satisfy
We introduce dimensionless variables (denoted by tildes) via
where , , or, in vector form, , for the Hadamard (componentwise) product . We assume the measurement noise is sufficiently small that the true density is of the same order as the observed data .
We further define the rescaled diffusion and growth functions
which ensures all quantities are . The derivative operators transform according to
(S.4)
Substituting Eq. (S.3)–Eq. (S.4) into the dimensional Eq. (1) yields the non-dimensional form
If all spatial lengths are equal then we can instead use
We approximate , , and by the MLP surrogates , , and .
SM3.3.1 Partial preprocessing
If we can incorporate these scales back into the derivative operators and proceed with the original , and in Eq. (S.5) without introducing training inefficiency. This leads to
where we now approximate , , and by the MLP surrogates , , and , respectively. Moreover, in our simulated experiments we generate the data directly in the model's dimensionless density , where is the biological density scale introduced above (Table 1). The data passed to the pipeline are therefore already , so we take the pipeline's characteristic density to be and apply no further rescaling (i.e., ). The training variable then coincides with the model's dimensionless density. Equivalently, the normalisation is absorbed at data-generation time, and is simply the special case of the general choice that would be made for un-normalised (e.g. experimental) data. Since both diffusion and growth depend only on , the factor cancels from the governing equation and does not affect the recovered diffusion and growth functions; we may therefore rescale to physical units via purely to dimensionalise the density axis post hoc.
SM3.4 Loss definitions
To make the loss functions directly comparable with the main text, we set . However, extending this to or is straightforward. In this subsection, we write the general forms in the non-dimensionalised coordinates of Section SM3.3, but in the implementation, all losses are evaluated in the original quantities , and , which is possible without rescaling because , , and are .
SM3.4.1 Data loss
Data locations. As outlined in Section 2, observed density measurements are available at discrete spatiotemporal locations
with corresponding observations . These points are fixed by the experimental design and form the points where the data loss is enforced.
Loss function. Under the noise model in Eq. (3), the negative log-likelihood (NLL) leads to a GLS objective. For a 2D spatial domain, define the residual
By Eq. (3), with , so the residuals are independent, zero-mean Gaussian variables with variance
The NLL of the observations is therefore
Following Lagergren et al. [8], we retain only the inverse-variance-weighted residual term and drop the log-variance and constant contributions, giving the weighted least-squares objective
Here, we approximate with . Furthermore, the coefficients are often assumed to be constant (or slowly varying), and we adopt this constant- assumption here, so that they reduce to a uniform multiplicative factor, which we absorb into . Therefore, we approximate the noise scaling using only the density-dependent factor and normalise by the number of data points. This yields the GLS-inspired loss of Lagergren et al. [8],
where the density measurements are normalised as . We nevertheless adopt a standard LS loss, i.e. with , since each ingredient of the GLS weighting is problematic here. Regions of very low density are common in biological data, so the weights can become arbitrarily large in practice and require clipping; is difficult to estimate; and since the weights depend on , dropping the log-variance term allows the objective to be reduced by inflating instead of fitting the data. The non-dimensionalised LS (or MSE) data loss that we use is
See Section SM2 for an empirical comparison of and .
SM3.4.2 PDE loss
Collocation points. The PDE residual loss is enforced at collocation points obtained by sampling uniformly over the spatiotemporal domain delimited by the coordinate-wise extrema of the data. Carrying out this sampling in the dimensional coordinates yields
The same procedure applied to the non-dimensionalised domain yields
Loss function. The PDE loss is defined as the mean-squared residual evaluated at collocation points ,
where , , and . The notation denotes evaluation of a function and its derivatives at the -th collocation point. The coefficients restore the physical magnitudes of the non-dimensional diffusion and growth surrogates and are given by
When the characteristic length scales are equal, , this reduces to the scalar coefficient .
In our setting, we take , which absorbs these scales into the derivative operators and allows us to evaluate the residual in the original coordinates with and . Explicitly, evaluating the residual at collocation points , we use
where . In the implementation we have and .
SM3.4.3 Biological loss
Biological constraint points. The biologically motivated penalty is imposed on a fixed equally spaced grid of non-dimensionalised density values , where and denote the minimum and maximum (non-dimensional) density values observed in the data.
Loss function. To penalise violations of the prescribed bounds, of monotone increase of , and of monotone decrease of , the biological loss is given by
where , , the indicator function equals 1 if the condition holds and 0 otherwise, and the non-dimensionalised bounds are , , , and . The coefficients and weight the penalties enforcing the prescribed bounds on and , respectively, while and weight the corresponding derivative-constraint penalties.
SM3.5 Network design
To describe the multilayer perceptrons (MLPs) used here in an accessible manner, we first present a generic -layer architecture consisting of hidden layers followed by a single output layer.
SM3.5.1 Generic MLP
Assume the network processes a minibatch of inputs , where is the batch size and the input dimension. Take the widths of the hidden layers to be and the output width as . Each layer is characterised by a weight matrix and a bias vector . Setting , the pre-activations and activations are computed recursively as
where is the element-wise activation function at layer , is the column vector of ones of length , and is a scalar that rescales the network's final output. Throughout we set , so no output rescaling is applied within the networks. If is chosen as the identity, . In the expanded forms below we abbreviate to for ease of notation; in each case the bias vector is understood to be broadcast over the rows of the preceding matrix product.
SM3.5.2 Density MLP
The cell density field is represented by an MLP , consisting of three hidden layers and one output layer ( ). Furthermore, each hidden layer within a given MLP contains the same number of neurons denoted by , while the output layer consists of a single neuron.
The expanded form is written here for the three hidden layers , but it extends straightforwardly to any number of hidden layers by inserting additional compositions. The input comprises the spatial coordinates and time, . All hidden layers share a common hidden activation (default ), while the output layer uses the softplus activation to ensure non-negative cell density predictions.
SM3.5.3 Diffusion and growth MLPs
The diffusion and growth coefficient functions are also represented by MLPs, and , which take as their input and each return a scalar output. As for , each hidden layer within a given network has identical width, denoted by and , respectively. Each output layer consists of a single neuron.
Diffusion network
The softplus activation in the output layer enforces non-negative diffusivity. The expanded form is written here for the three hidden layers , but it extends straightforwardly to any number of hidden layers by inserting additional compositions.
Growth network
No non-negativity constraint is imposed on the growth term, and the output layer therefore uses the identity activation. The expanded form is written here for three hidden layers , but it extends straightforwardly to any number of hidden layers by inserting additional compositions.
SM3.6 Early-stopping algorithm
Here, the primary hyperparameters are the early-stopping patience (ES) and the widths of the density, diffusion, and growth MLPs, denoted by , , and , respectively. Without loss of generality, we define the BINN configuration with respect to these parameters . The complete early-stopping procedure is given in Algorithm 1.
Algorithm 1: Validation-loss-based early stopping for experimental and simulated data, with optional recording of diffusion and growth MSEs
Input: BINN configuration ; training data and validation data ; minibatch size ; density grid ; characteristic diffusion and growth scales and ; large maximum epoch cap ; mode ; relative update threshold (default 0.05); validation frequency (default 1); and, for simulated data only, ground-truth diffusion , ground-truth growth , MSE sampling interval , and number of MSE points .
Initialisation: // Best validation loss for updates // Epoch of most recent qualifying update // Epoch of most recently saved checkpoint // Validation-loss history // Diffusion-MSE history // Growth-MSE history
for to do
Shuffle and divide it into training minibatches, each containing at most observations; foreach training minibatch do Compute the total training loss on ; Backpropagate the total loss and update the model parameters using the optimiser; if then Divide into validation minibatches, each containing at most observations; foreach validation minibatch do Compute the validation loss ; Average the validation-minibatch losses: ; Append to ; ; if then ; ; Save the trained model as configuration_best; ; end end if mode = simulated and then Compute MSE(; ) = ; Compute MSE(; ) = ; Append MSE(; ) to ; Append MSE(; ) to ; end if then break; end end
Output: saved model configuration_best (referred to as the best model) and its epoch ; best update epoch ; validation-loss history ; and, for simulated data only, diffusion- and growth-MSE histories and .