With the advancements of next-generation sequencing, publicly available pharmacogenomic datasets from cancer cell lines provide a handle for developing predictive models of drug responses and identifying associated biomarkers. However, many currently available predictive models are often just used as black boxes, lacking meaningful biological interpretations. In this study, we made use of open-source drug response data from cancer cell lines, in conjunction with KEGG pathway information, to develop sparse neural networks, K-net, enabling the prediction of drug response in EGFR signaling pathways and the identification of key biomarkers. To explore the rationality of identified biomarkers, we analyzed distribution patterns between drug-resistant and sensitive cell lines and performed simulated perturbation analysis on drug response. We compared K-net with commonly used interpretable algorithms in biomarker identification, such as lasso logistic regression and random forest classifiers. Our results suggested that K-net outperformed other algorithms in identifying key biomarkers linked to osimertinib response, such as KRAS and TP53 mutations, as well as AKT3 overexpression, accurately revealing their associations with osimertinib resistance. Moreover, K-net revealed subtype-specific top biomarkers for osimertinib resistance, with lung adenocarcinoma (LUAD) showing a predisposition to KRAS mutations and small cell lung cancer (SCLC) exhibiting AKT3 overexpression. Our study revealed that K-net was able to precisely identify critical biomarkers linked to drug responses, highlighting the potential to facilitate optimization of cancer treatment strategies.