You are on page 1of 36

CREDIT CARD FRAUD DETECTION USING HIDDEN MARKOV MODEL

BY S.Srilakshmi Ramya, Mtech(CSE), 09M81D5812.

ABSTRACT
Now a day the usage of credit cards has dramatically increased. As credit card becomes the most popular mode of payment for both online as well as regular purchase, cases of fraud associated with it are also rising. In this paper, we model the sequence of operations in credit card transaction processing using a Hidden Markov Model (HMM) and show how it can be used for the detection of frauds. An HMM is initially trained with the normal behavior of a cardholder. If an incoming credit card transaction is not accepted by the trained HMM with sufficiently high probability, it is considered to be fraudulent. At the same time, we try to ensure that genuine transactions are not rejected. We present detailed experimental results to show the effectiveness of our approach and compare it with other techniques available in the literature.

INTRODUCTION
Credit-card-based purchases can be categorized into two types: 1) Physical card and 2) Virtual card. 1) Physical card: In a physical-card based purchase, the cardholder presents his card physically to a merchant for making a payment. To carry out fraudulent transactions in this kind of purchase, an attacker has to steal the credit card.

2) Virtual card:
In the second kind of purchase, only some important information about a card (card number, expiration date, secure code) is required to make the payment. The only way to detect this kind of fraud is to analyze the spending patterns on every card and to figure out any inconsistency with respect to the usual spending patterns.

EXISTING SYSTEM
In case of the existing system the fraud is detected after the fraud is done that is, the fraud is detected after the complaint of the card holder. And so the card holder faced a lot of trouble before the investigation finish.And also as all the transaction is maintained in a log, we need to maintain a huge data. And also now a days lot of online purchase are made so we dont know the person how is using the card online, we just capture the IP address for verification purpose. So there need a help from the cyber crime to investigate the fraud. To avoid the entire above disadvantage we propose the system to detect the fraud in a best and easy way.

PROPOSED SYSTEM
In proposed system, we present a Hidden Markov Model (HMM).Which does not require fraud signatures and yet is able to detect frauds by considering a cardholders spending habit.
The details of items purchased in Individual transactions are usually not known to any Fraud Detection System (FDS) running at the bank that issues credit cards to the cardholders. An FDS runs at a credit card issuing bank. Each incoming transaction is submitted to the FDS for verification. If the FDS confirms the transaction to be of fraud, it raises an alarm, and the issuing bank declines the transaction.

Advantages

1) The detection of the fraud use of the card is found much faster that existingsystem. 2) In case of the existing system even the original card holder is also checked for frauddetection. But in this system no need to check the original user as we maitain a log. 3) The log which is maintained will also be a proof for the bank for the transaction made.

4) We can find the most accurate detection using this technique.

LITERATURE SURVEY

Ghosh and Reilly have proposed credit card fraud detection with a neural network. They have built a detection system, which is trained on a large sample of labeled credit card account transactions. These transactions contain example fraud cases due to lost cards, stolen cards, application fraud Counterfeit fraud, mail-order fraud, and non received issue (NRI) fraud.
Recently, Syeda et al. have used parallel granular neural networks (PGNNs) for improving the speed of data mining and knowledge of discovery process in credit card fraud detection. A complete system has been implemented for this purpose.

ALGORITHM
An HMM Model can be characterized by the following :

1.N is the number of states in the model. We denote the set of states S =[S1; S2; . . . SN], where Si, i =1; 2; . . .;N is an individual state. The state at time instant t is denoted by qt.
2. M is the number of distinct observation symbols per state. The observation symbols correspond to the physical output of the system being modeled. We denote the set of symbols V ={v1; V2; . . . VM}, whereVi, i = 1; 2; . . ;M is an individual symbol. 3.The state transition probability matrixA =[aij], where aij=P(qt+1=Sj|qt=Si), 1<i<N; 1<j< N; t=1; 2; . . . .For the general case where any state j can be reached from any other state i in a single step, we have aij >0 for all i, j. 4. The observation symbol probability matrix B =[bj(k), where bj(k)=P(Vk|Sj), 1<j<N, 1<k<M 5. The observation sequence O = O1;O2;O3; . . .OR, where each observation Ot is one of the symbols from V, and R is the number of observations in the sequence.

SYSTEM ANALYSIS & DESIGN


Use case diagram

New Card

User

Login

Store Info

Verification

Transaction

Module diagram

Start

New Card

Login

Security Information

Transaction

Verification

Stop

System Architecture
User

Login Details

Login

Account Details

Transaction

Verification

Complete n

Security

Project Flow Diagram

User

Account Area

Start Transaction

Verification

User

Security

User

Class diagram

State diagram

Activity diagram

New Account Security

Yes Account

CheckSec No Login.

Purchase.

Pay

Verification

Complete Transaction

Sequence diagram
New Account User Info Login Transaction Verification Security Complete Transaction

Login Info

Transaction Details

Security Info

Verification Details

Collaboration diagram

New Account

1: User Info

Login

Complete Transaction

2: Login Info

5: Verification Details

Transaction

3: Transaction Details

Verification

4: Security Info

Security

IMPLEMENTATION
System Requirements : Hardware Requirements: SYSTEM HARD DISK MONITOR MOUSE RAM Software Requirements: Operating system Front End Coding Language Back-End : : : : Windows XP Professional Asp .Net 2.0. Visual C# .Net SQL Server 2005. : : : : : Pentium IV 2.4 GHz 40 GB 15 VGA colour Logitech. 256 MB

List of Modules

1. New Card
2. Login 3. Security information 4.Transaction 5. Verification

Module Description
1)New card:In this module, the customer gives there information to enrol a new card. The information is all about there contact details. They can create there own login and password for there future use of the card. 2)Login:Login Form module presents site visitors with a form with user name and password fields. If the user enters a valid username/password combination they will be granted access to additional resources on website. Which additional resources they will have access to can be configured separately. 3)Security information:In Security information module it will get the information detail and its stores in database. If the card lost then the Security information module form arise. It has a set of question where the user has to answer the correctly to move to the transaction section.

Continue
4)Transaction:-

The method and apparatus for pre-authorizing transactions includes providing a communications device to a vendor and a credit card owner. The credit card owner initiates a credit card transaction by communicating to a credit card number, and storing therein, a distinguishing piece of information that characterizes a specific transaction to be made by an authorized user of the credit card at a later time.
5)Verification:-

Verification information is provided with respect to a transaction between an initiating party and a verification-seeking party, the verification information being given by a third, verifying party, based on confidential information in the possession of the initiating party.

Software Description
Features of .Net:

Microsoft .NET is a set of Microsoft software technologies for rapidly building and integrating XML Web services, Microsoft Windows-based applications, and Web solutions. The .NET Framework is a language-neutral platform for writing programs that can easily and securely interoperate.
.NET is also the collective name given to various software components built upon the .NET platform. These will be both products (Visual Studio.NET and Windows.NET Server, for instance) and services (like Passport, .NET My Services, and so on).
COMPONENTS OF .NET FRAMEWORK :

1.The Common Language Runtime (CLR).


2.The .NET Framework class library.

1.The Common Language Runtime (CLR):

The CLR is described as the execution engine of .NET.That means it manages code at execution time, providing important services such as memory management,and remoting and also ensures more security and robustness.
FEATURES OF THE COMMON LANGUAGE RUNTIME(CLR): The Common Language Runtime manages memory;thread execution, execution,code safety verification,compilation,and other system Services these are all run on CLR. Security Robostness Productivity Performance

2.The .NET Framework class library:

.NET provides a single-rooted hierarchy of classes, containing over 7000 types. The root of the namespace is called System; this contains basic types like Byte, Double, Boolean, and String, as well as Object.The class library is subdivided into a number of sets (or namespaces), each providing distinct areas of functionality, with dependencies between the namespaces kept to a minimum. XML SUPPORT:
Extensible Markup Language(XML) provides a method for describing structured data.XML is asubset of SGML that is optimized for delivery over the web.The World Wide Web Consortium(w3c) defines XML standards so that structured data will be uniform and independent of applications.Visual Studio .NET fully supports XML,providing the XML designer to make it easier to edit XML and create XML schemas.

Home page

Login page

Transaction page

Admin page

TESTING
The purpose of testing is to discover errors. Testing is the process of trying to discover every conceivable fault or weakness in a work product. It provides a way to check the functionality of components, sub assemblies, assemblies and/or a finished product It is the process of exercising software with the intent of ensuring that the Software system meets its requirements and user expectations and does not fail in an unacceptable manner. There are various types of test. Each test type addresses a specific testing requirement.

Unit testing: Unit testing involves the design of test cases that validate that the internal program logic is functioning properly, and that program inputs produce valid outputs. All decision branches and internal code flow should be validated. It is the testing of individual software units of the application

Integration testing: Integration tests are designed to test integrated software components to determine if they actually run as one program. Testing is event driven and is more concerned with the basic outcome of screens or fields. Functional Testing: Functional tests provide systematic demonstrations that functions tested are available as specified by the business and technical requirements, system documentation, and user manuals. System Testing: System testing ensures that the entire integrated software system meets requirements. It tests a configuration to ensure known and predictable results. An example of system testing is the configuration oriented system integration test.

White Box Testing:

White Box Testing is a testing in which in which the software tester has knowledge of the inner workings, structure and language of the software, or at least its purpose. It is purpose. It is used to test areas that cannot be reached from a black box level.
Black Box Testing: Black Box Testing is testing the software without any knowledge of the inner workings, structure or language of the module being tested. Black box tests, as most other kinds of tests, must be written from a definitive source document, such as specification or requirements document, such as specification or requirements document.

SECURITY
Investing In Security:
According to Symantec, for every second last year, nine new threats were unleashed onto the Web. This is an ongoing issue for those working to provide a secure environment for consumers, merchants and other businesses who operate on the Web. With these new threats constantly undermining the security measures in place, it becomes difficult to maintain a secure environment for credit card processing. Security Doesnt Have To Break The Bank: While it is definitely implied that the better the security provided by the processor the more expensive the fees, this is not a hard and fast rule. The cost effectiveness of higher security depends on where the security is found. Internal security measures are usually more expensive than those that are outsourced, giving e-commerce merchants an affordable option without increasing the chance of security being breached.

CONCLUSION

In this paper, we have proposed an application of HMM in credit card fraud detection. The different steps in credit card transaction processing are represented as the underlying stochastic process of an HMM. We have used the ranges of transaction amount as the observation symbols, whereas the types of item have been considered to be states of the HMM. We have suggested a method for finding the spending profile of cardholders, as well as application of this knowledge in deciding the value of observation symbols and initial estimate of the model parameters. It has also been explained how the HMM can detect whether an incoming transaction is fraudulent or not. Experimental results show the performance and effectiveness of our system and demonstrate the usefulness of learning the spending profile of the cardholders

FUTURE ENHANCEMENTS

The findings obtained here may not be generalized to the global fraud detection problem. As future work, some effective algorithm which can perform well for the classification problem with variable missclassification costs could be developed. In future we can prepare an application with consistent Fraud Detection with new techniques and modules, we can develop a sophisticated modules like calculating Fraud Timings, capturing the photo of the Fraud and many more modules can be developed

Thanq.

You might also like