Detecting Health Insurance Fraud: Reducing Costs for Both the Insurers and the Insured

Van Vu
Sara Kien
, and
Posted on Mar 24, 2021

Github repo

The Problem: Overwhelming Costs of Healthcare Fraud

According to the Institute of Medicine, health insurance fraud is among the top 5 “Sources of Waste” in American Health Care spending (Shrank et al., 2019). A study published in the International Journal of Academic Medicine showed that the cost of litigation and risk management is a significant expenditure associated with Health Care Fraud, often exceeding the direct costs of fraudulent claims (Dippolito et al., 2016). The high cost of litigation can deter health insurance companies from suing potentially fraudulent providers, especially because the direct cost of fraudulent claims can be transferred to the insured in the form of higher premiums. Many insurers would be more confident about pursuing litigation if they could be assured that the case is truly fraudulent, leading to overall net savings rather than losses. Net savings would benefit both the insurer and the insured as they would, ultimately, enable insurers to set health care premiums that are more competitive in the marketplace.

A Solution: Conservative Approaches to Medical Claim Fraud Detection

The purpose of the present analysis is to develop a conservative approach to detection of health care fraud for private insurers that supports prevention and litigation efforts by maximizing “true positives” (i.e., correctly classifying fraudulent activity as fraudulent) and minimizing “false positives” (i.e., incorrectly classifying non-fraudulent activity as fraudulent), thereby minimizing unnecessary costs associated with erroneous litigation.

About the Data

The data consisted of four separate datasets below. To get the full details of each provider, these datasets were combined into one.

  • Inpatient records: over 40k records, including doctor IDs, provider IDs (clinic/hospital IDs), patient IDs, diagnosis codes, operation code, reimbursement information, etc.
  • Outpatient records: over 500k records with similar features to inpatient records.
  • Beneficiary records: over 130k patients with their pre-existing chronic conditions.
  • Providers with fraudulent flags: about 9% of all providers were flagged with possible fraud.

Considering fraud was present in only 9% of all providers in the given dataset, a skewness towards non-fraudulent providers influenced model and metric selection to avoid errors caused by imbalance classification. To mitigate the effects of imbalance classification, we used a variety of methods: adjusting the class weights for select models, stratifying the data during train test split, and evaluating other metrics beyond just ROC AUC.

As can be seen in the figures below, there is a substantially higher number of outpatient claims than inpatient claims (i.e., hospitalizations) in the data set. However, a higher proportion of inpatient claims is associated with potentially fraudulent providers, compared to outpatient claims.

Furthermore, it is clear that the claims associated with potentially fraudulent providers are costly to both insurers and patients, with higher average claim reimbursements and higher average deductibles. The box-plot figure shows that the vast majority of claims associated with non-fraudulent providers cost insurers approximately $1000 to $2000 per claim, whereas a higher proportion of claims associated with potentially fraudulent providers costs upward of $4000 to $5000 per claim.

Unsupervised Machine Learning

Several unsupervised machine learning techniques were tested to identify potential features that can add value in predicting provider fraud, including association rule mining, LDA, and social network analysis. 

Association Rule Mining

Association rule mining was applied to claim diagnosis codes, physicians, and chronic conditions. Among the claim diagnosis codes and physician, only values that made up more than 1% and 0.2% of all values, respectively, were used. With a low minimum support, no insightful features were found. However, with a slightly higher minimum support among chronic conditions, an association between heart failure and ischemic heart was discovered. Since this association is intuitive, no new features were created based on association rule mining.

Latent Dirichlet Allocation

Likewise, latent Dirichlet allocation (LDA) confirmed the results from association rule mining. Applying LDA to the chronic conditions, diagnosis codes and procedure codes, revealed that there were no differences in allocation between two topics, fraudulent and non-fraudulent. 

Social Network Analyses

Social Network Analyses revealed that the number of patients and the number of attending physicians associated with each provider is higher for potentially fraudulent providers than for non-fraudulent providers. In the figures below, each node represents either a provider, a patient, or an attending physician. Each line or “edge” represents a connection, either from patient to provider (Figure 1), or from physician to provider (Figure 2). The larger the node, the greater the number of connections to that node.

The first figure depicts connections between patients and providers. There are larger nodes among the potentially fraudulent providers, showing that fraudulent providers are highly centralized. In other words, there is a large number of patients connected to a small number of providers (average number of patients per provider = 798). In contrast, among the non-fraudulent providers, providers are less centralized, with fewer patients distributed across a larger number of providers (average number of patients per provider = 191).

Figure 1: Patients per Provider: Number of patients associated with each provider is higher for potentially fraudulent providers 

The second figure depicts connections between attending physicians and providers (see below). The nature of the differences between fraudulent vs. non-fraudulent providers is similar when compared to the first figure, although the patterns are less obvious. Specifically, there is a larger number of physicians connected to each fraudulent provider (average number of physicians per provider = 59) than to each non-fraudulent provider (average number of physicians per provider = 30).

Figure 2: Physicians per provider: Number of physicians associated with each provider is higher for potentially fraudulent providers 

Feature Engineering

One notable feature that was engineered to potentially identify fraudulent providers (depicted in red below) involves submitting substantially more duplicate claims than non-fraudulent providers (depicted in blue).  This suggests that duplicate claims might be a relevant factor for detecting fraud. In this data set, duplicate claims were identified via patterns of diagnosis and claim codes.

In summary, the table below includes the new features that were added to the models. As a result of these new features, several features from the original dataset were dropped, including those with large missing values. The final dataset was grouped by provider.

Supervised Machine Learning

Model Selection

To identify cost-sensitive algorithms that will maximize true positives, metric scores of linear, nonlinear, and ensemble models were compared using k-fold cross validation. Macro scores were initially evaluated to take the average calculation of each class and to remove the influence of imbalance classes. The F1 macro scores among all models were slightly similar, at around 0.75. However, without compromising recall macro scores, the models that were ultimately chosen for further hyperparameter tuning via GridSearch include Logistic Regression (linear), Random Forest (ensemble), and Gradient Boosting (ensemble). A voting ensemble using these three models was evaluated further to determine if the model would improve. 

Determining the Best Metrics

Due to the imbalanced classification nature of our data, with the positive class being more important and false positives more costly, we rely on F0.5 and precision as our performance metrics

Model Comparisons

Since our goal is to optimize precision and F0.5, logistic regression gave us the best overall scores and the next best model is voting ensemble. Although gradient boosting gave us the highest precision score, other metrics suffered, as indicated by the lowest F0.5 score and a F1 score of less than 0.5.

Cost Matrix Assumptions

To approximate the cost of False Positive (FP), the potential cost of litigation, we used a survey conducted by The U.S. Chamber Institute for Legal Reform, Litigation Cost Survey of Major Companies, which included some health insurance companies. The survey revealed that the average cost of legal fees per case completed in court can cost a minimum of $350k and an average of $2 mil. And a separate discovery fee that can cost a minimum of $100k. Discovery is the pre-trial phase in a lawsuit in which each party investigates the facts of a case through the rules of civil procedure by obtaining evidence from the opposing party. Cases tend to settle during the discovery period. We assumed the cost of each FP to be $100k as a conservative estimate. As you recall, the average insurance reimbursement of a fraudulent claim is $3800, so at minimum, a False Negative (FN) is a loss of $3800 per claim. Conversely,  a True Positive (TP) that correctly identifies a fraudulent case represents a cost saving of $3800 per claim. 

Cost Matrix: Logistic Regression

Savings of $40,052,000 in fraudulent claims

Because the cost of FP or litigation is so high, it appears that it would not be worth it to sue. However, $3800 is the cost for one claim. We found that the median number of claims made by a provider flagged as potential fraudulent was 155, and the average was 420. When that many claims are involved, litigation may indeed be worthwhile. With the assumption that each fraudulent provider made 155 claims, our logistic regression model would ensure the insurer a savings of $40,520,000 for correctly identifying 68 TP with a precision of 83%.

Feature Importance

The “heat map” table below shows the feature importance results for each model. Darker blue colors represent more important features in each respective model (gradient boosting, random forest, and logistic regression).

Based on the logistic regression model, which maximized the probability of detecting a truly fraudulent provider, the following features are important for predicting fraud:

  • The number of claims, the number of duplicate claims, and the number of patients connected to providers
  • The number of procedure and diagnosis codes associated with a claim 
  • Diagnosis codes 25000, 42731, and 2724, as well as procedure code 4019, are particularly important
  • Inpatient claims are more strongly associated with fraudulent providers than outpatient claims
  • There are some states that are more strongly associated with fraud than others


Using an algorithm that includes social network analysis, engineering of new features such as duplicate claims, and a logistic regression model for classification, insurance companies can be confident that approximately 83% of the cases they pursue in court will result in “True Fraud” outcomes. 

By applying the cost matrix analysis above, we can see that this algorithm will save private insurers tens of millions of dollars. These savings will ultimately benefit the insured and will enable private insurers to remain competitive in the marketplace.

Future Directions

To estimate the cost of FP or cost litigation, we made some assumptions according to the Litigation Cost Survey of Major Companies. To determine the costs of FP more accurately, we need to obtain additional information regarding litigation expenses to better estimate the cost matrix. With more time, we would like to develop an interactive dashboard in which users can input claim and provider information and obtain a prediction regarding potential fraud.



Allen, Marshall. “We Asked Prosecutors if Health Insurance Companies Care About Fraud. They Laughed At Us.” ProPublica, 10 September 2019,, accessed 15, February 2021

Brownlee, Jason. “Tour of Evaluation Metrics for Imbalanced Classification.” Machine Learning Mastery, 8 January, 2020,, accessed 21, February, 2021

Dippolito, A., Braslow, B. M., Lombardo, G., & Hoddinott, K. M. (2016). History of physicians fighting frivolous lawsuits: An overview. International Journal of Academic Medicine. 

Shrank, W. H., Rogstad, T. L., & Parekh, N. (2019). Waste in the US health care system: Estimated costs and potential for savings. JAMA Network. 

Lawyers for Civil Justice, Civil Justice Reform Group, U.S. Chamber Institute for Legal Reform (2010). Litigation Cost Survey of Major Companies., accessed 26, February 2021.

About Authors

Van Vu

Van Vu

Data science fellow with a background in clinical pharmacy. Demonstrated commitment in reducing hospital readmissions and improving patient health outcomes. Showcases expertise with over ten years of experience in healthcare. Eager to combine clinical expertise and data science...
View all posts by Van Vu >

Kristin Teves

Kristin has a Masters in Business Administration with a concentration in Business Analytics from California State University, Fullerton and a Bachelor's in Biological Science from University of California, Irvine. She is excited to combine previous business domain knowledge...
View all posts by Kristin Teves >
Sara Kien

Sara Kien

As a social science researcher with a PhD in cognitive psychology, Sara has been applying data science skills (including hypothesis testing, statistics, machine learning, and natural language processing) to program evaluation and behavioral science in ways that enhance...
View all posts by Sara Kien >

Related Articles

Leave a Comment

No comments found.

View Posts by Categories

Our Recent Popular Posts

View Posts by Tags

#python #trainwithnycdsa 2019 airbnb Alex Baransky alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus API Application artist aws beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Best Data Science Bootcamp 2020 Best Ranked Big Data Book Launch Book-Signing bootcamp Bootcamp Alumni Bootcamp Prep Bundles California Cancer Research capstone Career Career Day citibike clustering Coding Course Demo Course Report D3.js data Data Analyst data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization Deep Learning Demo Day Discount dplyr employer networking feature engineering Finance Financial Data Science Flask gbm Get Hired ggplot2 googleVis Hadoop higgs boson Hiring hiring partner events Hiring Partners Industry Experts Instructor Blog Instructor Interview Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter lasso regression Lead Data Scienctist Lead Data Scientist leaflet linear regression Logistic Regression machine learning Maps matplotlib Medical Research Meet the team meetup Networking neural network Neural networks New Courses nlp NYC NYC Data Science nyc data science academy NYC Open Data NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time Portfolio Development prediction Prework Programming PwC python python machine learning python scrapy python web scraping python webscraping Python Workshop R R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest Ranking recommendation recommendation system regression Remote remote data science bootcamp Scrapy scrapy visualization seaborn Selenium sentiment analysis Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau team TensorFlow Testimonial tf-idf Top Data Science Bootcamp twitter visualization web scraping Weekend Course What to expect word cloud word2vec XGBoost yelp