Making machine translation more robust, consistent, and stable

Training on pseudo-labeled data limits the consequences of slight input variations and prevents updated models from backsliding on particular tasks.

Like many other machine learning applications, neural machine translation (NMT) benefits from overparameterized deep neural models — models so large that they would seem to risk overfitting but whose performance, for some reason, keeps scaling with the number of parameters.

Recently, larger models have mounted impressive improvements in translation quality, but like the models used in other applications, the NMT models are brittle: predictions are sensitive to small input changes, and there can be significant changes in model predictions when models are retrained. Users can be negatively affected, especially if they come to expect certain outputs for downstream tasks.

Especially jarring are cases where the model suddenly produces worse outputs on identical input segments. While these effects have been studied earlier in classification tasks, where an input is sorted into one of many existing categories, they haven’t been as well explored for generation tasks, where the output is a novel data item or sequence.

Translation model brittleness.png
Larger neural networks have mounted impressive results in machine translation, but these models are brittle. For example, (a) misspellings can change the output of a machine translation model, or (b) a change in the random seed during training, which can occur for reasons unrelated to the model itself (e.g., changing hardware), can lead to different results.

In a paper we recently presented at the International Conference on Learning Representations (ICLR), we investigated the issue of model robustness, consistency, and stability to updates — a set of properties we call model inertia. We found that the technique of using pseudo-labeled data in model training — i.e., pseudo-label training (PLT) — has the underreported side effect of improving model inertia.

Related content
Transfer learning using limited contrastive data improves formality accuracy without compromising performance.

In particular, we looked at bidirectional arcs between low- and high-resourced languages (en ↔ de, en ↔ ru, and en ↔ ja), and PLT improved model inertia across all of them. We also introduced a means of measuring regression — in which an updated model backslides on particular tasks — in generation models and show that it is also reduced by PLT. Having observed these effects, we hypothesize that a distribution simplification effect is at play and may hold more generally for other generation tasks.

Experiments

In our experiments, we examined several different flavors of PLT common in machine translation. In certain applications (e.g., non-autoregressive machine translation), unlabeled data or monolingual data is made into parallel data by translating (pseudo-labeling) the monolingual data. This is typically known as self-training or forward translation. In other contexts (e.g., knowledge distillation), it is common to use a larger model (a teacher model) to pseudo-label the training data and train a smaller model (a student model) on the combination of pseudo-labeled and parallel training data.

PLT for NMT.png
In this work, we studied how pseudo-label training (PLT) influences model inertia — i.e., model consistency, robustness, and stability to updates. We studied (a) how outputs change when inputs are changed; (b) how outputs are changed when random seeds used in training are changed; and (c) the number of negative flips, or regressions in quality, that occur after updates.

First, we tested the impact that adding pseudo-labeled data has on model robustness to minor variations in the inputs. We looked at synthetically generated misspellings where one character is randomly replaced by another and also at naturally occurring grammatical errors. We then compared the outputs of the machine translation models with and without these variations and measured how consistent (i.e., similar) the outputs are and the robustness of the models (i.e., how much quality degrades). We found that training on pseudo-labeled data makes models more consistent and that this wasn’t a function of the amount of training data or the size of the teacher model.

Random seed.png
We studied how PLT produces models that are more stable under incremental updates, which we model as changes in a random seed. We find that even with such minor updates, less than 10% of outputs remain the same. The inclusion of pseudo-labeled data almost doubles the number of outputs that are exact matches (EM) and increases stability (St.), defined as the lexical similarity between outputs, by roughly 20%.

We also considered the scenario in which models are incrementally updated (i.e., no changes to the model architecture, no major changes to the data, etc.) and tested whether models were more stable when we changed random seeds in student models or teacher models. We looked at the number of segments that were exact matches (EM) of each other and the stability (St.) of the models, which we defined as the lexical similarity of the outputs under changes in random seed. Surprisingly, we found that upwards of 90% of outputs are changed, just by changes in random seeds. We found that with pseudo-label data, the models are more stable by 20%, and close to double the number of segments are similar.

Related content
Test set includes 1,150 text segments, each in nine languages.

Given the large number of output changes, we naturally asked if the model makes worse translations for specific inputs, i.e., negative flips. Previously, negative flips have been studied in the context of classification, but in machine translation, the concept is more nebulous, since metrics can be noisy on the level of sentence segments. Consequently, we used human evaluations of our models to see if models had regressed.

Given the limitations in human evaluations, we also looked at a targeted error category that allowed us to measure segment-level regression automatically. In this work, we adopted gender translation accuracy as the targeted error and tested on the WinoMT dataset. We found that PLT methods reduce the number of negative flips in terms of regressions on the targeted and generic quality metric.

A hypothesis

Having observed an improvement in the model inertia of models trained on pseudo-labeled data, we set out to investigate the reasons behind it. We hypothesized that the improvement comes from a distribution-simplification effect similar to one seen in non-autoregressive MT. To test this idea, we conducted experiments comparing pseudo-label training with several other techniques well-known in MT for producing more robust models: BPE-Dropout, Back-translation, and n-best sampling.

We then looked at how each of these methods reduced the complexity of the training data, using a metric called the conditional entropy. Across the methods we experimented with, we found that model stability is correlated with simpler training distributions as measured by the conditional entropy.

PLT-NMT results.png
Across the methods we experimented with, we found that model stability is correlated with simpler training distributions as measured by conditional entropy, C(d).

As we enter an era where ever larger neural networks come into wider use to solve a variety of generation tasks, with the potential to shape the user experience in unimaginable ways, controlling these models to produce more robust, consistent, and stable outputs becomes paramount. We hope that by sharing our results, we can help make progress toward a world where AI evolves gracefully over time.

Research areas

Related content

US, CA, Palo Alto
We’re working to improve shopping on Amazon using the conversational capabilities of large language models, and are searching for pioneers who are passionate about technology, innovation, and customer experience, and are ready to make a lasting impact on the industry. You’ll be working with talented scientists, engineers, and technical program managers (TPM) to innovate on behalf of our customers. If you’re fired up about being part of a dynamic, driven team, then this is your moment to join us on this exciting journey! We are open to hiring candidates to work out of one of the following locations: Palo Alto, CA, USA
US, WA, Redmond
Project Kuiper is an initiative to launch a constellation of Low Earth Orbit satellites that will provide low-latency, high-speed broadband connectivity to unserved and underserved communities around the world. We are searching for talented candidates with experience in spaceflight trajectory modeling and simulation, orbit mechanics, and launch vehicle mission planning. Key job responsibilities This position requires experience in simulation and analysis of astrodynamics models and spaceflight trajectories. This position requires experience in software development for astrodynamics applications and expertise in supporting mission workflow for satellite operations. Strong analysis skills are required to develop engineering studies of complex large-scale dynamical systems. This position requires demonstrated expertise in computational analysis automation and tool development. Working with the Kuiper engineering team, you will: - Develop modeling techniques for analysis and simulation of deployment dynamics of multiple satellites - Support Project Kuiper’s Launch Vehicle Mission Management team with technical expertise in Launch Vehicle trajectory requirements specification - Develop tools to support Mission Management planning for over 80 launches! - Work collaboratively with launch vehicle system technical teams - Provide support of algorithm development and testing for the Kuiper Flight Dynamics System. - Provide software development support of production code. 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. We are open to hiring candidates to work out of one of the following locations: Redmond, WA, USA
CN, 11, Beijing
Are you interested in applying your strong quantitative analysis and big data skills to world-changing problems? Are you interested in driving the development of methods, models and systems for strategy planning, transportation and fulfillment network? Are you interested to cooperate with Amazonians around the world? If so, then this is the job for you. Our team, ATE(Analytics Technology and Engineering) is looking for an Applied Scientist to join our growing Science Team in Bangalore (India)/ Beijing(China). We are responsible for creating core analytics tech capabilities, quantative models, platforms development, and data engineering. We develop scalable analytics applications and research models to optimize operations processes. We standardize and optimize data sources and visualization efforts across geographies, build up, and maintain the online business intelligence services and data mart. You will work with other scientists, professional data engineers, business intelligence engineers, and product managers using rigorous quantitative approaches to ensure high quality data tech products for our customers around the world, including India, Australia, Brazil, Mexico, Singapore and Middle East. Amazon is growing rapidly and because we are driven by faster delivery to customers, a more efficient supply chain network, and lower cost of operations, our main focus is in the development of strategic models and automation tools fed by our massive amounts of available data. You will be responsible for building these models/tools that improve the economics of Amazon’s worldwide fulfillment networks in different countries as Amazon increases the speed and decreases the cost to deliver products to customers. You will work on large-scale vehicle routing and scheduling problems under complex operational and physical constraints. You will also identify and evaluate opportunities to reduce variable costs by improving fulfillment center processes, transportation operations and scheduling, and the execution of operational plans. Finally, you will help create the metrics to quantify improvements to the fulfillment costs (e.g., transportation and labor costs) resulting from the application of these optimization models and tools. Key job responsibilities - Design and develop complex mathematical, simulation and optimization models and apply them to define strategic and tactical needs and drive the appropriate business and technical solutions in the areas of vehicle routing, inventory management, network flow, supply chain optimization, demand planning. - Apply theories of mathematical optimization, including linear programming, combinatorial optimization, integer programming, dynamic programming, network flows and algorithms to design optimal or near optimal solution methodologies to be used by in-house decision support tools and software. - Translating business questions and concerns into specific analytical questions that can be answered with available data using Statistical and Machine Learning methods. - Prototype models by using modeling and programming languages with efficient data querying and modeling infrastructure. - Communicate proposals and results in a clear manner backed by data and coupled with actionable conclusions to drive business decisions. - Collaborate with colleagues from multidisciplinary science, engineering and business backgrounds. - Manage your own process. Prioritize and execute on high impact projects, triage external requests, and ensure to deliver projects in time. We are open to hiring candidates to work out of one of the following locations: Beijing, 11, CHN
GB, Cambridge
Our team builds generative AI solutions that will produce some of the future’s most influential voices in media and art. We develop cutting-edge technologies with Amazon Studios, the provider of original content for Prime Video, with Amazon Game Studios and Alexa, the ground-breaking service that powers the audio for Echo. Do you want to be part of the team developing the future technology that impacts the customer experience of ground-breaking products? Then come join us and make history. We are looking for a passionate, talented, and inventive Applied Scientist with a background in Machine Learning to help build industry-leading Speech, Language, Audio and Video technology. As an Applied Scientist at Amazon you will work with talented peers to develop novel algorithms and generative AI models to drive the state of the art in audio (and vocal arts) generation. Position Responsibilities: * Participate in the design, development, evaluation, deployment and updating of data-driven models for digital vocal arts applications. * Participate in research activities including the application and evaluation and digital vocal and video arts techniques for novel applications. * Research and implement novel ML and statistical approaches to add value to the business. * Mentor junior engineers and scientists. We are open to hiring candidates to work out of one of the following locations: Cambridge, GBR | London, GBR
GB, Cambridge
Our team undertakes research together with multiple organizations to advance the state-of-the-art in speech technologies. We not only work on giving Alexa, the ground-breaking service that powers Echo, her voice, but we also develop cutting-edge technologies with Amazon Studios, the provider of original content for Prime Video. Do you want to be part of the team developing the latest technology that impacts the customer experience of ground-breaking products? Then come join us and make history. We are looking for a passionate, talented, and inventive Senior Applied Scientist with a background in Machine Learning to help build industry-leading Speech, Language and Video technology. As a Senior Applied Scientist at Amazon you will work with talented peers to develop novel algorithms and modelling techniques to drive the state of the art in speech and vocal arts synthesis. Position Responsibilities: * Participate in the design, development, evaluation, deployment and updating of data-driven models for digital vocal arts applications. * Participate in research activities including the application and evaluation and digital vocal and video arts techniques for novel applications. * Research and implement novel ML and statistical approaches to add value to the business. * Mentor junior engineers and scientists. We are open to hiring candidates to work out of one of the following locations: Cambridge, GBR | London, GBR
US, VA, Arlington
The GenAI Innovation Center helps AWS customers accelerate their use of Generative AI to solve business challenges and promote innovation across their organizations. The Public Sector team focuses on public sector customers and their unique challenges. As a data scientist, you have deep and broad experience as an ML practitioner. You interface directly with customers to understand and identify their challenges that can be addressed by Generative AI. You build secure solutions that can scale to the size of the problem at hand and guide customers through your rigorous evaluation process. You'll design and run experiments, research new algorithms, and find new ways of optimizing risk, profitability, and customer experience. You're part of both a small team dedicated to public sector customers and a global organization enabling customers to accelerate their progress on GenAI. This position requires that the candidate selected be a US Citizen. AWS Sales, Marketing, and Global Services (SMGS) is responsible for driving revenue, adoption, and growth from the largest and fastest growing small- and mid-market accounts to enterprise-level customers including public sector. The AWS Global Support team interacts with leading companies and believes that world-class support is critical to customer success. AWS Support also partners with a global list of customers that are building mission-critical applications on top of AWS services. 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 1. Team with a GenAI strategist to understand a customer problem and provide guidance on how and whether GenAI can help address the issue. 2. Share your latest experiment results or challenges with other scientists on the team. 3. Collaborate on a blog post to share the results and methods used in your most recent customer success. 4. Attend or a deliver a tech talk to highlight a project you or a team mate just completed. 5. Provide feedback to your team during a code review. 6. Meet with customer stakeholders to demonstrate the latest progress on their problem. About the team Diverse Experiences AWS values diverse experiences. Even if you do not meet all of the 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. 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 & 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. 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 flexible work hours and arrangements are part of our culture. When we feel supported in the workplace and at home, there’s nothing we can’t achieve in the cloud. We are open to hiring candidates to work out of one of the following locations: Arlington, VA, USA | Denver, CO, USA
US, CA, Santa Clara
Amazon is looking for a motivated individual with strong analytical and algorithmic skills and practical experience to join the Modeling and Optimization (MOP) Routing Science team. Your main focus will be on developing and improving our last-mile experience, with emphasis on algorithmic and analytical work. We are looking for candidates with proven ability to design, implement, and evaluate state-of-the-art solutions to large-scale optimization problems, working closely with software development engineers. The position requires strong background in combinatorial optimization, algorithms, algorithm engineering, and data structures, particularly as it applies to vehicle routing and related problems. Familiarity with data science and Machine Learning techniques is a plus. You will also play an integral role in the network planning, modeling, and analysis that will improve the efficiency and cost effectiveness of global fulfillment operations. You will identify and evaluate opportunities to reduce variable costs by improving the transportation network topology, inventory placement, transportation operations and scheduling, fulfillment center processes, and the execution to operational plans. You will also improve the efficiency of capital investment by helping plan the location and deployment of fixed assets. Finally, you will help create the metrics to quantify improvements to the fulfillment costs (e.g., transportation and labor costs) resulting from the application of these optimization models and tools. Key job responsibilities We are looking for candidates with proven ability to design, implement, and evaluate state-of-the-art solutions to large-scale optimization problems, working closely with software development engineers. The position requires strong background in combinatorial optimization, algorithms, algorithm engineering, and data structures, particularly as it applies to vehicle routing problems. We are open to hiring candidates to work out of one of the following locations: Santa Clara, CA, USA
US, WA, Seattle
We are looking for detail-oriented, organized, and responsible individuals who are eager to learn how to work with large and complicated data sets. Some knowledge of econometrics, as well as basic familiarity with Python is necessary, and experience with SQL and UNIX would be a plus. These are full-time positions at 40 hours per week, with compensation being awarded on an hourly basis. You will learn how to build data sets and perform applied econometric analysis at Internet speed collaborating with economists, scientists, and product managers. These skills will translate well into writing applied chapters in your dissertation and provide you with work experience that may help you with placement. Roughly 85% of previous cohorts have converted to full time economics employment at Amazon. If you are interested, please send your CV to our mailing list at econ-internship@amazon.com. We are open to hiring candidates to work out of one of the following locations: Seattle, WA, USA
US, WA, Seattle
We are looking for detail-oriented, organized, and responsible individuals who are eager to learn how to work with large and complicated data sets. Some knowledge of econometrics, as well as basic familiarity with Python is necessary, and experience with SQL and UNIX would be a plus. These are full-time positions at 40 hours per week, with compensation being awarded on an hourly basis. You will learn how to build data sets and perform applied econometric analysis at Internet speed collaborating with economists, scientists, and product managers. These skills will translate well into writing applied chapters in your dissertation and provide you with work experience that may help you with placement. Roughly 85% of previous cohorts have converted to full time economics employment at Amazon. If you are interested, please send your CV to our mailing list at econ-internship@amazon.com. We are open to hiring candidates to work out of one of the following locations: Seattle, WA, USA
US, MA, North Reading
We are looking for experienced scientists and engineers to explore new ideas, invent new approaches, and develop new solutions in the areas of Controls, Dynamic modeling and System identification. Are you inspired by invention? Is problem solving through teamwork in your DNA? Do you like the idea of seeing how your work impacts the bigger picture? Answer yes to any of these and you’ll fit right in here at Amazon Robotics. We are a smart team of doers that work passionately to apply cutting edge advances in robotics and software to solve real-world challenges that will transform our customers’ experiences in ways we can’t even imagine yet. We invent new improvements every day. We are Amazon Robotics and we will give you the tools and support you need to invent with us in ways that are rewarding, fulfilling and fun. Key job responsibilities Applied Scientists take on big unanswered questions and guide development team to state-of-the-art solutions. We want to hear from you if you have deep industry experience in the Mechatronics domain and : * the ability to think big and conceive of new ideas and novel solutions; * the insight to correctly identify those worth exploring; * the hands-on skills to quickly develop proofs-of-concept; * the rigor to conduct careful experimental evaluations; * the discipline to fast-fail when data refutes theory; * and the fortitude to continue exploring until your solution is found We are open to hiring candidates to work out of one of the following locations: North Reading, MA, USA | Westborough, MA, USA