ObjectiveWe introduce Phe2vec, an automated framework for disease phenotyping from electronic health records (EHRs) based on unsupervised learning. We assess its effectiveness against standard rule-based algorithms from the Phenotype KnowledgeBase (PheKB).Materials and MethodsPhe2vec is based on pre-computing embeddings of medical concepts and patients’ longitudinal clinical history. Disease phenotypes are then derived from a seed concept and its neighbors in the embedding space. Patients are similarly linked to a disease if their embedded representation is close to the phenotype. We evaluated Phe2vec using 49,234 medical concepts from structured EHRs and clinical notes from 1,908,741 patients in the Mount Sinai Health System. We assessed performance on ten diverse diseases having a PheKB algorithm, and one disease without, namely Lyme disease.ResultsPhe2vec phenotypes derived using Word2vec, GloVe, and Fasttext embeddings led to promising performance in disease definition and patient cohort identification as compared with standard PheKB definitions. When comparing head-to-head Phe2vec and PheKB disease patient cohorts using chart review, Phe2vec performed on par or better in nine out of ten diseases in terms of predictive positive values. Additionally, Phe2vec effectively identified phenotype definition and patient cohort for Lyme disease, a condition not covered in PheKB.DiscussionPhe2vec offers a solution to improve time-consuming phenotyping pipelines. Differently from other automated approaches in the literature, it is fully unsupervised, can easily scale to any disease and was validated against widely adopted expert-based standards.ConclusionPhe2vec aims to optimize clinical informatics research by augmenting current frameworks to characterize patients by condition and derive reliable disease cohorts.