AI-Powered-Customer-Churn-Predictor
Table of contents
AI-Powered Customer Churn Prediction
Author: [Nick Bwalley]
Date: March 22, 2025
Abstract
This project implements an Artificial Neural Network (ANN) for predicting customer churn in the banking sector. Using a comprehensive dataset containing customer demographics and banking behavior, we develop a neural network-based classification model that identifies customers at risk of leaving. The model achieves 88% accuracy, providing financial institutions with an effective tool for proactive customer retention strategies.
Introduction
Customer churn, the phenomenon where customers cease their relationship with a company, represents a significant challenge in the banking industry. Acquiring new customers typically costs 5-25 times more than retaining existing ones, making churn prediction and prevention crucial for sustainable business growth. This project leverages the power of Artificial Neural Networks to identify patterns in customer data that indicate likelihood of attrition, enabling targeted intervention strategies.
Dataset
The dataset used in this study contains various customer attributes including:
- Demographic information (Geography, Gender, Age)
- Financial indicators (Balance, CreditScore, EstimatedSalary)
- Relationship metrics (Tenure, NumberOfProducts)
- Engagement metrics (HasCreditCard, IsActiveMember)
The target variable is a binary indicator of whether a customer churned (1) or remained (0) with the bank.
Methodology
Data Preprocessing
Our preprocessing pipeline included several key steps to prepare the data for neural network training:
-
Feature Selection
- Dropped personal identifiers like CustomerID and Surname that don't contribute meaningful predictive value
- Retained all behavioral and demographic features relevant to churn prediction
-
Categorical Encoding
- Implemented LabelEncoder to convert Gender to binary values (0 for female, 1 for male)
- Applied One-Hot Encoding to the Geography column to transform categorical location data into vector format
-
Data Normalization
- Standardized numerical features to ensure consistent scale across all input dimensions
- Split the dataset into training and validation sets to monitor model performance during training
Model Architecture
We implemented a feed-forward neural network with the following architecture:
- Input layer: Matching the number of features after preprocessing
- Hidden layer 1: 64 neurons with ReLU activation
- Hidden layer 2: 32 neurons with ReLU activation
- Dropout layers (30%) after each hidden layer to prevent overfitting
- Output layer: 1 neuron with sigmoid activation for binary classification
Training Process
- Optimizer: Adam with learning rate of 0.01
- Loss function: Binary cross-entropy
- Epochs: 100 with early stopping
- Early stopping monitored validation loss to prevent overfitting by halting training when performance on validation data stopped improving
- This technique helped determine the optimal number of training iterations without manual intervention
- Batch size: 32
Results
The final model achieved:
- Accuracy: 88%
- Validation loss: 0.34%
Analysis of feature importance revealed that Balance, Age, and IsActiveMember were the strongest predictors of customer churn.
Discussion
Our ANN model significantly outperformed traditional machine learning approaches in predicting customer churn. The neural network's ability to capture complex non-linear relationships between features proved particularly valuable in identifying subtle patterns of pre-churn behavior.
The model identified several customer segments with high churn probability:
- Inactive customers with high balances
- Younger customers (25-35 age group) with low product engagement
- Customers with declining transaction frequencies across multiple quarters
Business Applications
The deployment of this model enables:
- Proactive identification of at-risk customers before they show explicit signs of leaving
- Personalized retention strategies based on specific churn risk factors
- Optimization of customer service resources by focusing on high-value, high-risk customers
- Ongoing monitoring of churn risk indicators across the customer base
Sample Outputs
1. Customer Not Likely to Churn
2. Customer Likely to Churn
Conclusion
The AI-Powered Customer Churn Predictor provides a powerful tool for financial institutions seeking to reduce attrition rates. While the current model achieves impressive 88% accuracy with a validation loss of only 0.34%, there is still room for improvement. Future work will focus on experimenting with different neural network architectures, incorporating additional features, and fine-tuning hyperparameters to further enhance prediction accuracy.