Rapid prediction of lab-grown tissue properties using deep learning

The interactions between cells and the extracellular matrix are vital for the self-organisation of tissues. In this paper we present proof-of-concept to use machine learning tools to predict the role of this mechanobiology in the self-organisation of cell-laden hydrogels grown in tethered moulds. We develop a process for the automated generation of mould designs with and without key symmetries. We create a large training set with N = 6400 cases by running detailed biophysical simulations of cell–matrix interactions using the contractile network dipole orientation model for the self-organisation of cellular hydrogels within these moulds. These are used to train an implementation of the pix2pix deep learning model, with an additional 100 cases that were unseen in the training of the neural network for review and testing of the trained model. Comparison between the predictions of the machine learning technique and the reserved predictions from the biophysical algorithm show that the machine learning algorithm makes excellent predictions. The machine learning algorithm is significantly faster than the biophysical method, opening the possibility of very high throughput rational design of moulds for pharmaceutical testing, regenerative medicine and fundamental studies of biology. Future extensions for scaffolds and 3D bioprinting will open additional applications.


Introduction
There is a need for fast, efficient algorithms to understand and predict the selforganisation resulting from interactions between cells and extracellular matrix (ECM), particularly in cultured tissues.The extracellular matrix provides structure to tissue and is important for tissue development, maintenance and repair [1].Cell-matrix interactions allow for the feedback of forces between the cells and the ECM leading to self-organisation [2].This mechanobiology is a critical part of the behaviour of cells in tissues [1].Cultured tissues mimic the 3D structures in real tissues and have applications in regenerative medicine [3], testing in pharmacology [4,5], cultured meats [6] and are useful for the study of fundamental biology.The goal of this paper is to show proof-of-concept for the use of machine learning techniques to make predictions regarding the shapes and self-organisation of artificial tissues grown in moulds with tethers.
Such simulations may be useful for designing moulds and scaffolds suitable for tissue growth with specific characteristics, such as highly aligned cells.From an experimental point of view, it can be difficult and time consuming to design moulds and scaffolds to make cultured tissue with realistic characteristics.Several growth strategies for such tissue are available [3].Tethered cell-laden hydrogels can be a convenient way to make such tissues and have specific applications in highthroughput screening (e.g.muscle [7]) and growing small volumes of tissue with potential regenerative medicine applications (e.g.nerves [8] and cornea [9]).Design of moulds and scaffolds for these applications by trial and error is time consuming due to the time it takes to manufacture the moulds, and then grow and analyse tissues grown within them.Biophysical models offer the possibility to speed up this process by testing the properties of moulds computationally to determine how tissue grows within specific mould designs.
The contractile-network-dipole-orientation model CONDOR is a microscopic model for describing the self-organisation resulting from cell-matrix interactions in tissues with polarized or elongated cells [10].The CONDOR model has a number of key features.The interaction between the cells and the ECM is dictated by the symmetries of the cells.It is microscopic, allowing it to be easily extended e.g. for higher order interaction symmetries and biological variation.It is relatively fast for a mathematical model.The self-organisation of large numbers of cells (currently up to around 100000) can be simulated allowing macroscopic tissue sizes to be approached.Validation by comparing with tethered cellular hydrogels (of glial cells) has shown that it accurately predicts how cell-matrix interactions drive the shaping and selforganisation of tissues.The CONDOR model typically takes between 24 hours and 1 week on a single CPU core to simulate up to 100000 cells.
CONDOR simulations are complementary to widely available vertex models [11] and voronoi models [12], which typically neglect ECM and are limited to ∼ 10 3 cells.We also note the use of continuum models to predict the alignment of stress fibers in artificial tissue constructs [13,14,15,16].Also available are force-dipole approaches with fixed cell positions that cannot predict tissue deformations [17].
Machine learning techniques have the potential to speed up the process of predicting self-organisation in tissues to enable rapid rational design of moulds and scaffolds for cultured tissue.The use of Deep Learning models to efficiently and accurately approximate complex functions has been demonstrated in numerous scientific contexts including astronomy [18,19], medicine [20,21], ecology [22,23] and Earth observation [24,25].In this work, we use CONDOR simulations to train an implementation of the pix2pix generative adversarial network architecture [26].Given an input image comprising simple polygonal shapes that represent a mould and zero or more tethers, our trained pix2pix model is able to rapidly predict pixellated representations of the cell-laden hydrogels' equilibrium properties (i.e. the steady-state self-organisation of cells in the hydrogel) that accurately match CONDOR simulation output.
To the best of our knowledge, in this paper we present the first application of deep learning to the prediction of self-organisation in tissues.Machine-learning techniques have already been widely adopted to streamline and accelerate many aspects of tissue engineering research see e.g.Ref. [27] and references therein.These previous applications process large experimental datasets to infer manufacturing techniques and engineered tissue parameters that are best suited for specific applications like regenerative medicine.Our method is fundamentally different because it does not rely on experimental datasets for inference.Instead, by approximating the output of a proven biophysical model, we can accurately predict the detailed structures and properties of tissues that arise from their self-organisation within different shaped moulds.Our detailed predictions can be used to compute the bulk tissue parameters that other methods infer, and thereby identify mould shapes that produce tissues with suitable properties for specific applications.The predictions of our model can also be compared with real experimental datasets to verify their realism and, consequently, their utility in real-world contexts.

Automated mould creation for training data
In order to train the machine learning algorithm we require a large quantity of data representing tissue growth in 1000s of moulds.To create these examples, we have developed a script to generate automated moulds; this script creates mould outlines and positions tethers in a quasi-random manner.
We generate mould shapes and tethering posts by randomly generating a set of 3 to 6 coordinates on a two-dimensional plane in the range [0, 1] for both axes.This sequence of coordinates are used to define a simple polygon or convex hull.We reject shapes which have a cross-sectional area with less than 0.5 of the total canvas area to ensure they have reasonable dimensions, and subsequently regenerate coordinates.Following this, we generate 3 tethers at random positions within this polygon, each with a radius between 0.02 and 0.065 total canvas widths.
We then duplicate and transform the initial shape and tethers to produce a number of types of symmetry in the final mould.We use a total of 5 different duplication regimes; the first two involve reflections on either one or both axes to produce moulds which we label as single mirrored and double mirrored respectively.By duplicating with rotational transformations we can produce moulds with cyclic symmetry, or also dihedral symmetry if the initial mould is duplicated with a reflection beforehand.In all these cases, the origin for the mirror axes or rotations is a random position within the initial mould area.Finally we also use a set of random rotations each around different origin coordinates to produce an irregular and non-symmetric mould.Moulds produced by each regime are generated with equal probability.For moulds with either rotational symmetry, the order of symmetry can be between 2 and 6, again generated with equal probability.
Tethers are pruned after the duplication process to both reduce the total number present within the final mould, as well as to modify further the distribution and symmetry within the mould.This is achieved by defining an exclusion area for tethers for which we choose from several types.The first of these is a circular area placed in the centre of the mould with a diameter between 0.2 and 0.8 times the maximum mould width (determined randomly).The second is with bars placed along either the mirror axes or rotational vectors extending out from the centre, with width between 0.1 and 0.4 of the maximum mould width; these normally retain the same symmetry of the mould, but a rotational offset can also be applied to change the symmetry of tethers, i.e. a mould with dihedral symmetry can then have tethers with only rotational symmetry.Finally, we can use this same bar removal but with random alignment to produce moulds with asymmetric tether distributions.A diagram of these different types of tether removal is shown in Fig. 1.The removal method selected is chosen at random with probabilities based on the symmetry assigned to the mould, shown in Table 1.For the majority of generated moulds we discard those which are subsequently left with less than 4 tethers; we have however included a subset of 100 moulds which have been generated with no tethers in our training data.Finally, we round vertices in order to create curved edges in the mould design.Rounding of either convex and concave corners could be done independently, allowing for more variation in overall mould designs.Convex rounding was applied to 25% of all moulds, while concave rounding was applied to 75% of all moulds.A set of finalised mould designs are shown in Fig. 2.

Contractile network dipole orientation model
To simulate tissue growth within the moulds, we use a contractile network dipole orientation (CONDOR) model that predicts the self-organisation of cells in polarised tissues [10].The form of the model is, (1) The model describes the interaction between elongated (or polarised) cells and the ECM, which is mediated via integrins.E represents the total energy of the system of cells and force dipoles.
The system of cells and ECM is modelled as a contractile network of springs [28] within which the equilibrium length of the springs is modified to represent cell-matrix interactions.The interactions draw in the ECM perpendicular to the orientation of the polarised cells creating a force dipole.The alignment of cells is represented by the unit vector s, and the cell induces a force dipole that pulls on the ECM perpendicular to s. Indices i and j are used to label cells.∆ is a dimensionless parameter of value between 0 and 1 representing the strength of the cell-matrix interaction.l 0 is the equilibrium distance of the contractile network segments between nearest-neighbour cells in the absence of cell-matrix interactions.l ij is the displacement between cells i and j. s i is a unitary vector representing the orientation of cell i.The spring constant κ 0 represents the value of the nearest-neighbour spring constant.The dimensionless spring constant for the bond between cells i and j is represented by κij = κ ij /κ 0 such that κnn = 1.For bonds between more distant cells κij < 1.
The lowest energy state of this model is found using a simulated annealing approach as detailed in Ref. [10].During the anneal, cells maintain their bonds to the ECM (and thus their relative positions in the final configuration), but are otherwise free to move.This is consistent with the growth of cellular hydrogels, where the timescales associated with self-organisation are less than those related to cell motility (i.e. on the timescale on which we are interested, cells are not motile [10]).After the anneal we can calculate additional values, such as the average tension on a cell, τ or the average orientation, e.g.s 2 x The parameters of the simulations are as follows: We run simulations with cells and their bonds initially placed on a face-centre-cubic (FCC) lattice.The FCC lattice ensures that there is non-zero shear modulus in the model (the shear modulus is absent in contractile networks arranged as simple cubic lattices [28]).In addition, in the case of open boundary conditions, it is possible for the whole lattice to fold about a plane, which can occur during the simulated annealing process.This can be resolved by including more distant bonds in the contractile network representing the ECM, so that folds along linear axes are not possible without significant compression in the contractile network leading to a high energy state.In the simulations relating to this model, we set the dimensionless constants ∆ = 0.3 for all cells, κNNN = 0.4, κNNNN = 0.2 and κNNNNN = 0.2 (where the subscripts NNN, NNNN and NNNNN refer to next-nearest, next-next-nearest and next-nextnext-nearest neighbours respectively).The anneal temperature schedule is exponential with an initial temperature of T init /κ 0 l 2 0 = 0.0625.In practical terms, we set l 0 = 40 and κ 0 = 1 such that T init = 100.A fixed number of iterations is used (N cells × 10 6 ) and the ratio between initial and final temperatures T init /T final = 10 7 .The probability of selecting a new position follows a step-function probability.For the mould sizes selected, N cells ≈ 10000.A large penalty of 10 9 is applied to the energy for each cell that is situated outside the mould area, essentially forbidding cells to move into such regions.
We concentrate on moulds here.We expect the method to be valid for other situations such as scaffolds, however moulds offer a convenient system where experimental data tracking self-organisation in cellular hydrogels are available due to the ease of imaging flat systems (albeit data are sparse) [8,9].
Mould shapes generated as described in Section 2.1 are scaled to a suitable size for the CONDOR simulation and encoded in a voxel space.For our training set, the simulation area has an equal height and width of 62.5l 0 ; the mould is centred in this area and scaled so that the maximum height or width is equal to 56.24l 0 , or 0.9 times the simulation area dimensions.The mould is further scaled so its area is exactly 40% of the total simulation area.When encoded into voxel space format, the mould is given a depth of 4l 0 .
The CONDOR simulation of each individual tethered mould in this set takes approximately 24-36 core hours.We run the simulations in parallel on a multicore machine.The output of the CONDOR simulation describes the 3D cell lattice in its final state, with specific positions, orientations etc. being listed for each individually simulated cell.The machine learning model used to generate results in this paper was trained using a total of 6500 examples outputs of the CONDOR simulations representing approximately 27 core years of simulation, with 9:1 training and validation split (trained on 5760 examples, validation on 640).We have additionally run the CONDOR simulation for a set of 100 moulds to be set aside as a test set to assess the results of training, along with selection of several mould designs also used for real cell growth.

Machine learning
We use the TensorFlow [29] framework for machine learning to implement the pix2pix conditional generative adversarial network (cGAN) described in [26].Full details of the model architecture and an explanation of its function can be found in the Appendix.For convenience, we shall refer to our trained model as CONDOR-ML in the following.
In order to be used in the adversarial model, data output from the CONDOR simulations was converted into a set of 2D fields (flattening the z axis) encapsulating the properties of the cell matrix, which in turn can be encoded within a 256 by 256 pixel image compatible with the machine learning algorithm.The length and width of each pixel scales with equilibrium distance.For convenience, we define this as l p = 125l 0 /512.The equivalent 3D volume that each pixel represents is 4l 2 p l 0 .Cells in the CONDOR simulations are found at specific points, whereas a continuous field is needed for the adversarial model.The average spacing between cells in the xy plane are nominally larger than the sizes of pixels we are using for our distributions.As such a simple binning procedure would mean that many pixels would not contain any cells and consequently no measure of any cell properties.
To compensate for this and ensure we obtain a smooth and continuous field, we use a method of kernel density estimation to produce a weighted sum of each property (Z p ) per pixel based on all cells in the surrounding area with where z i is the value an individual cell has for one of its properties and w i,p is the associated weight.The summation is made over all individual cells.Weights are based on the distance between a cell and pixel and determined using a multivariate normal probability density function calculated over the area of the pixel, where x i and y i are the 2D projections of the coordinates of the cell, x p and y p are the centre coordinates of the pixel; these are all measured or converted to units of pixel length (l p ). σ defines the width of this normal distribution and is also measured on a pixel scale; to ensure the distribution is smooth without losing any detail, i.e. small scale variations in density or other properties, we set σ = 3px.The specific properties of cells from the CONDOR simulations included in the training are average magnitude of tension on a cell (τ i ), squares of the cell orientation (s 2 x,i , s 2 y,i , s 2 z,i ) and the tensor product of the cell orientations (s x,i s y,i , s x,i s z,i , s y,i s z,i ).All measures are dimensionless except τ i , which we convert to unitless values using where τ 0,i is the initial total tension on each cell.For the purposes of calculating the cell density field, we also associate a property ρ i = 1 with each cell (i.e. to calculate the convolution of the cell positions).Both equations 2 and 3 apply to all cell properties; the corresponding symbols we use for both the individual cell and weighted sum of quantities is shown in Table 2.
It is important to note that as a consequence of this convolution, each field is inherently multiplied by the density distribution for cells and is hence not individually normalised.Property distributions can subsequently be normalised using the inverse of the mean of the corresponding density distribution, such that where N p is the total number of pixels in the distribution (which for the 256 by 256 pixel distributions we have used would be N p = 65536).As we also set ρ i = 1, this becomes equivalent to where N c is the total number of cells, which itself is equal to the sum of weights for all cells and pixels, equivalent also to the sum of values in the density distribution.This normalisation also makes Z p a dimensionless quantity for all properties.

Quantity Density Tension
Tensor product of orientation Cell property Table 2: Symbols we use for values taken from CONDOR simulations (cell properties) and the symbols for their corresponding weighted sums (fields).
While normalisation of cell property distribution is important for making use of results, it is not applied during training of the machine learning model.Since the total number of cells can vary (and does for individual examples in our training data), this means that the normalisation factor N p /N c is not universal across the training set and ultimately results in a more complex relation that needs to be learned.The machine learning algorithm instead predicts the weighted sums (Z p ) which can then subsequently be normalised using the inverse of the mean of the corresponding predicted density as per Equation 5.
As a technical note, within the actual training process all distributions for each property in the entire training data set are uniformly re-scaled as to have a value range from −1 to 1. Subsequent predictions made by the trained model produces distributions in this −1 to 1 range, for which we apply the reverse of this scaling to return it to a scale matching the training data.
Fig. 3 shows the final weighted sum distributions for all 8 cell property fields for an example simulation result for a mould and tether arrangement.There are a number of aspects of these distributions common with all results.Firstly, the distributions for squares of cell orientations (S 2 x , S 2 y and S 2 z ) do not sum to a uniform value of 1; as a result of the kernel density estimation method, the sum of these distributions is instead equal to the cell density distribution P .As S 2 z is typically small in moulds, the S 2 x and S 2 y distributions appear as approximate inverses each other.There are increased S 2 z and tension (T ) values around the locations of tethers.S 2 z also increases close to the edges of the cell area.Because a fixed lattice of cells is used as a convenient way of defining the tether within CONDOR simulations, non-zero density is measured at the locations of tethers.The boundary of the density distribution is not sharply defined due to the kernel density estimation.
The corresponding input image needed for the machine learning algorithm is the associated mould and tethers used in the simulation.This consists of two layers, one

Results
Our test data set contains a range of examples covering all types of mould symmetry designs and tether distributions.Here we present results for a selection of different moulds and the comparisons between the results of CONDOR with the machine learning predictions of CONDOR-ML.For the purposes of directly comparing predictions from the machine learning model with simulated counterparts, we do not initially apply the normalisation from Eqn. 6.
Fig. 4 shows comparisons between CONDOR simulations and CONDOR-ML predictions of all properties for an example mould and tether set with 5th order dihedral rotational symmetry from our testing data.The final cell matrix shape is given by the P field, which shows a close match between the CONDOR-ML prediction and the simulation, with only minor deviations in the outline.The overall density distribution itself matches the simulation closely, with CONDOR ML correctly predicting a lower and uniform density in the central area between tethers.The same can be said with tension, where CONDOR-ML has predicted the increased value around tether positions and the average value between them, though fluctuations in the central region are not identical.Complex S 2 x , S 2 y and S x S y distributions can be seen in the simulations, and Fig. 4 shows that CONDOR-ML predicts these well, despite their complexity.The machine learning prediction correctly identifies that S 2 x and S 2 y follow approximately inverse distributions of each other.The most significant mismatches between the CONDOR simulation and machine learning predictions are found in the distributions of S 2 z , S y S z and S x S z (Fig. 4).While increased S 2 z is correctly predicted around tethers, increases in S 2 z at the edges of the cell matrix are less consistent.The S y S z and S x S z fields match less well, although the regions where these properties are non-zero are small and typically at the edge of the tissue; we do note that regions where non-zero values occur are predicted correctly even if the values are incorrect.
We measure agreement between CONDOR simulations and CONDOR-ML predictions for each property in each mould of our test set using the mean absolute error (MAE), where Z p,C are the pixel values from the simulation and Z p,ML the corresponding values from the machine-learning prediction.We used this measurement to identify the examples in our test set with the best and worst agreement for the properties S 2 x and T , as these are the most important properties to consider from a rational design standpoint.The 6 best and worst agreements for S 2 x are shown in Fig. 5 and Fig. 6 respectively, while the 6 best and worst for T are shown in Fig. 7 and Fig. 8.We note that the visual differences between the simulated and predicted distributions of S 2 x and T are minor even in the worst cases.We also measure the accuracy of predictions against expected simulated results for the entire test set.This is done by calculating a statistical measure of a particular property (for example, mean density) for both the predicted and simulated result of each example and plotting these values against each other, as shown in Figure 9.For each comparison we also calculate the Pearson correlation coefficient (r xy ) using where X i represents statistics from simulated results, and Y i the corresponding statistics from the machine learning predicted results, and N is the total number of examples in our test data set.Comparisons made in Figure 9 include mean density, which as noted previously is used as the scale factor for normalisation.This shows a mostly good correlation, confirmed with r xy = 0.881, though with 5 outliers which have a predicted mean density that is approximately 7% lower than the corresponding values from simulations; these outliers arise from localised variations in density predictions for     tapered and intricate portions of mould shapes where no tethers are present.Such cases are unlikely to be used for most tissue engineering applications.Additional statistical comparisons made in Figure 9 include the number of pixels with density exceeding 0.2, which effectively is a measure of area of the cell matrix.We also compare the means for both initial and density-normalised tension and cell orientations on the x and y axes.All statistics show high agreement, with r xy values all exceeding 0.98.The outliers associated with cell orientation are the same as those associated with the mean density.
The normalised properties T , S 2 x and S 2 y also show good agreement.When calculating average quantities directly from CONDOR simulation results it is the barred quantities that are calculated.Hence this shows that real quantities, such as total average alignment, which may be useful for design purposes, can be predicted using the machine learning algorithm.

Conclusions and Outlook
In this paper we have shown proof-of-concept for the use of machine learning tools to predict the self-organisation of cell-laden hydrogels grown in moulds.The machine learning method was trained using the results of contractile-network-dipole orientation models, so makes predictions of self-organisation driven by cell-matrix interactions.
To create a large training set for the machine-learning algorithm, we developed an automated process for the generation of mould designs, and used a biophysical model to simulate the cell-matrix interactions within those moulds.In this way, we created a large training set with 1000s of cases describing the self-organisation of cell-laden hydrogels within these moulds.These data are used to train an implementation of the pix2pix deep learning model.
The machine learning algorithm has high accuracy and is significantly faster than the biophysical method, opening the possibility of very-high-throughput rational designs for moulds for pharmaceutical testing, regenerative medicine and fundamental studies of biology.Accuracy was tested using 100 simulations that were unseen in the training of the neural network, demonstrating that the machine learning algorithm made excellent predictions that agreed well with the CONDOR simulations.Our pix2pix model runs at least 10,000 times faster than a typical CONDOR run.It executes in ∼ 0.1 seconds on a typical laptop CPU or ∼ 0.01 seconds if a laptop-grade GPU is used for the computation.
We anticipate a design process in which the CONDOR-ML machine learning algorithm is used to make rapid predictions of the tissue self-organisation in tethered mould designs.Once candidate designs were selected in this way, they would be tested by using full CONDOR simulations to confirm the self-organisation within the tissue matched the results from CONDOR-ML.Since the biophysical simulations are also approximate, the process would be finalised by 3D printing the best moulds and growing cultured tissues within the mould.
The advantage of CONDOR-ML over biophysical models and direct growth of biological samples is speed.Disadvantages are that results are approximate (biological growth is definitive) and that the machine learning algorithm is currently only trained on tethered moulds (extension of the machine learning algorithm to 3D requires an entirely new training set, whereas CONDOR is immediately applicable to 3D).Future extensions for scaffolds and 3D bioprinting will open additional applications.The results described here are primarily validated against hydrogels of glial cells, but we expect applicability to any elongated cell types that self-organise by aligning due to the symmetries underlying the model.For fully three dimensional tissue, the speed of full CONDOR calculations limits the size of the system that can be simulated.In full 3D, we are able to simulate systems with resolution of approximately 46 cells along each axis, which limits the feature size available in simulations for e.g.scaffolds (examples of 3D scaffolds can be found in Ref. [30]).Extensions of this machine learning technique could allow predictions to be made for larger scaffolds and work in this direction is currently in progress.Finally, we believe that the machine learning techniques used here could be applied to other biophysical models of self-organisation in tissue, or directly to experimental data, if sufficient data could be gathered.

Appendix: Machine learning details
We use the TensorFlow [29] framework for machine learning to implement the pix2pix conditional generative adversarial network (cGAN) described in [26].Unconditioned generative adversarial networks (GANs) comprise two separate convolutional neural networks (CNNs) which are referred to as the "generator" network and the "discriminator" network.The training data are a set of images drawn from a particular domain of interest e.g.animals, motor vehicles, specific types of landscape, or human faces.During training, the generator network learns to map random input vectors into realistic two dimensional images that are consistent with the target domain.At the same time, the discriminator network learns to distinguish real images, drawn from the input training data, from "fake" images produced by the generator in response to random input vectors.The training objective for the generator network is to produce images that the discriminator will always classify as real, and the training objective for the discriminator is to always distinguish correctly between real and fake images.Simultaneous optimisation of these two objectives results in a generator network that produces images that are almost indistinguishable from real images in the target domain.
Conceptually, the pix2pix model differs from standard GANs in two key ways: (i) Firstly, the inputs to the generator network are images rather than random vectors.The training data comprise pairs of input and target images that are related to each other by a shared, unknown mapping function.During training, the objective of the generator network is to learn this mapping from the input image space to the target image space, while simultaneously producing realistic images that the discriminator network cannot distinguish from the target images.
(ii) Secondly, rather than considering its input images in their entirety, the discriminator network is designed to evaluate the realism of small 70 × 70 pixel patches of the generated and target images.Empirically, this has been shown to result in finer details in images produced by the fully trained generator network [26].
The generator of the pix2pix network uses the U-net [31] architecture shown in Figure 10 with more details in Table 3.A U-net is a variant of a CNN architecture known as a convolutional auto-encoder.These networks pass their inputs through a sequence of convolution-normalisation-activation blocks (layers 2-24 in Table 3) called the "encoder" network.The encoder extracts features from the input images and encodes them as a one-dimensional array of values called the "latent space vector" or "bottleneck" (the output of layer 24 in Table 3).The values in the latent space vector are then passed into a sequence of transpose-convolution-normalisation-activation blocks (layers 25-56 in Table 3) called the "decoder" network.The decoder uses the values in the latent space vector to generate an output image that has the same width and height as the encoder input, but may have a different depth (typically refered to as the number of channels).Three of the blocks in the decoder network also include dropout layers (layers 27, 32 and 37 in Table 3) which randomly disable a fraction of the weights in the block and introduce noise that helps the entire network to generalise well when supplied with inputs that are not in the training set.During training, the layers of an auto-encoder learn weights such that the bottleneck contains a compressed representation of the input image that contains all the information that the decoder network required to reconstruct the required output image.
The U-net architecture augments a standard auto-encoder by adding "skip connections" that pass data directly between layers in the encoder and decoder and bypassing the bottleneck.The authors of [31] showed that the skip connections helped to preserve the overall structure of the input image while allowing fine details to be modified.This behaviour is ideal for our application because the skip connections let the network preserve the shape of the moulds while the weights of the network learn to predict the behaviour of the cells they contain.
The discriminator of the pix2pix network implements the architecture shown in Figure 10 with more details in Table 4.The discriminator is a traditional convolutional neural network, consisting of a sequence of blocks that perform convolution, normalisation, activation and padding operations.The network is designed to ensure that each pixel of its output represents a features of a restricted 70 × 70 pixel region or "patch" of the discriminator input.
As described in Section 2.1, we train CONDOR-ML using training examples that comprise a two-channel input image, and a corresponding eight-channel "label" image.The input images encode the spatial extent of a randomly generated mould and the locations of any tethers it contains.The labels have the same width and height as the inputs and encode the distributions of cell properties within the mould predicted by the CONDOR code.For each training example, we use the two-channel images as input to the generator and predict an eight-channel output that we will hereafter refer to as the "generated" image.
We then run the discriminator twice, using two different input prescriptions.In the first run, we concatenate the training input image (i.e. an image of the mould) with the corresponding label for that input (i.e. the "true" distributions of cell properties within the mould predicted by the CONDOR code).The resultant discriminator output is a single channel 30 × 30 image, that we will call the "real discriminator response".In the second run, we concatenate the training input image with the corresponding generated image (i.e. the predicted distributions of cell properties within the mould).The output is another single channel 30 × 30 image, that we will call the "generated discriminator response".
We use the three output images to compute an overall "loss" that is decreases as the the generated image becomes more consistent with the target domain (i.e. more realistic) and as the mean pixel-wise difference between the generated and label images decreases.The overall loss is composed from several constituent loss functions that each operate on to the outputs from different parts of the pix2pix model.
Firstly, we compute the mean of the absolute differences between each pixel in the generated and target images.This is conventionally referred to as the "L1 loss": where G i,j,k and L i,j,k represent the pixels in the ith rows, jth columns and kth channels of the generated and label images, respectively.As well as the L1 loss we also compute two loss functions based on the discriminator outputs.For the real discriminator response we compute the sigmoid cross-entropy between it and a 30×30 array of ones.Similarly we compute the sigmoid cross-entropy between generated discriminator response and a 30 × 30 array of zeros.The sigmoid cross entropy between a prediction X and a target Y is defined as: The sigmoid function is used to map the discriminator network outputs from a potentially infinite domain into the range [0 To train the discriminator network we then compute the discriminator loss L disc as the sum: where D L i,j and D G i,j represent the pixels in the ith rows and jth columns of the real discriminator response and the generated discriminator response, respectively.As training progresses, the weights of the discriminator network are adjusted by gradient descent to minimise the value of L disc .This loss is be minimised and equal to zero if the discriminator network predicts an array of zeros for the generated image and an array of ones for the label image.
To train the generator, we compute the generator loss L gen as the weighted sum: where λ is a model hyper-parameter that we set to 1000, following the authors of [26].
As training progresses, the weights of the generator network are adjusted by gradient descent to minimise the value of L gen .This loss is minimised when a generated image is identical to the corresponding label image, but it will not be zero unless the discriminator has learned to perfectly distinguish real and generate images.Our final model is trained using 5760 training examples, each comprising an input image and a corresponding label image.We train our model for 10 epochs, so the network learns from each example 10 times although the order in which the examples are presented to the network is randomised.When training our model, we update the generator and discriminator weights using gradient descent after computing L gen and L disc for a single image i.e. we use a batch size of one.For both networks, we use the Adam optimizer [32] with a learning rate of 2 × 10 −4 and exponential decay rates β 1 = 0.5 and β 2 = 0.999.Table 3: The architecture of the pix2pix generator network.Each row in the table corresponds with a single functional "layer" in the network.The "Type" column lists the names used by TensorFlow to define the computational objects comprising the network.The "Output Shape" column indicates the shape of the numerical array that results from the computation performed by the array on its inputs.We indicate the zeroth dimension of these shapes as a user-definable batch size, but for the work in this paper this batch size is always one.The "Parameter Count" column lists the numbers of parameters (weights) that can be trained for each layer.Horizontal lines divide the table into separate blocks that are illustrated in Figure 10.

Layer Type
Output Similarly coloured blocks represent blocks containing layers that perform similar, but not necessarily identical, computational operations on their inputs.Right: More detailed representations showing the layers that comprise each of the correspondingly coloured blocks in the network schematic.See Table 3 for details of any differences between layers in different computational blocks."Concatenate" blocks stack their inputs along the depth (channel) axis and output the result.Accordingly both inputs to a concatenate layer must have the same width and height, but their channel counts (depths) may be different.
Table 4: The architecture of the pix2pix discriminator network.Each row in the table corresponds with a single functional "layer" in the network.The "Type" column lists the names used by TensorFlow to define the computational objects comprising the network.The "Output Shape" column indicates the shape of the numerical array that results from the computation performed by the array on its inputs.We indicate the zeroth dimension of these shapes as a user-definable batch size, but for the work in this paper this batch size is always one.The "Parameter Count" column lists the numbers of parameters (weights) that can be trained for each layer.Horizontal lines divide the table into separate blocks that are illustrated in Figure 11.
Layer  Similarly coloured blocks represent blocks containing layers that perform similar, but not necessarily identical, computational operations on their inputs.Right: More detailed representations showing the layers that comprise each of the correspondingly coloured blocks in the network schematic.See Table 3 for details of any differences between layers in different computational blocks."Concatenate" blocks stack their inputs along the depth (channel) axis and output the result.Accordingly both inputs to a concatenate layer must have the same width and height, but their channel counts (depths) may be different.

Figure 1 :
Figure 1: Different tether removal methods used for mould generation.

Figure 2 :
Figure 2: A selection of mould and tether designs demonstrating the various symmetry and tether pruning regimes.
describing mould area and the other tether positions.Both layers consist of 256 by 256 arrays of binary values -in the case of the mould layer, values of 1 indicate the depression in the mould where the cell matrix lies, while 0 indicates any region outside this.Similarly, values of 1 in the tether layer indicate the presence of a tether and values are 0 otherwise.Any pixel that is set as a tether location is also set as being non-mould area.The final input image is a 256 by 256 by 2 array.

Figure 3 :
Figure 3: An example of the training data used, including the input mould image and all 8 target fields produced by the CONDOR simulation.All properties are dimensionless.

Figure 4 :
Figure 4: Comparison between the results of the CONDOR simulation and the machine learning prediction for a an example mould with 5 order rotational symmetry from our testing data set.All properties are dimensionless.

Figure 5 :
Figure 5: Comparisons between the CONDOR simulation results and CONDOR-ML prediction results for S 2x with best agreement.All properties are dimensionless.

Figure 6 :
Figure 6: Comparisons between the CONDOR simulation results and CONDOR-ML prediction results for S 2x with worst agreement.All properties are dimensionless.

Figure 7 :
Figure 7: Comparisons between the CONDOR simulation results and CONDOR-ML prediction results for T with best agreement.All properties are dimensionless.

Figure 8 :
Figure 8: Comparisons between the CONDOR simulation results and CONDOR-ML prediction results for T with worst agreement.All properties are dimensionless.

Figure 9 :
Figure 9: Figure showing statistical comparisons for the entire test set.Statistics include mean pixel density P , number of pixels with density exceeding 0.2 as a proxy for area, N (P > 0.2), and mean values for both initial and normalized tension (T and T ), x alignment (S 2 x and S 2 x ) and y alignment (S 2 y and S 2 y ).Also shown for each comparison is the Pearson correlation coefficient, r xy , and a dashed line to indicate equal values.All properties are dimensionless.Barred and unbarred properties are related by a scaling factor depending on N c .Note that the the axes of the top two plots do not start at 0.

Figure 11 :
Figure 11: Left: Schematic illustration of the pix2pix discriminator network.Similarly coloured blocks represent blocks containing layers that perform similar, but not necessarily identical, computational operations on their inputs.Right: More detailed representations showing the layers that comprise each of the correspondingly coloured blocks in the network schematic.See Table3for details of any differences between layers in different computational blocks."Concatenate" blocks stack their inputs along the depth (channel) axis and output the result.Accordingly both inputs to a concatenate layer must have the same width and height, but their channel counts (depths) may be different.

Table 1 :
Probabilities of tether removal selection applied.The five symmetry types are selected with equal probability.For cyclic and dihedral rotations,

the rotation order is selected with equal probability between 2 and 6 inclusive. Symmetry Selection Removal type relative selection frequency frequency None Circular Symmetric bars Rotated bars Random Bars
In double mirror case, this can be either horizontal axis, vertical axis, or both.
Left: Schematic illustration of the pix2pix generator network.