How to test for COVID-19 efficiently

“Group testing” protocols tailored to particularities of the COVID-19 pandemic promise more-informative test results.

In the absence of a vaccine, a valuable measure for controlling the spread of COVID-19 is large-scale testing. The limited availability of test kits, however, means that testing has to be done as efficiently as possible.

The most efficient testing protocol is group testing, in which test samples from multiple subjects are tested together. If the test is perfectly reliable, then a negative test for a group clears all of its members at once. Clever group selection enables the protocol to zero in on infected patients with fewer tests than would be required to test each patient individually.

Group testing is a well-studied problem, but particular aspects of COVID testing — among them the relatively low infection rate among the test population, the false-positive rate of the tests, and practical limits on the number of samples that can be pooled in a single group — mean that generic test strategies dictated by existing theory are suboptimal.

My colleagues and I have written a paper that presents optimal strategies for COVID testing in several different circumstances. The paper is currently under submission for publication, but we have posted it to arXiv in the hope that our ideas can help stimulate further advances in COVID test design.

The key to group testing is that a given test sample is tested in several different groups, each of which combines it with a different assortment of samples. By cross-referencing the results of all the group tests, it’s possible to predict with high probability the correct result for any given sample.

Graphic illustratration of groupings
The intuition behind the researchers’ non-adaptive-testing algorithm. Circles represent individual patients; each grouping assigns patients to different groups. A 1 in the Tests column indicates that the group tested positive, a 0 that it tested negative. Cross-referencing results across groupings identifies infected individuals more efficiently than individual testing would.
Credit: Stacy Reilly

In this respect, the problem exactly reproduces the classical problem of error-correcting codes in information theory. Each parity bit in an error-correcting code encodes information about several message bits, and by iteratively cross-referencing message bits and parity bits, it’s possible to determine whether errors have crept into either.

Accordingly, we treat the problem of deciding how to pool test samples as a coding problem, and the problem of interpreting the test results as a decoding problem, and we use the information-theoretic concept of information gain to evaluate test protocols.

Adaptive testing

Group testing comes in two varieties: adaptive and non-adaptive. In the adaptive setting, tests (or groups of tests) are conducted in sequence, and the outcomes of one round of testing inform the group selection for the next round. In non-adaptive testing, groups are selected without any prior information about group outcomes.

In our paper, we consider adaptive testing involving relatively small numbers of patients — less than 30. We also consider non-adaptive testing for much larger numbers — say, thousands. In both settings, using the tools of information theory, we factor in prior knowledge about the probability of infection — some patients’ risk is higher than others’ — and the false-positive and false-negative rates of the tests.

Even with small numbers of patients, given the uncertainty of the test results and the mixture of prior infection probabilities, calculating the optimal composition of the test groups is an intractably complex problem. We show that in the COVID-19 setting, evolutionary strategies offer the best approximation of the optimal composition.

With evolutionary strategies, test groups are assembled at random, and the likely information gain is computed (given the prior probability of a positive test for each patient). Then some of the group compositions are randomly varied and tested again. Variations that lead to greater information are explored further; those that don’t are abandoned.

This procedure will produce the best approximation of the optimal group composition, but it could take a while: there’s no theoretical guarantee about how quickly evolutionary strategies will converge on a solution. As an alternative in the context of adaptive testing with small numbers of patients, we also consider a greedy group composition strategy. 

With the greedy strategy, we first assemble the group that, in itself, maximizes the information gain for one round of testing. Then we select the group that maximizes the information gain in the next round, and so on. In our paper, we show that this approach is very likely to arrive at a close approximation of the ideal group composition, with tighter guarantees on the convergence rate than evolutionary strategies offer.

Non-adaptive testing

For large-scale, non-adaptive tests, the conventional approach is to use Bloom filter pooling. The Bloom filter is a mechanism designed to track data passing through a network in a streaming, online context. 

The Bloom filter uses several different hash functions to hash each data item it sees to several different locations in an array of fixed size. Later, if any location corresponding to a given data item is empty, the filter can guarantee that that item hasn’t been seen. False positives, however, are possible.

Group testing has appropriated this design, using the multiple hash functions to assign a single patient’s sample to multiple locations and grouping samples that hash to the same location. But no matter how good the hash functions are, the distribution across groups may not be entirely even. If the groups average, say, 20 members each, some might have 18, others 22, and so on. That compromises the accuracy of the ensuing predictions of infection.

The Bloom filter design assumes that the number of data items seen in the streaming, network setting is unpredictable and open ended. But in the group-testing context, we know exactly how many patient samples we’re distributing across groups. So we can exactly control the number of samples assigned to each group.

If we have no prior probabilities of infection rates, an even distribution is optimal. If we do have priors, then we can distribute samples accordingly: maximizing information gain might require that we reduce the sizes of groups containing high-probability samples and increase the sizes of groups containing low-probability samples.

Similarly, because the Bloom filter was designed for the streaming, networked setting, the algorithm for determining whether an item has been seen must be highly efficient; the trade-off is that it doesn’t minimize the risk of a false positive. 

In the context of group testing, we can afford a more involved but accurate decoding algorithm. In our paper, we show that a message-passing algorithm, of a type commonly used to decode error-correcting codes, is much more effective than the standard Bloom filter decoding algorithm.

Related content

IN, KA, Bengaluru
Amazon Ads delivers advertising experiences across Amazon's owned-and-operated properties and third-party networks, reaching hundreds of millions of customers worldwide. Within Amazon Ads, Advertising Trust is the science-first organization responsible for ensuring every ad shown to customers meets Amazon's content policies — at massive scale, across all ad formats and global marketplaces. The Ads Trust Science team builds the ML systems that automate content moderation decisions: multimodal classification, retrieval-based labeling, LLM reasoning, and agentic self-improvement architectures. This requires inventing new approaches at the intersection of computer vision, NLP, information retrieval, and generative AI. We are seeking an Applied Science Manager to lead a team of applied scientists building next-generation content moderation intelligence. You will own the science roadmap for one of the highest-impact automation programs in Amazon Advertising, defining how multimodal content understanding, retrieval-first classification, and LLM-based reasoning combine into a production system that serves global advertising at scale. Key job responsibilities * Lead a team of applied scientists working across multimodal ML (vision-language models, video understanding), large-scale retrieval systems (embedding-based similarity and deduplication), and generative AI (LLM-based policy reasoning, knowledge distillation, agentic architectures, reinforcement learning). * Define the science strategy for ads trust. * Own end-to-end delivery of ML solutions: problem formulation, offline experimentation, online A/B testing, and production deployment. Your models directly move automation and defect metrics reported to senior leadership. * Build and grow scientists — hire, mentor, and develop team members. Raise the science bar through structured review processes and a publication culture within Amazon. * Partner with engineering, product, and operations teams to translate science investments into measurable automation improvements. Influence roadmaps across dependent teams. * Communicate science strategy and results to senior leadership through narratives, technical deep-dives, and roadmap documents.
US, WA, Seattle
Stores Economics and Science (SEAS) is an interdisciplinary science and engineering team in Amazon's Stores organization with a peak-jumping mission: we apply expertise in science and engineering to move from local to global optima in methods, models, and software. We pursue this mission by leveraging frontier science; collaborating with partner teams; and learning from the tools, experience, and perspective of others. We scale by solving problems, first in the small to prove concepts, and then in the large by building scalable solutions. We also help other teams within Amazon scale by hiring and developing the best and embedding them in other business units. In 2026, we are focused on economics and science in areas related to (1) lowering cost-to-serve, (2) optimizing selection, and (3) emerging machine learning. We also have some ongoing and highly-leveraged collaborations that help partner teams inside Amazon short-circuit months of R&D or otherwise look around corners. We are looking for an Applied Scientist to build and deliver state-of-the-art science and engineering solutions to improve our Stores business. In this role, you will work in a team of scientists and engineers with backgrounds in machine learning, NLP, IR, statistics, and economics to identify bottlenecks in our business, conceive new ideas to overcome those challenges, and deploy scientific solutions in partnership with product teams. Your responsibilities include developing and maintaining the scientific models, benchmarks, and services. Graduate education or hands-on experience in machine learning, optimization, causal inference, Bayesian statistics, deep learning, or other quantitative scientific fields is a big plus. To be successful in this role, you should be a quick learner and comfortable with a high degree of ambiguity. Key job responsibilities The successful candidate will lead large-scale science initiatives from research to production and translate complex business problems into mathematical frameworks. They will design and implement large-scale algorithms for complex supply chain and marketplace problems, and design incentive-compatible mechanisms for marketplace challenges. The ideal candidate will have a strong publication record in top-tier conferences/journals (INFORMS, EC, WINE, ICML, NeurIPS, etc.) and experience coordinating cross-functional projects. Hands-on experience building science solutions to mechanism design problems (e.g., optimal auction design, welfare maximization under constraints, incentive compatible coordination), with expertise in statistical learning and algorithm development. Leadership responsibilities include influencing technical strategy and roadmaps for complex initiatives, influencing senior stakeholders and shaping technical direction, and fostering team growth.
IN, KA, Bengaluru
We are embarking on a multi-year journey to improve the shopping experience for customers globally. Amazon Search team creates customer-focused search solutions and technologies that make shopping delightful and effortless for our customers. Our goal is to understand what customers are looking for in whatever language happens to be their choice at the moment and help them find what they need in Amazon's vast catalog of billions of products — starting from the very first keystroke. As Amazon expands to new interfaces, we are faced with the unique challenge of maintaining the bar on Search Results Quality and Search Autocomplete. We are looking for a Applied Scientist II to work on improving search on Amazon using NLP, ML, and DL technology. As an Applied Scientist, you will lead our efforts in query understanding, semantic matching, and ranking. You will build systems that anticipate search query intent and surface the right results. As part of this role, you will develop high precision, high recall, and low latency solutions for search. Your solutions should work for all languages that Amazon supports and will be used in all Amazon locales world-wide. You will develop scalable science and engineering solutions that work successfully in production. Key job responsibilities As an Applied Scientist on the team, you will lead science innovation to improve the customer search experience through higher-quality search results. You will: - Develop and deploy ML models to produce relevant search results. - Design and train semantic matching models (bi-encoders, cross-encoders, and distillation from large foundation models) for ranking and relevance. - Develop reinforcement learning and reward-modeling approaches to continuously improve search results quality. - Train multi-objective ranking and scoring systems that balance suggestion diversity, specificity, and relevance. - Design and implement scalable model architectures optimized for strict latency constraints, including knowledge distillation, quantization, and efficient inference strategies for production deployment. - Lead end-to-end science projects from problem formulation through production launch, collaborating closely with engineers and scientists within and outside the team to deliver customer-facing impact.
IN, KA, Bengaluru
We are embarking on a multi-year journey to improve the shopping experience for customers globally. Amazon Search team creates customer-focused search solutions and technologies that make shopping delightful and effortless for our customers. Our goal is to understand what customers are looking for in whatever language happens to be their choice at the moment and help them find what they need in Amazon's vast catalog of billions of products — starting from the very first keystroke. As Amazon expands to new interfaces, we are faced with the unique challenge of maintaining the bar on Search Results Quality and Search Autocomplete. We are looking for a Applied Scientist II to work on improving search on Amazon using NLP, ML, and DL technology. As an Applied Scientist, you will lead our efforts in query understanding, semantic matching, and ranking. You will build systems that anticipate search query intent and surface the right results. As part of this role, you will develop high precision, high recall, and low latency solutions for search. Your solutions should work for all languages that Amazon supports and will be used in all Amazon locales world-wide. You will develop scalable science and engineering solutions that work successfully in production. Key job responsibilities As an Applied Scientist on the team, you will lead science innovation to improve the customer search experience through higher-quality search results. You will: - Develop and deploy ML models to produce relevant search results. - Design and train semantic matching models (bi-encoders, cross-encoders, and distillation from large foundation models) for ranking and relevance. - Develop reinforcement learning and reward-modeling approaches to continuously improve search results quality. - Train multi-objective ranking and scoring systems that balance suggestion diversity, specificity, and relevance. - Design and implement scalable model architectures optimized for strict latency constraints, including knowledge distillation, quantization, and efficient inference strategies for production deployment. - Lead end-to-end science projects from problem formulation through production launch, collaborating closely with engineers and scientists within and outside the team to deliver customer-facing impact.
IN, KA, Bengaluru
We are embarking on a multi-year journey to improve the shopping experience for customers globally. Amazon Search team creates customer-focused search solutions and technologies that make shopping delightful and effortless for our customers. Our goal is to understand what customers are looking for in whatever language happens to be their choice at the moment and help them find what they need in Amazon's vast catalog of billions of products — starting from the very first keystroke. As Amazon expands to new interfaces, we are faced with the unique challenge of maintaining the bar on Search Results Quality and Search Autocomplete. We are looking for a Applied Scientist II to work on improving search on Amazon using NLP, ML, and DL technology. As an Applied Scientist, you will lead our efforts in query understanding, semantic matching, and ranking. You will build systems that anticipate search query intent and surface the right results. As part of this role, you will develop high precision, high recall, and low latency solutions for search. Your solutions should work for all languages that Amazon supports and will be used in all Amazon locales world-wide. You will develop scalable science and engineering solutions that work successfully in production. Key job responsibilities As an Applied Scientist on the team, you will lead science innovation to improve the customer search experience through higher-quality search results. You will: - Develop and deploy ML models to produce relevant search results. - Design and train semantic matching models (bi-encoders, cross-encoders, and distillation from large foundation models) for ranking and relevance. - Develop reinforcement learning and reward-modeling approaches to continuously improve search results quality. - Train multi-objective ranking and scoring systems that balance suggestion diversity, specificity, and relevance. - Design and implement scalable model architectures optimized for strict latency constraints, including knowledge distillation, quantization, and efficient inference strategies for production deployment. - Lead end-to-end science projects from problem formulation through production launch, collaborating closely with engineers and scientists within and outside the team to deliver customer-facing impact.
US, NY, New York
Are you a scientist interested in pushing the state of the art in machine learning and recommendation systems? Are you interested in working on novel ideas that can positively impact millions of customers? Do you wish you had access to large datasets and tremendous computational resources? Answer yes to any of these questions and you will be a great fit for our team at Amazon. As an Applied Scientist in our team, you will be responsible for the research, design, and development of new AI technologies for Personalization. You will adopt or invent new machine learning and analytical techniques in the realm of recommendations and large language models. You will collaborate with scientists, engineers, and product partners locally and abroad. Your work will include inventing, experimenting with, and launching new features, products and systems. Key job responsibilities - Using Amazon’s large-scale computing resources, you will ask research questions about customer behavior, build state-of-the-art models to optimize the shopping experience, and run these models directly on the retail website. - Develop AI solutions for Recommendation systems using Deep learning, LLMs, Reinforcement Learning, distillation, and Optimization methods; - Work closely with engineers and product managers to design, implement and launch AI solutions end-to-end; - Design and conduct offline and online (A/B) experiments to evaluate proposed solutions based on in-depth data analyses; - Effectively communicate technical and non-technical ideas with teammates and stakeholders; - Stay up-to-date with advancements and the latest modeling techniques in the field; - Publish your research findings in top conferences and journals. About the team Our team is part of Amazon’s Personalization organization, a high-performing group that leverages Amazon’s expertise in machine learning, big data, distributed systems, and user experience design to deliver the best shopping experiences for our customers. We run global experiments and our work has revolutionized e-commerce with features such as "Keep shopping for ...", “Customers who bought this item also bought”, and “Frequently bought together”.
US, WA, Seattle
Interested in modeling and understanding customer behavior through machine learning, artificial intelligence, and data mining over TB scale data with huge business impact on millions of customers? Join our team of Scientists developing models to model customer behavior and optimize the customer experience with Amazon Prime. This includes understanding who our customers are, long-term value of the Prime membership program, and creating the right personalized framework for content and subscription optimization. As an AI/ML expert, you will partner directly with product owners to intake, build, and directly apply your modeling solutions. There are numerous scientific and technical challenges you will get to tackle in this role, such as optimizing/fine-tuning GenAI/LLM solutions for Prime personalization, building GenAI foundation models, global scalability of models, combinatorial optimization, cold start problem, accelerated experimentation, short/long term goals modeling, and multi-step optimization leading to reinforcement learning of the customer journey. We employ techniques from GenAI/LLMs, supervised/semi-supervised learning, deep learning, transformer architectures, using outcomes from causal Econometric modeling, and Reinforcement learning. As the central science team within Prime, our expertise gets routinely called upon to weigh in on a variety of topics. We also emphasize the need and value of scientific research and have developed a strong publication and patent record (internally/externally) which you will be a part of. You will also utilize and be exposed to the latest in ML technologies and infrastructure: AWS technologies (EMR/Spark, Sagemaker, DynamoDB, S3, ClaudeCode), various AI/ML algorithms and techniques (Deep Learning, GenAI/LLMs, transformers, supervised/unsupervised/semi-supervised/reinforcement learning), and statistical modeling techniques. - Stay abreast of current literature in the field and advance/build novel science solutions leveraging SoTA solutions. - Build and develop AI/ML models and supporting infrastructure at TB scale, in coordination with software engineering teams. - Leverage Deep Learning and GenAI solutions for building foundation models and personalized optimization solution. - Develop offline policy estimation tools and integrate with measurement systems/econometric models. - Establish scalable, efficient, automated processes for large scale data analyses, science development, science validation and model implementation. - Analyze and extract relevant information from large amounts of Amazon’s historical business data to help automate and optimize key processes. - Work closely with the business to understand their problem space, identify the opportunities and formulate the problems. - Use AI/machine learning, data mining, statistical techniques and others to create actionable, meaningful, and scalable solutions for the business problems. - Design, develop and evaluate highly innovative models and statistical approaches to understand and predict customer behavior and to solve business problems. Key job responsibilities - Stay abreast of current literature in the field and advance/build novel science solutions leveraging SoTA solutions. - Build and develop AI/ML models and supporting infrastructure at TB scale, in coordination with software engineering teams. - Leverage Deep Learning and GenAI solutions for building foundation models and personalized optimization solution. - Develop offline policy estimation tools and integrate with measurement systems/econometric models. - Establish scalable, efficient, automated processes for large scale data analyses, science development, science validation and model implementation. - Analyze and extract relevant information from large amounts of Amazon’s historical business data to help automate and optimize key processes. - Work closely with the business to understand their problem space, identify the opportunities and formulate the problems. - Use AI/machine learning, data mining, statistical techniques and others to create actionable, meaningful, and scalable solutions for the business problems. - Design, develop and evaluate highly innovative models and statistical approaches to understand and predict customer behavior and to solve business problems.
US, WA, Seattle
Innovators wanted! Are you an entrepreneur? A builder? A dreamer? This role is part of an Amazon Special Projects team that takes the company’s Think Big leadership principle to the limits. We focus on creating entirely new products and services with a goal of positively impacting the lives of our customers. No industries or subject areas are out of bounds. If you’re interested in innovating at scale to address big challenges in the world, this is the team for you. Here at Amazon, we embrace our differences. We are committed to furthering our culture of inclusion. We have thirteen employee-led affinity groups, reaching 40,000 employees in over 190 chapters globally. We are constantly learning through programs that are local, regional, and global. Amazon’s culture of inclusion is reinforced within our 16 Leadership Principles, which remind team members to seek diverse perspectives, learn and be curious, and earn trust. As a Applied Scientist at the intersection of machine learning and the life sciences, you will participate in developing exciting products for customers. Our team rewards curiosity while maintaining a laser-focus in bringing products to market. Competitive candidates are responsive, flexible, and able to succeed within an open, collaborative, entrepreneurial, startup-like environment. At the forefront of both academic and applied research in this product area, you have the opportunity to work together with a diverse and talented team of scientists, engineers, and product managers and collaborate with others teams.
US, WA, Seattle
Prime Video is a first-stop entertainment destination offering customers a vast collection of premium programming in one app available across thousands of devices. Prime members can customize their viewing experience and find their favorite movies, series, documentaries, and live sports – including Amazon MGM Studios-produced series and movies; licensed fan favorites; and programming from Prime Video subscriptions such as Apple TV+, HBO Max, Peacock, Crunchyroll and MGM+. All customers, regardless of whether they have a Prime membership or not, can rent or buy titles via the Prime Video Store, and can enjoy even more content for free with ads. Are you interested in shaping the future of entertainment? Prime Video's technology teams are creating best-in-class digital video experience. As a Prime Video team member, you’ll have end-to-end ownership of the product, user experience, design, and technology required to deliver state-of-the-art experiences for our customers. You’ll get to work on projects that are fast-paced, challenging, and varied. You’ll also be able to experiment with new possibilities, take risks, and collaborate with remarkable people. We’ll look for you to bring your diverse perspectives, ideas, and skill-sets to make Prime Video even better for our customers. With global opportunities for talented technologists, you can decide where a career Prime Video Tech takes you! Key job responsibilities As a highly experienced and seasoned science leader, you will apply state of the art natural language processing and computer vision research to video centric digital media, while also responsible for creating and maintaining the best environment for applied science in order to recruit, retain and develop top talent. You will lead the research direction for a team of deeply talented applied scientists, creating the roadmaps for forward-looking research and communicate them effectively to senior leadership. You will also hire and develop applied scientists - growing the team to meet the evolving needs of our customers. About the team This team's mission is to deeply understand all content and empower all customers with relevant language options, innovative accessibility assists, and rich title-information across all their content-experiences on Prime Video. We create and publish content on-time that's meaningful, accurate, and accessible to every customer globally. We delight our customers by pushing the boundaries of content understanding and enrichment. Through inclusion and innovation, we do the most fulfilling work of our career.
GB, MLN, Edinburgh
Do you want to make a real difference to real people's lives? Want to design and build fair and explainable systems which automate recruitment processes across Amazon? Come and be part of a team that develops new machine learning (ML) technologies, which help Amazon scale for its customers by recruiting diverse teams. Join our Recommendations team within Intelligent Talent Acquisition (ITA) where you’ll build machine learning products that transform how job seekers find opportunities and recruiters discover talent. You’ll develop sophisticated recommendation systems powering both Amazon Jobs and internal hiring platforms, operating at global scale to match the right people with the right positions. Using techniques including representation learning, reinforcement learning, and probabilistic modeling, your work will directly improve efficiency for recruiters and help candidates find their ideal roles. This position offers the chance to solve complex problems with significant impact by creating systems that make Amazon’s entire hiring ecosystem more effective while collaborating with scientists across the organization. Key job responsibilities - Design and implement machine learning models that power recommendation systems for job seekers and recruiters, ensuring high performance, scalability, and reliability at global scale. Our ideal candidate has a strong scientific foundation and experience of statistical analysis and model building and has a passion for fairness and explainability in ML systems. - Collaborate with engineers, scientists, and product managers to define requirements, create solutions, and deliver products that improve the hiring experience. - Participate in the full software development lifecycle including scoping, design, coding, testing, documentation, deployment, and maintenance of recommendation systems and ML models. - Solve complex ML problems using optimal data structures and algorithms, making thoughtful trade-offs between efficiency and maintainability. - Stay current with scientific literature and develop novel approaches that address business challenges in talent acquisition. You will have the opportunity to provide feedback on scientific work across the organization helping the entire Intelligent Talent Acquisition organization improve. A day in the life You might spend the morning reviewing a colleague’s code for a new recommendation algorithm feature, then collaborate with product managers to refine requirements for an upcoming enhancement. After lunch, you’ll dive into model development, analyzing performance metrics from recent A/B tests and implementing improvements to the job-seeker recommendation pipeline. Throughout the day, you’ll participate in scientific discussions with peers across the organization, providing valuable feedback while continuing to refine your expertise. About the team The Recommendations team is a hybrid group of software engineers and applied scientists located in Edinburgh. We build tools that match people to jobs and jobs to people, optimizing experiences for both recruiters and candidates. Our work directly impacts Amazon’s ability to find and hire exceptional talent globally. The team maintains a collaborative environment with regular knowledge sharing and mentorship opportunities. We work closely with our product teams to understand business needs and develop innovative scientific solutions that improve hiring outcomes across both industry and student requisitions worldwide.