Detecting Emerging Symptoms of COVID-19 using Context-based Twitter Embeddings

Roshan Santosh, H. Andrew Schwartz, Johannes C. Eichstaedt, Lyle H. Ungar, Sharath C. Guntuku

TL;DR

Researchers have developed an iterative, graph-based NLP framework that mines Twitter data to identify emerging COVID-19 symptoms weeks before official health organizations. By leveraging contextual BERT embeddings, the system successfully identified symptoms like "loss of taste/smell" and "diarrhea" nearly a month before they were officially recognized by the CDC.

What Problem Does This Paper Address?

During the early stages of the COVID-19 pandemic, medical knowledge was evolving rapidly. While "classic" symptoms like fever and cough were identified early, others—such as gastrointestinal issues or the loss of sense of smell—emerged later. Official reporting from agencies like the CDC often lags behind real-world observations due to the time required for clinical validation.

Social media offers a real-time "digital exhaust" of patient experiences, but mining this data is notoriously difficult. The data is highly imbalanced (most tweets aren't about symptoms), noisy, and full of linguistic ambiguity. Traditional keyword searches fail to capture the context of a word; for instance, a tweet saying "I have a dry cough" is medically relevant, while "that joke made me cough" is not. The authors sought a way to automatically extract a "master list" of context-specific symptoms from massive, unlabelled social media corpora.

Methods

The authors propose a graph-based iterative search model that moves beyond static word embeddings (like Word2Vec) to use contextual embeddings from BERT.

  1. Seed Initialization: The process starts with a single "seed word" (e.g., "cough") and a few "seed texts" (tweets where that word is clearly used as a symptom).
  2. Context Embedding (CEmb): The system generates a representative embedding for the desired context by averaging the BERT embeddings of the seed word across the seed texts.
  3. Iterative Graph Expansion: The model performs an exhaustive search across a large dataset to find tokens with high cosine similarity to the current context. It builds a directed, weighted graph where nodes are tokens and edges represent similarity.
  4. The $k$ Parameter: A crucial innovation is the trainable search parameter $k$, which balances the influence of the global "Context Embedding" vs. the local "Node Embedding." This creates an "Exploration vs. Exploitation" dynamic:
  5. Low $k$: Encourages exploration, helping discover rare or novel symptom candidates.
  6. High $k$: Focuses on exploitation, yielding symptoms more robustly associated with the known context.
  7. Refinement: As new words are identified (e.g., "fever," "headache"), they are added to the graph, and the global Context Embedding is updated to become more robust.
Figure 2: Symptom model graph for COVID-19 Tweet dataset

Datasets

The study utilized two primary datasets:

  • COVID-19 Twitter Dataset: A random subset of 1 million tweets collected between March 12 and April 23, 2020, filtered by keywords like "coronavirus," "outbreak," and "pandemic."
  • ADR Benchmark: To test the model's generalizability, they used a standard annotated Adverse Drug Reaction (ADR) dataset containing tweets labeled for drug side effects (e.g., reactions to Statins).

Key Insights and Ideas

  • Context is King: The authors found that traditional methods like Word2Vec or Topic Modeling (LDA) failed because they couldn't distinguish between different uses of the same word. BERT's ability to provide different embeddings for "cough" based on the surrounding text was the key to filtering out noise.
  • Beating the CDC: The most striking insight is the lead time. The model identified symptoms like sore throat, chills, and diarrhea in mid-March, while the CDC only added these to their official list in mid-April.
  • Iterative Discovery: By treating the problem as a graph expansion task rather than a simple classification task, the model can discover "rare" symptoms (like vertigo or anemia) that might be missed by supervised models trained on static datasets.
Figure 1: Comparative timeline of symptom detection by our approach against CDC reporting

Key Results

The model demonstrated high precision across both tasks:

  • Symptom Detection: The graph-based approach achieved a precision of 1.0 at $p=5$ and 0.9 at $p=20$ when using "cough" as a seed. This outperformed a manual context-text approach, especially as the search depth increased.
  • ADR Generalization: When applied to the Statins dataset using "pain" as a seed, the model achieved a precision of 0.95 at $p=20$, identifying specific reactions like "muscle deterioration" and "skin lesions."
  • Early Detection: As shown in the timeline (Figure 1), the model's "digital traces" provided a 3-4 week head start over official public health reporting for several key symptoms.

Limitations and Future Work

  • Multi-word Terms: The current iteration focuses on single tokens. While the authors argue that full-text validation makes this less of an issue, the system cannot currently extract complex phrases like "loss of taste."
  • Ground Truth: Evaluating "emerging" symptoms is difficult because there is no definitive ground truth during a live pandemic. The authors relied on manual inspection and retrospective comparison with the CDC.
  • Human-in-the-loop: The authors envision this as a tool for medical professionals to "scavenge" large corpora, rather than a fully autonomous diagnostic tool. Future work could focus on better integrating human validation into the iterative loop.

Summary updated

BibTeX
@inproceedings{santosh2020detecting,
  author = {Roshan Santosh and H. Andrew Schwartz and Johannes C. Eichstaedt and Lyle H. Ungar and Sharath C. Guntuku},
  title = {{Detecting Emerging Symptoms of COVID-19 using Context-based Twitter Embeddings}},
  booktitle = {NLP4COVID @ EMNLP},
  year = {2020},
  doi = {10.18653/v1/2020.nlpcovid19-2.35},
}
Figure