Dynamical Dorfman Testing with Quarantine

by   Mustafa Doger, et al.
University of Maryland

We consider dynamical group testing problem with a community structure. With a discrete-time SIR (susceptible, infectious, recovered) model, we use Dorfman's two-step group testing approach to identify infections, and step in whenever necessary to inhibit infection spread via quarantines. We analyze the trade-off between quarantine and test costs as well as disease spread. For the special dynamical i.i.d. model, we show that the optimal first stage Dorfman group size differs in dynamic and static cases. We compare the performance of the proposed dynamic two-stage Dorfman testing with state-of-the-art non-adaptive group testing method in dynamic settings.



page 1

page 2

page 3

page 4


Dynamic SAFFRON: Disease Control Over Time Via Group Testing

We consider the dynamic infection spread model that is based on the disc...

Dynamic group testing to control and monitor disease progression in a population

In the context of a pandemic like COVID-19, and until most people are va...

Group testing via residuation and partial geometries

The motivation for this paper comes from the ongoing SARS-CoV-2 Pandemic...

Dynamic Infection Spread Model Based Group Testing

We study a dynamic infection spread model, inspired by the discrete time...

Group Testing with a Graph Infection Spread Model

We propose a novel infection spread model based on a random connection g...

Positively Correlated Samples Save Pooled Testing Costs

The group testing approach that can achieve significant cost reduction o...

Testing the efficacy of epidemic testing

The cataclysmic contagion based calamity – Covid-19 has shown us a clear...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

I Introduction

Group testing, introduced by Dorfman [1]

in 1943, is a powerful tool to identify infected individuals in a population using a minimum number of tests. In group testing, samples from multiple individuals are mixed and tested together. If disease prevalence in the population is low, mixed samples are not contaminated with high probability, which in turn results in gains in terms of number of tests.

Group testing algorithms where tests to be performed are designed in advance are called non-adaptive, and algorithms that use the results of previous tests are called adaptive [2]. Traditional group testing approaches assume that infections are either i.i.d. in a population (i.i.d. model) or the number of infections is known (combinatorial model) [3, 4, 2]. Both of these assumptions are naive and do not hold in reality. Sparked by the ongoing covid-19 pandemic, many recent works have considered infection models with a community structure and proposed algorithms that exploit the community structure in order to reduce the required number of tests [5, 6, 7, 8].

Another limitation of traditional group testing approaches is the assumption that the infection status of individuals is static, whereas in practice there is a time dimension to disease spread. Using the SIR model [9], recent references [10, 11] consider community-aware group testing for the dynamic case. In [10]

, SIR model is based on a continuous-time Markovian process and the aim is to estimate the states of individuals while reducing the number of tests spent on each day using an entropy reduction approach. Entropy reduction refers to the idea that, in order to reduce the number of tests, entropy of each testing stage should be maximized

[12, 13]. In [11], SIR model with a stochastic block model (SBM) is discretized and a theoretical guarantee for the order-optimality of the number of tests spent per day is given. In this paper, we consider a similar discrete-time SIR model with some variations in the community structure, introduce new ideas related to dynamic group testing and analyze their implications.

I-a Related Works

Our work is closely related to Dorfman’s group testing [1] and the group testing problem studied in [11] with discrete-time SIR-SBM. In [1], for an i.i.d. infection model, Dorfman divides the population of size into groups of size and tests these groups. This is the first stage of testing. In the second stage of testing, individuals belonging to contaminated groups are tested individually to find all infections. Dorfman finds the optimum group size to minimize expected number of tests.

In [11], the population consists of communities, such that the probability of infection spread within a community is larger than the probability of infection spread across communities. With a discrete-time SIR model, infections, infection spread, recoveries and interventions occur only at discrete time instants (days). In addition, test results come with one day delay; the result of a test registered on day becomes available on day . Based on these assumptions, [11] shows that, given the test results of the previous day, the discrete-time SIR-SBM reduces to a static group testing problem on the current day. As a result, [11] applies existing results from non-adaptive group testing [12] and shows them to be order optimal.

I-B Our Contributions

We adapt Dorfman testing to discrete-time SIR-SBM introduced in [11]. We demonstrate the benefits of using Dorfman’s adaptive method compared to the non-adaptive method used in [11]. As a stand-alone problem, we study the effects of quarantining individuals in a positive first stage test in a Dorfman type two-stage adaptive method, and find the optimum group size considering the opposing goals of minimizing the number of tests versus not quarantining uninfected individuals unnecessarily. The optimal group size so obtained is different than the optimal Dorfman group size.

We then apply the quarantine idea to discrete-time SIR-SBM. We analyze the trade-off between quarantine costs, test costs, and quarantine’s effect on infection spread over time. For a special case of dynamic i.i.d. infection model, we find the optimal dynamic Dorfman group size analytically, and show that it differs from the static Dorfman group size.

We provide extensive numerical results: For the SIR-SBM model, we compare the performance of the dynamic Dorfman testing proposed here with the state-of-the-art non-adaptive algorithm proposed in [11]. For the i.i.d. dynamic setting, we show gains in terms of number of tests for static Dorfman group size versus dynamic Dorfman group size.

Ii SIR-SBM Model and Dorfman Adaptation

Ii-a Discrete-time SIR-SBM

We consider a population of size , that is partitioned into communities of size each. On any day , each individual belonging to community is in one of three states: where stands for susceptible, for infected and for recovered. We assume is an absorbing state, whereas states and are transient. During a day, the state of individuals may transition from to , or from to according to SBM that is detailed below. At time111In this paper, we use notations , , to mean the following. Ony any day, we have a fixed reference time, such as 9am. On day , means slightly before the reference time, e.g., 8:59am, when we receive the previous day’s test results; means slightly after the reference time, e.g., 9:01am, when we take measurements and submit (register) tests; and means the time between the submission of the tests on day until the test results are received on day , i.e., the time duration after and before . , infection starts to spread among population where each individual has i.i.d. infection probability, . On following days, infection spreads according to SBM with parameters . Namely: If an individual is in state at , then during it spreads infection to any of its susceptible neighbors in the same community with probability , and to members of other communities with probability . Any individual who was infected at time , can recover during with probability . The discrete-time SIR-SBM captures the disease progression of continuous-time SIR-SBM well [11]. Although we assume that discrete-time instances are days, the model can be discretized with other time-units.

Ii-B Test Results

Infection status of an individual is denoted by , where iff . A group test takes samples from a set of individuals and tests them at once. The result of the test is , where stands for binary OR operation. The tests are registered on each day at time , shortly after that, during new infections occur. The results of the tests registered at become available at . If an individual is detected to be positive at time , it is isolated from the population indefinitely.

Ii-C Dorfman Adaptation

We use two-stage Dorfman testing on a daily basis to detect infected individuals and isolate them from the population. On the first day, we apply the first stage of Dorfman test. For the first stage testing at where , only individuals from the same community are grouped together. If an individual belongs to a contaminated group at , it participates in the second stage testing at . Any person that belongs to an uncontaminated group at is assigned to a new group at and tested as part of the first stage testing of Dorfman testing. If a person participated in the second stage testing at and was infected, we should learn the result at and isolate that individual indefinitely. On the other hand, if that individual is not infected, it will be assigned to a new group at for a first stage Dorfman testing.

We first briefly discuss why using Dorfman testing could be more beneficial compared to non-adaptive group testing used in [11]. First, note that the use of a non-adaptive testing method, both for i.i.d. and non-i.i.d. priors, may result in classification errors. Hence, the assumption of independent infections argued in [11] does not hold when errors occur in decoding. Definite defective (DD) algorithm makes sure that no false-positive classification is made but it allows false-negative classifications. Moreover, since this is a dynamic problem with a time dimension, any error made at one step potentially accumulates over time. Hence, some individuals that get infected at cannot be found from the tests registered at , which will be available at . As a result they will spread infection until they are identified as infected. In fact, we will show with simulations how severely cumulative-error problems may affect disease spread.

In comparison, we use an adaptive testing method which has zero-error testing capacity . Hence, we do not make classification errors. A minor problem introduced by Dorfman testing is as follows: The infection status of individuals at time who are tested with a contaminated group cannot be determined from the results available at time , hence independence assumption of [11] cannot be used here. However, in order to determine an optimum Dorfman group size at , we have to know the number of infections present in each community at . We approximate this number with the expected number of infections for each contaminated first stage group with size of community as


where is the probability of infection for each individual. Using , we have . Hence each contaminated group can be assumed to contain a single defective individual. In conclusion, for an individual from community , who was susceptible at , the probability of being infected at , i.e., , can be approximated as


where is the sum of number of contaminated first stage groups and number of infected individuals in second stage tests in community at . Hence, is used to find the optimum first stage Dorfman group size at for community .

Another complication introduced by Dorfman testing is the amount of time each infected individual can potentially spread the infection. Note that, an individual who was tested together with an uncontaminated group at as part of a first stage test and who gets infected during will participate again in a first stage test at , and will be individually tested at . As a result, we will remove this individual from the population at . Thus, this individual will spread the infection during and . In the next section, we propose a novel quarantining approach and its costs in dynamic group testing to address this issue.

Iii Dorfman Testing with Quarantine Costs

Traditional Dorfman testing finds a group size for the first stage such that the expected total number of tests over the first and second stages is minimized. In a dynamical setting where disease spreads over time, and test results are not available immediately, the time between the first and second stage test results is critical in slowing down the further spread of infections. Hence, as a precaution, all individuals who belong to contaminated first stage groups at time can be put into quarantine from until . Any individual who is quarantined yet not infected will rejoin the population at . Moreover, it is not necessary to test those individuals at since they were in quarantine during . Hence, with quarantine, in (3) decreases to number of contaminated first stage groups of tests at . The decrease in decreases disease spread since also decreases. Moreover, as decreases, number of tests spent also decreases since we can mix more samples together in the first stage of Dorfman testing at . However, quarantining individuals is a burden to the functioning of the society, and even more so if many of those individuals were not actually infected. As a result, in a dynamic setting with Dorfman testing, there is a trade-off between test costs and quarantine costs, as well as disease spread. In this section, we analyze effects of this trade-off on Dorfman group sizes.

Expected test cost of traditional Dorfman testing is,


where is the first stage Dorfman group size, is the size of community , and is the infection prevalence rate. We model the quarantine cost as an exponential function of the number of people who were not infected but put into quarantine,


where is a design choice and is the number of people in community who are quarantined unnecessarily. The quarantine cost of each community is independent of others.

For analytical tractability purposes, we make a mild assumption that the first stage groups in each community are also independent. Although this undermines the exponential nature of the cost introduced in (5), without this assumption, optimum Dorfman size would depend on community size, which is not desirable for finding cost per person. However, the assumption still captures exponential behavior and the trade-off between quarantine versus test costs which is our main point here. Based on this assumption, the expected quarantine cost is,


Fig. 1: Test cost optimization versus test and quarantine cost optimization.

Next, instead of minimizing the test cost in (4) alone, we minimize the weighted average of the test cost in (4) and the quarantine cost in (9), where is a design choice that determines the relative importance of test and quarantine costs,


Fig. 1 shows a comparison between the normalized Dorfman test cost alone, and weighted Dorfman test and quarantine costs, for . We plot optimal group sizes for each that are logarithmically spaced between . On the left -axis, we show optimal group sizes obtained by optimizing (4) and (10), respectively. On the right -axis, we show optimized normalized test and quarantine costs. As each unnecessarily quarantined individual has an exponential effect, we see that normalized quarantine cost of optimized (4) is greater by orders of magnitude than optimized (10), whereas normalized test costs are still of the same order. Hence, in settings with moderate and small to moderate , optimizing (10) instead of (4) decreases quarantine cost substantially without effecting test cost as much.

Fig. 2: CCA method, cumulative infection trajectories.

Fig. 3: Dynamic Dorfman testing without quarantine.

Iii-a Experimental Results

We consider the system model introduced in Section II with parameters SBM and . First, we experimentally show how a non-adaptive method like CCA cannot overcome the cumulative error introduced by dynamic settings if it uses comparable number of tests as dynamic Dorfman testing. Normally, on day with population size for CCA algorithm, we would have to choose number of tests as . However, as mentioned in Appendix of [11], the number of tests that will be used during initial days will be at least as large as and group testing will offer no advantage. Hence, for the purpose of comparing adaptive Dorfman algorithm with CCA, here we choose , which is on average more than what Dorfman testing would have used on a daily basis with these system parameters. Fig. 2 shows total number of infected people during a day testing period for different trajectories. Here, approximately of these trajectories end up with disease explosion due to cumulative errors.

Fig. 4: Dynamic Dorfman testing with quarantine without quarantine cost.

Fig. 5: Dynamic Dorfman testing with quarantine and its cost.

Next, we examine how Dorfman testing performs for the same SBM setting for different trajectories. In Fig. 3, experimental results for Dorfman testing are displayed where we do not quarantine people who belong to contaminated groups and isolation is only applicable for individuals who test positive in the second stage. Without a quarantine procedure, of population contracts the disease, which is undesirable.

In Fig. 4, we show how these results change if we apply quarantine to contaminated groups based on the first stage results and individuals who are not infected yet quarantined join the population once their individual test results are available next day. Note that disease progression is decreased since an individual who gets infected during can spread infection during instead of during both and . As a result, number of tests spent decreases since decreases. Although the results are promising since we spend a small amount of tests and only of the population contracts the disease, unnecessary quarantine numbers are quite large which is undesirable.

Finally, when we use the objective in (10) instead of that in (4), and and choose , we obtain the results shown in Fig. 5. We observe that we can decrease quarantine costs substantially while increasing test costs. Also note that, total disease spread has increased from to since fewer uninfected individuals spend one day in quarantine during outbreak which results in vulnerability to contract the disease. Thus, (10) introduces a useful tool to trade-off quarantine costs, test costs, and disease spread.

Iv Optimizing Group Sizes for Dynamic Model with i.i.d. Infections over Time

In static Dorfman testing, the expected number of tests is minimized for a single day. For a dynamical model, on each day, group size for the first stage testing directly affects the number of people participating in the first stage of testing on the next day. Hence, optimizing the test cost for a single day may not be optimal for the entire horizon of testing. In this section, we investigate this problem for a tractable i.i.d. setting.

Iv-a System Model

Here, we consider the following simplified i.i.d. infection model: Each day, each individual that has not been infected so far can get infected i.i.d. with probability

. Any individual that has been infected is isolated indefinitely once it is classified as infected via Dorfman testing.

Iv-B Test Costs

Let denote the number of people entering the first stage Dorfman testing on day . Together with the second stage testing of these individuals, the expected number of total first stage tests on day and second stage (individual) tests that will be registered on day is,


and therefore,


where denotes the first stage group size on day .

is a random variable which depends on

and as well as , where denotes and similarly for . To express in terms of these variables, let be the number of uncontaminated groups found from results of day and be the number of contaminated groups found from results of day . Note that . Also, let be the number of negative individuals of a contaminated group , which were tested together with some infected individuals on day as part of Dorfman first stage testing and let denote the individuals who do not catch the infection before the second stage test on day . We can express in terms of these variables as,


Then, we find expectation of each of these variables as,


Hence, by taking expectation of (13), we obtain,


Assuming that testing will take place between day and day , where individual testing stage of day will happen on day , the total expected number of tests can be expressed as,


This equation, in turn, can be solely expressed in terms of and by using (22) iteratively. Thus,


Fig. 6: Optimization of a single day versus optimization of the entire horizon.

After is found, we can optimize this cost over . Let denote the optimum value for day . By inspecting (22) and (24), we see that does not depend on even though depends on since appears as normalization term. As a result, is uniquely determined by the value of . Once this is done, can be found using and . This can be iteratively done for all going backwards from to . Once we find , we proceed with the first stage Dorfman testing for day . After that, on day , we obtain the first stage results of day and we have to optimize the cost in (24) for where (and ) is no longer a random variable. We observe that impacts for . But this results in the same optimum values for since each only depends on and can only add a normalization factor for for . The same argument can be done for realization of on day for each . Hence, no matter what realization comes out for and , will be the same as initial optimum value found from (25), which means we do not have to worry about realizations of and .

Fig. 7: CCA versus Dorfman testing for i.i.d. infection model with .

Iv-C Experimental Results

In Fig. 6, we compare the performance of optimizing Dorfman group sizes on a daily basis using (11) with optimizing (25). Here, we choose , , . The curves show that by optimizing (25) we can get some benefits in terms of number of tests spent. Although optimum values of (25) are different from (11), rounding the group sizes to integer values removes some of the benefits of optimizing (25).

In Fig. 7 and Fig. 8, we compare the performance of Dorfman testing using (25) with dynamic non-adaptive group testing (CCA) using two different number of tests per day, , values. The infection model is as stated above, i.e., each day infections occur i.i.d. with , , . Here, we also show daily population size , as well as the number of people that have not been detected for more than days for the CCA algorithm (note that Dorfman testing requires at most days to find infected individuals). For CCA, if we chose the number of tests as , then, Dorfman testing outperforms CCA. If we decrease factor to as in Fig. 8, the number of undetected people explodes for the CCA algorithm.

Fig. 8: CCA versus Dorfman testing for i.i.d. infection model with .

V Conclusion

In this paper, we introduced an adaptation of Dorfman group testing for dynamical settings with disease spread over time. We investigated the benefits as well as complications of the proposal adaptation, and compared its performance to that of a state-of-the-art non-adaptive testing method. By introducing the quarantine concept and its costs, we showed how optimal Dorfman group sizes can change, and investigated the trade-off between the test cost, quarantine cost, and disease progression. This theoretical quarantine modeling is similar to practically implemented close-contact tracing in communities during the ongoing covid-19 pandemic, where accurate tests like PCR may result in delays, during which time the individuals may be presumed potentially infected, and may be asked to be quarantined. We also showed that optimum dynamic Dorfman group sizes can differ from the static case in i.i.d. settings.


  • [1] R. Dorfman. The detection of defective members of large populations. Annals of Mathematical Statistics, 14:436–440, 1943.
  • [2] M. Aldridge, O. Johnson, and J. Scarlett. Group testing: An information theory perspective. Foundations and Trends in Communications and Information Theory, 15(3-4):196–392, 2019.
  • [3] D.-Z. Du and F. K. Hwang. Combinatorial Group Testing And Its Applications. World Scientific, 2 edition, 1999.
  • [4] J. Wolf. Born again group testing: Multiaccess communications. IEEE Transactions on Information Theory, 31(2):185–191, March 1985.
  • [5] P. Nikolopoulos, S. R. Srinivasavaradhan, T. Guo, C. Fragouli, and S. Diggavi. Group testing for overlapping communities. In IEEE ICC, June 2021.
  • [6] S. Ahn, W-N. Chen, and A. Ozgur. Adaptive group testing on networks with community structure. In IEEE ISIT, July 2021.
  • [7] B. Arasli and S. Ulukus. Graph and cluster formation based group testing. In IEEE ISIT, July 2021.
  • [8] P. Nikolopoulos, S. R. Srinivasavaradhan, T. Guo, C. Fragouli, and S. Diggavi. Group testing for connected communities. In AISTATS, April 2021.
  • [9] I. Z. Kiss, J. C. Miller, and P. L. Simon. Mathematics of Epidemics on Networks, volume 46. Springer, 01-2017.
  • [10] S. R. Srinivasavaradhan, P. Nikolopoulos, C. Fragouli, and S. Diggavi. An entropy reduction approach to continual testing. In IEEE ISIT, July 2021.
  • [11] S. R. Srinivasavaradhan, P. Nikolopoulos, C. Fragouli, and S. Diggavi. Dynamic group testing to control and monitor disease progression in a population. Available at arXiv:2106.10765.
  • [12] T. Li, C. L. Chan, W. Huang, T. Kaced, and S. Jaggi. Group testing with prior statistics. In IEEE ISIT, June 2014.
  • [13] M. Doger and S. Ulukus. Group testing with non-identical infection probabilities. In IEEE REDUNDANCY, October 2021.