Line Haul at DS.jpeg
Amazon Transportation Services' Middle Mile team “has made longstanding contributions to operations research and analytics for decades, and their impact has been widely noted and recognized,” said Erica Klampfl, 2021 INFORMS Prize committee chair.
Credit: AboutAmazon.com

How Amazon's Middle Mile team helps packages make the journey to your doorstep

The Middle Mile team manages complexity and scale in making routing decisions across the company’s expansive transportation network.

Amazon Transportation Services’ Middle Mile team develops routing solutions to move customer orders from its vendors and fulfillment centers to its network of sortation centers, air facilities, and delivery stations in the most efficient way possible.

Watch Amazon's trucks line up outside a facility

Over the past five years, the team has played a critical role in helping Amazon deliver on increasingly ambitious goals — from two-day and one-day deliveries for Prime customers, to one-hour delivery windows for services like Prime Now.

Recently, INFORMS, the leading international association for operations research and analytics professionals, recognized these achievements by awarding Amazon the 2021 INFORMS Prize. The award recognizes the effective integration of operations research and analytics into organizational decision making.

The INFORMS prize logo is shown atop the Amazon logo
The INFORMS prize "is awarded for effective integration of advanced analytics and operations research/management sciences (OR/MS) in an organization."
INFORMS.org

“Amazon has made longstanding contributions to operations research and analytics for decades, and their impact has been widely noted and recognized,” said Erica Klampfl, 2021 INFORMS Prize committee chair. “Amazon is truly deserving of this prestigious prize, and the entire O.R. and analytics community joins INFORMS in thanking them for all they have done and continue to do.”

Over the past five years, the team has doubled down on scientific innovation and operations research to move millions of packages globally through Amazon’s transportation network. The INFORMS award serves as a reminder not just of the work the Middle Mile team has done at Amazon, but also how far they have come.

An extremely complex problem

Given the high number of variables involved in arriving at optimal routing decisions, complexity is a constant for Amazon’s Middle Mile team.

For every customer order, Amazon’s routing algorithms must determine the best path through the network to move the product between suppliers, fulfillment centers, sorting facilities, and delivery stations, to quickly, safely, and cost-effectively reach customers.

They must evaluate the merits of each transportation option — surface, rail, air, or maritime — and determine the most effective route.  The algorithms also determine an optimal or near-optimal route to send the order to a facility where it can be sorted and handed off for delivery. Finally, all schedules have to be designed in a way that optimizes for safety and complies with government regulations such as rest breaks, hours of service, and other requirements.

Our trucking network alone presents us with over ten octovigintillion possible routing solutions.
Tim Jacobs

“To give you an idea of the scale and complexity we’re managing, our trucking network alone presents us with over 1088 or ten octovigintillion — possible routing solutions,” says Tim Jacobs, director of Middle Mile Research Science and Optimization. “This is an especially large number, when you consider that there are 1082 atoms in the visible universe.”

And that’s just for the trucking network.

When a product is ordered on the Amazon Store, there are several ways it can make its way from a fulfillment center to the customer’s residence.

There’s the (relatively) straightforward approach: The product is sent from a fulfillment center to a sortation center and to a delivery station, at which point it is placed on a vehicle for delivery to the customer’s residence.

There are also more involved scenarios, such as when customers place time-sensitive orders for items stored in geographically distant fulfillment centers. In these cases, the products are often delivered using a combination of Amazon’s air cargo network along with the surface network to meet the customer’s delivery timelines.

When Jacobs joined Amazon in 2016, the majority of the company’s loads were carried by a relatively small number of large third-party carriers that managed the truck assignments and routings. Since then, the Middle Mile team has helped to develop new ways to manage its transportation network, including by routing a growing number of medium and small carriers using Amazon’s own technology and algorithms, enabling more efficient management and visibility of the transportation network, which in turn helps Amazon get packages to customers faster and more efficiently.

That effort began, in part, by expanding the team.

In the beginning: Improving Amazon’s surface operations

In 2016, Mauricio Resende was among just a few scientists in Amazon’s Middle Mile team — a number that has since grown significantly.

Prior to Amazon, Resende worked as a scientist at AT&T Labs focused on combinatorial optimization. At its essence, combinatorial optimization involves using mathematical methods to identify the best decisions for a problem from a large set of candidate solutions.

“In 2016, Amazon’s surface routing decisions were made using a basic local search algorithm,” Resende says. “Loads were allocated in advance. The process was largely iterative, and we drove small improvements to the algorithm week over week.”

Tim Jacobs, director of Middle Mile Research Science and Optimization; Mauricio Resende, principal research scientist; and Nilay Noyan, principal research scientist
Named among others in Amazon's 2021 INFORMS Prize were (from left) Tim Jacobs, director of Middle Mile Research Science and Optimization, Mauricio Resende, principal research scientist, and Nilay Noyan, principal research scientist.

Crucially, in order to automate routing decisions, the algorithms and systems needed to account for differing constraints and inputs that have a profound impact on routing decisions, such as the nuances of different regulatory agencies in each country.

The system also needed to understand the storage and throughput constraints of each facility by considering factors like operating hours or whether parking slips might be required. So, the team worked to model and eliminate those system blind spots.

“We developed more advanced data structures and algorithmic techniques to account for these constraints as we designed routing schedules,” says Resende.

Resende provides the example of a sequence evaluator designed by Amazon’s Middle Mile research team. The evaluator was designed to help find the most effective routing solution for a pre-determined objective function, such as cost, or number of trips with empty loads.

The evaluator computed the cost for a presented route. It kept working through possible changes to the route until a near-optimal route was found. This solution was then perturbed — routes were deliberately eliminated and new deliveries were fed into the algorithm. The task was then repeated. In this manner, the algorithm progressed toward an iteratively better solution.

Through methods such as these, Resende and his fellow researchers drove a significant reduction in surface transportation costs.

When you are working with such a large universe of possibilities, you have to be incredibly efficient in how you formulate the problem.
Mauricio Resende

“When you are working with such a large universe of possibilities, you have to be incredibly efficient in how you formulate the problem,” says Resende. “You then have to be efficient in designing algorithms to solve that formulation of the problem.”

The Middle Mile team also faced situations where it had to route goods that hadn’t been accounted for in the demand forecasts that are an input to its routing plans. While future demand can be predicted, there are still many unknowns at the planning stage. A good example is spikes in demand for new products, or products that become unexpectedly popular.

To cope with demand variability, the Middle Mile team developed a truckload supply load board with dynamic pricing. The load board, powered by a number of machine learning algorithms coupled with mathematical optimization models, allowed Amazon to expand its delivery network by accessing the available capacity of pre-screened carriers operating in a geographical area or lane.

The load board dynamically sets prices for loads that are currently available. Carriers can review available loads simultaneously. Interested carriers can then accept the load at the offered price in real-time. This arrangement also helps carriers optimize the efficiency of their drivers’ schedules.

As Amazon drove improvements to its surface network, the Middle Mile team also leveraged scientific innovation to design routing solutions for its air cargo service, which has expanded rapidly since launching in 2016.

Developing algorithms to manage Amazon’s fleet of contracted airline partners

Nilay Noyan joined the company as a principal research scientist in September 2019. Prior to Amazon, Noyan was a professor of industrial engineering at Sabanci University in Istanbul.

Broadly speaking, the air routing problems are similar to those for surface networks. However, there are completely different constraints associated with airlines.
Nilay Noyan

“Broadly speaking, the air routing problems are similar to those for surface networks,” says Noyan. “However, there are completely different constraints associated with airlines.”

These include regulatory constraints, lead times for procuring aircraft, the impact of fluctuating fuel prices, and resources required to manage airline contracts. Flight schedule designs also need to ensure that there is sufficient time for routine line maintenance, airplane refueling, and the loading and unloading of packages.

Arrival and departure times must be aligned with available capacity and resources to ensure packages are processed on time. To further complicate matters, airline schedules have to be aligned with those of the surface network so there are trucks waiting on the ground to carry packages to the next destination.

Over the past four years, the Middle Mile Planning Research and Optimization Science team has developed and implemented more than a dozen optimization and machine learning models to build and operate the air transport network. These tools help the team arrive at the most optimal decisions in areas such as flight schedule design, fuel management, package flow planning, maintenance planning, and disruption recovery.

Noyan says machine learning also plays an important role in helping the Middle Mile team solve for problems that are inherently stochastic or unpredictable in nature.

Amazon Prime Air Boeing 767
Over the past four years, the Middle Mile Planning Research and Optimization Science team has developed and implemented more than a dozen optimization and machine learning models to build and operate the air transport network.
Chad Slattery

“Deviations from the execution plans are unavoidable in case of unexpected disruption events due to weather, unscheduled maintenance, and crew-related delays,” says Noyan. “Machine-learning-based prediction methods help us react to these unexpected situations, and adapt quickly so that we can meet our delivery promises to customers.”

In addition to helping Amazon adapt to unpredictable events, Jacobs sees machine learning playing an increasingly important role in helping Amazon more effectively unify the worlds of surface, air, rail and maritime networks for both network design and day of operations.  

“At Amazon, we work back backwards from the customer,” he says. “We don’t think of each mode of transport separately, as is common in the industry. Instead, we are continually working to combine these areas effectively, so that the way we plan and the way we operate the network are consistent.”

Related content

IN, HR, Gurugram
We're on a journey to build something new a green field project! Come join our team and build new discovery and shopping products that connect customers with their vehicle of choice. We're looking for a talented Senior Applied Scientist to join our team of product managers, designers, and engineers to design, and build innovative automotive-shopping experiences for our customers. This is a great opportunity for an experienced engineer to design and implement the technology for a new Amazon business. We are looking for a Applied Scientist to design, implement and deliver end-to-end solutions. We are seeking passionate, hands-on, experienced and seasoned Senior Applied Scientist who will be deep in code and algorithms; who are technically strong in building scalable computer vision machine learning systems across item understanding, pose estimation, class imbalanced classifiers, identification and segmentation.. You will drive ideas to products using paradigms such as deep learning, semi supervised learning and dynamic learning. As a Senior Applied Scientist, you will also help lead and mentor our team of applied scientists and engineers. You will take on complex customer problems, distill customer requirements, and then deliver solutions that either leverage existing academic and industrial research or utilize your own out-of-the-box but pragmatic thinking. In addition to coming up with novel solutions and prototypes, you will directly contribute to implementation while you lead. A successful candidate has excellent technical depth, scientific vision, project management skills, great communication skills, and a drive to achieve results in a unified team environment. You should enjoy the process of solving real-world problems that, quite frankly, haven’t been solved at scale anywhere before. Along the way, we guarantee you’ll get opportunities to be a bold disruptor, prolific innovator, and a reputed problem solver—someone who truly enables AI and robotics to significantly impact the lives of millions of consumers. Key job responsibilities Architect, design, and implement Machine Learning models for vision systems on robotic platforms Optimize, deploy, and support at scale ML models on the edge. Influence the team's strategy and contribute to long-term vision and roadmap. Work with stakeholders across , science, and operations teams to iterate on design and implementation. Maintain high standards by participating in reviews, designing for fault tolerance and operational excellence, and creating mechanisms for continuous improvement. Prototype and test concepts or features, both through simulation and emulators and with live robotic equipment Work directly with customers and partners to test prototypes and incorporate feedback Mentor other engineer team members. A day in the life - 6+ years of building machine learning models for retail application experience - PhD, or Master's degree and 6+ years of applied research experience - Experience programming in Java, C++, Python or related language - Experience with neural deep learning methods and machine learning - Demonstrated expertise in computer vision and machine learning techniques.
US, WA, Seattle
Do you want to re-invent how millions of people consume video content on their TVs, Tablets and Alexa? We are building a free to watch streaming service called Fire TV Channels (https://techcrunch.com/2023/08/21/amazon-launches-fire-tv-channels-app-400-fast-channels/). Our goal is to provide customers with a delightful and personalized experience for consuming content across News, Sports, Cooking, Gaming, Entertainment, Lifestyle and more. You will work closely with engineering and product stakeholders to realize our ambitious product vision. You will get to work with Generative AI and other state of the art technologies to help build personalization and recommendation solutions from the ground up. You will be in the driver's seat to present customers with content they will love. Using Amazon’s large-scale computing resources, you will ask research questions about customer behavior, build state-of-the-art models to generate recommendations and run these models to enhance the customer experience. You will participate in the Amazon ML community and mentor Applied Scientists and Software Engineers with a strong interest in and knowledge of ML. Your work will directly benefit customers and you will measure the impact using scientific tools.
US, MA, Boston
The Artificial General Intelligence (AGI) team is looking for a passionate, talented, and inventive Applied Scientist with a strong deep learning background, to build industry-leading technology with Large Language Models (LLMs) and multi-modal systems. You will support projects that work on technologies including multi-modal model alignment, moderation systems and evaluation. Key job responsibilities As an Applied Scientist with the AGI team, you will support the development of novel algorithms and modeling techniques, to advance the state of the art with LLMs. Your work will directly impact our customers in the form of products and services that make use of speech and language technology. You will leverage Amazon’s heterogeneous data sources and large-scale computing resources to accelerate advances in generative artificial intelligence (GenAI). You are also expected to publish in top tier conferences. About the team The AGI team has a mission to push the envelope in LLMs and multimodal systems. Specifically, we focus on model alignment with an aim to maintain safety while not denting utility, in order to provide the best-possible experience for our customers.
IN, HR, Gurugram
Our customers have immense faith in our ability to deliver packages timely and as expected. A well planned network seamlessly scales to handle millions of package movements a day. It has monitoring mechanisms that detect failures before they even happen (such as predicting network congestion, operations breakdown), and perform proactive corrective actions. When failures do happen, it has inbuilt redundancies to mitigate impact (such as determine other routes or service providers that can handle the extra load), and avoids relying on single points of failure (service provider, node, or arc). Finally, it is cost optimal, so that customers can be passed the benefit from an efficiently set up network. Amazon Shipping is hiring Applied Scientists to help improve our ability to plan and execute package movements. As an Applied Scientist in Amazon Shipping, you will work on multiple challenging machine learning problems spread across a wide spectrum of business problems. You will build ML models to help our transportation cost auditing platforms effectively audit off-manifest (discrepancies between planned and actual shipping cost). You will build models to improve the quality of financial and planning data by accurately predicting ship cost at a package level. Your models will help forecast the packages required to be pick from shipper warehouses to reduce First Mile shipping cost. Using signals from within the transportation network (such as network load, and velocity of movements derived from package scan events) and outside (such as weather signals), you will build models that predict delivery delay for every package. These models will help improve buyer experience by triggering early corrective actions, and generating proactive customer notifications. Your role will require you to demonstrate Think Big and Invent and Simplify, by refining and translating Transportation domain-related business problems into one or more Machine Learning problems. You will use techniques from a wide array of machine learning paradigms, such as supervised, unsupervised, semi-supervised and reinforcement learning. Your model choices will include, but not be limited to, linear/logistic models, tree based models, deep learning models, ensemble models, and Q-learning models. You will use techniques such as LIME and SHAP to make your models interpretable for your customers. You will employ a family of reusable modelling solutions to ensure that your ML solution scales across multiple regions (such as North America, Europe, Asia) and package movement types (such as small parcel movements and truck movements). You will partner with Applied Scientists and Research Scientists from other teams in US and India working on related business domains. Your models are expected to be of production quality, and will be directly used in production services. You will work as part of a diverse data science and engineering team comprising of other Applied Scientists, Software Development Engineers and Business Intelligence Engineers. You will participate in the Amazon ML community by authoring scientific papers and submitting them to Machine Learning conferences. You will mentor Applied Scientists and Software Development Engineers having a strong interest in ML. You will also be called upon to provide ML consultation outside your team for other problem statements. If you are excited by this charter, come join us!
US, MA, Boston
The Artificial General Intelligence (AGI) team is looking for a passionate, talented, and inventive Senior Applied Scientist with a strong deep learning background, to build industry-leading technology with Large Language Models (LLMs) and multimodal systems. Key job responsibilities As a Senior Applied Scientist with the AGI team, you will work with talented peers to lead the development of novel algorithms and modeling techniques, to advance the state of the art with LLMs. Your work will directly impact our customers in the form of products and services that make use of speech and language technology. You will leverage Amazon’s heterogeneous data sources and large-scale computing resources to accelerate advances in generative artificial intelligence (GenAI). About the team The AGI team has a mission to push the envelope in LLMs and multimodal systems, in order to provide the best-possible experience for our customers.
IN, KA, Bengaluru
The Amazon Alexa AI team in India is seeking a talented, self-driven Applied Scientist to work on prototyping, optimizing, and deploying ML algorithms within the realm of Generative AI. Key responsibilities include: - Research, experiment and build Proof Of Concepts advancing the state of the art in AI & ML for GenAI. - Collaborate with cross-functional teams to architect and execute technically rigorous AI projects. - Thrive in dynamic environments, adapting quickly to evolving technical requirements and deadlines. - Engage in effective technical communication (written & spoken) with coordination across teams. - Conduct thorough documentation of algorithms, methodologies, and findings for transparency and reproducibility. - Publish research papers in internal and external venues of repute - Support on-call activities for critical issues Basic Qualifications: - Master’s or PhD in computer science, statistics or a related field or relevant science experience (publications/scientific prototypes) in lieu of Masters - Experience in deep learning, machine learning, and data science. - Proficiency in coding and software development, with a strong focus on machine learning frameworks. - Experience in Python, or another language; command line usage; familiarity with Linux and AWS ecosystems. - Understanding of relevant statistical measures such as confidence intervals, significance of error measurements, development and evaluation data sets, etc. - Excellent communication skills (written & spoken) and ability to collaborate effectively in a distributed, cross-functional team setting. Preferred Qualifications: - Track record of diving into data to discover hidden patterns and conducting error/deviation analysis - Ability to develop experimental and analytic plans for data modeling processes, use of strong baselines, ability to accurately determine cause and effect relations - The motivation to achieve results in a fast-paced environment. - Exceptional level of organization and strong attention to detail - Comfortable working in a fast paced, highly collaborative, dynamic work environment - Papers published in AI/ML venues of repute
IN, KA, Bengaluru
The Amazon Alexa AI team in India is seeking a talented, self-driven Applied Scientist to work on prototyping, optimizing, and deploying ML algorithms within the realm of Generative AI. Key responsibilities include: - Research, experiment and build Proof Of Concepts advancing the state of the art in AI & ML for GenAI. - Collaborate with cross-functional teams to architect and execute technically rigorous AI projects. - Thrive in dynamic environments, adapting quickly to evolving technical requirements and deadlines. - Engage in effective technical communication (written & spoken) with coordination across teams. - Conduct thorough documentation of algorithms, methodologies, and findings for transparency and reproducibility. - Publish research papers in internal and external venues of repute - Support on-call activities for critical issues Basic Qualifications: - Master’s or PhD in computer science, statistics or a related field - 2-7 years experience in deep learning, machine learning, and data science. - Proficiency in coding and software development, with a strong focus on machine learning frameworks. - Experience in Python, or another language; command line usage; familiarity with Linux and AWS ecosystems. - Understanding of relevant statistical measures such as confidence intervals, significance of error measurements, development and evaluation data sets, etc. - Excellent communication skills (written & spoken) and ability to collaborate effectively in a distributed, cross-functional team setting. - Papers published in AI/ML venues of repute Preferred Qualifications: - Track record of diving into data to discover hidden patterns and conducting error/deviation analysis - Ability to develop experimental and analytic plans for data modeling processes, use of strong baselines, ability to accurately determine cause and effect relations - The motivation to achieve results in a fast-paced environment. - Exceptional level of organization and strong attention to detail - Comfortable working in a fast paced, highly collaborative, dynamic work environment
IN, KA, Bengaluru
Amazon is investing heavily in building a world class advertising business and we are responsible for defining and delivering a collection of self-service performance advertising products that drive discovery and sales. Our products are strategically important to our Retail and Marketplace businesses driving long term growth. We deliver billions of ad impressions and millions of clicks daily and are breaking fresh ground to create world-class products. We are highly motivated, collaborative and fun-loving with an entrepreneurial spirit and bias for action. With a broad mandate to experiment and innovate, we are growing at an unprecedented rate with a seemingly endless range of new opportunities. The ATT team, based in Bangalore, is responsible for ensuring that ads are relevant and is of good quality, leading to higher conversion for the sellers and providing a great experience for the customers. We deal with one of the world’s largest product catalog, handle billions of requests a day with plans to grow it by order of magnitude and use automated systems to validate tens of millions of offers submitted by thousands of merchants in multiple countries and languages. In this role, you will build and develop ML models to address content understanding problems in Ads. These models will rely on a variety of visual and textual features requiring expertise in both domains. These models need to scale to multiple languages and countries. You will collaborate with engineers and other scientists to build, train and deploy these models. As part of these activities, you will develop production level code that enables moderation of millions of ads submitted each day.
US, WA, Bellevue
Our mission is to provide consistent, accurate, and relevant delivery information to every single page on every Amazon-owned site. MILLIONS of customers will be impacted by your contributions: The changes we make directly impact the customer experience on every Amazon site. This is a great position for someone who likes to leverage Machine learning technologies to solve the real customer problems, and also wants to see and measure their direct impact on customers. We are a cross-functional team that owns the ENTIRE delivery experience for customers: From the business requirements to the technical systems that allow us to directly affect the on-site experience from a central service, business and technical team members are integrated so everyone is involved through the entire development process. You will have a chance to develop the state-of-art machine learning, including deep learning and reinforcement learning models, to build targeting, recommendation, and optimization services to impact millions of Amazon customers. Do you want to join an innovative team of scientists and engineers who use machine learning and statistical techniques to deliver the best delivery experience on every Amazon-owned site? Are you excited by the prospect of analyzing and modeling terabytes of data on the cloud and create state-of-art algorithms to solve real world problems? Do you like to own end-to-end business problems/metrics and directly impact the profitability of the company? Do you like to innovate and simplify? If yes, then you may be a great fit to join the DEX AI team. Key job responsibilities - Research and implement machine learning techniques to create scalable and effective models in Delivery Experience (DEX) systems - Solve business problems and identify business opportunities to provide the best delivery experience on all Amazon-owned sites. - Design and develop highly innovative machine learning and deep learning models for big data. - Build state-of-art ranking and recommendations models and apply to Amazon search engine. - Analyze and understand large amounts of Amazon’s historical business data to detect patterns, to analyze trends and to identify correlations and causalities - Establish scalable, efficient, automated processes for large scale data analyses, model development, model validation and model implementation
US, WA, Seattle
The Search Supply & Experiences team, within Sponsored Products, is seeking an Applied Scientist to solve challenging problems in natural language understanding, personalization, and other areas using the latest techniques in machine learning. In our team, you will have the opportunity to create new ads experiences that elevate the shopping experience for our hundreds of millions customers worldwide. As an Applied Scientist, you will partner with other talented scientists and engineers to design, train, test, and deploy machine learning models. You will be responsible for translating business and engineering requirements into deliverables, and performing detailed experiment analysis to determine how shoppers and advertisers are responding to your changes. We are looking for candidates who thrive in an exciting, fast-paced environment and who have a strong personal interest in learning, researching, and creating new technologies with high customer impact. Key job responsibilities As an Applied Scientist on the Search Supply & Experiences team you will: - Perform hands-on analysis and modeling of enormous datasets to develop insights that increase traffic monetization and merchandise sales, without compromising the shopper experience. - Drive end-to-end machine learning projects that have a high degree of ambiguity, scale, and complexity. - Build machine learning models, perform proof-of-concept, experiment, optimize, and deploy your models into production; work closely with software engineers to assist in productionizing your ML models. - Design and run experiments, gather data, and perform statistical analysis. - Establish scalable, efficient, automated processes for large-scale data analysis, machine-learning model development, model validation and serving. - Stay up to date on the latest advances in machine learning. About the team We are a customer-obsessed team of engineers, technologists, product leaders, and scientists. We are focused on continuous exploration of contexts and creatives where advertising delivers value to shoppers and advertisers. We specifically work on new ads experiences globally with the goal of helping shoppers make the most informed purchase decision. We obsess about our customers and we are continuously innovating on their behalf to enrich their shopping experience on Amazon