Accessible Data Curation and Analytics for International-Scale Citizen Science Datasets

Benjamin Murray, Eric Kerfoot, Mark S. Graham, Carole H. Sudre, Erika Molteni, Liane S. Canas, Michela Antonelli, Kerstin Klaser, Alessia Visconti, Andrew T. Chan, Paul W. Franks, Richard Davies, Jonathan Wolf, Tim Spector, Claire J. Steves, Marc Modat, Sebastien OurselinarXiv 2020

TL;DR

Researchers at King’s College London have unveiled ExeTera, an open-source Python framework designed to bridge the gap between standard data science tools and massive "citizen science" datasets. By utilizing columnar storage and streaming algorithms, ExeTera allows researchers to curate and analyze terabyte-scale data—like the 189-million-record Covid Symptom Study—on commodity hardware without hitting the dreaded "out-of-memory" wall.

What Problem Does This Paper Address?

Modern citizen science projects, such as the Covid Symptom Study (CSS), generate data at a scale that breaks traditional academic workflows. When the CSS reached 4.7 million participants and nearly 200 million assessments, researchers encountered two major hurdles:

  1. The RAM Wall: Ubiquitous Python libraries like Pandas and Numpy are designed to load datasets entirely into Random Access Memory (RAM). Once a dataset exceeds 16–32 GB, standard workstations fail, forcing researchers toward expensive server-grade hardware or complex, high-maintenance database clusters (like PostgreSQL or Couchbase).
  2. The Snapshot Dilemma: Public datasets are often released as "snapshots"—static files representing the state of the data at a specific time. Because these snapshots are "memory-less," tracking how a specific patient’s symptoms changed or were corrected between two different files is computationally grueling and prone to reproducibility errors across large research teams.

Methods

The authors developed ExeTera to provide a "Drive Scale" solution (handling 16 GB to 1 TB) that feels familiar to Python users but operates differently under the hood:

  • Columnar Storage (HDF5): Unlike CSVs, which are "row-local" (you must parse the whole line to see one field), ExeTera uses HDF5 to store data in columns. If you only need to analyze "age" and "test result," ExeTera only reads those specific columns from the disk, resulting in massive speedups.
  • Streaming Algorithms: To handle joins and sorts that exceed RAM, ExeTera implements streaming merges. By ensuring data is sorted, it can perform joins in $O(m+n)$ time, processing data in small chunks rather than loading two massive tables at once.
  • Journaling: ExeTera includes a specialized operation to combine snapshots into a "journaled" dataset. This preserves a timestamped history of changes, allowing for longitudinal analysis even when the source data is destructive (i.e., when new snapshots overwrite old errors).
  • Reproducibility Framework: The software enforces "algorithm immutability." By versioning cleaning scripts and ensuring consistent random seeds, the team ensures that different researchers across the globe get identical results from the same data snapshot.

Datasets

The primary evaluation uses the Covid Symptom Study dataset (as of October 2020):

  • Patients: 4.7 million rows, 224 fields.
  • Assessments: 189.2 million rows, 66 fields.
  • Tests/Diet: Smaller tables used for relational joins.

The authors also used synthetic datasets generated via the ExeTeraEval project to benchmark join operations up to 2.1 billion rows.

Key Insights and Ideas

  • Sorting is the Scalability Secret: The paper emphasizes that once data is sorted, complex operations like joins and aggregations become simple "merges." ExeTera focuses heavily on scalable sorting (using a two-phase approach for arrays that don't fit in RAM) to enable everything else.
  • The "Pandas-like" API is a Feature, Not Just a Convenience: By emulating the API researchers already know, the authors lower the barrier to entry for epidemiologists and clinicians who aren't database engineers but need to work with big data.
  • Data Cleaning is the Real Bottleneck: The authors highlight that "raw datasets are typically noisy." ExeTera isn't just a storage engine; it’s a curation pipeline that handles the messy reality of app-based data, such as users entering height in meters vs. centimeters or conflicting test results.

Key Results

  • Subset Reading: Loading 32 fields from the 4.7M-row patient table took 18.8 seconds in Pandas (via CSV) but only 0.09 seconds in ExeTera.
  • Scaling Joins: In a head-to-head join test, Pandas failed due to memory exhaustion at 134 million rows. ExeTera successfully completed the same join on a 2.1-billion-row dataset in about 10 minutes on the same hardware.
  • Import Speed: ExeTera can stream and convert the 189-million-row assessment CSV into its optimized HDF5 format in approximately one hour (3849 seconds).

Limitations and Future Work

  • HDF5 Fragility: The authors admit HDF5 is "fragile to interruptions." If a write process is killed mid-way, the entire file can become unreadable. They are exploring alternative formats like Parquet or ORC for future versions.
  • Single-Core Processing: Currently, ExeTera does not utilize multiple CPU cores or distributed clusters. The authors plan to integrate Dask to allow the framework to scale into the multi-terabyte range across distributed nodes.
  • API Maturity: While the goal is a Pandas-style experience, some high-level abstractions are still under development, requiring users to occasionally interact with lower-level operations.

Summary updated

BibTeX
@misc{murray2020accessible,
  author = {Benjamin Murray and Eric Kerfoot and Mark S. Graham and Carole H. Sudre and Erika Molteni and Liane S. Canas and Michela Antonelli and Kerstin Klaser and Alessia Visconti and Andrew T. Chan and Paul W. Franks and Richard Davies and Jonathan Wolf and Tim Spector and Claire J. Steves and Marc Modat and Sebastien Ourselin},
  title = {{Accessible Data Curation and Analytics for International-Scale Citizen Science Datasets}},
  year = {2020},
  eprint = {2011.00867},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2011.00867},
}
Figure