PayPal Feeds the DL Beast with Vault of Fraud Data
PayPal is no stranger to fraud. As one of the Internet’s first online payment services, PayPal has been exposed to every type of wire fraud imaginable (and some beyond imagination). Sometimes the fraudsters had the upper hand, but now, thanks to deep learning (DL) models running on high performance computing (HPC) infrastructure, PayPal is leveraging its vast repository of fraud data to keep the fraudsters on the run.
PayPal is one of the classic success stories of the Internet era. Founded during the dot-com heyday of 1998, the company carved out a lucrative niche – facilitating secure payments online — early in the Internet’s development. The company went public in 2002, raising $61 million in an IPO before being bought a month later by eBay.
Spun out by eBay in 2015, PayPal continues to grow its payment rail business at an astounding rate. The San Jose, California company generated more than $15 billion in revenue in 2018, with a profit north of $2 billion, placing it squarely in the middle of the S&P 500 list of the largest companies in the United States.
But running a payment processing system on the Internet is no easy business, and PayPal faces substantial financial and reputational risks from hackers, conmen, organized crime, and money launderers alike. In fact, the company struggled mightily with fraud in its early days, and incurred heavy losses. According to the 2006 book “The PayPal Wars,” PayPal once had fraud losses amounting to 120 basis points (or 1.2 percent of the value of transactions), and lost $2,300 per hour to fraud.
Faced with the prospect of losing its business to the fraudsters, PayPal fought back and invested heavily in big data technology. Its investment in sophisticated fraud detection – including a large contingent of human fraud-fighters — is a major reason why it’s still around despite facing attacks by fraudsters every minute of every day.
Now the company is looking to leverage emerging AI technology, such as deep learning, to keep its fraud levels low.
Journey to AI
In the first decade of PayPal’s existence, the company approached fraud detection much like any other bank would, according to PayPal Vice President of Data Science Hui Wang. That meant using traditional machine learning technologies, such as logistic regressions, she says. This formed the first phase of the company’s journey into AI.
“Starting around 2009 or 2010, we started investing in what we have, this in-house fraud management system,” Wang tells us. The company stepped up its fraud-fighting game by using more advanced technologies, such as neural networks and Gradient Boosted Trees (GBTs), which represented the second phase of the company’s journey.
This system worked well, and the accuracy of its automated fraud-detection system increased by about 50%. Then, about two to three years ago, the company started to look at advanced AI, Wang says, which included technologies and techniques like deep learning, active learning, and transfer learning. This represented the third phase of the AI journey.
The company is now mid-way through that third leg of the journey, and it’s starting to reap the rewards. So far, the advanced AI has delivered an accuracy boost of about 10 to 20 percent over the traditional ML approach to detecting fraud in real time, Wang says.
“Over the last two or three years, we were seeding investment,” says Wang, who is also PayPal’s senior director of global risk sciences. “We are now able to benefit from advanced AI in our real-time fraud detection system.”
Voracious Data Appetite
PayPal has one big advantage over the fraudsters: a huge repository of data. This data repository was important for training classical machine learning models, but it’s absolutely critical for training a deep learning model.
“Over the years we accumulated very, very rich data,” Wang says. “These are really what set us apart in terms of our overall fraud [detection]….We’ve been doing this for a long time so really we have accumulated a lot of data and a lot of intelligence along the way.”
In the second phase of PayPal’s AI journey, Wang and her colleagues might feed somewhere between one million to 10 million data points into the neural network. “I see a clear delta in performance,” Wang says, “but after 20 million [data points], we start to see the performance start to level off…It cannot continue to scale with the amount of data.”
The new deep learning models are voracious consumers of data, which is great, because PayPal has reams of data to feed it.
“With deep learning, we noticed that it scales a lot better,” Wang says. “The more data we throw in we see the performance continue to increase, to improve. At PayPal, we never have a lack of data! We have a lot of data. So we are now able to throw hundreds of millions of data [points] into our training properties and we are seeing a clear delta.”
Deep learning is a voracious consumer of something else: processor capacity. Instead of deploying its new deep learning system on traditional CPUs, the company opted to use Nvidia T4 GPUs. Using GPUs allowed PayPal to lower its server capacity by a factor of 8x compared to deploying on traditional CPUs, PayPal’s CTO Sri Shivananda said in a March blog post.
The performance of the deep learning models tracks closely with the amount of horsepower the company puts behind it, Wang says. “The performance improvement is highly corrected with the computing power,” she says. “We see business performance scale with the amount of computing power.”
Feeding the DL Beast
All things being equal, more data is always better, so having a deep learning system that can work with more data is better. But the deep learning benefits accrue to PayPal in different ways, according to Wang.
For starters, the new deep learning approach lets PayPal vary the types of data that it’s using to predict which users, transactions, or locations are likely to be fraudulent, or associated with fraud.
“Today we are throwing what we call features into the DL monster. But the real value of DL will come if we start to throw in raw events,” Wang says. “You’re talking about maximizing or capitalizing the large amount of data that PayPal has.”
The number of tunable parameters available to PayPal has also increased. With the neural networks and GBTs used in phase two, the company might have a few tens of parameters to tune.
But with deep learning, PayPal’s data scientists have hundreds or even thousands of parameters they can work with. This has a direct impact on the company’s ability to fight fraud, Wang says. “The more parameters we tune, we can get to more granularity of our performance,” she says. “So it’s to be able to maximize or optimize performance.”
Deep learning is also bolstering PayPal’s ability to utilize technology developed in other domains and transfer it to the fraud-detection business, Wang says. That’s something the company did with GBTs and neural networks in its second phase, but it required a lot of human handholding. That is being automated with deep learning, she says.
“In the image recognition area….there are some generic classifiers that everyone uses. You take the generic classifier and you fine tune it for your own purpose,” she says. “Deep learning provides very easy, very natural way for us to learn across different domains, and then do transfer learning. This is really good for PayPal because we have a lot of different domains we can learn and cross train from.”
A Never-Ending (Fraud) Journey
PayPal is in the middle of the third leg of its deep learning and AI journey. But that doesn’t meant the company – which uses a variety of tools and languages, including R, Python, TensorFlow, and H2O – is any closer to the end. In the fraud-fighting business, just as it does in the fraud-perpetrating business, the work continues every day.
“We’re still in the middle of it. The technology is still evolving,” she says. “We’re trying to make sure we can stay ahead of it a little bit to make sure we continue to beef up our fraud detection system so we can protect our good customers and leave the bad guys out.”
By all accounts, PayPal’s fraud-fighting system is world class. While the company refused to discuss specifics, other sourcespeg its losses to fraud at around 32 basis points (0.32%), which would place it in the top quartile for merchants. Considering that the company processed $235 billion in transactions for its customers last year, the $300 million that it spent fighting fraud would seem to be a good investment.
“Protecting customers is our top goal. We want to provide our customers the most convenient, fastest, and safest [transaction],” Wang says. “The cost of a mistake for our AI solution is a lot higher than the cost of a mistake from AI in another domain, like image recognition. So we need to be very careful.”
This article originally appeared in sister publication Datanami.