Test & Contain

Increasing the effectiveness of a limited number of COVID-19 tests in resource-constrained environments


The Problem

Testing resources for viral infections are often scarce due to several factors, including limited access to reagents, shortages in trained lab technicians, and deficient logistics. At the same time, testing is an essential tool for effectively combating epidemics, as it gives crucial estimates of virus prevalence, and allows the identification of infected asymptomatic and symptomatic individuals that form the basis of sophisticated containment policies. For this reason, novel strategies are required that maximise the benefit from each available test.


Group testing

Our methodology is based on the principle of group testing. In group testing, multiple samples are pooled into a single test. The result indicates whether any given person in the pool is infected, or conversely – and more informatively – if none are infected.  

Group A

Group B

Group testing.png

Illustration of group tests of size 6. Red dots represent infected individuals. In the above scenario, a single group test on Group A will return negative, since no individual is infected. The test for Group B will return positive, since some individuals are infected.


Our solution

Instead of determining the number of tests required for a given testing regime, we turn the problem on its head and formulate the problem of maximising the use of limited testing resources as a resource allocation problem. Our approach is designed for settings with severely limited testing capacities.

Our model segments the population according to an individual’s “exposure” to others (and consequently to the virus), and their cost of containment. The latter can refer to social cost, e.g. a healthcare worker who by self-isolating is unable to perform essential duties, or financial cost, which is prohibitive for many.  Following this, we compute the optimal group sizes and test allocations for each segment. Finally, the group testing is performed and appropriate containment measures are carried out for groups that test positively for the virus. 

We emphasise that our solution provides considerable flexibility for policymakers to optimise the balance between virus containment and socioeconomic welfare.


Classify people into segments

The heterogeneous testing strategy we propose classifies individuals along two axes: their exposure to the virus and their cost of self-isolation.


Optimise for pool sizes and test allocations

Based on these population characteristics, we define optimal group size and number of tests per segment. 


Test and contain as necessary

Following testing, we carry out isolation of groups that tested positive.

Proven benefits

Not only is there a substantial literature regarding group testing in the Computational Learning Theory community, but the underlying method has been successfully used in practice to fight HIV. The most compelling benefit of group testing is its ability to amplify the reach of a limited number of tests to larger population segments by allocating tests to disjoint groups of individuals. 



Maximising the Benefits of an Acutely Limited Number of COVID-19 tests

J. Jonnerby, P. Lazos, E. Lock, F. Marmolejo-Cossio, C. Bronk Ramsey, D. Sridhar

Harvard CRCS Workshop on AI for Social Good (2020)

Finalist - Global Challenges in Economics and Computation

The Team


Jakob Jonnerby

DPhil Student in Physics,

University of Oxford


DPhil Student in Computer Science,

University of Oxford


Career Development Fellow in Computer Science, Balliol College, University of Oxford


Divya Sridhar

DPhil Student in Zoology,

University of Oxford


Postdoctoral Researcher in Computer Science, 

Sapienza Universita di Roma


Ninad Rajgopal

DPhil Student in Computer Science,

University of Oxford


Prof. Fernando Díaz-Barriga


Dr. Cesaré Ovando Vázquez


Prof. Angel Alpuche Solis


Prof. Salvador Ruiz Correa


Dr. Sergio Casas Flores


Prof. Christopher Bronk Ramsey

 University of Oxford



Thanks for submitting!

Contact Us