Distributed “Re-Ranker” ensures that Alexa improvements reach customers ASAP

Suppose that you say to Alexa, “Alexa, play Mary Poppins.” Alexa must decide whether you mean the book, the video, or the soundtrack. How should she do it?

Each of Alexa’s core domains — such as the Books domain, the Video domain, or the Music domain — has its own natural-language-understanding (NLU) model, which estimates the likelihood that a given request is intended for it. But those models are trained on different data, so there’s no guarantee that their probability estimates are compatible. Should a 70% estimate from Music be given priority over a 68% estimate from Books, or is it possible that, when it comes to Mary Poppins, the Music model is slightly overconfident?

The standard way to address this problem is to train a machine learning system to take probability estimates from multiple domain models and weight them so that they’re more directly comparable. But in a paper we’re presenting at this year’s IEEE Spoken Language Technologies conference, my colleagues and I present an alternative: a method that lets each domain develop its own weighting procedure, independent of the others.

The advantage of this approach is that each domain can update its own weighting system whenever required, and multiple domains can perform updates in parallel, which is more efficient. We are already using this method in production, to ensure that Alexa customers benefit from system updates as quickly as possible. We call it re-ranking, because it takes a list of domain-specific hypotheses ranked according to an NLU model’s confidence scores and re-ranks them according to a learned set of weights.

Those weights don’t just apply to the domain classification probability. Alexa’s NLU models also classify utterances by intent, or the action the customer wants performed, and slot, or the data item the intent is supposed to act upon. And like the domain classifications, intent and slot classifications are probabilistic.

Within the Music domain, for instance, the utterance “play Thriller” would probably call up the PlayMusic intent (as opposed to, say, the CreateList intent), but the slot classifier might assign similar probabilities to the classifications of the word “Thriller” as AlbumName and SongName.

During training, we feed one of our domain-specific re-rankers not just the domain classification probability for each utterance but the most probable intent and slot hypotheses, too. It could be, for instance, that for purposes of re-ranking, intent confidence is more important than domain confidence, or vice versa.

The system learns these relative values during training, and it produces separate weights for each classification category — domain, intent, and slot. It can also factor contextual information into its re-rankings, learning, for instance, that on a Fire TV, it should give more precedence to Video domain hypotheses than it should on a voice-only device.

In experiments, we trained our re-ranker using several evaluation criteria, or “loss functions.” The first loss function relies on a metric we call semantic error, which counts the number of errors in a given classification hypothesis and divides it by the total number of intents and slots in the correct classification. If an utterance in the training set has one intent and two slots, for instance, then a hypothesis that gets the intent and one slot right but misses the other slot would have a semantic-error score of 1/3.

Semantic-error-rate_example.png._CB461160527_.png
Examples of semantic-error (SemER) scores for several Books domain hypotheses about the classification of the utterance “play Moana”.

Our first loss function is called expected semantic error. It imposes a penalty on rankings in which hypotheses with high semantic error rank ahead of hypotheses with low semantic error.

The second loss function is a so-called cross-entropy function. It eschews the comparatively fine-grained semantic-error measure in favor of a simple one-bit tag that indicates whether a given hypothesis is true or not. But it imposes a particularly stiff penalty on incorrect hypotheses that get high confidence scores, and it confers a large bonus on true hypotheses that get high confidence scores.

This is the loss function we introduce to calibrate scores across domains. It inclines toward weights that correct for overconfidence, but by rewarding the ability to distinguish true hypotheses so lavishly, it also prevents overcompensation.

Our third loss function simply combines the first two — the expected-semantic-error function and the cross-entropy function. We also compare systems trained on all three loss functions to one that uses no domain-specific weighting at all.

The graph below summarizes our results. The dotted line represents perfect calibration of confidence scores across all domains. The better our re-rankers approximate that line, the better calibration they afford.

Our first observation is that the unweighted baseline system is already fairly well calibrated, a tribute to the quality of the domain-specific NLU models. Our second is that, while the combination of expected semantic error and cross-entropy (R3) does indeed yield the best calibration, it’s only slightly better than cross-entropy alone (R2), which is significantly better than expected semantic error alone (R1). In production we use the combined loss function to ensure the best possible experience for our customers.

Calibration_plots.jpg._CB461173753_.jpg

Acknowledgments: Rahul Gupta, Shankar Ananthakrishnan, Spyros Matsoukas

Related content

US, WA, Seattle
The Artificial General Intelligent team (AGI) seeks a passionate, talented, and resourceful Applied Scientist in the field of LLM, Artificial Intelligence (AI), Natural Language Processing (NLP) and/or Information Retrieval, to invent and build scalable solutions for a state-of-the-art context-aware conversational AI. As part of this team, you will collaborate with talented peers to create scalable solutions for an innovative conversational assistant, aiming to revolutionize user experiences for millions of Alexa customers. The ideal candidate possesses a solid understanding of machine learning fundamentals and a passion for pushing boundaries in the field. They thrive in fast-paced environments, possess the drive to tackle complex challenges, and excel at swiftly delivering impactful solutions while iterating based on user feedback. Join us in our mission to redefine industry standards and provide unparalleled experiences for our customers. Key job responsibilities . You will analyze, understand and improve user experiences by leveraging Amazon’s heterogeneous data sources and large-scale computing resources to accelerate advances in artificial intelligence. . You will work on core LLM technologies, including developing best-in-class modeling, prompt optimization algorithms to enable Conversation AI use cases · Build and measure novel online & offline metrics for personal digital assistants and customer scenarios, on diverse devices and endpoints · Create, innovate and deliver deep learning, policy-based learning, and/or machine learning based algorithms to deliver customer-impacting results · Perform model/data analysis and monitor metrics through online A/B testing · Research and implement novel machine learning and deep learning algorithms and models. We are open to hiring candidates to work out of one of the following locations: Bellevue, WA, USA | Boston, MA, USA | Seattle, WA, USA
US, WA, Redmond
Project Kuiper is an initiative to increase global broadband access through a constellation of 3,236 satellites in low Earth orbit (LEO). Its mission is to bring fast, affordable broadband to unserved and underserved communities around the world. Project Kuiper will help close the digital divide by delivering fast, affordable broadband to a wide range of customers, including consumers, businesses, government agencies, and other organizations operating in places without reliable connectivity. As an Applied Scientist on the team you will responsible for building out and maintaining the algorithms and software services behind one of the world’s largest satellite constellations. You will be responsible for developing algorithms and applications that provide mission critical information derived from past and predicted satellite orbits to other systems and organizations rapidly, reliably, and at scale. You will be focused on contributing to the design and analysis of software systems responsible across a broad range of areas required for automated management of the Kuiper constellation. You will apply knowledge of mathematical modeling, optimization algorithms, astrodynamics, state estimation, space systems, and software engineering across a wide variety of problems to enable space operations at an unprecedented scale. You will develop features for systems to interface with internal and external teams, predict and plan communication opportunities, manage satellite orbits determination and prediction systems, develop analysis and infrastructure to monitor and support systems performance. Your work will interface with various subsystems within Project Kuiper and Amazon, as well as with external organizations, to enable engineers to safely and efficiently manage the satellite constellation. The ideal candidate will be detail oriented, strong organizational skills, able to work independently, juggle multiple tasks at once, and maintain professionalism under pressure. You should have proven knowledge of mathematical modeling and optimization along with strong software engineering skills. You should be able to independently understand customer requirements, and use data-driven approaches to identify possible solutions, select the best approach, and deliver high-quality applications. Export Control Requirement: Due to applicable export control laws and regulations, candidates must be a U.S. citizen or national, U.S. permanent resident (i.e., current Green Card holder), or lawfully admitted into the U.S. as a refugee or granted asylum. About the team The Constellation Management & Space Safety team maintains and builds the software services responsible for maintaining situational awareness of Kuiper satellites through their entire lifecycle in space. We coordinate with internal and external organizations to maintain the nominal operational state of the constellation. We build automated systems that use satellite telemetry and other relevant data to predict future orbits, plan maneuvers to avoid high risk close approaches with other objects in space, keep satellites in the desired locations, and exchange data with external organizations. We provide visibility information that is used to predict and establish communication channels for Kuiper satellites. We are open to hiring candidates to work out of one of the following locations: Redmond, WA, USA
US, WA, Seattle
Join us in the evolution of Amazon’s Seller business! The Selling Partner Recruitment and Success organization is the growth and development engine for our Store. Partnering with business, product, and engineering, we catalyze SP growth with comprehensive and accurate data, unique insights, and actionable recommendations and collaborate with WW SP facing teams to drive adoption and create feedback loops. We strongly believe that any motivated SP should be able to grow their businesses and reach their full potential by using our scaled, automated, and self-service tools. We aim to accelerate the growth of Sellers by providing tools and insights that enable them to make better and faster decisions at each step of selection management. To accomplish this, we offer intelligent insights that are both detailed and actionable, allowing Sellers to introduce new products and engage with customers effectively. We leverage extensive structured and unstructured data to generate science-based insights about their business. Furthermore, we provide personalized recommendations tailored to individual Sellers' business objectives in a user-friendly format. These insights and recommendations are integrated into our products, including Amazon Brand Analytics (ABA), Product Opportunity Explorer (OX), and Manage Your Growth (MYG). We are looking for a talented and passionate Sr. Research Scientist to lead our research endeavors and develop world-class statistical and machine learning models. The successful candidate will work closely with Product Managers (PM), User Experience (UX) designers, engineering teams, and Seller Growth Consulting teams to provide actionable insights that drive improvements in Seller businesses. Key job responsibilities 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. About the team The Seller Growth science team aims to provide data and science solutions to drive Seller growth and create better Seller experiences. We structure our science domain with three key themes and two horizontal components. We discover the opportunity space by identifying opportunities with unrealized potential, then generate actionable analytics to identify high value actions (HVAs) that unlock the opportunity space, and finally, empower Sellers with personalized Growth Plans and differentiated treatment that help them realize their potential. We are open to hiring candidates to work out of one of the following locations: Seattle, WA, USA
GB, London
Amazon Advertising is looking for a Senior Applied Scientist to join its brand new initiative that powers Amazon’s contextual advertising product. Advertising at Amazon is a fast-growing multi-billion dollar business that spans across desktop, mobile and connected devices; encompasses ads on Amazon and a vast network of hundreds of thousands of third party publishers; and extends across US, EU and an increasing number of international geographies. We are looking for a dynamic, innovative and accomplished Senior Applied Scientist to work on machine learning and data science initiatives for contextual data processing and classification that power our contextual advertising solutions. Are you excited by the prospect of analyzing terabytes of data and leveraging state-of-the-art data science and machine learning techniques to solve real world problems? Do you like to own business problems/metrics of high ambiguity where yo get to define the path forward for success of a new initiative? As an applied scientist, you will invent ML and Artificial General Intelligence based solutions to power our contextual classification technology. As this is a new initiative, you will get an opportunity to act as a thought leader, work backwards from the customer needs, dive deep into data to understand the issues, conceptualize and build algorithms and collaborate with multiple cross-functional teams. Key job responsibilities * Design, prototype and test many possible hypotheses in a high-ambiguity environment, making use of both analysis and business judgment. * Collaborate with software engineering teams to integrate successful experiments into large-scale, highly complex Amazon production systems. * Promote the culture of experimentation and applied science at Amazon. * Demonstrated ability to meet deadlines while managing multiple projects. * Excellent communication and presentation skills working with multiple peer groups and different levels of management * Influence and continuously improve a sustainable team culture that exemplifies Amazon’s leadership principles. About the team The Supply Quality organization has the charter to solve optimization problems for ad-programs in Amazon and ensure high-quality ad-impressions. We develop advanced algorithms and infrastructure systems to optimize performance for our advertisers and publishers. We are focused on solving a wide variety of problems in computational advertising like Contextual data processing and classification, traffic quality prediction (robot and fraud detection), Security forensics and research, Viewability prediction, Brand Safety and experimentation. Our team includes experts in the areas of distributed computing, machine learning, statistics, optimization, text mining, information theory and big data systems. We are open to hiring candidates to work out of one of the following locations: London, GBR
ES, M, Madrid
At Amazon, we are committed to being the Earth’s most customer-centric company. The International Technology group (InTech) owns the enhancement and delivery of Amazon’s cutting-edge engineering to all the varied customers and cultures of the world. We do this through a combination of partnerships with other Amazon technical teams and our own innovative new projects. You will be joining the Tools and Machine learning (Tamale) team. As part of InTech, Tamale strives to solve complex catalog quality problems using challenging machine learning and data analysis solutions. You will be exposed to cutting edge big data and machine learning technologies, along to all Amazon catalog technology stack, and you'll be part of a key effort to improve our customers experience by tackling and preventing defects in items in Amazon's catalog. We are looking for a passionate, talented, and inventive Scientist with a strong machine learning background to help build industry-leading machine learning solutions. We strongly value your hard work and obsession to solve complex problems on behalf of Amazon customers. Key job responsibilities We look for applied scientists who possess a wide variety of skills. As the successful applicant for this role, you will with work closely with your business partners to identify opportunities for innovation. You will apply machine learning solutions to automate manual processes, to scale existing systems and to improve catalog data quality, to name just a few. You will work with business leaders, scientists, and product managers to translate business and functional requirements into concrete deliverables, including the design, development, testing, and deployment of highly scalable distributed services. You will be part of team of 5 scientists and 13 engineers working on solving data quality issues at scale. You will be able to influence the scientific roadmap of the team, setting the standards for scientific excellence. You will be working with state-of-the-art models, including image to text, LLMs and GenAI. Your work will improve the experience of millions of daily customers using Amazon in Europe and in other regions. You will have the chance to have great customer impact and continue growing in one of the most innovative companies in the world. You will learn a huge amount - and have a lot of fun - in the process! This position will be based in Madrid, Spain We are open to hiring candidates to work out of one of the following locations: Madrid, M, ESP
IN, KA, Bangalore
Appstore Quality tech team builds tools, using AI and engineering techniques to provide the best quality apps to Amazon Appstore users. We are a team of highly-motivated, engaged, and responsive professionals who enable the core testing and quality infrastructure of Amazon Appstore. Come join our team and be a part of history as we deliver results for our customers. Appstore Quality team's mission is to automate all types of functional, non functional, and compliance checks on apps submitted by appstore app developers to enable north star vision of publishing apps in under 5 hours. Our team uses various ML/AI/Generative AI techniques to automatically detect violations in images and text metadata submitted by developers. We are working on ambitious project AI projects such as building LLM, auto navigate a mobile app to detect inside app issues and violations. We are seeking an innovative and technically strong data scientist with a background in optimization, machine learning, and statistical modeling/analysis. This role requires a team member to have strong quantitative modeling skills and the ability to apply optimization/statistical/machine learning methods to complex decision-making problems, with data coming from various data sources. The candidate should have strong communication skills, be able to work closely with stakeholders and translate data-driven findings into actionable insights. The successful candidate will be a self-starter, comfortable with ambiguity, with strong attention to detail and ability to work in a fast-paced and ever-changing environment. This role involves working closely with Sr Data Scientist, Principal engineer, and engineering team to build ML and AL based solutions in meeting our north start vision. Key job responsibilities • Implement statistical methods to solve specific business problems utilizing code (Python, Scala, etc.). • Improve upon existing methodologies by developing new data sources, testing model enhancements, and fine-tuning model parameters. • Collaborate with program management, product management, software developers, data engineering, and business leaders to provide science support, and communicate feedback; develop, test and deploy a wide range of statistical, econometric, and machine learning models. • Build customer-facing reporting tools to provide insights and metrics which track model performance and explain variance. • Communicate verbally and in writing to business customers with various levels of technical knowledge, educating them about our solutions, as well as sharing insights and recommendations. • Earn the trust of your customers by continuing to constantly obsess over their needs and helping them solve their problems by leveraging technology • Excellent prompt engineering skillset with a deep knowledge of LLMs, embeddings, transformer models. • Work with distributed machine learning and statistical algorithms to harness enormous volumes of data at scale to serve our customers About the team In Appstore, “We entertain, and delight, hundreds of millions of people across devices with a vast selection of relevant apps, games, and services by making it trivially easy for developers to deliver”. Appstore team enables the customer and developer flywheel on devices by enabling developers to seamlessly launch and manage their apps/ in-app content on Amazon. It helps customers discover, buy and engage with these apps on Fire TV, Fire Tablets and mobile devices. The technologies we build on vary from device software, to high scale services, to efficient tools for developers. We are open to hiring candidates to work out of one of the following locations: Bangalore, KA, IND
US, WA, Bellevue
Want to be part of the team whose mission is to expand Alexa to new countries, languages, devices and cultures? The Alexa International team makes it happen. Our customers are very diverse in where they live, the languages they speak to Alexa, the devices they use and the content that matters most. In turn, our problems are diverse and need innovative solutions. We are seeking a Senior Applied Science Manager who will play a key role in the next generation of AI powered Conversational Assistants. Key job responsibilities Lead and manage a team of applied and research scientists responsible for building multilingual experiences Collaborate with cross-functional teams to ensure that Amazon’s AI models are aligned with human preferences. Identify and prioritize research opportunities that have the potential to significantly impact our AI systems. Mentor and guide team members to achieve their career goals and objectives. Communicate research findings and progress to senior leadership and stakeholders. We are open to hiring candidates to work out of one of the following locations: Bellevue, WA, USA
US, CA, Sunnyvale
The Artificial General Intelligence (AGI) team is looking for a highly-skilled Senior Applied Scientist, to lead the development and implementation of cutting-edge algorithms and push the boundaries of efficient inference for Generative Artificial Intelligence (GenAI) models. As a Senior Applied Scientist, you will play a critical role in driving the development of GenAI technologies that can handle Amazon-scale use cases and have a significant impact on our customers' experiences. Key job responsibilities - Design and execute experiments to evaluate the performance of different decoding algorithms and models, and iterate quickly to improve results - Develop deep learning models for compression, system optimization, and inference - Collaborate with cross-functional teams of engineers and scientists to identify and solve complex problems in GenAI - Mentor and guide junior scientists and engineers, and contribute to the overall growth and development of the team We are open to hiring candidates to work out of one of the following locations: Bellevue, WA, USA | Boston, MA, USA | New York, NY, USA | Sunnyvale, CA, USA
US, NJ, Newark
Employer: Audible, Inc. Title: Data Scientist II Location: One Washington Park, Newark, NJ, 07102 Duties: Design and implement scalable and reliable approaches to support or automate decision making throughout the business. Apply a range of data science techniques and tools combined with subject matter expertise to solve difficult business problems and cases in which the solution approach is unclear. Acquire data by building the necessary SQL / ETL queries. Import processes through various company specific interfaces for accessing RedShift, and S3 / edX storage systems. Build relationships with stakeholders and counterparts, and communicate model outputs, observations, and key performance indicators (KPIs) to the management to develop sustainable and consumable products. Explore and analyze data by inspecting univariate distributions and multivariate interactions, constructing appropriate transformations, and tracking down the source and meaning of anomalies. Build production-ready models using statistical modeling, mathematical modeling, econometric modeling, machine learning algorithms, network modeling, social network modeling, natural language processing, or genetic algorithms. Validate models against alternative approaches, expected and observed outcome, and other business defined key performance indicators. Implement models that comply with evaluations of the computational demands, accuracy, and reliability of the relevant ETL processes at various stages of production. Position reports into Newark, NJ office; however, telecommuting from a home office may be allowed. Requirements: Requires a Master’s in Statistics, Computer Science, Data Science, Machine Learning, Applied Math, Operations Research, Economics, or a related field plus two (2) years of experience as a Data Scientist, Data Engineer, or other occupation/position/job title involving research and data analysis. Experience may be gained concurrently and must include one (1) year in each of the following: - Building statistical models and machine learning models using large datasets from multiple resources - Working with Customer, Content, or Product data modeling and extraction - Using database technologies such as SQL or ETL - Applying specialized modelling software including Python, R, SAS, MATLAB, or Stata. Alternatively, will accept a Bachelor's and four (4) years of experience. Multiple positions. Apply online: www.amazon.jobs Job Code: ADBL157. We are open to hiring candidates to work out of one of the following locations: Newark, NJ, USA
US, CA, Sunnyvale
The Artificial General Intelligence (AGI) team is looking for a highly-skilled Senior Applied Scientist, to lead the development and implementation of cutting-edge algorithms and push the boundaries of efficient inference for Generative Artificial Intelligence (GenAI) models. As a Senior Applied Scientist, you will play a critical role in driving the development of GenAI technologies that can handle Amazon-scale use cases and have a significant impact on our customers' experiences. Key job responsibilities - Design and execute experiments to evaluate the performance of different decoding algorithms and models, and iterate quickly to improve results - Develop deep learning models for compression, system optimization, and inference - Collaborate with cross-functional teams of engineers and scientists to identify and solve complex problems in GenAI - Mentor and guide junior scientists and engineers, and contribute to the overall growth and development of the team We are open to hiring candidates to work out of one of the following locations: Bellevue, WA, USA | Boston, MA, USA | New York, NY, USA | Sunnyvale, CA, USA