Skip to main content
Proceedings of the National Academy of Sciences of the United States of America logoLink to Proceedings of the National Academy of Sciences of the United States of America
letter
. 2025 Mar 20;122(13):e2501506122. doi: 10.1073/pnas.2501506122

Large language models for identifying social determinants of health

Yu Wang a,1
PMCID: PMC12002213  PMID: 40112096

Large language models, including Bidirectional Encoder Representations from Transformers (BERT) and Generative Pre-trained Transformer (GPT), are competing for dominance in natural language processing (1–3). This ongoing competition extends to real-world applications, including a recent study by Gabriel et al. on identifying social determinants of health (SDoH) (4). The authors proposed a method based on RoBERTa, a variant of BERT, to detect homelessness, food insecurity, and domestic violence with very limited labeled data. Comparing the performance of SDoH classifiers trained on three datasets-GPT-generated notes only, authentic notes from Medical Information Mart for Intensive Care (MIMIC), and a combination of synthetic and MIMIC notes-Gabriel et al. concluded that “supplementing training data with synthetic data may optimize predictive performance for identifying SDoH from the unstructured data present in clinical notes” (4). While we commend their findings and the innovative use of synthetic data, we contend that these conclusions may not readily generalize to other studies for three key reasons.

First, some models in the study (4) show potential training limitations, undermining the reliability of their conclusions. For instance, in the task of detecting food insecurity, a RoBERTa-base model fine-tuned on MIMIC notes yields an Area Under the Receiver Operating Characteristics Curve (ROC-AUC) of 0.13. By comparison, random guessing, such as coin flips, would achieve an ROC-AUC of 0.5. Fine-tuning BERT models requires careful hyperparameter tuning, especially when the training set is small (5). However, this study lacks dedicated validation sets and instead relies solely on test sets, leaving critical hyperparameters, such as the learning rate and the number of training epochs, either at default or fixed values (4).

Second, in cases with very limited data, there is strong reason to believe that few-shot learning with GPT can outperform fine-tuning BERT and its variants. RoBERTa models’ state-of-the-art performance has relied on the availability of sufficiently large training datasets. For example, early experiments (3) typically utilize thousands (6) or tens of thousands of training samples (7), whereas Gabriel et al. employ only 40 to 100 data points for fine-tuning. Additionally, (4) uses the base version of RoBERTa, rather than its larger and more performant counterpart. Considering that GPT models are already approaching the performance of RoBERTa-large models (3), Gabriel et al.’s decision to fine-tune RoBERTa-base models makes it more likely that few-shot prompting with GPT could exceed the performance of these fine-tuned models.

Last, when the dataset contains more data points—such as 300—a fine-tuned RoBERTa-large model may no longer benefit from synthetic data. Previous studies (8) have shown that data augmentation provides limited benefits for RoBERTa-base models when there are 500 or more training samples. Furthermore, research indicates that performance gains diminish as the number of data points increases due to diminishing marginal returns (9). Similarly, while synthetic data can improve performance compared to having no additional data, its contribution is considerably less impactful than that of real data (10). This performance degradation is particularly pronounced when synthetic data are generated through zero-shot learning, as in ref. 4, compared to data generated through few-shot learning (10).

Acknowledgments

Author contributions

Y.W. designed research; performed research; analyzed data; and wrote the paper.

Competing interests

The author declares no competing interest.

References

  • 1.Argyle L. P., et al. , Out of one, many: Using language models to simulate human samples. Polit. Anal. 31, 1–15 (2023). [Google Scholar]
  • 2.Strachan J. W. A., et al. , Testing theory of mind in large language models and humans. Nat. Hum. Behav. 8, 1285–1295 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 3.Ziems C., et al. , Can large language models transform computational social science? Comput. Linguist. 50, 237–291 (2024).
  • 4.R. A. Gabriel et al., On the development and validation of large language model-based classifiers for identifying social determinants of health. Proc. Natl. Acad, Sci. U.S.A. 121, e2320716121 (2024). [DOI] [PMC free article] [PubMed]
  • 5.M. Mosbach, M. Andriushchenko, D. Klakow, On the stability of fine-tuning bert: Misconceptions, explanations, and strong baselines. ICLR (2021).
  • 6.M. Sap, E. Horvitz, Y. Choi, N. A. Smith, J. W. Pennebaker, “Recollection versus imagination: Exploring human memory and cognition via neural language models” in Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, D. Jurafsky, J. Chai, N. Schluter, J. Tetreault, Eds. (Association for Computational Linguistics, 2020).
  • 7.R. Baly, G. D. S. Martino, J. Glass, P. Nakov, “We can detect your bias: Predicting the political ideology of news articles” in Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing, B. Webber, T. Cohn, Y. He, Y. Liu, Eds. (Association for Computational Linguistics, 2020).
  • 8.S. Longpre, Y. Wang, C. DuBois, “How effective is task-agnostic data augmentation for pretrained transformers?” in Findings of the Association for Computational Linguistics: EMNLP 2020, T. Cohn, Y. He, Y. Liu, Eds. (Association for Computational Linguistics, 2020).
  • 9.X. Zhu, C. Vondrick, C. C. Fowlkes, D. Ramanan, Do we need more training data? Int. J. Comput. Vis.119, 76–92 (2016).
  • 10.Z. Li, H. Zhu, Z. Lu, M. Yin, “Synthetic data generation with large language models for text classification: Potential and limitations” in Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, H. Bouamor, J. Pino, K. Bali, Eds. (Association for Computational Linguistics, 2023).

Articles from Proceedings of the National Academy of Sciences of the United States of America are provided here courtesy of National Academy of Sciences

RESOURCES