How Prime Video distills time series anomalies into actionable alarms

Targeted handling of three distinct types of “special events” dramatically reduces false-alarm rate.

Prime Video customers must be able to reliably stream content at all times on any device that supports the Prime Video application, such as mobile phones, smart TVs, or video game consoles.

Related content
The switch to WebAssembly increases stability, speed.

For the Prime Video team, deploying and maintaining the application on such a broad scale entails custom code configurations and third-party integrations that are unique to particular geographical regions and families of devices. This diversity poses the risk of a fragmented customer experience, wherein device- or region-specific issues affect only a subset of customers.

Manually setting alarms that monitor the quality of the Prime Video application across all combinations of customer activities, device types, and regions is infeasible. However, this problem can be reframed as a large-scale, online, time-series anomaly detection problem, such that an automated monitoring solution alerts on-call engineers to deviations from expected behavior in observed traffic.

Monitorable metrics.png
The Cartesian product of independent metric dimensions results in a combinatorial explosion of time series describing different aspects of customer activity on Prime Video.

In this post, we shed light on practical challenges that arise when applying anomaly detection to time series describing customer activity and present a selection of mitigating techniques. The proposed solutions distinguish different categories of deviations induced by fluctuating customer viewing behavior and have contributed to a significant reduction in the false alarms that would otherwise distract Prime Video engineers from meeting real customer needs.

Time series deviations.png
Sample time series containing two notable deviations from expected behavior. Only the second deviation corresponds to a customer-impacting malfunction, whereas the first was caused by an external event.

This distinction is especially challenging because innocuous drops in metric traffic can look very similar to those caused by genuine incidents. The graph below depicts two independent deviations from expected behavior that would be regarded as anomalous in the absence of any additional information. However, after inspecting the contexts surrounding these two anomalies, we discovered that only the second was caused by a correctable software malfunction, whereas the first was simply an artifact of lower Prime Video viewership while an external event was taking place.

Innocuous changes to customer viewing behavior on media-streaming platforms such as Prime Video can be driven by several factors. In this post, we shall focus on what we shall henceforth refer to as special events, which we further categorize as

  1. anticipated special events, e.g., major sporting tournaments;
  2. unanticipated low-impact special events, e.g., sunny weather encouraging more outdoor activities;
  3. unanticipated high-impact special events, e.g., breaking news broadcasts or natural disasters.
Special-event taxonomy.png
Taxonomy of different types of special events affecting Prime Video customer traffic.

1. Anticipated special events

Prime Video viewers sometimes seek content that is available only on other services. For instance, highly anticipated sporting events, such as the NFL Super Bowl or the FIFA World Cup, are known to dominate TV ratings on regular broadcasting.

Related content
Detectors for block corruption, audio artifacts, and errors in audio-video synchronization are just three of Prime Video’s quality assurance tools.

Conversely, Prime Video exclusives, such as NFL Thursday Night Football games, and tentpole content launches, such as The Lord of the Rings: The Rings of Power, are expected to result in transient surges in metric traffic. In the absence of context, the deviations in either direction may be large enough to be flagged as anomalous, resulting in false alarms about the state of the Prime Video application.

If a complete schedule of events that are expected to affect metric traffic is available, anomaly detection models can be enhanced by covariates or exogenous variables. Taking forecasting-based anomaly detection as an example, the inclusion of covariates should result in more meaningful predictions against which anomaly scores can be computed.

Binary encoding of events.png
A binary encoding of scheduled events, wherein an activation indicates the occurrence of an external event.

Leveraging covariates for this purpose remains nontrivial. For example, different matches within a tournament attract differing viewership, depending on which teams are playing, the risk of a popular team being knocked out, etc. It is challenging to encode such nuances in a binary covariate that is activated whenever any external event is ongoing, and further offline analysis of historical data is required to identify additional associative or causal variables that influence the deviations induced by different events.

2. Unanticipated low-impact special events

Curating an exhaustive list of relevant events for geographically dispersed customers is a near-impossible task, especially when compounded by the wide variety of devices on which the Prime Video application is available. Events can also be rescheduled at short notice, invalidating any provisions made to accommodate them. In our taxonomy, unanticipated low-impact events are events that are unaccounted for but whose overall impact may still be discernible by other means.

Related content
Team from Amazon Web Services also wins the best-paper award at the Workshop on Detection and Classification of Acoustic Scenes and Events.

To mitigate the impact of incomplete covariate information, we advocate for an ensemble-based approach combining multiple detectors that explicitly capture different characteristics of time series behavior, such as mean, variance, trend, etc. When monitoring Prime Video metrics, we found that relying solely on models that gauge the magnitude of a deviation, such as forecasting-based scorers, was insufficient. Meanwhile, introducing additional derivative and correlation-based detectors greatly enhanced our ability to filter out innocuous anomalies related to special events.

Complementary anomaly scorers.png
Examples of how two complementary anomaly scorers (forecasting- and derivative-based) can be treated as an ensemble for assessing the severity of an anomaly. Note how in the second example, the derivative-based scorer indicates an anomaly only during the period where the trend is reversed, whereas the increased forecasting-based score persists beyond the initial deviation.

3. Unanticipated high-impact special events

Some special events happen not only unexpectedly but with such sudden and drastic impact that they are especially hard to distinguish from a genuine malfunction. Examples include widespread power outages due to natural disasters and breaking-news broadcasts announcing election results, the unexpected passing of a public figure, etc.

Related content
CVPR papers examine the recovery of 3-D information from camera movement and learning general representations from weakly annotated data.

Mimicking the judgment of an end user triaging an anomaly post hoc is often the best way to handle such unpredictable and dramatic deviations. The effects of external events can often be distinguished from application malfunctions by their correlation with other metrics in the affected region. More specifically, at the time an anomaly is detected for Prime Video, we are interested in verifying whether similar deviations have also been observed for metrics describing services on distinct technology stacks.

Outlook

Identifying distinct categories of special events and deploying appropriate remedies have been invaluable for improving how we monitor metrics describing customer activity. This has allowed Prime Video engineers to instead focus their time on delivering more new and exciting features for customers. One consideration this post hasn’t touched upon is the risk of missing a genuine incident as a result of introducing additional suppression mechanisms. This is an important factor that should be regularly assessed and effectively communicated to end users of the monitoring service.

Related content
Automated-reasoning method enables the calculation of tight bounds on the use of resources — such as computation or memory — that results from code changes.

The operational challenges of delivering reliable anomaly detection in practical settings are often disregarded as domain-specific idiosyncrasies. Consequently, they are largely overlooked in the prolific stream of novel modeling and methodological contributions appearing in the literature on time series anomaly detection. The insights shared in this blog post are not exhaustive either, but we hope this serves as a useful guide for practitioners facing similar issues and motivates broader research on both domain-specific and domain-agnostic mechanisms for translating detected anomalies into actionable alarms.

Research areas

Related content

US, WA, Bellevue
The Learning & Development Science team in Amazon Logistics (AMZL) builds state-of-the-art Artificial Intelligence (AI) solutions for enhancing leadership and associate development within the organization. We develop technology and mechanisms to map the learner journeys, answer real-time questions through chat assistants, and drive the right interventions at the right time. As an Applied Scientist on the team, you will play a critical role in driving the design, research, and development of these science initiatives. The ideal candidate will lead the research on learning and development trends, and develop impactful learning journey roadmap that align with organizational goals and priorities. By parsing the information of different learning courses, they will utilize the latest advances in Gen AI technology to address the personalized questions in real-time from the leadership and associates through chat assistants. Post the learning interventions, the candidate will apply causal inference or A/B experimentation frameworks to assess the associated impact of these learning programs on associate performance. As a part of this role, this candidate will collaborate with a large team of experts in the field and move the state of learning experience research forward. They should have the ability to communicate the science insights effectively to both technical and non-technical audiences. Key job responsibilities * Apply science models to extract actionable information from learning feedback * Leverage GenAI/Large Language Model (LLM) technology for scaling and automating learning experience workflows * Design and implement metrics to evaluate the effectiveness of AI models * Present deep dives and analysis to both technical and non-technical stakeholders, ensuring clarity and understanding and influencing business partners * Perform statistical analysis and statistical tests including hypothesis testing and A/B testing * Recognize and adopt best practices in reporting and analysis: data integrity, test design, analysis, validation, and documentation
US, WA, Bellevue
Are you excited about developing cutting-edge generative AI, large language models (LLMs), and foundation models? Are you looking for opportunities to build and deploy them on real-world problems at a truly vast scale with global impact? At AFT (Amazon Fulfillment Technologies) AI, a group of around 50 scientists and engineers, we are on a mission to build a new generation of dynamic end-to-end prediction models (and agents) for our warehouses based on GenAI and LLMs. These models will be able to understand and make use of petabytes of human-centered as well as process information, and learn to perceive and act to further improve our world-class customer experience – at Amazon scale. We are looking for a Sr. Applied Scientist who will become of the research leads in a team that builds next-level end-to-end process predictions and shift simulations for all systems in a full warehouse with the help of generative AI, graph neural networks, and LLMs. Together, we will be pushing beyond the state of the art in simulation and optimization of one of the most complex systems in the world: Amazon's Fulfillment Network. Key job responsibilities In this role, you will dive deep into our fulfillment network, understand complex processes, and channel your insights to build large-scale machine learning models (LLMs and Transformer-based GNNs) that will be able to understand (and, eventually, optimize) the state and future of our buildings, network, and orders. You will face a high level of research ambiguity and problems that require creative, ambitious, and inventive solutions. You will work with and in a team of applied scientists to solve cutting-edge problems going beyond the published state of the art that will drive transformative change on a truly global scale. You will identify promising research directions, define parts of our research agenda and be a mentor to members of our team and beyond. You will influence the broader Amazon science community and communicate with technical, scientific and business leaders. If you thrive in a dynamic environment and are passionate about pushing the boundaries of generative AI, LLMs, and optimization systems, we want to hear from you. A day in the life Amazon offers a full range of benefits that support you and eligible family members, including domestic partners and their children. Benefits can vary by location, the number of regularly scheduled hours you work, length of employment, and job status such as seasonal or temporary employment. The benefits that generally apply to regular, full-time employees include: 1. Medical, Dental, and Vision Coverage 2. Maternity and Parental Leave Options 3. Paid Time Off (PTO) 4. 401(k) Plan If you are not sure that every qualification on the list above describes you exactly, we'd still love to hear from you! At Amazon, we value people with unique backgrounds, experiences, and skillsets. If you’re passionate about this role and want to make an impact on a global scale, please apply! About the team Amazon Fulfillment Technologies (AFT) powers Amazon’s global fulfillment network. We invent and deliver software, hardware, and data science solutions that orchestrate processes, robots, machines, and people. We harmonize the physical and virtual world so Amazon customers can get what they want, when they want it. The AFT AI team has deep expertise developing cutting edge AI solutions at scale and successfully applying them to business problems in the Amazon Fulfillment Network. These solutions typically utilize machine learning and computer vision techniques, applied to text, sequences of events, images or video from existing or new hardware. We influence each stage of innovation from inception to deployment, developing a research plan, creating and testing prototype solutions, and shepherding the production versions to launch.
US, CA, Santa Clara
Machine learning (ML) has been strategic to Amazon from the early years. We are pioneers in areas such as recommendation engines, product search, eCommerce fraud detection, and large-scale optimization of fulfillment center operations. The Generative AI team helps AWS customers accelerate the use of Generative AI to solve business and operational challenges and promote innovation in their organization. As an applied scientist, you are proficient in designing and developing advanced ML models to solve diverse challenges and opportunities. You will be working with terabytes of text, images, and other types of data to solve real-world problems. You'll design and run experiments, research new algorithms, and find new ways of optimizing risk, profitability, and customer experience. We’re looking for talented scientists capable of applying ML algorithms and cutting-edge deep learning (DL) and reinforcement learning approaches to areas such as drug discovery, customer segmentation, fraud prevention, capacity planning, predictive maintenance, pricing optimization, call center analytics, player pose estimation, event detection, and virtual assistant among others. Key job responsibilities The primary responsibilities of this role are to: • Design, develop, and evaluate innovative ML models to solve diverse challenges and opportunities across industries • Interact with customer directly to understand their business problems, and help them with defining and implementing scalable Generative AI solutions to solve them • Work closely with account teams, research scientist teams, and product engineering teams to drive model implementations and new solution A day in the life ABOUT AWS: Diverse Experiences Amazon values diverse experiences. Even if you do not meet all of the preferred qualifications and skills listed in the job description, we encourage candidates to apply. If your career is just starting, hasn’t followed a traditional path, or includes alternative experiences, don’t let it stop you from applying. Why AWS Amazon Web Services (AWS) is the world’s most comprehensive and broadly adopted cloud platform. We pioneered cloud computing and never stopped innovating — that’s why customers from the most successful startups to Global 500 companies trust our robust suite of products and services to power their businesses. Work/Life Balance We value work-life harmony. Achieving success at work should never come at the expense of sacrifices at home, which is why we strive for flexibility as part of our working culture. When we feel supported in the workplace and at home, there’s nothing we can’t achieve in the cloud. Inclusive Team Culture Here at AWS, it’s in our nature to learn and be curious. Our employee-led affinity groups foster a culture of inclusion that empower us to be proud of our differences. Ongoing events and learning experiences, including our Conversations on Race and Ethnicity (CORE) and AmazeCon (gender diversity) conferences, inspire us to never stop embracing our uniqueness. Mentorship and Career Growth We’re continuously raising our performance bar as we strive to become Earth’s Best Employer. That’s why you’ll find endless knowledge-sharing, mentorship and other career-advancing resources here to help you develop into a better-rounded professional.
US, WA, Bellevue
The Geospatial science team solves problems at the interface of ML/AI and GIS for Amazon's last mile delivery programs. We have access to Earth-scale datasets and use them to solve challenging problems that affect hundreds of thousands of transporters. We are looking for strong candidates to join the transportation science team which owns time estimation, GPS trajectory learning, and sensor fusion from phone data. You will join a team of GIS and ML domain experts and be expected to develop ML models, present research results to stakeholders, and collaborate with SDEs to implement the models in production. Key job responsibilities - Understand business problems and translate them into science problems - Develop ML models - Present research results - Write and publish papers - Write production code - Collaborate with SDEs and other scientists
IN, KA, Bengaluru
Job Description AOP(Analytics Operations and Programs) team is responsible for creating core analytics, insight generation and science capabilities for ROW Ops. We develop scalable analytics applications and research modeling to optimize operation processes.. You will work with professional Product Managers, Data Engineers, Data Scientists, Research Scientists, Applied Scientists and Business Intelligence Engineers using rigorous quantitative approaches to ensure high quality data/science products for our customers around the world. We are looking for an Applied Scientist to join our growing Science Team in Bangalore/Hyderabad. As an Applied Scientist, you are able to use a range of science methodologies to solve challenging business problems when the solution is unclear. You will be responsible for building ML models to solve complex business problems and test them in production environment. The scope of role includes defining the charter for the project and proposing solutions which align with org's priorities and production constraints but still create impact . You will achieve this by leveraging strong leadership and communication skills, data science skills and by acquiring domain knowledge pertaining to the delivery operations systems. You will provide ML thought leadership to technical and business leaders, and possess ability to think strategically about business, product, and technical challenges. You will also be expected to contribute to the science community by participating in science reviews and publishing in internal or external ML conferences. Our team solves a broad range of problems that can be scaled across ROW (Rest of the World including countries like India, Australia, Singapore, MENA and LATAM). Here is a glimpse of the problems that this team deals with on a regular basis: • Using live package and truck signals to adjust truck capacities in real-time • HOTW models for Last Mile Channel Allocation • Using LLMs to automate analytical processes and insight generation • Using ML to predict parameters which affect truck scheduling • Working with global science teams to predict Shipments Per Route for $MM savings • Deep Learning models to classify addresses based on various attributes Key job responsibilities 1. Use machine learning and analytical techniques to create scalable solutions for business problems Analyze and extract relevant information from large amounts of Amazon’s historical business data to help automate and optimize key processes 2. Design, develop, evaluate and deploy, innovative and highly scalable ML models 3. Work closely with other science and engineering teams to drive real-time model implementations 4. Work closely with Ops/Product partners to identify problems and propose machine learning solutions 5. Establish scalable, efficient, automated processes for large scale data analyses, model development, model validation and model maintenance 6. Work proactively with engineering teams and product managers to evangelize new algorithms and drive the implementation of large-scale complex ML models in production 7. Leading projects and mentoring other scientists, engineers in the use of ML techniques As part of our team, candidate in this role will work in close collaboration with other applied scientists and cross functional teams on high visibility projects with direct exposure to the senior leadership team on regular basis. About the team This team is responsible for applying science based algo and techniques to solve the problems in operation and supply chain. Some of these problems include Truck Scheduling, LM capacity planning, LLM and so on.
US, WA, Seattle
Amazon continues to invest heavily in building our world class advertising business. 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, breaking fresh ground to create world-class products. We are highly motivated, collaborative and fun-loving with an entrepreneurial spirit and strong 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 Sponsored Products Monetization team is broadly responsible for pricing of ads on Amazon search pages, balancing short-term and long-term ad revenue growth to drive sustainable marketplace health. As a Senior Applied Scientist on our team, you will be responsible for defining the science and technical strategy for one of our most impactful marketplace controls, creating lasting value for Amazon and our advertising customers. You will help to identify unique opportunities to create customized and delightful shopping experience for our growing marketplaces worldwide. Your job will be identify big opportunities for the team that can help to grow Sponsored Products business working with retail partner teams, Product managers, Software engineers and PMs. You will have opportunity to design, run and analyze A/B experiments to improve the experience of millions of Amazon shoppers while driving quantifiable revenue impact. More importantly, you will have the opportunity to broaden your technical skills in an environment that thrives on creativity, experimentation, and product innovation. Key job responsibilities - Lead science, tech and business strategy and roadmap for Sponsored Products Monetization - Drive alignment across multiple organizations for science, engineering and product strategy to achieve business goals - Lead and mentor scientists and engineers across teams to develop, test, launch and improve of science models designed to optimize the shopper experience and deliver long term value for Amazon and advertisers - Develop state of the art experimental approaches and ML models - Drive end-to-end Machine Learning projects that have a high degree of ambiguity, scale, complexity - Establish scalable, efficient, automated processes for large-scale data analysis, machine-learning model development, model validation and serving - Research new and innovative machine learning approaches - Recruit Scientists to the team and provide mentorship
IN, KA, Bengaluru
The Amazon Artificial Generative Intelligence (AGI) 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 job responsibilities - 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
US, WA, Seattle
The Private Brands Discovery team designs innovative machine learning solutions to enhance customer awareness of Amazon’s own brands and help customers find products they love. This interdisciplinary team of scientists and engineers incubates and develops disruptive solutions using cutting-edge technology to tackle some of the most challenging scientific problems at Amazon. To achieve this, the team utilizes methods from Natural Language Processing, deep learning, large language models (LLMs), multi-armed bandits, reinforcement learning, Bayesian optimization, causal and statistical inference, and econometrics to drive discovery throughout the customer journey. Our solutions are crucial to the success of Amazon’s private brands and serve as a model for discovery solutions across the company. This role presents a high-visibility opportunity for someone eager to make a business impact, delve into large-scale problems, drive measurable actions, and collaborate closely with scientists and engineers. As a team lead, you will be responsible for developing and coaching talent, guiding the team in designing and developing cutting-edge models, and working with business, marketing, and software teams to address key challenges. These challenges include building and improving models for sourcing, relevance, and CTR/CVR estimation, deploying reinforcement learning methods in production etc. In this role, you will be a technical leader in applied science research with substantial scope, impact, and visibility. A successful team lead will be an analytical problem solver who enjoys exploring data, leading problem-solving efforts, guiding the development of new frameworks, and engaging in investigations and algorithm development. You should be capable of effectively interfacing between technical teams and business stakeholders, pushing the boundaries of what is scientifically possible, and maintaining a sharp focus on measurable customer and business impact. Additionally, you will mentor and guide scientists to enhance the team's talent and expand the impact of your work.
CA, ON, Toronto
Amazon Advertising is one of Amazon's fastest growing and most profitable businesses. As a core product offering within our advertising portfolio, Sponsored Products (SP) helps merchants, retail vendors, and brand owners succeed via native advertising, which grows incremental sales of their products sold through Amazon. The SP team's primary goals are to help shoppers discover new products they love, be the most efficient way for advertisers to meet their business objectives, and build a sustainable business that continuously innovates on behalf of customers. Our products and solutions are strategically important to enable our Retail and Marketplace businesses to drive long-term growth. We deliver billions of ad impressions and millions of clicks and break fresh ground in product and technical innovations every day! Why you love this opportunity Amazon is investing heavily in building a world-class advertising business. This team is responsible for defining and delivering a collection of advertising products that drive discovery and sales. Our solutions generate billions in revenue and drive long-term growth for Amazon’s Retail and Marketplace businesses. We deliver billions of ad impressions, millions of clicks daily, and break fresh ground to create world-class products. We are highly motivated, collaborative, and fun-loving team with an entrepreneurial spirit - with a broad mandate to experiment and innovate. Impact and Career Growth You will invent new experiences and influence customer-facing shopping experiences to help suppliers grow their retail business and the auction dynamics that leverage native advertising; this is your opportunity to work within the fastest-growing businesses across all of Amazon! Define a long-term science vision for our advertising business, driven fundamentally from our customers' needs, translating that direction into specific plans for research and applied scientists, as well as engineering and product teams. This role combines science leadership, organizational ability, technical strength, product focus, and business understanding. Key job responsibilities As an Applied Scientist on this team you will: * Build machine learning models and utilize data analysis to deliver scalable solutions to business problems. * Perform hands-on analysis and modeling with very large data sets to develop insights that increase traffic monetization and merchandise sales without compromising shopper experience. * Work closely with software engineers on detailed requirements, technical designs and implementation of end-to-end solutions in production. * Design and run A/B experiments that affect hundreds of millions of customers, evaluate the impact of your optimizations and communicate your results to various business stakeholders. * Work with scientists and economists to model the interaction between organic sales and sponsored content and to further evolve Amazon's marketplace. * Establish scalable, efficient, automated processes for large-scale data analysis, machine-learning model development, model validation and serving. * Research new predictive learning approaches for the sponsored products business. * Write production code to bring models into production.
US, WA, Seattle
Amazon is investing heavily in building a world class advertising business and developing a collection of self-service performance advertising products that drive discovery and sales. Our products are strategically important to our Retail and Marketplace businesses for 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. Sponsored Products DP Experience and Market place org is looking for a strong Applied Scientist who can delight our customers by continually learning and inventing. Our ideal candidate is an experienced Applied Scientist who has a track-record of performing deep analysis and is passionate about applying advanced ML and statistical techniques to solve real-world, ambiguous and complex challenges to optimize and improve the product performance, and who is motivated to achieve results in a fast-paced environment. The position offers an exceptional opportunity to grow your technical and non-technical skills and make a real difference to the Amazon Advertising business. As an Applied Scientist in the Blended Widgets team, you will: * Conduct hands-on data analysis, and run regular A/B experiments, gather data, perform statistical analysis and deep dive, and communicate the impact to senior management * Rapidly design, prototype and test many possible hypotheses in a high-ambiguity environment, making use of both quantitative analysis and business judgment * Establish scalable, efficient, automated processes for large-scale data analysis, machine-learning model development, model validation and serving * Collaborate with software engineering teams to integrate successful experimental results into large-scale, highly complex Amazon production systems * Promote the culture of experimentation and applied science at Amazon Team video https://youtu.be/zD_6Lzw8raE We are also open to consider the candidate in New York, or Seattle.