Identifying patient-level data risks in trusted research environments: Worked examples with synthetic data
Open Access
- 1 February 2026
- journal article
- Published by SAGE Publications in Digital Health
- Vol. 12
Abstract
Objective: This study examined and illustrated real-world risks of unintended patient-level data egress from Trusted Research Environments (TREs) and Secure Data Environments (SDEs), using synthetic data to recreate cases encountered in PIONEER, the HDR UK Hub in Acute Care. Methods: Synthetic datasets with demographics and NEWS2 vital signs were created using SciPy and NumPy for two fictitious populations. These datasets were transformed for machine-learning and embedded into various formats to simulate potential egress scenarios. Three worked examples include binary serialisation of data, binary serialisation of complex objects, and plain text mark-up reports. Results: Initial screening of exported files included checking reported sizes. While absolute size alone cannot confirm patient-level data, unusually large files can signal the need for closer inspection. In several cases, this prompted manual review that uncovered sensitive information. File size is therefore a useful signal within a layered egress checking process, not a diagnostic measure. Standard tools like Python or R do not warn of hidden data, reinforcing the need for explicit egress policies and independent verification. Converting binary formats only works for recognized code libraries and requires ongoing maintenance. Manual inspection alongside automation remains essential to identify and remove embedded data. Conclusion: These cases highlight the complexities in identifying and preventing identifiable data egress from TREs. Key insights include clear guidance for researchers, the limitations of binary serialisation for egress due to security vulnerabilities, and the importance of plain-text data exports for ease of verification.Keywords
Funding Information
- Wellcome Trust
- Alpha-1 Foundation
- Medical Research Council
- British Lung Foundation
- National Institute for Health and Care Research
- Engineering and Physical Sciences Research Council
- Health Data Research UK
This publication has 20 references indexed in Scilit:
- From transparency to accountability of intelligent systems: Moving beyond aspirationsData & Policy, 2022
- Infrastructure and operating processes of PIONEER, the HDR-UK Data Hub in Acute Care and the workings of the Data Trust Committee: a protocol paperBMJ Health & Care Informatics, 2021
- Outlining Traceability2021
- Array programming with NumPyNature, 2020
- SciPy 1.0: fundamental algorithms for scientific computing in PythonNature Methods, 2020
- Algorithmic realism2020
- Guidelines for Human-AI Interaction2019
- Security Dialogues: Building Better Relationships between Security and BusinessIEEE Security & Privacy, 2016
- Secure access to confidential microdata: four years of the Virtual Microdata LaboratoryEconomic & Labour Market Review, 2008
- Human error: models and managementBMJ, 2000