Developing a smart Face image Fraud Detection System (FFDS) at Airtel

Bhupendra Niranjan
Airtel Digital
Published in
9 min readMay 16, 2022

As one of the market leaders in the Telecom industry, Airtel undergoes million of acquisitions daily in both prepaid and postpaid connections, whether it is SIM cards, DTH connections, or Fiber connections. For the given scale, there is a possibility of fraudulent activity at all tiers of the acquisition, be it customers or retailer agents.

During daily acquisition flows, two major fraudulent cases were widely prevalent which required a permanent fix to the solution.

Postpaid connection Dues: Non-payment of dues by customers for postpaid connections who later opted for a new connection. These customers have to be stopped from engaging in new transactions with Airtel until the payment of the back debt.

Document Forgery: Retailer agents and even customers are involved in document forgery for getting a new connection in certain cases.

The requirement, therefore, was to develop a system tool that could block these fraudulent users from making further transactions with Airtel. This gave rise to the Face image Fraud Detection System (FFDS). The objective was to create a database of fraudulent users and images and provide the capability to verify every new acquisition with these blacklisted user entries.

Abstract:

To bring a 100 % complete stop to the potential loophole of Airtel’s KYC system for retailers who become the multiple sim card owner acting as multiple customers using their documents and for customers who are involved in document forging through which they penetrate the system and become the owner of services (like SIM card) registered on other’s information.

The process starts with the building of a face detection & face recognition system on Airtel’s data which we were using to detect and recognize live face image and compare it with a person’s photo on an authorized document (Aadhar-Card, Driving License, Voting-Card) by Govt of India to use for registration of sim card acquisition.

Face Detection & its Recognition was the first major hurdle because a live photo of a person captured may contain lots of noise that can arise due to unfavourable stimuli like low lighting conditions, poor camera resolution, etc. which introduces difficulty for detection as well as for recognition of live photos. So, we adopted image preprocessing techniques & fine-tuned our deep learning models on this data.

Since we are dealing with Big Data and Vector matching in such a range of millions, we incorporated various DB designs for storing the retailer/customer metadata but also for their face embeddings generated from the live photo. The main challenge here was that the vector embeddings from face recognition cannot be stored in Traditional DB as our requirement was to handle thousands of transaction requests per second and compare with millions of blacklisted customer face vectors which led to another research area of faster indexing search methods.

We experimented with several algorithms & found the perfect match for our face vector indexing and stored them in DB designed solely for faster vector indexing searches which links with Traditional DB for a person’s metadata information retrieval.

Technical walkthrough:

FFDS (Face image Fraud Detection System): This system is built upon 2 major usage of technologies which comprises AI tools incorporated with DB Design methods & tools, which we call in our terminology known as AI Software Engineering.

AI tools this system contains are as follows:

1. Opencv for image preprocessing

2. Face Detection Model

3. Face Recognition Model

DB Design tools here we are using are as follows:

  1. Postgres DB
  2. Milvus

Components of the Fraud Detection system:

As part of the solution, we have used a complete Open-Source solution

1. Image Pre-processing

2. Deep learning Models

3. Database Engines

1. Image Pre-processing:

Since the face images can be of varying resolution and illumination, the input images are pre-processed using Opencv tools to ensure standardization of images for the model.

In the dataset, we got for the development of the model we observed that majority of our image pre-processing was on the photo in documents that are put up by users. The issues that were observed are as follows:

1) Low Resolutions Devices:

● Causing damaging facial edge features.

● Devices used for capturing introduce salt and pepper noise in live images due to which facial detection & recognition can fail in some cases.

2) Unfavourable stimulus:

● Bad lighting conditions present in remote areas due to which face detection & recognition are possible but finding the similarity of images can be hindered.

Techniques Used:

1) Image Normalization: Process that changes the range of pixel intensity values. Applications include photographs with poor contrast due to glare, for example. Normalization is sometimes called contrast stretching or histogram stretching. In more general fields of data processing, such as digital signal processing, it is referred to as dynamic range expansion.

This is useful when you have data from different formats (or datasets) and you want to normalize all of them so you can apply the same algorithms to them. Is usually performed as follows:

This technique was used to normalize images captured in unfavourable stimulus

2) Image Smoothening: Image noise can also originate in film grain and the unavoidable shot noise of an ideal photon detector. Image noise is an undesirable by-product of image capture that obscures the desired information. The original meaning of “noise” was “unwanted signal”; unwanted electrical fluctuations in signals received by AM radios caused audible acoustic noise (“static”).

Mainly to overcome the issue caused due to dust and wear & tear of photos in the document. For image smoothing, we have various kernel level filter techniques but we used Bilateral blurring ( cv2.bilateralFilter )

Thus far, our blurring methods have intended to reduce noise and detail in an image; however, as a side effect, we have tended to lose edges in the image.

To reduce noise while still maintaining edges, we can use bilateral blurring. Bilateral blurring accomplishes this by introducing two Gaussian distributions.

The first Gaussian function only considers spatial neighbours. That are pixels that appear close together in the coordinate space of the image. The second Gaussian then models the pixel intensity of the neighbourhood, ensuring that only pixels with similar intensity are included in the actual computation of the blur.

Intuitively, this makes sense. If pixels in the same (small) neighbourhood have a similar pixel value, then they likely represent the same object. But if two pixels in the same neighbourhood have contrasting values, then we could be examining the edge or boundary of an object — and we would like to preserve this edge.

Overall, this method can preserve the edges of an image, while still reducing noise. The largest downside to this method is that it is considerably slower than its averaging, Gaussian, and median blurring counterparts.

2. Deep Learning based Computer vision models:

1) Face detection:

Face detection is an integral part of any face authentication pipeline flow as it is the stepping stone to creating structured data out of the face image. The user images can be filled with occlusions and background noise and also can have different facial features like changes in hairstyle, etc. with time.

To tackle these, a face detection model was fine-tuned on the customer data chunk for different age, lighting, and gender conditions. This model helped us to localize the face coordinates along with the landmarks.

Face alignment, which is also used in face authentication pipelines, was not considered for our use case since we always dealt with front-facing user images.

2) Face embedding generation:

Face embedding generation was the next part of the face authentication pipeline where the aim was to generate a structured fixed size embedding vector from the detected face region.

Since we had a huge datastore of customer data but only very few images for each individual to be used in training, we had to rely on a One-Shot/Few Shot Learning approaches. We fine-tuned a Deep CNN based on Siamese network ( metric learning using loss like Semi-Hard Triplet Loss) which would generate a fixed size 128-dimensional embedding for any given input image. The training approach ensured that faces similar to each other had embedding vectors close to each other in the 128 dim vector space.

Siamese Network Flow

3. Database engine:

The next part of the pipeline involved choosing an adequate Database not just for storing metadata of entries but also for quick search across the entire set of blacklisted entries. This was divided across two databases:

1) Postgres DB: The Database used to store all metadata and information related to the Customers is currently being stored in Postgres which acts as a lookup database in case of matched entries.

The initial implementation focused on Postgres for searching new images as well. However, searching millions of entries for every new image where the search need not be an exact vector match but the closest vector match was a lengthy and inaccurate process. Hence, we moved to ANN (Approximate Nearest Neighbor) algorithms which would return the closest match for a given input vector in seconds.

We experimented with multiple frameworks like Annoy, Milvus, and HNSW and decided to rely on Milvus for its

1. Tunable parameters to control speed vs accuracy.

2. Highly flexible and reliable architecture.

2) Milvus: The Vector-based database used to store and index the structured data (face embeddings) of fraudulent users is Milvus and is the hero of the entire software tool. It helps to determine similar images based on a similarity metric and a preset distance threshold.

It provides support for multiple indexing techniques based on tree, graph, or hash methods. Based on experiments and consideration for space, we have chosen the IVF_FLAT index.

IVF_FLAT: is a quantization-based index and is best suited for scenarios that seek an ideal balance between accuracy and query speed.

Based on experimentation and testing on live labeled data, L2 normalized Euclidean distance (L2) is being currently used as a similarity metric to compare the face embeddings with the distance threshold also being set post-analysis on the labeled data.

The distance threshold is chosen in a way such that the False Positives and False Negatives are at a minimum. A Decision Tree model with depth 1 can help us determine the threshold at which the entropy is minimum.

Process Flow:

Business Pipeline:

1. Process Flow for blacklisting users

This flow can only be accessed within the internal workgroup by the registered personnel who constantly track and monitor customer & retailer activity (via other automated defrauding tools) and report fraudulent users. They are provided with the capability to do blacklisting & whitelisting on the go.

2. Process Flow for searching blacklisted users

This flow is integrated with the customer acquisition journey. Every customer and retailer are verified by the application flow by capturing his/her user image before providing access to the service demanded. This prevents fraudulent customers and retailers from making further transactions with Airtel. This service helps to identify those users and block them from carrying out any transactions.

Architectural Considerations:

The entire application is hosted on multiple servers to be able to handle millions of search/verify requests daily

1. Reliability:

a. Master-slave architecture:

Since we need high availability for our infra setup, the current implementation for Milvus involves using a master-slave architecture for Milvus servers using a shared data node. On failure of service on the master server, the configuration ensures the traffic is sent to the backup slave server.

b. Bi-directional data replication.

A common data node ensures the prevention of inconsistency in data between the master and slave server.

2. Scalability:

Currently, the deployed Milvus standalone server alone can handle millions of data entries. On benchmarks, the currently deployed system for a DB size of 1 million can search approximate nearest neighbors for a given input vector in less than 0.5s which very well serves our purpose since we handle millions of acquisitions every day.

Business impact:

● With the FFDS feature, we started in Feb-2021 with 11k forged activations getting detected which has been reduced to 2.5k in March-2022; thereby reducing more than 77% forgery in the system.

● Further, With the Blacklisting feature, we have been able to prevent 6.7k new fraudulent activations from blacklisted users with prospective BD savings of Rs.7.21 Mn in the last 7 months.

--

--

Bhupendra Niranjan
Airtel Digital
0 Followers
Writer for

Engineering Manager at Airtel Xlab