Skip to main content
CUSTOMER STORY

Enabling natural language translation at scale

Millions

Of web pages translated from 35 languages per day

200x

Increase in speed at lower cost

80%+

Compute utilization

PLATFORM USE CASE: Data science,machine learning
CLOUD: AWS

As the largest independent demand-side platform (DSP), The Trade Desk uses data to help digital advertisers optimize global campaign spend and target relevant audiences, wherever they might be in the world. When The Trade Desk’s contextual targeting team realized that non-English web pages were not being included as part of The Trade Desk platform’s offering, they partnered with Databricks to build a natural language processing (NLP) model on the Databricks Data Intelligence Platform. The model translates web pages into English, making it easier to tag them appropriately and determine ad pricing based on their value. As a result of the collaboration, The Trade Desk now processes more than 100 million web pages per day, half of them in languages other than English, thereby increasing the reach of their clients, boosting their competitive advantage and paving the way for future NLP projects.

NLP enables global advertising with local relevance

Thanks to the internet, businesses of all sizes have the opportunity to market their products and services to a global audience. But sifting through millions of web pages in dozens of languages to reach the right audience at the right time would be an impossible task for any business.

That’s where DSPs come in. DSPs automate the ad buying process by enabling advertisers to reach consumers by serving them advertising on digital channels, including publisher websites. They use contextual tags to match ads with relevant web pages and set pricing based on the market value of each impression via ad exchanges. With DSPs, advertisers can target specific audience segments, bid on ads in real time, and optimize ad performance based on KPIs like cost per click, making the ad buying process faster, cheaper, and more efficient.

As the world’s largest independent DSP, The Trade Desk is committed to optimizing their platform to deliver greater value to clients. When the contextual targeting team realized that half the web pages they analyzed each day were non-English — and therefore needed to be properly analyzed, tagged and priced — they saw an opportunity to add over 5 billion potential customer touch points.

The Trade Desk set out to build an NLP model that would translate non-English websites into English and apply tags based on the content and context of the website. This information would then be automatically fed into the pricing pipeline where the tags are evaluated using a proprietary algorithm to determine the value of the web pages. By combining all English and non-English websites into one pipeline, The Trade Desk could deliver more relevant tagging, more accurate pricing and better results magnitudes faster than original methods.

From proof of concept to production in weeks

The plan called for supporting 35 languages, which at other companies might mean 35 teams building 35 models. Instead, the team decided to focus on building a single smart NLP model that could effectively analyze all 35 languages and deliver unified results as part of a single workflow.

While there are open source solutions for NLP, the team knew those models wouldn’t be able to handle the massive volumes of data The Trade Desk needs to process every day — more than 100 million web pages and more than 1 trillion ad impressions. Instead, The Trade Desk turned to Databricks to help develop a proof of concept built on the Databricks Data Intelligence Platform. “We’ve worked with Databricks for years, and we’ve always loved the flexibility of their platform for experimentation,” said Xuefu Wang, Senior Data Scientist at The Trade Desk. “Our original plan was to use Databricks to run a proof of concept, taking advantage of the amazing optimization they do to speed up computation. But as our two teams continued to collaborate, we discovered Databricks Workflows, which made it easy to move from development to production in weeks. We gave it a try, and we’ve been using it ever since.”

An innovative, highly scalable model built on collaboration

The Trade Desk’s NLP model is the result of a highly iterative and collaborative process between several teams. “We started with a single node instance, and from there we figured out how to distribute it on a Spark-based platform using partner technologies. That’s where we began to find bottlenecks throughout the pipeline — our partner systems were optimized for CPUs, and we knew we needed to use GPUs to run the model at speed and scale,” explained Farshad Hashmatulla, Manager of Technology Communications, The Trade Desk. “We retooled the model, made some small customizations and tuned it to be more performant. Within a month, we scaled from translating only two languages up to 35.”

Databricks’ user-friendly notebooks UI enabled cross-team collaboration within The Trade Desk. “Databricks’ shared environment fast-tracked knowledge sharing of neural network optimization on one instance between our own AI lab and our visionary contextual team. The collaborative notebook environment made it simple to share and reproduce results between our teams in London and New York,” added Christopher Hawkes, Data Scientist at The Trade Desk’s AI lab. From that point on, it was just a matter of increasing the number of compute instances to support anticipated volumes, which on Databricks simply means increasing the number of nodes. This design also makes it easy to scale up to support both more languages and greater volumes in the future.

“With Databricks, we were able to scale up production levels quickly to support an entire day’s worth of web pages, with 80 to 90% compute utilization on every extra node we spun up,” Wang added. “Thanks to our partnership, we built an NLP model on the Databricks Data Intelligence Platform that enabled our platform to be more efficient.”

Speed and scale lead to competitive advantage

Currently, The Trade Desk’s platform translates tens of millions of non-English web pages and processes one trillion ad impressions per day, or 13 million per second. That’s 200 times faster than the original pipeline at a fraction of the cost. “Now we’re able to easily satisfy our SLA of processing all web pages in 24 hours,” noted Wang.

The speed and scale of the new NLP model also gives The Trade Desk increased global scale in a fast-growing market. “We’re seeing international advertisers come to us with unique marketing questions. They want to know whether we can support their campaign locally,” Wang explained. “Because we have this multilingual pipeline already in place, we can tell our clients we can support them in their local language.” 

Having an end-to-end pipeline in-house allows The Trade Desk to tweak and tool their model to meet the needs of customers with better performance than third-party platforms. “It helps us position The Trade Desk as a leader in the DSP industry,” added Wang. To this point, Hawkes also noted, “the Databricks platform surprised me on the amount of low-level customizability available. We, of course, took full advantage of this and tuned our Spark tasks fractional GPU resources to achieve stunning performance.”

The power of partnership

The success of the Databricks–Trade Desk NLP project has paved the way for the two companies to work together in the future. “This project opened the door for other teams at The Trade Desk to collaborate with Databricks on NLP projects,” Wang concluded. “I’d say that speaks to the power of our collaboration. Databricks has been an amazing partner.”