[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-342159-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-342159-en":131},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","transformer-based-deep-learning-model-for-the-diagnosis-of-suspected-lung-cancer-in-primary-care-based-on-electronic-health-record-data","Transformer-based deep learning model for the diagnosis of suspected lung cancer in primary care based on electronic health record data","","Lung cancer is a leading cause of cancer death in the UK, and existing epidemiological risk models in clinical use show limited positive predictive value because they ignore temporal relationships in sequential electronic health record (EHR) data. A transformer-based approach was developed for early detection in primary care. The model learns care-pathway patterns from semantically preprocessed GP EHR history, improving discrimination for suspected lung cancer and enabling interpretation via clustering. Future work targets external validation and GP-system integration.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/research-report/","Research & Report",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/transformer-based-deep-learning-model-for-the-diagnosis-of-suspected-lung-cancer-in-primary-care-based-on-electronic-health-record-data/342159/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/transformer-based-deep-learning-model-for-the-diagnosis-of-suspected-lung-cancer-in-primary-care-based-on-electronic-health-record-data/342159.png","ImageObject",300,407,{"name":42,"@type":43},"Evangeline","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-10-24","2026-09-22",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",11,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"Why do existing lung cancer risk models underperform in primary care?","Question",{"text":63,"@type":64},"They often have low positive predictive value and do not capture temporal relationships contained in sequential EHR care pathways.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"How was the transformer-based model developed and evaluated?",{"text":68,"@type":64},"The WSIC dataset was split into training and validation. GP EHR data from the three years before diagnosis (excluding the most recent month) were semantically preprocessed, then modeled using ALBERT with a logistic regression head, with comparator modeling and k-means clustering explored.",{"name":70,"@type":61,"acceptedAnswer":71},"What performance and interpretability results were reported?",{"text":72,"@type":64},"The model achieved an AUROC of 0.924 with a PPV of 3.6% and sensitivity of 86.6% on the three-year window. Cluster analysis was used to identify six groups of patients showing similar progression and investigation patterns.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},342159,1790322395,{"code":4,"msg":82,"data":83},"success",[84,88,92,96,101,106,111,115,120,123,127],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":85,"show_sort_weight":86,"slug":87},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":89,"show_sort_weight":90,"slug":91},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":93,"show_sort_weight":94,"slug":95},"Exam",70,"exam",{"id":97,"doc_module":4,"doc_module_name":25,"category_name":98,"show_sort_weight":99,"slug":100},5,"Comic",60,"comic",{"id":102,"doc_module":4,"doc_module_name":25,"category_name":103,"show_sort_weight":104,"slug":105},6,"Technology",50,"technology",{"id":107,"doc_module":4,"doc_module_name":25,"category_name":108,"show_sort_weight":109,"slug":110},7,"Healthcare",40,"healthcare",{"id":112,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":113,"slug":114},8,30,"research-report",{"id":116,"doc_module":4,"doc_module_name":25,"category_name":117,"show_sort_weight":118,"slug":119},9,"Religion & Spirituality",20,"religion-spirituality",{"id":118,"doc_module":4,"doc_module_name":25,"category_name":121,"show_sort_weight":118,"slug":122},"World Cup","world-cup",{"id":124,"doc_module":4,"doc_module_name":25,"category_name":125,"show_sort_weight":124,"slug":126},10,"Lifestyle","lifestyle",{"id":128,"doc_module":4,"doc_module_name":25,"category_name":129,"show_sort_weight":97,"slug":130},19,"General","general",{"code":4,"msg":82,"data":132},{"doc_id":79,"user_id":133,"nickname":42,"user_avatar":134,"doc_module":4,"category_id":112,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":135,"file_id":136,"file_url":137,"file_type":138,"file_size":139,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":140,"language":141,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":142,"faqs":143,"seo_title":144,"seo_description":12,"update_tm":145,"read_time":146,"preview_page_count":33,"preview_urls":147},13056703019662,"https://ap-avatar.wpscdn.com/avatar/be000253a8e92610077?_k=1778726343310543188","Articles   \nTransformer-based deep learning model for the diagnosis of suspected lung cancer in primary care based on electronic health record data  \nLan Wang,a Yonghua Yin,b Ben Glampson,c Robert Peach,d Mauricio Barahona,a Brendan C. Delaney,e,f,g,∗ and Erik K. Mayerc,f,g  \naDept of Mathematics, Imperial College London, UK  \nbDept of Electrical and Electronic Engineering, Imperial College London, UK cICARE SDE, Imperial College Healthcare NHS Trust, London, UK  \ndDept of Brain Sciences, Imperial College London, UK eIX, Imperial College London, UK  \nfDept of Surgery and Cancer, Imperial College London, UK  \nSummary  \nBackground Due to its late stage of diagnosis lung cancer is the commonest cause of death from cancer in the UK. Existing epidemiological risk models in clinical usage, which have Positive Predictive Values (PPV) of less than 10%, do not consider the temporal relations expressed in sequential electronic health record (EHR) data. We aimed to build a model for lung cancer early detection in primary care using machine learning with deep ‘transformer’ models on EHR data to learn from these complex sequential ‘care pathways’.  \nMethods We split the Whole Systems Integrated Care (WSIC) dataset into 70% training and 30% validation. Within the training set we created a case–control study with lung cancer cases and control cases of ‘other’ cancers or respiratory conditions or ‘other’ non cancer conditions. Based on 3,303,992 patients from January 1981 to December 2020 there were 11,847 lung cancer cases. 5789 cases and 7240 controls were used for training and 50,000 randomly selected patients out of the whole validation population of 368,906 for validation. GP EHR data going back three years from the date of diagnosis less the most recent one months were semantically preprocessed by mapping from more than 30,000 terms to 450 . Model building was performed using ALBERT with a Logistic Regression Classiﬁer (LRC) head. Clustering was explored using k-means. An additional regression model alone was built on the pre-processed data as a comparator.  \nFindings Our model achieved an AUROC of 0.924 (95% CI 0.921–0.927) with a PPV of 3.6%(95% CI 3.5–3.7) and Sensitivity of 86.6%(95% CI 85.3–87.8) based on the three year’s data prior to diagnosis less the immediate month before index diagnosis. The comparator regression model achieved a PPV of 3.1%(95% CI 3.0–3.1) and AUROC of 0.887 (95% CI 0.884–0.889) . We interpreted our model using cluster analysis and have identiﬁed six groups of patients exhibiting similar lung cancer progression patterns and clinical investigation patterns.  \nInterpretation Capturing temporal sequencing between cancer and non-cancer pathways to diagnosis enables much more accurate models. Future work will focus on external dataset validation and integration into GP clinical systems for evaluation.  \nFunding Cancer Research UK.  \nCopyright © 2024 The Authors. Published by Elsevier B.V. This is an open access article under the CC BY license ([http://creativecommons.org/licenses/by/4.0/](http://creativecommons.org/licenses/by/4.0/)).  \nKeywords: Deep learning; Transformers; Machine learning; Cancer prediction; Primary care; Artiﬁcial intelligence  \n*Corresponding author. Chair in Medical Informatics and Decision Making, Imperial College, IX, 5th ﬂoor iHub, 84 Wood Ln, London, W12 0BZ, UK. E-mail [address:](address: brendan.delaney@imperial.ac.uk)[ brendan.delaney@imperial.ac.uk](address: brendan.delaney@imperial.ac.uk) (B.C. Delaney).  \nURL: [http://www.imperial.ac.uk/people/brendan.delaney](http://www.imperial.ac.uk/people/brendan.delaney) (B.C. Delaney).  \ngJoint senior authors.  \neBioMedicine 2024;110: 105442 Published Online xxx [https://doi.org/10](https://doi.org/10) . 1016/j.ebiom.2024 . 105442  \n[www.thelancet.com Vol](www.thelancet.com Vol) 110 December, 2024 1  \n Articles  \nResearch in context  \nEvidence before this study  \nPredictive models for early detection of cancer are a priority as treatment int","cbCaiv68nrWVD76L","https://ap.wps.com/l/cbCaiv68nrWVD76L","pdf",1427711,13,"English","# Summary\n## Background\n## Methods\n## Findings\n## Interpretation\n## Research in context\n### Evidence before this study\n### Added value of this study","[{\"question\":\"Why do existing lung cancer risk models underperform in primary care?\",\"answer\":\"They often have low positive predictive value and do not capture temporal relationships contained in sequential EHR care pathways.\"},{\"question\":\"How was the transformer-based model developed and evaluated?\",\"answer\":\"The WSIC dataset was split into training and validation. GP EHR data from the three years before diagnosis (excluding the most recent month) were semantically preprocessed, then modeled using ALBERT with a logistic regression head, with comparator modeling and k-means clustering explored.\"},{\"question\":\"What performance and interpretability results were reported?\",\"answer\":\"The model achieved an AUROC of 0.924 with a PPV of 3.6% and sensitivity of 86.6% on the three-year window. Cluster analysis was used to identify six groups of patients showing similar progression and investigation patterns.\"}]","Transformer-based deep learning model for the diagnosis of suspected lung cancer in primary care based on electronic health record data | PDF",1790045566,33,[148,152,156,160],{"page_no":22,"url":149,"width":150,"height":151},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/057b3eaac410885d7a4ca09890cef302.webp",983,1310,{"page_no":26,"url":153,"width":154,"height":155},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/ea4965dd03cfc92865c78f9f6ee8e83a.webp",982,1309,{"page_no":30,"url":157,"width":158,"height":159},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/91b78973e5da9a892c4628467eee2c76.webp",981,1308,{"page_no":33,"url":161,"width":162,"height":163},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/21895e5f04cf258eff21b8f2913a281c.webp",980,1306]