Speeding training of decision trees

New method reduces training time by up to 99%, with no loss in accuracy.

Gradient-boosted decision trees are a machine learning model commonly used in large-scale, online search applications because they combine high accuracy with high efficiency.

Maintaining that efficiency, however, means limiting the number of data features that gradient-boosted trees consider in making a decision. If the training data for a decision tree model has many possible features to choose from — say, thousands — and the model will end up using only a fraction of them — say, a couple hundred — then training can become inefficient, as most of the features the model evaluates will prove irrelevant.

In a paper accepted to the International Conference on Artificial Intelligence and Statistics, which was to be held last week but has been postponed until September, we present a new method for training gradient-boosted trees that is much more efficient than its most efficient predecessor in cases where the total feature set is larger than the necessary-feature set.

In tests, we compared our approach to three other implementations of gradient-boosted decision trees, using three popular benchmark data sets. Relative to the most efficient of its predecessors — a technique called gradient-boosted feature selection — our method reduced training time by 50% to 99%, while preserving the accuracy of the resulting models.

We also found that our approach is particularly well suited to multitask training, in which the machine learning model is trained to perform several tasks at once — identifying images of dogs, cats, and horses, for instance, instead of just one of the three.

In experiments, when our system was trained on three tasks simultaneously, it performed better on each of those tasks than when it was trained on a single task. We also compared it to the standard method of doing multitask training with gradient-boosted trees and found that it improved performance on all three tasks.

A decision tree is a binary tree — something like a flow chart — that presents a series of binary decisions. With each decision, the tree branches into two paths. Ultimately, every path through the tree reaches a terminal point known as a leaf. Each leaf has an associated number that represents its vote on some classification task: yes, I think this is a dog; no, I don’t think this song is a good match for the query.

DecisionTree-01.png
An example of a machine learning model that uses gradient-boosted decision trees. During training, the model builds trees in sequence; each new tree minimizes the residual error of the trees that preceded it. The output of each tree is its vote on a classification question, and the aggregated output of all the trees determines the final outcome.
Credit: Stacy Reilly

A model that uses gradient-boosted decision trees consists of multiple trees — possibly hundreds. During training, the model builds the trees in sequence. Each new tree is designed to minimize the residual error of the trees that preceded it: that’s the gradient boosting. The output of the model as a whole is the aggregate output of all the trees.

At each new decision point for each tree, the model has to select a decision criterion that will minimize the error rate of the model as a whole. That means evaluating every possible feature of the training data — in the case of a music track, artist, title, genre, date of release, bit rate, track number, and so on.

For each of those features, the model must find the best split point, the threshold value that determines whether the path branches left or right. If the data has 1,000 features, but only 100 of them will ultimately prove useful as decision criteria, most of that work is wasted.

Collective action

We address this problem by adapting the common binary-search algorithm. Before training, we normalize the values for each feature, so that they all fall within the range of 0 to 1. Then we randomly divide the features into two groups, creating two pseudo-features, whose values are simply the sums of the normalized values for the individual features. We repeat this process several times, producing several pairs of pseudo-features that evenly divide the feature set.

During training, at each decision point, we evaluate the tree using one pair of pseudo-features, selecting a split point for each in the ordinary fashion. We then take the pseudo-feature that leads to better prediction, randomly divide it into two new pseudo-features, and again test split points.

We repeat this process until we’ve converged on a single feature to serve as the criterion for that decision point. Rather than evaluate every feature, we evaluate a number of pseudo-features equal to the logarithm of the number of features.

This approach is only an approximation, but in the paper, we present a theoretical analysis showing that, given enough training data, the approximation should still converge on an optimal set of decision trees.

We also tested our approach empirically, on three standard benchmarks for machine learning research. One is a data set of handwritten numbers, and the goal is to identify the numbers; another is a data set of flight information, and the goal is to predict delays; and the third is an image recognition task. We compared our system’s performance to that of three other standard implementations of gradient-boosted trees.

In all cases, our system’s performance was within a fraction of a percentage point of the best-performing baseline’s — either ahead or behind — but its training time was much lower. The differences in training time varied depending on the systems’ target accuracy rate, but for the flight data set, the training time acceleration was consistently around twofold; for the handwriting recognition task, it was consistently around 10-fold; and for the image recognition task, it was consistently around 100-fold.

Related content

US, WA, Seattle
The Sponsored Products and Brands team at Amazon Ads is re-imagining the advertising landscape through novel generative AI technologies, revolutionizing how millions of customers discover products and engage with brands across Amazon.com and beyond. We are at the forefront of re-inventing advertising experiences, bridging human creativity with artificial intelligence to transform every aspect of the advertising lifecycle from ad creation and optimization to performance analysis and customer insights. We are a passionate group of innovators dedicated to developing responsible and intelligent AI technologies that balance the needs of advertisers, enhance the shopping experience, and strengthen the marketplace ecosystem. If you're energized by solving complex challenges and pushing the boundaries of what's possible with AI, join us in shaping the future of advertising. Key job responsibilities As an applied scientist on our team, you will * Develop AI solutions for Sponsored Brands advertiser and shopper experiences. Build recommendation systems that leverage generative models to develop and improve campaigns. * You invent and design new solutions for scientifically-complex problem areas and/or opportunities in new business initiatives. * You drive or heavily influence the design of scientifically-complex software solutions or systems, for which you personally write significant parts of the critical scientific novelty. You take ownership of these components, providing a system-wide view and design guidance. These systems or solutions can be brand new or evolve from existing ones. * Define a long-term science vision and roadmap for our Sponsored Brands advertising business, driven from our customers' needs, translating that direction into specific plans for applied scientists and engineering teams. This role combines science leadership, organizational ability, technical strength, product focus, and business understanding. * Work closely with engineers and product managers to design, implement and launch AI solutions end-to-end; * Design and conduct A/B experiments to evaluate proposed solutions based on in-depth data analyses; * Think big about the arc of development of Gen AI over a multi-year horizon, and identify new opportunities to apply these technologies to solve real-world problems * Effectively communicate technical and non-technical ideas with teammates and stakeholders; * Translate complex scientific challenges into clear and impactful solutions for business stakeholders. * Mentor and guide junior scientists, fostering a collaborative and high-performing team culture. * Stay up-to-date with advancements and the latest modeling techniques in the field About the team The Sponsored Brands Impressions-based Offerings team is responsible for evolving the value proposition of Sponsored Brands to drive brand advertising in retail media at scale, helping brands get discovered, acquire new customers and sustainably grow customer lifetime value. We build end-to-end solutions that enable brands to drive discovery, visibility and share of voice. This includes building advertiser controls, shopper experiences, monetization strategies and optimization features. We succeed when (1) shoppers discover, engage and build affinity with brands and (2) brands can grow their business at scale with our advertising products. #GenAI
US, CA, San Diego
The Private Brands team is looking for a Sr. Research Scientist to join the team in building science solutions at scale. Our team applies Optimization, Machine Learning, Statistics, Causal Inference, and Econometrics/Economics to derive actionable insights about the complex economy of Amazon’s retail business and develop Statistical Models and Algorithms to drive strategic business decisions and improve operations. We are an interdisciplinary team of Scientists, Engineers, PMTs and Economists. Key job responsibilities You will work with business leaders, scientists, and economists to translate business and functional requirements into concrete deliverables, including the design, development, testing, and deployment of highly scalable optimization solutions and ML models. This is a unique, high visibility opportunity for someone who wants to have business impact, dive deep into large-scale problems, enable measurable actions on the consumer economy, and work closely with scientists and economists. As a Sr Scientist, you bring business and industry context to science and technology decisions. You set the standard for scientific excellence and make decisions that affect the way we build and integrate algorithms. Your solutions are exemplary in terms of algorithm design, clarity, model structure, efficiency, and extensibility. You tackle intrinsically hard problems, acquiring expertise as needed. You decompose complex problems into straightforward solutions. We are particularly interested in candidates with experience in Operations Research, ML and predictive models and working with distributed systems. Academic and/or practical background in Operations Research and Machine Learning specifically Reinforcement Learning are particularly relevant for this position. To know more about Amazon science, Please visit https://www.amazon.science About the team We are a one pizza, agile team of scientists focused on solving supply chain challenges for Amazon Private Brands products. We collaborate with Amazon central teams like SCOT and develop both central as well as APB-specific solutions to address various challenges, including sourcing, demand forecasting, ordering optimization, inventory distribution, and inventory health management. Working closely with business stakeholders, Product Management Teams (PMTs), and engineering partners, we drive projects from initial concept through production deployment and ongoing monitoring.
US, CA, Sunnyvale
As a Reinforcement Learning Controls Scientist, you will be responsible for developing Reinforcement Learning models to control complex electromechanical systems. You will take responsibility for defining frameworks, performing analysis, and training models that guide and inform mechanical and electrical designs, software implementation, and other software modules that affect overall device safety and performance. You understand trade-offs between model-based and model-free approaches. You will demonstrate cross-functional collaboration and influence to accomplish your goals. You will play a role in defining processes and methods to improve the productivity of the entire team. You will interface with Amazon teams outside your immediate organization to collaborate and share knowledge. You will investigate applicable academic and industry research, prototype and test solutions to support product features, and design and validate production designs that deliver an exceptional user experience. Key job responsibilities - Produce models and simulations of complex, high degree-of-freedom dynamic electromechanical systems - Train Reinforcement Learning control policies that achieve performance targets within hardware and software constraints - Hands-on prototyping and testing of physical systems in the lab - Influence hardware and software design decisions owned by other teams to optimize system-level performance - Work with cross-functional teams (controls, firmware, perception, planning, sensors, mechanical, electrical, etc.) to solve complex system integration issues - Define key performance indicators and allocate error budgets across hardware and software modules - Perform root cause analysis of system-level failures and distinguish between hardware/software failures and hardware/software mitigations - Translate business requirements to engineering requirements and identify trade-offs and sensitivities - Mentor junior engineers in good design practice; actively participate in hiring of new team members About the team The Dynamic Systems and Control team develops models, algorithms, and code to bridge hardware and software development teams and bring robotic products to life. We contributed to Amazon Astro (https://www.amazon.com/Introducing-Amazon-Astro/dp/B078NSDFSB) and Echo Show 10 (https://www.amazon.com/echo-show-10/dp/B07VHZ41L8/), along with several new technology introductions and unannounced products currently in development.
US, WA, Seattle
About Sponsored Products and Brands: The Sponsored Products and Brands team at Amazon Ads is re-imagining the advertising landscape through industry leading generative AI technologies, revolutionizing how millions of customers discover products and engage with brands across Amazon.com and beyond. We are at the forefront of re-inventing advertising experiences, bridging human creativity with artificial intelligence to transform every aspect of the advertising lifecycle from ad creation and optimization to performance analysis and customer insights. We are a passionate group of innovators dedicated to developing responsible and intelligent AI technologies that balance the needs of advertisers, enhance the shopping experience, and strengthen the marketplace. If you're energized by solving complex challenges and pushing the boundaries of what's possible with AI, join us in shaping the future of advertising. About Our Team: The Sponsored Brands Impressions-based Offerings team is responsible for evolving the value proposition of Sponsored Brands to drive brand advertising in retail media at scale, helping brands get discovered, acquire new customers and sustainably grow customer lifetime value. We build end-to-end solutions that enable brands to drive discovery, visibility and share of voice. This includes building advertiser controls, shopper experiences, monetization strategies and optimization features. We succeed when (1) shoppers discover, engage and build affinity with brands and (2) brands can grow their business at scale with our advertising products. About This Role: As a Principal Scientist for the team, you will have the opportunity to apply your deep subject matter expertise in the area of ML, LLM and GenAI models. You will invent new product experiences that enable novel advertiser and shopper experiences. This role will liaise with internal Amazon partners and work on bringing state-of-the-art GenAI models to production, and stay abreast of the latest developments in the space of GenAI and identify opportunities to improve the efficiency and productivity of the team. Additionally, you will define a long-term science vision for our advertising business, driven by our customer’s needs, and translate it into actionable plans for our team of applied scientists and engineers. This role will play a critical role in elevating the team’s scientific and technical rigor, identifying and implementing best-in-class algorithms, methodologies, and infrastructure that enable rapid experimentation and scaling. You will communicate learnings to leadership and mentor and grow Applied AI talent across org. * Develop AI solutions for Sponsored Brands advertiser and shopper experiences. Build monetization and optimization systems that leverage generative models to value and improve campaign performance. * Define a long-term science vision and roadmap for our Sponsored Brands advertising business, driven from our customers' needs, translating that direction into specific plans for applied scientists and engineering teams. This role combines science leadership, organizational ability, technical strength, product focus, and business understanding. * Design and conduct A/B experiments to evaluate proposed solutions based on in-depth data analyses. * Effectively communicate technical and non-technical ideas with teammates and stakeholders. * Stay up-to-date with advancements and the latest modeling techniques in the field. * Think big about the arc of development of Gen AI over a multi-year horizon and identify new opportunities to apply these technologies to solve real-world problems. #GenAI
US, WA, Seattle
Innovators wanted! Are you an entrepreneur? A builder? A dreamer? This role is part of an Amazon Special Projects team that takes the company’s Think Big leadership principle to the limits. If you’re interested in innovating at scale to address big challenges in the world, this is the team for you. As a Data Scientist on our team, you'll analyze complex data, develop statistical methodologies, and provide critical insights that shape how we optimize our solutions. Working closely with our Applied Science team, you'll help build robust analytical frameworks to improve healthcare outcomes. This role offers a unique opportunity to impact healthcare through data-driven innovation. Key job responsibilities In this role, you will: - Analyze complex healthcare data to identify patterns, trends, and insights - Develop and validate statistical methodologies - Create and maintain analytical frameworks - Provide recommendations on data collection strategies - Collaborate with Applied Scientists to support model development efforts - Design and implement statistical analyses to validate analytical approaches - Present findings to stakeholders and contribute to scientific publications - Work with cross-functional teams to ensure solutions are built on sound statistical foundations - Design and implement causal inference analyses to understand underlying mechanisms - Develop frameworks for identifying and validating causal relationships in complex systems - Work with stakeholders to translate causal insights into actionable recommendations A day in the life You'll work with large-scale healthcare datasets, conducting sophisticated statistical analyses to generate actionable insights. You'll collaborate with Applied Scientists to validate model predictions and ensure statistical rigor in our approach. Regular interaction with product teams will help translate analytical findings into practical improvements for our services. About the team We represent Amazon's ambitious vision to solve the world's most pressing challenges. We are exploring new approaches to enhance research practices in the healthcare space, leveraging Amazon's scale and technological expertise. We operate with the agility of a startup while backed by Amazon's resources and operational excellence. We're looking for builders who are excited about working on ambitious, undefined problems and are comfortable with ambiguity.
US, WA, Seattle
Innovators wanted! Are you an entrepreneur? A builder? A dreamer? This role is part of an Amazon Special Projects team that takes the company’s Think Big leadership principle to the limits. If you’re interested in innovating at scale to address big challenges in the world, this is the team for you. As an Applied Scientist on our team, you will focus on building state-of-the-art ML models for healthcare. Our team rewards curiosity while maintaining a laser-focus in bringing products to market. Competitive candidates are responsive, flexible, and able to succeed within an open, collaborative, entrepreneurial, startup-like environment. At the forefront of both academic and applied research in this product area, you have the opportunity to work together with a diverse and talented team of scientists, engineers, and product managers and collaborate with other teams. This role offers a unique opportunity to work on projects that could fundamentally transform healthcare outcomes. Key job responsibilities In this role, you will: • Design and implement novel AI/ML solutions for complex healthcare challenges • Drive advancements in machine learning and data science • Balance theoretical knowledge with practical implementation • Work closely with customers and partners to understand their requirements • Navigate ambiguity and create clarity in early-stage product development • Collaborate with cross-functional teams while fostering innovation in a collaborative work environment to deliver impactful solutions • Establish best practices for ML experimentation, evaluation, development and deployment • Partner with leadership to define roadmap and strategic initiatives You’ll need a strong background in AI/ML, proven leadership skills, and the ability to translate complex concepts into actionable plans. You’ll also need to effectively translate research findings into practical solutions. A day in the life You will solve real-world problems by getting and analyzing large amounts of data, generate insights and opportunities, design simulations and experiments, and develop statistical and ML models. The team is driven by business needs, which requires collaboration with other Scientists, Engineers, and Product Managers across the Special Projects organization. You will prepare written and verbal presentations to share insights to audiences of varying levels of technical sophistication. About the team We represent Amazon's ambitious vision to solve the world's most pressing challenges. We are exploring new approaches to enhance research practices in the healthcare space, leveraging Amazon's scale and technological expertise. We operate with the agility of a startup while backed by Amazon's resources and operational excellence. We're looking for builders who are excited about working on ambitious, undefined problems and are comfortable with ambiguity.
US, WA, Seattle
Innovators wanted! Are you an entrepreneur? A builder? A dreamer? This role is part of an Amazon Special Projects team that takes the company’s Think Big leadership principle to the limits. If you’re interested in innovating at scale to address big challenges in the world, this is the team for you. As an Applied Scientist on our team, you will focus on building state-of-the-art ML models for healthcare. Our team rewards curiosity while maintaining a laser-focus in bringing products to market. Competitive candidates are responsive, flexible, and able to succeed within an open, collaborative, entrepreneurial, startup-like environment. At the forefront of both academic and applied research in this product area, you have the opportunity to work together with a diverse and talented team of scientists, engineers, and product managers and collaborate with other teams. This role offers a unique opportunity to work on projects that could fundamentally transform healthcare outcomes. Key job responsibilities In this role, you will: • Design and implement novel AI/ML solutions for complex healthcare challenges • Drive advancements in machine learning and data science • Balance theoretical knowledge with practical implementation • Work closely with customers and partners to understand their requirements • Navigate ambiguity and create clarity in early-stage product development • Collaborate with cross-functional teams while fostering innovation in a collaborative work environment to deliver impactful solutions • Establish best practices for ML experimentation, evaluation, development and deployment • Partner with leadership to define roadmap and strategic initiatives You’ll need a strong background in AI/ML, proven leadership skills, and the ability to translate complex concepts into actionable plans. You’ll also need to effectively translate research findings into practical solutions. A day in the life You will solve real-world problems by getting and analyzing large amounts of data, generate insights and opportunities, design simulations and experiments, and develop statistical and ML models. The team is driven by business needs, which requires collaboration with other Scientists, Engineers, and Product Managers across the Special Projects organization. You will prepare written and verbal presentations to share insights to audiences of varying levels of technical sophistication. About the team We represent Amazon's ambitious vision to solve the world's most pressing challenges. We are exploring new approaches to enhance research practices in the healthcare space, leveraging Amazon's scale and technological expertise. We operate with the agility of a startup while backed by Amazon's resources and operational excellence. We're looking for builders who are excited about working on ambitious, undefined problems and are comfortable with ambiguity.
US, WA, Seattle
Innovators wanted! Are you an entrepreneur? A builder? A dreamer? This role is part of an Amazon Special Projects team that takes the company’s Think Big leadership principle to the limits. If you’re interested in innovating at scale to address big challenges in the world, this is the team for you. As an Applied Scientist on our team, you will focus on building state-of-the-art ML models for healthcare. Our team rewards curiosity while maintaining a laser-focus in bringing products to market. Competitive candidates are responsive, flexible, and able to succeed within an open, collaborative, entrepreneurial, startup-like environment. At the forefront of both academic and applied research in this product area, you have the opportunity to work together with a diverse and talented team of scientists, engineers, and product managers and collaborate with other teams. This role offers a unique opportunity to work on projects that could fundamentally transform healthcare outcomes. Key job responsibilities In this role, you will: • Design and implement novel AI/ML solutions for complex healthcare challenges • Drive advancements in machine learning and data science • Balance theoretical knowledge with practical implementation • Work closely with customers and partners to understand their requirements • Navigate ambiguity and create clarity in early-stage product development • Collaborate with cross-functional teams while fostering innovation in a collaborative work environment to deliver impactful solutions • Establish best practices for ML experimentation, evaluation, development and deployment • Partner with leadership to define roadmap and strategic initiatives You’ll need a strong background in AI/ML, proven leadership skills, and the ability to translate complex concepts into actionable plans. You’ll also need to effectively translate research findings into practical solutions. A day in the life You will solve real-world problems by getting and analyzing large amounts of data, generate insights and opportunities, design simulations and experiments, and develop statistical and ML models. The team is driven by business needs, which requires collaboration with other Scientists, Engineers, and Product Managers across the Special Projects organization. You will prepare written and verbal presentations to share insights to audiences of varying levels of technical sophistication. About the team We represent Amazon's ambitious vision to solve the world's most pressing challenges. We are exploring new approaches to enhance research practices in the healthcare space, leveraging Amazon's scale and technological expertise. We operate with the agility of a startup while backed by Amazon's resources and operational excellence. We're looking for builders who are excited about working on ambitious, undefined problems and are comfortable with ambiguity.
US, WA, Seattle
Innovators wanted! Are you an entrepreneur? A builder? A dreamer? This role is part of an Amazon Special Projects team that takes the company’s Think Big leadership principle to the limits. If you’re interested in innovating at scale to address big challenges in the world, this is the team for you. As a Senior Applied Scientist on our team, you will focus on building state-of-the-art ML models for healthcare. Our team rewards curiosity while maintaining a laser-focus in bringing products to market. Competitive candidates are responsive, flexible, and able to succeed within an open, collaborative, entrepreneurial, startup-like environment. At the forefront of both academic and applied research in this product area, you have the opportunity to work together with a diverse and talented team of scientists, engineers, and product managers and collaborate with other teams. This role offers a unique opportunity to work on projects that could fundamentally transform healthcare outcomes. Key job responsibilities In this role, you will: • Design and implement novel AI/ML solutions for complex healthcare challenges • Drive advancements in machine learning and data science • Balance theoretical knowledge with practical implementation • Work closely with customers and partners to understand their requirements • Navigate ambiguity and create clarity in early-stage product development • Collaborate with cross-functional teams while fostering innovation in a collaborative work environment to deliver impactful solutions • Establish best practices for ML experimentation, evaluation, development and deployment • Partner with leadership to define roadmap and strategic initiatives You’ll need a strong background in AI/ML, proven leadership skills, and the ability to translate complex concepts into actionable plans. You’ll also need to effectively translate research findings into practical solutions. A day in the life You will solve real-world problems by getting and analyzing large amounts of data, generate insights and opportunities, design simulations and experiments, and develop statistical and ML models. The team is driven by business needs, which requires collaboration with other Scientists, Engineers, and Product Managers across the Special Projects organization. You will prepare written and verbal presentations to share insights to audiences of varying levels of technical sophistication. About the team We represent Amazon's ambitious vision to solve the world's most pressing challenges. We are exploring new approaches to enhance research practices in the healthcare space, leveraging Amazon's scale and technological expertise. We operate with the agility of a startup while backed by Amazon's resources and operational excellence. We're looking for builders who are excited about working on ambitious, undefined problems and are comfortable with ambiguity.
US, MA, Boston
The Artificial General Intelligence (AGI) team is looking for a highly skilled and experienced Sr. Applied Scientist, to support the development and implementation of state-of-the-art algorithms and models for supervised fine-tuning and reinforcement learning through human feedback and complex reasoning; with a focus across text, image, and video modalities. As an Sr. Applied Scientist, you will play a critical role in supporting the development of Generative AI (Gen AI) technologies that can handle Amazon-scale use cases and have a significant impact on our customers' experiences. Key job responsibilities Collaborate with cross-functional teams of engineers, product managers, and scientists to identify and solve complex problems in Gen AI Design and execute experiments to evaluate the performance of different algorithms (PT, SFT, RL) and models, and iterate quickly to improve results Think big about the arc of development of Gen AI over a multi-year horizon, and identify new opportunities to apply these technologies to solve real-world problems Communicate results and insights to both technical and non-technical audiences, including through presentations and written reports About the team We are passionate scientists dedicated to pushing the boundaries of innovation in Gen AI with focus on Software Development use cases.