BACKGROUND: Due to the non-randomized nature of real-world data, prognostic factors need to be balanced, which is often done by propensity scores (PS). This study aimed to investigate whether autoencoders, which are unsupervised deep learning architectures, might be leveraged to compute PS. METHODS: We selected patient-level data of 128,368 first-line treated cancer patients from the Flatiron Health EHR-derived de-identified database. We trained an autoencoder architecture to learn a lower-dimensional patient representation, which we used to compute PS. To compare the performance of an autoencoder-based PS with established methods, we performed a simulation study. We assessed the balancing and adjustment performance using standardized mean differences (SMD), root-mean-square-errors (RMSE), percent bias and confidence interval (CI) coverage. To illustrate the application of the autoencoder-based PS, we emulated the PRONOUNCE trial by applying the trial's protocol elements within an observational database setting, comparing two chemotherapy regimens. RESULTS: All methods but the manual variable selection approach led to well-balanced cohorts with average SMDs <0.1. LASSO yielded on average the lowest deviation of resulting estimates (RMSE 0.0205) followed by the autoencoder approach (RMSE 0.0248). Altering the hyperparameter setup in sensitivity analysis, the autoencoder approach led to similar results as LASSO (RMSE 0.0203 and 0.0205, respectively). In the case study, all methods provided a similar conclusion with point estimates clustered around the null (e.g. HRautoencoder 1.01 [95% CI 0.80-1.27] vs. HRPRONOUNCE 1.07 [0.83-1.36]). INTERPRETATION: Autoencoder-based PS computation was a feasible approach to control for confounding but did not perform better than some established approaches like LASSO.