Abstract
A central goal in biology is to infer input signals from measurable readouts. Engineered biosensors are usually built to respond selectively to single inputs, so crosstalk between sensors must be removed through laborious, context-specific orthogonalization. Here we show that multiplexed concentrations can be inferred without eliminating crosstalk. We distribute sensing across a microbial community and decode its time-resolved collective response, which can disambiguate combinations of chemical inputs even when individual sensors show crosstalk or respond indirectly. A computational framework coupling kinetic modeling with machine learning maps these community dynamics to input concentrations. We demonstrate quantitative inference in communities with low or high sensor crosstalk, in communities that respond only indirectly to antibiotic combinations, and in pooled hospital sink water spiked with target analytes. By tolerating non-orthogonal, cross-reactive, and indirect responses, distributed dynamic sensing broadens the range of biological systems usable for multiplexed measurement, wherever input combinations produce reproducible, distinguishable response trajectories.
Subject terms: Assay systems, Computer modelling, Biosensors, Microbial communities, Computational science
Multiplexed biosensing is often limited by crosstalk between sensors. Here, authors distribute sensing across microbial communities and use timer-resolved modelling and machine learning to infer multiple chemical concentrations from cross-reactive and indirect responses.
Introduction
A fundamental challenge in biology is to deduce input signals from measurable outputs. The development of biological signal processing tools is essential for bioengineering research, medical diagnostics, and environmental monitoring1–4. Thus, a major effort in synthetic biology has been to engineer gene circuits that generate specific readouts in response to defined inputs, utilizing microbes, mammalian cells, and cell-free components5–8. As a result, dozens of sensory components have been constructed to detect diverse signals, including pH, gene transfer, heavy metals, explosives, and disease biomarkers9–14.
While tremendous progress has been made toward engineering biological sensing functions to detect individual analytes15–17, many applications require multiplexed signal processing, where multiple signals are measured simultaneously by a common system18–20. For example, diseases may be better characterized by a panel of analytes than by any individual signal alone21. Sensors have been created to monitor gut diseases by monitoring one analyte, yet the gastrointestinal environment is highly complex, with different niches containing a variety of nutrients, inflammatory markers, and microbial species22–25. Large gene circuits composed of logic gates have been programmed to process multiple input signals for cancer diagnostics26 and environmental contaminant detection27, although they were limited to classification tasks and did not yield quantitative measurements of each input.
Further progress in multiplexed signal processing has been limited due to persistent challenges related to crosstalk – a system’s non-specific response to unintended signals28. Multiplexed signal processing can be achieved by encoding information processing units in a single strain18 or distributing them across a microbial community29–32, but each approach has drawbacks. In single strains, each additional sensor circuit can increase cellular burden and complicate the scaling of multiplexed systems33,34. Shared intracellular machinery and global factors like growth burden and metabolic competition also contribute to crosstalk between sensor circuits35–40. Crosstalk introduces bias into the system’s outputs, leading to incorrect inference of input signals. This interconnectedness also makes it challenging to optimize the performance of an individual sensor component without affecting the performance of other system components.
To this end, microbial communities can reduce intracellular crosstalk and growth burden by compartmentalizing circuits, which also enables more modular implementation30–32. However, this approach introduces new challenges including intercellular interactions, like competition, that can lead to unstable community dynamics and impact the direct relationship between sensor inputs and outputs27. Output measurements distorted by imbalanced populations inhibit accurate resolution of inputs. This and other forms of crosstalk reduce measurement precision and thus limit the ability to quantify inputs on a continuous scale. Crosstalk can also be introduced by input-input interactions, environmental interference, output signal profile overlap, and other confounding factors. Thus, regardless of the method used, crosstalk is a universal challenge.
Efforts to reduce crosstalk to achieve orthogonality, where sensors operate independently, have focused on strategies to optimize circuits across all levels of cellular regulation, including modifying DNA sequences and tuning transcription and translation41–45. This typically requires time- and resource- intensive experiments to build and screen sensor components to minimize crosstalk20. Even when individual sensory components are engineered to minimize direct interactions with each other, complete orthogonality remains difficult to achieve due to global factors of the system and the vast potential for non-specific interactions35–40. Minimizing crosstalk is also context dependent: different sensor combinations, growth conditions, or measurement methods may require re-optimization36–38. Consequently, sensor combinations with substantial crosstalk may be excluded from multiplexed applications or require additional experimental optimization. This motivates a complementary strategy: rather than relying solely on front-end optimization of sensing components, one can ask whether multiplexed quantitative information can be recovered computationally from complex biological responses.
In this work, we develop and evaluate a proof-of-concept inference framework to address these challenges using computational signal resolution, which we demonstrate with perceptive microbial consortia. We asked whether a group of sensors with crosstalk could be used for multiplexed quantitative inference, not by experimental optimization of genetic components or populations, but through a computational approach that integrates kinetic modeling and machine learning (ML). The key requirement for our approach is that distinct input combinations generate distinguishable output trajectories beyond experimental variability, such that inference of inputs from outputs is feasible. We illustrate and evaluate the approach across a series of increasingly complex experimental systems. Together, these systems illustrate conditions under which time-resolved biological responses can support multiplexed quantitative inference, while also defining input resolvability and context-specific calibration as important requirements.
Results
Our pipeline entails three steps (Fig. 1). First, we experimentally generated data by measuring cell density and fluorescence of a microbial community treated with different combinations of chemical input concentrations. Second, we augmented the experimental data with simulations using a kinetic model. Third, we used a variational autoencoder (VAE) to encode the outputs of the augmented dataset into a compressed latent space, then trained a multilayer perceptron (MLP) to use the latent variables to predict the chemical input concentrations. We demonstrated this workflow on systems with increasing complexity.
Fig. 1. Overview of experimental and computational pipeline.

(Left) Microbial communities created with engineered sensor bacteria have natural complexities including crosstalk between different sensors and signals. Input inference requires that distinct input combinations generate output trajectories that are distinguishable under the measurement conditions. To increase output information content and improve distinguishability, we measured temporal responses of microbial communities. (Middle) To achieve sufficient data size to train our ML model, we used a phenomenological kinetic model fitted to experimental data to augment the dataset with simulated data. (Right) The time courses are compressed into a lower-dimensional latent space using a variational autoencoder. The latent dimensions are fed to a multilayer perceptron to predict the experimental input concentrations.
Pipeline development on a two-member low-crosstalk community
System assembly and data generation
As proof of principle, we used a community of two Escherichia coli MC4100Z1 strains containing low-crosstalk inducible systems. One strain, aTc-GFP, expresses superfolder green fluorescent protein (sfGFP) under an anhydrotetracycline (aTc) inducible promoter; the other, IPTG-mCherry, expresses mCherry, a red fluorescent protein, under an isopropyl β-d-thiogalactopyranoside (IPTG) inducible promoter (Fig. 2a). These two inducible systems are commonly used, in part, due to their low crosstalk at the component level. However, when we measured the community’s response to each inducer, it had a low level of crosstalk, where each fluorescent signal was negatively suppressed by the opposite inducer (Fig. 2b).
Fig. 2. Pipeline can predict inputs from a 2-sensor community with low crosstalk.

a Schematic of low-crosstalk two-sensor community used to develop the experimental and computational pipeline. One sensor detects aTc and produces GFP in response, and the other sensor detects IPTG and produces mCherry in response. b Crosstalk measurements for aTc and IPTG sensors. See Suppl. Table 3 for details of statistical analysis. c VAE reconstructed vs. true time course data with R2. Using the latent dimensions the VAE generated from time courses, the VAE decoder accurately reconstructs the features of the full time course data. d Examples of VAE reconstructed time courses (orange) and their respective experimental time courses (blue). The VAE reconstructs the shape of the time courses with high fidelity. e MLP predictions compared to true input concentrations of aTc and IPTG in the augmented dataset. Prediction accuracy was assessed with R2 metric. f MLP predictions compared to true input concentrations of aTc and IPTG for experimental data only. The prediction accuracy achieved an R2 of at least 0.99 for both aTc and IPTG training data and 0.95 and 0.965 for aTc and IPTG concentrations, respectively, in the validation dataset. The experimental dataset contained n = 326 time-course samples from 80 unique input combinations before dynamic-range filtering; the augmented dataset also included 10,000 simulated time courses. Crosstalk estimates in (b) used n = 2 replicate wells per condition. Source data are provided as a Source Data file.
Our approach to resolving crosstalk requires that distinct input combinations generate output trajectories that are distinguishable above experimental variability. To achieve this, we designed experiments to maximize the information content of the outputs. In addition to using a different fluorescent reporter to respond to each input, which aligns with common practice, we measured full time courses of cell density and fluorescence. Compared with a single time-point measurement, these trajectories capture additional temporal features, including transient responses and relative timing, and reduce dependence on the selection of a particular measurement time46.
To generate data, we mixed cultures of the two populations at an equal ratio and added a range of concentrations of IPTG and aTc (Methods). In each experiment, we generated data for 95–380 samples, each consisting of the community growth curve, GFP, and mCherry time courses (Suppl. Figs. 1–3).
Data augmentation using kinetic modeling
While we were able to generate experimental data in high throughput, the VAE in our ML pipeline required significantly more data to be reliably trained. To address the limited experimental data, we augmented the dataset using a kinetic model. The model consists of a set of ordinary differential equations (ODEs) to describe each population’s growth and protein expression (Methods).
The induction of each fluorescent protein is modeled using a Hill equation, constrained by measurements of the community dose-response at a single time point (Suppl. Fig. 4). Our model also accounts for crosstalk between the two channels, constrained by the measurements of the community’s fluorescence response to saturating concentrations of each inducer at a single time point (Fig. 2b). We used nonlinear optimization to estimate the remaining parameters of the model using the experimentally measured time courses. These parameters include growth rate, growth inhibition, basal protein expression, maximum protein induction, and protein decay rate.
The goal of parameter fitting is to ensure that our model is constrained by available experimental data. The Hill equation parameter estimations using the single time point dose response data first imposed a soft constraint on the model; then, the overall performance of the model was more strongly constrained by the nonlinear optimization of the full equations with the time courses. As a result, the fitted model allowed us to densely sample the dose responses of the system with high fidelity. Using the optimized parameters, we simulated 10,000 time courses with a range of randomized IPTG and aTc concentrations. The simulated and experimental time courses were combined to create an augmented dataset.
We used the optimized model to evaluate population-level growth dynamics of the microbial community. Although the measured crosstalk of the two populations was low, the model indicates that they could have underlying interactions, like imbalanced growth (Supplementary Fig. 5). Growth competition between populations is a challenge for implementing complex signal processing with microbial communities because it can cause one population to overtake the community47–49. This typically requires optimization at the community level to maintain stable population fractions47,50. Additionally, it may confound the relationship between inputs and outputs, thereby hindering accurate inference. However, we aimed for our computational pipeline to facilitate accurate signal processing despite such confounding factors present in the community.
Using machine learning to predict signal concentrations from time courses
Our next objective was to use the augmented data to train a neural network to predict input signals directly from the system outputs. The outputs consisted of the community growth curve, GFP, and mCherry time courses. Each output was generated with high temporal resolution, consisting of at least 255 time points, to ensure rich information content. This resulted in high-dimensional data, where the combined structure of the outputs was 3 × 255. In processing the data, the cell density and fluorescence time courses associated with each sample or simulation were concatenated into a single data series, yielding a vector of 765 time point features (Suppl. Fig. 6).
To facilitate input predictions from this high-dimensional output data, we built a VAE to deduce a concise, latent representation of the time courses. Our recent studies have demonstrated that the latent dimensions generated by properly trained VAEs can improve downstream analysis by extracting key features of the data through an unbiased approach, minimizing the impact of experimental noise51,52. Upon successful training (Methods), each combined data series was compressed by the encoder of the VAE to a low-dimensional latent vector. The decoder of the VAE then reconstructed the original data series from the latent vector.
We systematically tested VAE architectures and latent space sizes to determine a configuration for reliable downstream prediction (Suppl. Note 1). We did so by using this low-crosstalk sensor dataset and a dataset for two sensors with strong crosstalk, described in the next section. In this study, we selected a latent size of 10, which represents roughly 76-fold compression of the original data. Despite this drastic compression, each latent vector captures the essential features of the original time courses, as evidenced by the high-fidelity reconstruction of the raw data (Fig. 2c, d).
Given each latent vector’s ability to reconstruct the original data series with high fidelity (using the trained VAE decoder), the latent vector can serve as the surrogate of the raw data series. We next built a neural network combining the trained VAE encoder and an MLP to first map microbial community outputs into a latent vector and then map the latent vector to the corresponding input concentrations. When training this combined model, we froze the parameters of the VAE encoder and only optimized the parameters associated with the MLP (Methods). We chose to use an MLP to capture the complexity of the microbial community while maintaining simplicity to avoid overfitting.
The VAE-MLP accurately estimated IPTG and aTc concentrations for the augmented dataset (Fig. 2e). High accuracy was maintained when we isolated predictions solely for experimental data (Fig. 2f). The computational pipeline, including the VAE-MLP architecture, that was developed for this dataset was used for all subsequent analyses.
Robustness of the pipeline to modeling and training assumptions
Before applying the pipeline to more complex sensing systems, we examined whether its performance is dependent on the specific mechanistic assumptions made, parameter identifiability, or training protocol used during model construction. Because the ODE model is employed solely as a structured data generator rather than as a predictive model for inference, we reasoned that accurate inference should primarily depend on learned input–output relationships, rather than on detailed mechanistic fidelity.
First, we tested the robustness of the pipeline to alternative kinetic model formulations. In addition to the base ODE model used throughout this study, we implemented an alternative formulation in which reporter dynamics are explicitly coupled to growth-dependent expression and dilution. Synthetic training datasets generated from the two formulations were used to train the identical VAE–MLP pipeline. Despite differences in the ODE model structure used to simulate data, inference accuracy on experimental data remained similarly high (Suppl. Fig. 7a), indicating that downstream prediction was not sensitive to the tested variation in kinetic-model formulation.
Second, we assessed robustness to kinetic model parameter non-identifiability. The parameters of the ODE model are not uniquely identifiable from the experimental time-course data, and distinct parameter sets can fit the observed trajectories with comparable fidelity. To evaluate whether this ambiguity propagates to inference, we generated synthetic training datasets using multiple parameterizations obtained from different optimization strategies and parameter-bound constraints, while keeping the model formulation fixed. Separate VAE-MLP models trained on these datasets achieved similarly high prediction accuracy and produced nearly identical predictions on held-out experimental data (Supplementary Fig. 7b), indicating that the tested parameter non-identifiability did not measurably compromise inference.
Third, we evaluated robustness to training protocol using a conservative split-before-fitting strategy. In this analysis, the original ODE model formulation was retained, but the model was fit exclusively to the experimental training subset prior to synthetic data generation, thereby preventing any reuse of information across training and validation partitions, even indirectly through the synthetic data distribution. While this constraint modestly reduced performance, inference accuracy remained high, and the qualitative conclusions were unchanged (Supplementary Fig. 7c), indicating that the observed performance was not explained by information reuse across experimental partitions.
Together, these analyses show that inference performance was preserved under the modeling and training variations tested here. To provide insight into this robustness, we examined the learned latent representations of the pipeline using the originally trained VAE–MLP model. Perturbations along individual latent dimensions induced smooth and continuous changes in predicted input concentrations, rather than abrupt or unstable responses (Suppl. Fig. 8). This behavior suggests that the model encodes trajectory-level input–output structure in a low-dimensional representation, which may contribute to stable inference across changes in modeling and training assumptions. Importantly, we emphasize that the latent variables are not directly interpretable and are not intended to correspond to specific biological or physical processes; this analysis is illustrative and is included solely to provide intuition for model robustness.
Demonstration of the pipeline on two sensors with strong crosstalk
We next tested the pipeline on two sensors with high crosstalk that detect tetrathionate (TTR) and thiosulfate (THS)22. These two sulfur-related compounds are linked to gut inflammation22,25,53. Thiosulfate is also implicated in steel corrosion54–56 and can affect wastewater toxicity57,58. The sensors, TTR-YFP and THS-CFP, were contained in E. coli MG1655 host strains for community measurements (Fig. 3a). We measured the community’s fluorescence activation in response to each of the inducers (Fig. 3b). CFP had 85% cross-reactivity to TTR, indicating strong crosstalk. YFP had 8% cross-reactivity to THS.
Fig. 3. Pipeline can predict inputs for a 2-sensor community with high crosstalk.

a A high-crosstalk two-sensor community to test the pipeline’s ability to handle crosstalk. One sensor detects TTR and produces YFP in response, and the other sensor detects THS and produces CFP in response. b Crosstalk measurements for TTR and THS sensors. This set of sensors has high crosstalk as indicated by the strong activation of fluorescence by the unintended inducer. See Supplementary Table 3 for details of statistical analysis. c MLP predictions vs true input concentrations of TTR and THS for augmented training and validation sets. Both had an R2 of at least 0.997. d MLP predictions vs true input concentrations of TTR and THS for training and validation sets of experimental data only. The model achieved an R2 of at least 0.682. The experimental dataset contained n = 283 time-course samples from 88 unique input combinations before dynamic-range filtering; the augmented dataset also included 10,000 simulated time courses. Crosstalk estimates in panel b used n = 2 replicate wells per condition. Source data are provided as a Source Data file.
We co-cultured the two sensor strains with a range of TTR and THS concentrations and measured the cell density, CFP, and YFP at 285 time points (Suppl. Figs. 9–11). The data were processed following the same computational pipeline described for the low-crosstalk sensors, including kinetic model fitting, data augmentation, and VAE-MLP training and prediction. The full pipeline achieved an R2 over 0.99 for predicting TTR and THS concentrations in the augmented dataset (Fig. 3c). When isolating predictions for experimental data, it achieved an R2 of 0.96 and 0.98 for the training set of TTR and THS concentrations, respectively. It predicted TTR and THS concentrations in the validation set with an R2 of 0.68 and 0.87, respectively (Fig. 3d).
Demonstration of the pipeline on three-sensor communities
We next applied the pipeline to communities consisting of three members, each containing one sensing circuit in E. coli Top10F’ host strains. To ensure the three reporters had distinct fluorescence wavelengths, we used red, cyan, and yellow fluorescent proteins for all three-sensor communities. We followed the same experimental protocol for generating time courses, except with three populations, three inducers, and measuring three fluorescence outputs in addition to cell density. Computationally, we adjusted the kinetic model to incorporate the growth and protein expression of the third population. We used the same parameter fitting protocol with these updated equations and new datasets. The growth curve and three fluorescence curves were concatenated into a single data series of four total curves.
First, we constructed a 3-member community of sensors with low crosstalk (Fig. 4a). The strains, Cuma-YFP, OHC14-CFP, and aTc-mCherry, detect cuminic acid (Cuma), N-(3-Hydroxytetradecanoyl)-DL-homoserine lactone (OHC14), and aTc, respectively18. Our VAE-MLP pipeline enabled the prediction of the three input concentrations with high fidelity (Fig. 4b). Next, we combined three sensors with stronger crosstalk, up to 13%, between multiple fluorescence and inducer pairs (Fig. 4c). The strains, Van-YFP, DAPG-CFP, and Nar-mCherry, detect vanillic acid (Van), 2,4-diacetylphloroglucinol (DAPG), and naringenin (Nar), respectively18. Despite crosstalk, the computational pipeline accurately predicted the experimental input concentrations for these sensors (Fig. 4d).
Fig. 4. Input predictions for three-sensor communities with varying degrees of crosstalk.

a Crosstalk measurements for three low-crosstalk sensors that detect Cuma, OHC14, and aTc. See Supplementary Table 3 for details of statistical analysis. b MLP predictions vs true input concentrations of Cuma, OHC14, and aTc for the experimental validation dataset. Each input type was predicted with an R2 of at least 0.93. c Crosstalk measurements for three high-crosstalk sensors that detect Van, DAPG, and Nar. d MLP predictions compared to true input concentrations of Van, DAPG, and Nar for the experimental validation dataset. Each input type was predicted with an R2 of at least 0.90. The low-crosstalk dataset contained n = 777 time-course samples from 281 unique input combinations, and the high-crosstalk dataset contained n = 286 time-course samples from 94 unique input combinations, before dynamic-range filtering; each augmented dataset also included 10,000 simulated time courses. Crosstalk estimates in panels a and c used n = 2 and n = 3 replicate wells per condition, respectively. Source data are provided as a Source Data file.
Contextual limits of transfer-function–based inference
In many biosensing applications, chemical concentrations are inferred by fitting a transfer function, most commonly a Hill equation, to a single time point of a dose–response curve, followed by inversion of this function to estimate inputs from measured outputs. This strategy is attractive because of its simplicity and interpretability, and it can perform well when sensors are approximately orthogonal and responses are dominated by a single, direct regulatory interaction. Under such conditions, the output at a fixed time point provides a reliable proxy for the underlying input concentration.
However, single-time-point inference implicitly assumes that each output channel responds independently and monotonically to its corresponding input, and that the information required for inference is preserved in a snapshot measurement. These assumptions are often not satisfied in complex sensing environments, where multiple inputs interact through shared cellular resources, growth-mediated effects, or indirect community-level responses. In such scenarios, distinct input combinations can converge to similar steady-state outputs. By contrast, time-resolved responses provide a feature-rich description of system dynamics, including transient behaviors, relative timing, and coupled growth and expression patterns, that can disambiguate inputs even when steady-state signals overlap. Our computational pipeline is designed to exploit these rich temporal features for inference (Figs. 1–4). To illustrate this point, we reanalyzed representative datasets using single-time-point transfer-function inversion (Suppl. Figs. 12, 13), which highlights how standard approaches can degrade as crosstalk and indirect effects become more prominent.
Analyte quantification through indirect community responses
The fundamental requirement is that distinct input combinations generate output trajectories that are distinguishable above experimental variability. To demonstrate this notion, we applied our pipeline to analyze a two-member community’s response to antibiotic combination treatment59. Neither population was engineered as a sensor for detecting chemical compounds. The community consisted of a β-lactam resistant population, expressing a β-lactamase (Bla), and a β-lactam susceptible population. The community was treated with varying concentrations of a β-lactam (amoxicillin) and a Bla inhibitor (tazobactam or sulbactam), which inhibits Bla expressed by the resistant population. Both populations constitutively expressed blue fluorescent protein (BFP), and the resistant population constitutively expressed GFP (Fig. 5a). Cell density, BFP, and GFP were measured for the duration of culturing.
Fig. 5. Pipeline predicts antibiotic and inhibitor concentrations from communities without direct sensing functions.

a The communities consisted of an antibiotic-resistant strain that expressed GFP and Bla, and an antibiotic-sensitive strain. Both strains expressed BFP. The resistant strain used for the results in this figure expressed a periplasmic Bla enzyme on a high copy number plasmid vector, named HSGBla. b, c Heatmaps of the microbial community fluorescence responses to treatment with the maximum concentrations of the antibiotic or inhibitor (TAZ (b) and SUL (c)). Color bar and value represent normalized response coefficients derived from fluorescence fold-change with respect to no antibiotic or inhibitor added; a negative value indicates suppression relative to the no-drug condition. Since the communities were not designed to detect the drugs, the same molecule could elicit the absolute maximum response for both fluorescent proteins (amoxicillin in b). The absolute maximum fold-change response could also be negative, indicating the molecule suppressed fluorescence (BFP maximum for both panels). See Suppl. Table 3 for details of statistical analysis. d MLP predictions of amoxicillin (AMX) and tazobactam (TAZ) Bla-inhibitor concentrations vs true concentrations for experimental training and validation datasets. e MLP predictions of amoxicillin (AMX) and sulbactam (Sul) Bla-inhibitor concentrations vs true concentrations for experimental training and validation datasets. Each antibiotic-inhibitor dataset contained n = 300 time-course samples from 100 unique input combinations before dynamic-range filtering, with n = 3 replicate wells per condition; crosstalk estimates in (b, c) also used n = 3 replicate wells per condition. Source data are provided as a Source Data file.
We used our pipeline to predict the antibiotic and inhibitor concentrations from the three time courses. Although neither fluorescent protein was directly activated by the antibiotic or inhibitor, we estimated the crosstalk model parameter from community fluorescence data corresponding to the maximum antibiotic or inhibitor concentrations (Fig. 5b, c). We observed high levels of crosstalk in these communities, meaning they would not typically be selected as sensors for these two analytes. We also fit the Hill equation parameters to single time point fluorescence dose-response data (Suppl. Fig. 14). Since the community was not designed to detect the antibiotic or inhibitor, the fluorescence responses to each molecule were noisier and less sensitive to lower concentrations. Our original two-population kinetic model for sensing communities was sufficiently general to represent this new data, with different interpretations of variables (Suppl. Fig. 15). As such, we directly fit the remaining model parameters to this experimental data, then used the fitted model to augment the dose responses. Our VAE-MLP pipeline yielded high-accuracy predictions of the drug concentration combinations used to treat the communities (Fig. 5d, e).
We applied this approach to eight datasets of these two-member communities treated with amoxicillin and Bla inhibitors. In each dataset, the plasmid copy number, Bla enzyme, or inhibitor molecule were varied. In most cases, without modifying the kinetic model formulation, our pipeline yielded accurate predictions of the drug concentrations, showing that our pipeline could be applied across several related community configurations (Suppl. Fig. 16). Certain plasmid and inhibitor combinations resulted in worse predictions, typically for the inhibitor. This is likely due to the inhibitor eliciting too small a change in cell density and fluorescence such that the pipeline cannot accurately estimate its concentration. For some datasets, the BFP measurements were noisier, preventing the pipeline from detecting differences in the signal response. Nevertheless, for most of the datasets, the concentrations were predicted with high fidelity.
These examples show that communities need not contain dedicated sensory circuits to support quantitative inference, provided that the inputs generate reproducible and distinguishable dynamical responses. More broadly, this indirect-response strategy complements existing biosensor approaches for detecting multiple antibiotics and is relevant to complex matrices such as hospital sink-drain samples, where antibiotic residues and water chemistry can be measured together60,61. In the datasets tested here, the same phenomenological kinetic-model formulation provided sufficiently accurate data augmentation for most community configurations.
Example of inferring five inputs from three time-resolved readouts
The antibiotic response experiments also motivate a broader interpretation of what constitutes an analyte in this framework. Rather than requiring a direct sensor, an analyte can be viewed more generally as any perturbation that induces a reproducible, information-rich dynamical response. Under this interpretation, antibiotics, inhibitors, nutrients, and other environmental factors are treated as inputs whose concentrations are inferred from time-resolved population and reporter dynamics.
Moreover, we reason that time-resolved outputs could support inference of more inputs than the number of measured output channels. To illustrate this concept, we extended the pipeline to a system in which two strains generating three readouts (OD and two fluorescence channels) were used to infer the concentrations of five distinct inputs, including antibiotics and metabolic perturbations (Suppl. Fig. 17). Using the same overall inference workflow, the model inferred all five inputs from the shared time-course data in the held-out experimental validation set.
This example illustrates that the number of resolvable inputs can exceed the number of measured fluorescence channels when the trajectories contain sufficiently distinct information about each input. It does not imply that an arbitrary number of inputs can be recovered from a fixed set of outputs; resolvability depends on the input ranges, output modalities, temporal sampling, experimental noise, and calibration data available for a given system.
Analyte quantification in hospital sink water
Detecting analytes in complex samples like wastewater or patient samples is necessary for the translation of biological signal processing to environmental and biomedical applications. Real-world samples often contain complex mixtures of metabolites and contaminants, which can complicate inference of target signals4,62–64. Here, rather than attempting an in situ deployment, we asked whether the framework could infer spiked analytes after calibration in hospital-derived sink-water samples.
We tested this with water collected from sink P-traps in patient rooms from an acute care hospital. Hospital sink P-traps contain many contaminants, including pathogenic microbes, pharmaceutical compounds, and disinfecting agents61,62,65. Hospital sinks have been connected to antimicrobial-resistant outbreaks and are a known source for exposure to antibiotic resistance and spread of infections66,67. Also, hospital wastewater effluent is of concern due to its high concentrations of active pharmaceutical compounds that are toxic to wildlife and humans61,68. These features make hospital sink water a relevant and compositionally complex environmental matrix for evaluating the feasibility of the inference framework.
P-trap samples were collected weekly from newly installed sinks in patient rooms in Duke University Hospital (Methods). To test our approach, we pooled together the filtrate of five sinks from one week (Fig. 6a). We used the Van-YFP and aTc-mCherry sensors previously used in three-sensor community experiments. Vanillic acid (Van) is a phenolic compound and environmental contaminant69, and aTc is a degradation product of tetracycline antibiotics70,71. Also, vanillic acid and aTc were chosen because well-characterized sensor strains were available, allowing us to test the inference framework in a realistic sample matrix without additional component engineering.
Fig. 6. Inference of spiked analytes after calibration in pooled hospital sink-water.

a Schematic overview describing the sample collection and processing. Liquid was collected from the P-trap of hospital sinks. The samples from 5 sinks not treated with Virasept disinfectant were pooled together for testing. b Final predictions of aTc and Van concentrations with respect to their true concentrations for both training and validation sets of the data. R2 score for each subset is labeled in the plot. The sink-water dataset contained n = 189 time-course samples from 93 unique input combinations before dynamic-range filtering. Source data are provided as a Source Data file.
We first measured the sensors’ responses to Van and aTc in sink water to confirm that the sensor community produced informative readouts in this altered background (Suppl. Fig. 18). We added both sensor strains and various concentrations of Van and aTc to the pooled sink samples. We measured cell density and fluorescence time series to train and validate the computational pipeline. The pipeline predicted Van and aTc concentrations in sink water with an R2 of at least 0.99 for training data. For validation data, the pipeline estimated aTc concentrations with an R2 of 0.994 and Van concentrations with an R2 of 0.988 (Fig. 6b). Together, these results show that, after calibration in the P-trap-derived water, the framework inferred spiked Van and aTc concentrations with high accuracy. This experiment establishes feasibility in a sink-water background rather than robustness across environmental matrices or an in situ deployment.
Discussion
Our results establish a proof-of-concept framework for multiplexed quantitative inference from time-resolved biological responses. The framework relies on several design features that support inference in the systems examined here. By distributing sensory functions across microbial consortia, this strategy can reduce some intracellular interactions between circuits and provide a modular route for assembling multiplexed systems. Our pipeline also assumes that the community remains sufficiently stable over the assay window for all relevant strains to contribute reproducible, information-rich readouts. This requirement concerns functional persistence during the measurement period rather than long-term ecological stability; substantial loss of an informative population could impair inference. Augmenting experimental data using a kinetic model generated datasets large enough to train a VAE. The phenomenological model captured the measured community growth and reporter dynamics sufficiently well to support structured data augmentation, rather than to provide a uniquely identifiable mechanistic description. Other models could be adapted to systems like cell-free genetic circuits or human cell-signaling pathways5,8. Finally, the VAE enabled distillation of important information from high-dimensional data, and the MLP was critical for computing input concentrations from latent variables.
We used ML to estimate input concentrations because of its flexibility, which enabled more accurate predictions than directly using the kinetic model in the systems tested here (Suppl. Fig. 19). The VAE–MLP was trained across the full training dataset and could learn nonlinear associations between combinations of inputs and patterns in the measured trajectories that were not explicitly encoded in the phenomenological model. By contrast, direct model-based inference was constrained by the assumed equations and their fitted parameters. These results do not imply that ML will necessarily outperform model-based inference in every setting; rather, they show that the combined pipeline was advantageous for the cross-reactive and indirect responses examined here. In future work, pretrained models for scientific dynamical systems, together with broader advances in machine learning for synthetic biology72–74, may reduce the amount of system-specific data needed for representation learning. However, the suitability of such models for biological inference would need to be established across independent systems and measurement contexts.
Our pipeline addresses several challenges in multiplexed biological signal processing and may facilitate broader translation of responsive biological systems to applications in diagnostics and environmental monitoring. We demonstrated how our pipeline could reduce certain bottlenecks that exist at various stages of traditional biosensor development. First, the platform broadens the types of biological responses that can be considered for quantitative inference, because a detailed mechanistic understanding of specific genetic pathways or sensory components is not required. Biological systems with a natural response to stimuli can be implemented for detecting signals, even without a direct input-to-output sensing mechanism, as demonstrated with the antibiotic-treated communities. Next, using this platform, sensors that have crosstalk with each other can be used in combination, whereas they otherwise would be excluded or require re-optimization. This may broaden the combinations of sensing components and reduce some experimental optimization. Finally, background-dependent interactions can be incorporated when they are represented in the calibration data, as illustrated by the sink-water experiment.
The framework is potentially applicable across different types of inputs and outputs. We estimated small-molecule concentrations, but the pipeline could be used as a measurement tool in other contexts, such as detecting genetic material or monitoring and controlling gene expression19,75,76. Alternative reporters with high information content, including hyperspectral profiles77, acoustic signals78, or high-resolution fluorescence wavelength measurements, may provide additional informative output dimensions, although these modalities were not experimentally evaluated here.
Requirements, assumptions, and limitations of the inference framework
Whether a chosen set of biological outputs can resolve a given panel of inputs is a question of system identifiability: whether the input concentrations can be recovered from the measured output trajectories. We determine this resolvability operationally for each implementation. For a given system, the intended input range and the prediction error acceptable for the application are defined, the system is calibrated on representative data, and performance is evaluated on independent data spanning that range; the input panel is supported when the predefined error criterion is met across validation, and failure indicates that the chosen outputs, temporal sampling, or calibration dataset are insufficient for that panel. This assessment is system-specific because identifiability here is a property of the calibrated input-output map and the measurement noise, and it depends on response dynamic ranges, cross-reactivity, input ranges, temporal sampling, and biological and measurement variability, which are not known before the system is characterized. The number of resolvable inputs is not fixed by the number of readout channels. Time-resolved trajectories can resolve more inputs than channels, as illustrated by our example of inferring five inputs from three readouts (Suppl. Fig. 17). In contrast, limited dynamic range and responsiveness of readouts to inputs will compromise the resolvability, as reflected by the poor model performance in inferring TAZ concentrations by the HSGBlaM community (Suppl. Fig. 16h). As a result, no general a priori criterion can return the maximum number of resolvable inputs from a chosen set of outputs in advance for nonlinear, cross-reactive systems of this kind. Our workflow (Fig. 1) can therefore be applied broadly, while successful high-performance inference must be established for each implementation rather than guaranteed a priori.
Consortium-based inference further requires that populations contributing informative responses remain sufficiently stable over the assay period. In our engineered systems, we promoted this stability by choosing strains with similar growth rates and by inoculating them at equal fractions. For systems in which substantial compositional drift or strain loss is plausible, strain abundance or strain-specific output baselines should be monitored during calibration and validation, and measurements outside the calibrated range of community states should not be interpreted using the trained model. Scaling to larger input panels will also increase calibration and data requirements, despite the additional information contained in time-resolved measurements. The ODE model is phenomenological and uses fitting constraints to support data augmentation rather than uniquely identify biological parameters. In our model, the carrying capacity was fixed because allowing it to vary destabilized parameter estimation. This illustrates that model fitting can depend on parameter constraints and bounds, which must be reassessed for each new implementation. Moreover, the robustness analyses examine only the formulations, parameterizations, and training protocols tested here and do not establish insensitivity to arbitrary model misspecification. Finally, the hospital sink-water experiment evaluates one pooled P-trap-derived matrix and does not establish robustness across different sites, sampling times, or environmental matrices.
Within these constraints, the study establishes the feasibility of combining distributed biological responses with time-resolved computational inference to quantify multiplexed inputs that may be cross-reactive or indirect.
Methods
Strains and plasmids
The IPTG-mCherry sensor uses p15a-T5-2A-mCherry plasmid developed in a previous study, in which it was referred to as His-T2-mCherry79. The aTc-GFP sensor uses p15a-pLTet-O-1-sfGFP plasmid, which we constructed from p15A-pTet-sfGFP-linker-Tdimer-kanR80 by removing the linker-Tdimer sequence. Both plasmids were kanamycin resistant and were transformed into E. coli MC4100Z1 host strains.
The THS-CFP sensor was constructed from pKD236-4b and pKD237-3a-2 plasmids; The TTR-YFP sensor was constructed from pKD238-1a and pKD239-1g-2 plasmids22. These were gifts from Jeffrey Tabor (Addgene references in Suppl. Table 1). The regulator plasmids, pKD237-3a-2 and pKD239-1g-2, were modified by replacing sfGFP with CFP and YFP, respectively, and the constitutive mCherry genes were removed. The plasmid pairs corresponding to each two-component system were chloramphenicol and spectinomycin resistant and were co-transformed into E. coli MG1655 host strains.
The OHC14-CFP sensor uses plasmid pAJM.1642; the Cuma-YFP sensor uses plasmid pAJM.657; the aTc-mCherry sensor uses plasmid pAJM.011; the Van-YFP sensor uses plasmid pAJM.773; the DAPG-CFP sensor uses plasmid pAJM.847; the Nar-mCherry sensor uses plasmid pAJM.66118. These were gifts from Christopher Voigt (Addgene references in Supplementary Table 1). The YFP reporter in pAJM.011 and pAJM.661 was replaced with mCherry to obtain aTc-mCherry and Nar-mCherry sensors. The YFP reporter in pAJM.1642 and pAJM.847 was replaced with CFP to obtain OHC14-CFP and DAPG-CFP sensors. The plasmids were all kanamycin resistant and were transformed into E. coli Top10F’ host.
Plasmid modifications were performed using Gibson Assembly cloning method81. Transformations were plated on LB agar plates with appropriate antibiotic selection. Colonies from the transformations were cultured in LB media overnight with antibiotic selection, then stored in 25% glycerol at 80 °C.
Plasmids used in the antibiotic prediction dataset were originally generated and described in Ma et al.59. Our study only used data from E. coli MG1655 DA28102 cells with plasmids pBla-sfGFP (low copy number, expresses periplasmic Bla), pBlaM-sfGFP (low copy number, expresses cytoplasmic Bla), pHSGBla-sfGFP (high copy number, expresses periplasmic Bla), or pHSGBlaM-sfGFP (high copy number, expresses cytoplasmic Bla). DA28102 constitutively expresses mTagBFP2 on the chromosome, and all the plasmids express Bla under IPTG induction and constitutively express sfGFP.
Growth media and chemical inducers
Unless stated otherwise, all agar plates were made with LB agar and all liquid cultures were in LB broth, both supplemented with appropriate antibiotics (50 µg/mL kanamycin, 35 µg/mL chloramphenicol, 50 µg/mL spectinomycin). Cultures for the sensor community experiments were induced with the following chemicals: isopropyl-β-D-thiogalactopyranoside (IPTG) (Thermo Scientific, Sigma, and GoldBio), anhydrotetracycline hydrochloride (aTc) (Sigma, 37919-100MG-R), sodium thiosulfate pentahydrate (THS) (Sigma, S6672-500G), potassium tetrathionate (TTR) (Sigma, P2926-25G), N-(3-Hydroxytetradecanoyl)-DL-homoserine lactone (OHC14) (Sigma, 51481-10MG), 4-Isopropylbenzoic acid (Cuma) (Sigma, 268402-5 G), vanillic acid (Van) (Sigma, 94770-10 G), 2,4-diacetylphloroglucinol (DAPG) (Santa Cruz Biotechnology, CAS 2161-86-6, Cat# sc-206518D), and naringenin (Nar) (Sigma, N5893-1G). The antibiotic prediction dataset used amoxicillin (Sigma) as the antibiotic and either tazobactam (Fisher Scientific) or sulbactam (Fisher Scientific) as the Bla inhibitors, which were prepared fresh in DMSO (amoxicillin, tazobactam) or water (sulbactam) for each experiment51,59.
Sensor community experiments
Freezer stocks were streaked onto LB agar plates with antibiotic selection and incubated at 37 °C overnight. Cultures were inoculated from single colonies and cultured overnight in 3 mL LB media with appropriate antibiotics in 16 mL culture tubes (Genesee Scientific, 21-129) at 37 °C with 225 rpm shaking. Cultures were diluted with LB to reach OD600 (OD) of about 0.1. Appropriate antibiotics were added. For microbial community experiments, each population’s diluted culture was mixed at an equal volume ratio. The mixed cultures were transferred to a 96-well black-sided, clear flat-bottom plate (Corning, 3603). Inducers were added to the appropriate wells to reach their intended final concentration (available in data files). Total volume for all microwell-plate cultures was 200 µL. 50 µL mineral oil was added on top of the cultures to prevent evaporation. Plates were incubated for at least 20 h at 37 °C in a plate reader (Tecan Infinite 200 PRO), which shook the plate (5 s, orbital) and measured OD and fluorescence every 5 min. Some experiments utilized Tecan Freedom EVO robot for liquid handling steps or for moving plates from incubator to plate reader for each measurement over the course of the experiment. When using the robot, plate readings were taken roughly every 17 min.
Experimental dataset sizes for sensor communities are as follows. aTc-IPTG dataset: 326 sets of time courses, with 80 unique input combinations. TTR-THS dataset: 283 sets of time courses, with 88 unique input combinations. Cuma-OHC14-aTc dataset: 777 sets of time courses, with 281 unique input combinations. Van-dapg-nar dataset: 286 sets of time courses, with 94 unique input combinations. (For each dataset, 2–4 replicates per unique combination of input concentrations were generated.)
Antibiotic treatment experiments
All data for the antibiotic-treated communities was originally generated and described in Ma et al. and Baig et al.51,59. The methods used for the data included in our study are as follows. Colonies on LB agar plates were inoculated in 2 mL LB in 16 mL culture tubes for overnight culturing at 37 °C with 225 rpm shaking for 16 h. 1 mM IPTG and 50 µg/mL kanamycin were added to cultures of the plasmid-containing population. Cultures were corrected to OD of 1. The resistant and susceptible population cultures were mixed 1:1, then diluted 16-fold for a cell density of 5 × 107 cells/mL. 50 µL 1 M IPTG was added. Amoxicillin and Bla inhibitor stocks were diluted in LB at concentrations 2.5 times their final concentrations. 40 µL of the 2.5× stocks of amoxicillin and inhibitor were distributed to wells in a 384-well deep well plate (Thermo Scientific) using a MANTIS liquid handler (Formulatrix). Then, 20 µL of the diluted culture was added by the MANTIS. Initial cell density was 1 × 106 cells per 100 µL well, IPTG concentration was 1 mM, antibiotic and inhibitor concentrations formed a dose-response matrix of 0, 0.5, 1, 2, 4, 8, 16, 32, 64, and 128 µg/mL each. Each condition had three replicate wells and were randomly positioned across the plate. All edge wells and 12 interior wells contained blank LB. The plate was incubated at 30 °C in a plate reader (Tecan Spark) with the lid on to prevent evaporation. The plate reader, which was equipped with a lid lifter, shook the plate (5 s orbital) and took OD, GFP, and BFP readings every 10 min for 24 h. In total, 300 sets of time courses were generated from 100 unique input combinations.
Hospital sink water collection and processing
Sink samples were collected from the 9100 unit in Duke North tower of Duke Hospital in Durham, NC. 30 in-room patient handwashing sinks that did not have multi-drug-resistant organism colonization were used in the study and randomized 1:1 to intervention or control groups. Intervention sinks were treated with Virasept (Ecolab) disinfectant while control sinks received no treatment. Sink P-traps were sampled weekly using sterile syringes and tubing to collect the sample. The sample was vortexed in the syringe for 10 seconds then 15 mL was dispensed into a sterile 15 mL tube, which was vortexed again for 10 s, then stored at 4 °C. Samples were filtered through a 0.22 µm paper filter into a flask with vacuum pressure applied. The filtrate from each sink sample was poured into a 15 mL conical tube and stored at 4 °C again until use for the experiments in this study.
Immediately prior to using the samples for the sensor experiments, they were filtered again through a 0.22 µm syringe filter twice to ensure removal of any native sink microbes or contamination from processing that could interfere with the growth of the sensor bacteria. The filtrate samples from 5 control sinks (no treatment) from week 12 were mixed at an equal volume ratio to create an average hospital sink sample. The sink mixture was mixed with LB at a 3:1 ratio, to which appropriate antibiotics were added, then 176 µL was distributed to wells of a 96-well plate. Sensor bacteria were prepared as described for sensor community experiments, except cultures were corrected to reach ~0.7 OD before mixing together at an equal volume ratio. A total of 20 µL of the mixed cultures was added to a 96-well plate. A total of 2 µL of each inducer was added to the corresponding wells. Mineral oil was added, and the plate was incubated and readings were taken in a plate reader over time. In total, 189 sets of time courses were generated from 93 unique input combinations.
Experimental data pre-processing
Data were imported to Python for the remaining methods. For co-culture data, all time courses from a single set of sensors were trimmed to match the shortest time span from the sensor set and subsampled to have the same sampling interval. Fluorescence data obtained from different plate readers was converted to the same scale using a calibration between instruments (available in data files). Converted fluorescence data were min-max scaled with respect to the rest of the corresponding fluorescence data in the sensor set by performing the following scaling: (1). The basal expression fluorescence time course (when no inducers were added) was subtracted from all time courses. The OD and fluorescence time courses were concatenated to create a 1-dimensional vector per sample that is of length , where is the number of fluorescence colors in a community and is the number of time point measurements.
Kinetic model formulation
We formulated a set of ordinary differential equations (ODEs) to describe each population’s cell density () and fluorescent protein per cell () in response to different input concentrations (), where is the population and is the input:
| 2 |
| 3 |
The cell density equation incorporates maximum growth rate (), carrying capacity (), and input-derived growth inhibition (). A term with the parameters and is incorporated, which modifies the logistic growth equation to better fit the shape of experimentally measured OD time courses that we observed51. Fluorescence equations include basal gene expression rate () and protein decay rate (). Fluorescence activation by each input is represented by a Hill equation with maximum induction rate (), Hill coefficient (), and the input concentration resulting in half-maximum induction (). A crosstalk parameter () modulates how strongly each input activates expression with respect to the cognate input, where cognate inputs have an of 1 and for non-cognate inputs is a relative fraction. To approximate measured optical density (OD) and total fluorescence (), we use the following equations:
| 4 |
| 5 |
Parameter estimations
Crosstalk, , was estimated from the community’s fluorescence measurements at 20 h for conditions where only one inducer was added at its maximum concentration. The average fluorescence value of the blanks was subtracted from the fluorescence values of the samples to get . Crosstalk was calculated via the following equation,
| 6 |
where is the fluorescence when the inducer of interest was added, is the fluorescence when no inducers were added, and is the fluorescence when the inducer intended for that respective sensor was added.
The Hill coefficient () and half-max () were estimated from the community’s fluorescence measurements at 20 h for different concentrations of only one inducer added to the culture. Non-linear least squares optimization was used to fit a Hill equation to the dose-response data from each input-output combination, and the optimized and values were saved.
Carrying capacity () was fixed to a value of 1.5 and the remaining parameters were estimated using non-linear least squares optimization to fit the full ODE model to all time course data. Initial estimates and bounds provided to the optimizer are in Supplementary Table 2.
Simulated data generation
Using the optimized parameter set for each microbial sensor community, we simulated 10,000 OD and fluorescence time courses using solve_ivp function (SciPy). Chemical input concentrations were randomized on a uniformly distributed log scale within a range bounded by the lower 1 percentile and upper 99th percentile of the sensor’s dynamic range, as represented by the inequality,
| 7 |
and normalized by the half maximum concentration, , that corresponds to the intended inducer-fluorescence pair. Initial conditions for OD and fluorescence were randomized on a normal distribution with mean, standard deviation, minimum, and maximum limits set by the respective measured experimental values. Each simulation had the same number of time points as the corresponding experimental dataset. The OD and fluorescence time courses were concatenated to create a 1-dimensional vector per simulation that is of length , where is the number of fluorescence colors in the community and is the number of time points simulated.
Secondary data processing
The experimental data were filtered to remove samples where the inducer concentration was equal to 0 or where the inducer concentration was below the 1 percentile or above the 99th percentile of the sensor’s dynamic range as determined by the same inequality as above. The chemical input concentrations were normalized by the half maximum concentration, , that corresponds to the intended inducer-fluorescence pair. The filtered experimental data were combined with the simulated data to create the augmented dataset. With each time point of the time course data treated as a feature of the dataset, each feature was min-max scaled to lie within a range between 0 and 1. The chemical input concentration data were log10 transformed. Data were randomly shuffled with an 80/20 train-validation split.
VAE construction and training
The VAE utilizes a one-dimensional convolutional neural network (CNN) to encode and decode the time course data. The encoder consists of four convolutional layers with ReLU activation functions, progressively reducing the time course dimensionality to a 6-channel latent representation. Fully connected layers then compute the mean and log variance, mapping the representation to a 10-dimensional latent space. The reparameterization trick is applied to sample from the latent distribution for reconstruction. The decoder reconstructs the time courses from the latent space using a fully connected layer followed by transposed convolutional layers that convert the latent representation back to the original time course dimensions. The model was trained with a batch size of 32 for 400 epochs using the Adam optimizer (learning rate = 1e-3, weight decay = 1e-5). The objective function combines reconstruction loss (MSE) and KL divergence to balance accurate reconstruction with regularization of the latent space. A warmup learning rate schedule was applied for the first 8 epochs, followed by exponential decay (decay rate, γ = 0.99) with a minimum learning rate of 5e-6. Early stopping was employed, where training was terminated if the validation loss did not improve for 30 consecutive epochs. After training, latent representations were extracted by computing the mean vectors of the encoder output for both train and validation datasets.
Combined VAE-MLP construction and training
The MLP was trained to predict analyte concentrations from the latent representations that were output from the VAE. The MLP consisted of three fully connected linear layers. The first layer mapped the 10-dimensional latent space to a 128-dimensional hidden representation, followed by a ReLU activation function. The second layer of the same width further processed the hidden representation without reducing the dimensionality, followed by another ReLU activation. The final output layer mapped the hidden representation to the predicted analyte concentrations (2–5 dimensions). The MLP training was done after the VAE was already trained and frozen, to form a combined model, where the VAE’s resulting latent variables were passed through the MLP to generate analyte concentration predictions. The training procedure for the MLP, including the optimizer and learning rate scheduler, was identical to that of the VAE.
Software
Data processing, kinetic-model fitting, simulation, machine learning and figure generation were performed in Python 3.12.7 using NumPy 1.26.4, pandas 2.2.3, SciPy 1.14.1, PyTorch 2.5.1+cu118, torchvision 0.20.1+cu118, scikit-learn 1.5.2, Matplotlib 3.9.2, seaborn 0.13.2, and openpyxl 3.1.5; notebooks were executed with Jupyter 8.6.3.
Statistics & Reproducibility
No statistical method was used to predetermine sample size. Sample sizes were chosen to provide broad coverage of the prespecified input-concentration grids within the capacity of the 96- or 384-well assays and to include replicate culture wells for each input combination. The sensor-community datasets contained 326 time courses for 80 aTc-IPTG combinations, 283 for 88 TTR-THS combinations, 777 for 281 Cuma-OHC14-aTc combinations, and 286 for 94 Van-DAPG-Nar combinations. The antibiotic dataset contained 300 time courses for 100 input combinations, and the sink-water dataset contained 189 time courses for 93 input combinations. Exact sample numbers for each analysis are provided in the figure legends and Source Data file.
Samples with an inducer concentration of zero or a concentration below the 1st percentile or above the 99th percentile of the corresponding sensor dynamic range were excluded from specified machine-learning analyses, as described under Secondary data processing. In addition, one TTR–THS well labeled “contaminated”; 84 Cuma–OHC14–aTc wells labeled “bad wells,” one labeled “aTc is off,” and one labeled “outlier”; and two sink-water wells labeled “leaked” were excluded during experimental quality control and were not included in the reported dataset totals. Blank and other control wells were retained in the source files but were not counted as experimental co-culture samples. No other data were excluded. Antibiotic-treatment conditions were randomly positioned across the plate, and sinks in the source study were randomized 1:1 to intervention or control groups; the present sink-water analysis used pooled filtrates from five control sinks. Except where noted, the experiments were not randomized because defined input concentrations were assigned directly to assay wells and all conditions within an experiment were processed in parallel. The investigators were not blinded to allocation during experiments and outcome assessment. Data were randomly shuffled before the 80/20 training-validation split. Statistical analyses included R², mean squared error, Kullback-Leibler divergence, Pearson correlation and the tests specified in Suppl. Table 3; measures of central tendency and variation are defined in the corresponding figure legends.
Reporting summary
Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.
Supplementary information
Source data
Author contributions
K.E.D. and L.Y. conceptualized and designed the research. K.E.D conducted experimental data generation, computational pipeline development and analysis. A.R.S. conducted experimental data generation and analysis. I.S. performed computational pipeline analysis. A.R. and R.D. conducted experimental data generation and assisted with computational pipeline optimization. K.E.D., H.V.L., and S.L. cloned sensor circuits. H.V.L. conducted preliminary data generation and helped design the research. H.R.M generated the antibiotic-response datasets and contributed to their analysis and interpretation. N.G. provided sink samples and protocols. D.J.A. and C.G. provided sink samples and protocols and guidance on applications and future directions. L.Y. contributed to computational pipeline development and analysis and experimental design. K.E.D., L.Y., A.R.S. and I.S. wrote and revised the manuscript with input from all authors.
Peer review
Peer review information
Nature Communications thanks the anonymous reviewers for their contribution to the peer review of this work. A peer review file is available.
Funding
This work was supported by the National Institutes of Health (R01GM098642 and R01EB031869 to LY), the Centers for Disease Control and Prevention (Cooperative Agreement U54CK000616 to DJA), and the National Science Foundation (Cooperative Agreement EEC-2133504 to CG). The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.
Data availability
The experimental data generated in this study are available in the Source Data file and at https://github.com/youlab/multiplexed_sensing. Previously published antibiotic-response data used in this study are available in the same repository and were originally reported in refs. 51,59 Source data are provided with this paper.
Code availability
Code used for the computational pipeline and figure generation is available at https://github.com/youlab/multiplexed_sensing. A version-specific archive of the code is available from Zenodo under 10.5281/zenodo.21048583 (ref. 82).
Competing interests
The authors declare no competing interests.
Footnotes
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supplementary information
The online version contains supplementary material available at 10.1038/s41467-026-75739-6.
References
- 1.Zhang, F., Carothers, J. M. & Keasling, J. D. Design of a dynamic sensor-regulator system for production of chemicals and fuels derived from fatty acids. Nat. Biotechnol.30, 354–359 (2012). [DOI] [PubMed] [Google Scholar]
- 2.Riglar, D. T. et al. Engineered bacteria function in the mammalian gut as long term live diagnostics of inflammation. Nat. Biotechnol.35, 653–658 (2017). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 3.Mimee, M. et al. An ingestible bacterial-electronic system to monitor gastrointestinal health. Science360, 915–918 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 4.Atkinson, J. T. et al. Real-time bioelectronic sensing of environmental contaminants. Nature611, 548–553 (2022). [DOI] [PubMed] [Google Scholar]
- 5.Yang, X. et al. Engineering synthetic phosphorylation signaling networks in human cells. Science387, 74–81 (2025). [DOI] [PubMed] [Google Scholar]
- 6.Caliendo, F. et al. Customizable gene sensing and response without altering endogenous coding sequences. Nat. Chem. Biol.21, 348–359 (2025). [DOI] [PubMed] [Google Scholar]
- 7.Rogers, J. K. & Church, G. M. Genetically encoded sensors enable real-time observation of metabolite production. Proc. Natl. Acad. Sci.113, 2388–2393 (2016). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 8.Jung, J. K. et al. Cell-free biosensors for rapid detection of water contaminants. Nat. Biotechnol.38, 1451–1459 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 9.Schmidl, S. R. et al. Rewiring bacterial two-component systems by modular DNA-binding domain swapping. Nat. Chem. Biol.15, 690–698 (2019). [DOI] [PubMed] [Google Scholar]
- 10.Diesel, E., Schreiber, M. & van der Meer, J. R. Development of bacteria-based bioassays for arsenic detection in natural waters. Anal. Bioanal. Chem.394, 687–693 (2009). [DOI] [PubMed] [Google Scholar]
- 11.Wan, X. et al. Cascaded amplifying circuits enable ultrasensitive cellular sensors for toxic metals. Nat. Chem. Biol.15, 540–548 (2019). [DOI] [PubMed] [Google Scholar]
- 12.Kotula, J. W. et al. Programmable bacteria detect and record an environmental signal in the mammalian gut. Proc. Natl. Acad. Sci. USA.111, 4838–4843 (2014). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 13.Kalvapalle, P. B. et al. Information storage across a microbial community using universal RNA barcoding. Nat. Biotechnol.44, 269–276 (2026). [DOI] [PubMed] [Google Scholar]
- 14.Belkin, S. et al. Remote detection of buried landmines using a bacterial sensor. Nat. Biotechnol.35, 308–310 (2017). [DOI] [PubMed] [Google Scholar]
- 15.Lee, S. K. & Keasling, J. D. A propionate-inducible expression system for enteric bacteria. Appl. Environ. Microbiol.71, 6856–6862 (2005). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 16.Hanko, E. K. R., Minton, N. P. & Malys, N. A transcription factor-based biosensor for detection of itaconic acid. ACS Synth. Biol.7, 1436–1446 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 17.Tscherner, M., Giessen, T. W., Markey, L., Kumamoto, C. A. & Silver, P. A. A synthetic system that senses candida albicans and inhibits virulence factors. ACS Synth. Biol.8, 434–444 (2019). [DOI] [PubMed] [Google Scholar]
- 18.Meyer, A. J., Segall-Shapiro, T. H., Glassey, E., Zhang, J. & Voigt, C. A. Escherichia coli “Marionette” strains with 12 highly optimized small-molecule sensors. Nat. Chem. Biol.15, 196–204 (2019). [DOI] [PubMed] [Google Scholar]
- 19.Cheng, Y.-Y. et al. Programming bacteria for multiplexed DNA detection. Nat. Commun.14, 2001 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 20.Nielsen, A. A. K. et al. Genetic circuit design automation. Science352, aac7341 (2016). [DOI] [PubMed] [Google Scholar]
- 21.Cubillos-Ruiz, A. et al. Engineering living therapeutics with synthetic biology. Nat. Rev. Drug Discov.20, 941–960 (2021). [DOI] [PubMed] [Google Scholar]
- 22.Daeffler, K. N.-M. et al. Engineering bacterial thiosulfate and tetrathionate sensors for detecting gut inflammation. Mol. Syst. Biol.13, 923 (2017). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 23.Cartwright, I. M. et al. Mucosal acidosis elicits a unique molecular signature in epithelia and intestinal tissue mediated by GPR31-induced CREB phosphorylation. Proc. Natl. Acad. Sci.118, e2023871118 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 24.Schmidt, F. et al. Noninvasive assessment of gut function using transcriptional recording sentinel cells. Science376, eabm6038 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 25.Inda-Webb, M. E. et al. Sub-1.4 cm3 capsule for detecting labile inflammatory biomarkers in situ. Nature620, 386–392 (2023). [DOI] [PubMed] [Google Scholar]
- 26.Xie, Z., Wroblewska, L., Prochazka, L., Weiss, R. & Benenson, Y. Multi-input rnai-based logic circuit for identification of specific cancer cells. Science333, 1307–1311 (2011). [DOI] [PubMed] [Google Scholar]
- 27.Wang, B., Barahona, M. & Buck, M. A modular cell-based biosensor using engineered genetic logic circuits to detect and integrate multiple environmental signals. Biosens. Bioelectron.40, 368–376 (2013). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 28.Klumpe, H. E., Garcia-Ojalvo, J., Elowitz, M. B. & Antebi, Y. E. The computational capabilities of many-to-many protein interaction networks. Cell Syst.14, 430–446 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 29.Yuan, J. et al. Perspective on the development of synthetic microbial community (SynCom) biosensors. Trends Biotechnol.41, 1227–1236 (2023). [DOI] [PubMed] [Google Scholar]
- 30.Al-Radhawi, M. A. et al. Distributed implementation of Boolean functions by transcriptional synthetic circuits. ACS Synth. Biol.9, 2172–2187 (2020). [DOI] [PubMed] [Google Scholar]
- 31.Karkaria, B. D., Treloar, N. J., Barnes, C. P. & Fedorec, A. J. H. From microbial communities to distributed computing systems. Front. Bioeng. Biotechnol.8, 834 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 32.Padmakumar, J. P. et al. Partitioning of a 2-bit hash function across 66 communicating cells. Nat. Chem. Biol.21, 268–279 (2025). [DOI] [PubMed] [Google Scholar]
- 33.Tsoi, R. et al. Metabolic division of labor in microbial systems. Proc. Natl. Acad. Sci.115, 2526–2531 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 34.Wu, G. et al. Metabolic burden: cornerstones in synthetic biology and metabolic engineering applications. Trends Biotechnol.34, 652–664 (2016). [DOI] [PubMed] [Google Scholar]
- 35.Miller, T., Patel, K., Rodriguez, C., Stabb, E. V. & Hagen, S. J. Dimension-reduction simplifies the analysis of signal crosstalk in a bacterial quorum sensing pathway. Sci. Rep.11, 19719 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 36.Gyorgy, A. et al. Isocost lines describe the cellular economy of genetic circuits. Biophys. J.109, 639–646 (2015). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 37.Zhang, R. et al. Winner-takes-all resource competition redirects cascading cell fate transitions. Nat. Commun.12, 853 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 38.Stone, A., Youssef, A., Rijal, S., Zhang, R. & Tian, X.-J. Context-dependent redesign of robust synthetic gene circuits. Trends Biotechnol.42, 895–909 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 39.Klumpp, S. & Hwa, T. Bacterial growth: global effects on gene expression, growth feedback and proteome partition. Curr. Opin. Biotechnol.28, 96–102 (2014). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 40.Dai, Y. et al. Biomolecular condensates regulate cellular electrochemical equilibria. Cell187, 5951–5966.e18 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 41.Müller, I. E. et al. Gene networks that compensate for crosstalk with crosstalk. Nat. Commun.10, 4028 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 42.Wang, B., Kitney, R. I., Joly, N. & Buck, M. Engineering modular and orthogonal genetic logic gates for robust digital-like synthetic biology. Nat. Commun.2, 508 (2011). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 43.Sexton, J. T. & Tabor, J. J. Multiplexing cell-cell communication. Mol. Syst. Biol.16, e9618 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 44.Miller, C. A., Ho, J. M. L. & Bennett, M. R. Strategies for Improving Small-Molecule Biosensors in Bacteria. Biosensors12, 64 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 45.Hossain, A. et al. Automated design of thousands of nonrepetitive parts for engineering stable genetic systems. Nat. Biotechnol.38, 1466–1475 (2020). [DOI] [PubMed] [Google Scholar]
- 46.Zhang, C. et al. Temporal encoding of bacterial identity and traits in growth dynamics. Proc. Natl. Acad. Sci.117, 20202–20210 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 47.Scott, S. R. et al. A stabilized microbial ecosystem of self-limiting bacteria using synthetic quorum-regulated lysis. Nat. Microbiol2, 17083 (2017). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 48.Coyte, K. Z., Schluter, J. & Foster, K. R. The ecology of the microbiome: Networks, competition, and stability. Science350, 663–666 (2015). [DOI] [PubMed] [Google Scholar]
- 49.Duncker, K. E., Holmes, Z. A. & You, L. Engineered microbial consortia: strategies and applications. Microb. Cell Factories20, 211 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 50.Kong, W., Meldgin, D. R., Collins, J. J. & Lu, T. Designing microbial consortia with defined social interactions. Nat. Chem. Biol.14, 821–829 (2018). [DOI] [PubMed] [Google Scholar]
- 51.Baig, Y., Ma, H. R., Xu, H. & You, L. Autoencoder neural networks enable low dimensional structure analyses of microbial growth dynamics. Nat. Commun.14, 7937 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 52.Lu, J. et al. Discovery of interpretable patterning rules by integrating mechanistic modeling and deep learning. 2024.09.02.610872 Preprint at 10.1101/2024.09.02.610872 (2024).
- 53.Winter, S. E. et al. Gut inflammation provides a respiratory electron acceptor for Salmonella. Nature467, 426–429 (2010). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 54.Choudhary, L., Macdonald, D. D. & Alfantazi, A. Role of Thiosulfate in the Corrosion of Steels: A Review. Corrosion71, 1147–1168 (2015). [Google Scholar]
- 55.Bermont-Bouis, D., Janvier, M., Grimont, P. A. D., Dupont, I. & Vallaeys, T. Both sulfate-reducing bacteria and Enterobacteriaceae take part in marine biocorrosion of carbon steel. J. Appl. Microbiol.102, 161–168 (2007). [DOI] [PubMed] [Google Scholar]
- 56.Liang, R., Grizzle, R. S., Duncan, K. E., McInerney, M. J. & Suflita, J. M. Roles of thermophilic thiosulfate-reducing bacteria and methanogenic archaea in the biocorrosion of oil pipelines. Front. Microbiol.5, 89 (2014). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 57.Oh, S.-R., Kim, J.-K., Lee, M.-J. & Choi, K. Dechlorination with sodium thiosulfate affects the toxicity of wastewater contaminated with copper, cadmium, nickel, or zinc. Environ. Toxicol.23, 211–217 (2008). [DOI] [PubMed] [Google Scholar]
- 58.Ryon, M. G., Stewart, A. J., Kszos, L. A. & Phipps, T. L. Impacts on streams from the use of sulfur-based compounds for dechlorinating industrial effluents. Water Air Soil Pollut.136, 255–268 (2002). [Google Scholar]
- 59.Ma, H. R., Xu, H. Z., Kim, K., Anderson, D. J. & You, L. Private benefit of β-lactamase dictates selection dynamics of combination antibiotic treatment. Nat. Commun.15, 8337 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 60.Lu, N., Chen, J., Rao, Z., Guo, B. & Xu, Y. Recent advances of biosensors for detection of multiple antibiotics. Biosensors13, 850 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 61.Rodger, G. et al. A workflow for the detection of antibiotic residues, measurement of water chemistry and preservation of hospital sink drain samples for metagenomic sequencing. J. Hosp. Infect.144, 128–136 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 62.Bhandari, G. et al. A review on hospital wastewater treatment technologies: current management practices and future prospects. J. Water Process Eng.56, 104516 (2023). [Google Scholar]
- 63.Bar, N. et al. A reference map of potential determinants for the human serum metabolome. Nature588, 135–140 (2020). [DOI] [PubMed] [Google Scholar]
- 64.Dekkers, K. F. et al. An online atlas of human plasma metabolite signatures of gut microbiome composition. Nat. Commun.13, 5370 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 65.Franco, L. C. et al. A microbiological survey of handwashing sinks in the hospital built environment reveals differences in patient room and healthcare personnel sinks. Sci. Rep.10, 8234 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 66.Kotay, S., Chai, W., Guilford, W., Barry, K. & Mathers, A. J. Spread from the sink to the patient: in situ study using Green Fluorescent Protein (GFP)-expressing escherichia coli to model bacterial dispersion from hand-washing sink-trap reservoirs. Appl. Environ. Microbiol.83, e03327–16 (2017). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 67.Parkes, L. O. & Hota, S. S. Sink-related outbreaks and mitigation strategies in healthcare facilities. Curr. Infect. Dis. Rep.20, 42 (2018). [DOI] [PubMed] [Google Scholar]
- 68.Nguyen, A. P. The threat of hospital wastewater: an evidence-based call to action. DNP Qualifying Manuscripts, University of San Francisco. 86 (2023).
- 69.Matejczyk, M. et al. Biological effects of vanillic acid, iso-vanillic acid, and orto-vanillic acid as environmental pollutants. Ecotoxicol. Environ. Saf.277, 116383 (2024). [DOI] [PubMed] [Google Scholar]
- 70.Dos Santos, H. F., De Almeida, W. B. & Zerner, M. C. Conformational Analysis of the Anhydrotetracycline Molecule: A Toxic Decomposition Product of Tetracycline. J. Pharm. Sci.87, 190–195 (1998). [DOI] [PubMed] [Google Scholar]
- 71.Pena, A. et al. Determination of tetracycline and its major degradation products by liquid chromatography with fluorescence detection. J. Pharm. Biomed. Anal.18, 839–845 (1998). [DOI] [PubMed] [Google Scholar]
- 72.Rai, K., Wang, Y., O’Connell, R. W., Patel, A. B. & Bashor, C. J. Using machine learning to enhance and accelerate synthetic biology. Curr. Opin. Biomed. Eng.31, 100553 (2024). [Google Scholar]
- 73.Chen, T. et al. OmniArch: Building Foundation Model for Scientific Computing. Proc. Mach. Learn. Res.267, 9860–9887 (2025).
- 74.Sun, J., Liu, Y., Zhang, Z. & Schaeffer, H. Towards a Found. Model Partial Differential Equations: Multi-Operator Learn. Extrapolation10.48550/arXiv.2404.12355 (2024). [Google Scholar]
- 75.Nou, X. A. & Voigt, C. A. Sentinel cells programmed to respond to environmental DNA including human sequences. Nat. Chem. Biol.20, 211–220 (2024). [DOI] [PubMed] [Google Scholar]
- 76.Lugagne, J.-B., Blassick, C. M. & Dunlop, M. J. Deep model predictive control of gene expression in thousands of single cells. Nat. Commun.15, 2148 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 77.Chemla, Y. et al. Hyperspectral reporters for long-distance and wide-area detection of gene expression in living bacteria. Nat. Biotechnol.44, 258–268 (2026). [DOI] [PubMed] [Google Scholar]
- 78.Bourdeau, R. W. et al. Acoustic reporter genes for noninvasive imaging of microorganisms in mammalian hosts. Nature553, 86–90 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 79.Dai, Z. et al. Living fabrication of functional semi-interpenetrating polymeric materials. Nat. Commun.12, 3422 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 80.Kim, K. et al. Mapping single-cell responses to population-level dynamics during antibiotic treatment. Mol. Syst. Biol.19, e11475 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 81.Gibson, D. G. et al. Enzymatic assembly of DNA molecules up to several hundred kilobases. Nat. Methods6, 343–345 (2009). [DOI] [PubMed] [Google Scholar]
- 82.Duncker, K. E. et al. Engineering microbial consortia for distributed signal processing: code repository. Zenodo10.5281/zenodo.21048583 (2026). [DOI] [PMC free article] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Supplementary Materials
Data Availability Statement
The experimental data generated in this study are available in the Source Data file and at https://github.com/youlab/multiplexed_sensing. Previously published antibiotic-response data used in this study are available in the same repository and were originally reported in refs. 51,59 Source data are provided with this paper.
Code used for the computational pipeline and figure generation is available at https://github.com/youlab/multiplexed_sensing. A version-specific archive of the code is available from Zenodo under 10.5281/zenodo.21048583 (ref. 82).
