Bringing code analysis tools to Jupyter notebooks

Based on a survey of thousands of machine learning practitioners, a new CodeGuru extension addresses common problems, such as code cell execution order, incorrect API calls, and security.

The computational notebook is an interactive, web-based programming interface based on the concept of a lab notebook. Users can describe the computations they’re performing — including diagrams — and embed code in the notebook, and the notebook backend will execute the code, integrating the results into the notebook layout.

Jupyter Notebook is the most popular implementation of computational notebooks, and it has become the tool of choice for data scientists. By September 2018, there were more than 2.5 million public Jupyter notebooks on GitHub, and this number has been growing rapidly.

Related content
In a pilot study, an automated code checker found about 100 possible errors, 80% of which turned out to require correction.

However, using Jupyter Notebook poses several challenges related to code maintenance and machine learning best practices. We recently surveyed 2,669 machine learning (ML) practitioners, and 33% of them mentioned that notebooks get easily cluttered due to the mix of code, documentation, and visualization. Similarly, 23% found silent bugs hard to detect, and 18% agreed that global variables are inconsistently used. Another 15% found reproduction of notebooks to be hard, and 6% had difficulty detecting and remediating security vulnerabilities within notebooks.

We are excited to share our recent launch of the Amazon CodeGuru extension for JupyterLab and SageMaker Studio. The extension seamlessly integrates with JupyterLab and SageMaker Studio, and with a single button click, it can provide users feedback and suggestions for improving their code quality and security. To learn more about how to install and use this extension, check out this user guide.

Static analysis

Traditional software development environments commonly use static-analysis tools to identify and prevent bugs and enforce coding standards, but Jupyter notebooks currently lack such tools. We on the Amazon CodeGuru team, which has developed a portfolio of code analysis tools for Amazon Web Services customers, saw a great opportunity to adapt our existing tools for notebooks and build solutions that best fit this new problem area.

Notebook-Interface.jpg
An example of how the notebook environment can integrate discussion, code, and visualizations.

We presented our initial efforts in a paper published at the 25th International Symposium on Formal Methods in March 2023. The paper reports insights from our survey and from interviews with ML practitioners to understand what specific issues need to be addressed in the notebook context. In the following, we give two examples of how our new technologies can help machine learning experts to be more productive.

Execution order

Code is embedded in computational notebooks in code cells, which can be executed in an arbitrary order and edited on the fly; that is, cells can be added, deleted, or changed after other cells have been executed.

While this flexibility is great for exploring data, it raises problems concerning reproducibility, as cells with shared variables can produce different results when running in different orders.

Jupyter code examples.png
Left: code cells executed in nonlinear order; right: code cells executed in linear order.

Once a code cell is executed, it is assigned an integer number in the square bracket on its left side. This number is called the execution count, and it indicates the cell’s position in the execution order. In the example above, when code cells are executed in nonlinear order, the variable z ends up with the value 6. However, execution count 2 is missing in the notebook file, which can happen for multiple reasons: perhaps the cell was executed and deleted afterwards, or perhaps one of the cells was executed twice. In any case, it would be hard for a second person to reproduce the same result.

Related content
New tool can spot problems — such as overfitting and vanishing gradients — that prevent machine learning models from learning.

To catch problems resulting from out-of-order execution in Jupyter notebooks, we developed a hybrid approach that combines dynamic information capture and static analysis. Our tool collects dynamic information during the execution of notebooks, then converts notebook files with Python code cells into a novel Python representation that models the execution order as well as the code cells as such. Based on this model, we are able to leverage our static-analysis engine for Python and design new static-analysis rules to catch issues in notebooks.

APIs

Another common problem for notebook users is misuse of machine-learning APIs. Popular machine learning libraries such as PyTorch, TensorFlow, and Keras greatly simplify the development of AI systems. However, due to the complexity of the field, the libraries’ high level of abstraction, and the sometimes obscure conventions governing library functions, library users often misuse these APIs and inject faults into their notebooks without even knowing it.

Related content
ICSE paper presents techniques piloted by Amazon Web Services’ Automated Reasoning team.

The code below shows such a misuse. Some layers of a neural network, such as dropout layers, may behave differently during the training and evaluation of the network. PyTorch mandates explicit calls to train() and eval() to denote the start of training and evaluation, respectively. The code example is intended to load a trained model from disk and evaluate it on some test data.

However, it misses the call to eval(), as by default, every model is in the training phase. In this case, some layers will indirectly change the architecture of the network, which would make all prediction unstable; i.e., for the same input, the predictions would be different at different times.

# noncompliant case
model.load_state_dict(torch.load("model.pth"))
predicted = model.evaluate_on(test_data)

# compliant case
model.load_state_dict(torch.load("model.pth"))
model.eval()
predicted = model.evaluate_on(test_data)

Instabilities caused by this bug can have a serious impact. Even when the bug is found (currently, through manual code review) and fixed, the model needs to be retrained. Depending on how large the model is and how late in the development process the bug is found, this could mean a waste of thousands of hours.

The best case would be to detect the bug directly after the developer writes the code. Static analysis can help with this. In our paper, we implemented a set of static-analysis rules that automatically analyze machine learning code in Jupyter notebooks and could detect such bugs with high precision.

In experiments involving a large set of notebook files, our rules found an average of one bug per seven notebooks. This result motivates us to dive deep into bug detection in Jupyter notebooks.

Our survey identified the following issues that notebook users care about:

  • Reproducibility: People often find it difficult to reproduce results when moving notebooks between different environments. Notebook code cells are often executed in nonlinear order, which may be not reproducible. About 14% of the survey participants collaborate on notebooks with others only when models need to be pushed into production; reproducibility is even more crucial for production notebooks.
  • Correctness: People introduce silent correctness bugs without knowing it when using machine learning libraries. Silent bugs affect model outputs but do not cause program crashes, which makes them extremely hard to find. In our survey, 23% of participants confirmed this.
  • Readability: During data exploration, notebooks can easily get messy and hard to read. This hampers maintainability as well as collaboration. In our survey, 32% of participants mentioned that readability is one of the biggest difficulties in using notebooks.
  • Performance: It is time- and memory-consuming to train big models. People want help to make both training and the runtime execution of their code more efficient.
  • Security: In our survey, 34% of participants said that security awareness among ML practitioners is low and that there is a consequent need for security scanning. Because notebooks often rely on external code and data, they can be vulnerable to code injection and data-poisoning attacks (manipulating machine learning models).

These findings pointed us toward the kinds of issues that our new analysis rules should address. During the rule sourcing and specification phase, we asked ML experts for feedback on the usefulness of the rules as well as examples of compliant and noncompliant cases to illustrate the rules. After developing the rules, we invited a group of ML experts to evaluate our tools on real-world notebooks. We used their feedback to improve the accuracy of the rules.

The newly launched Amazon CodeGuru extension for JupyterLab and SageMaker Studio enables the enforcement of code quality and security in computational notebooks to “shift left”, or move earlier in the development process. Users can now detect security vulnerabilities — such as injection flaws, data leaks, weak cryptography, and missing encryption — within notebook cells, along with other common issues that affect the readability, reproducibility, and correctness of the computations performed by notebooks.

Acknowledgements: Martin Schäf, Omer Tripp

Research areas

Related content

IN, KA, Bengaluru
Do you want to join an innovative team of scientists who use machine learning and statistical techniques to create state-of-the-art solutions for providing better value to Amazon’s customers? Do you want to build and deploy advanced algorithmic systems that help optimize millions of transactions every day? Are you excited by the prospect of analyzing and modeling terabytes of data 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 Machine Learning and Data Sciences team for India Consumer Businesses. If you have an entrepreneurial spirit, know how to deliver, love to work with data, are deeply technical, highly innovative and long for the opportunity to build solutions to challenging problems that directly impact the company's bottom-line, we want to talk to you. Major responsibilities - 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 - Design, development, evaluate and deploy innovative and highly scalable models for predictive learning - Research and implement novel machine learning and statistical approaches - Work closely with software engineering teams to drive real-time model implementations and new feature creations - Work closely with business owners and operations staff to optimize various business operations - Establish scalable, efficient, automated processes for large scale data analyses, model development, model validation and model implementation - Mentor other scientists and engineers in the use of ML techniques
US, NY, New York
MULTIPLE POSITIONS AVAILABLE Employer: Amazon Development Center U.S., Inc. Offered Position: Applied Scientist III - AMZ007408 Job Location: New York, NY Position Responsibilities: Participate in the design, development, evaluation, deployment, and updating of formal reasoning systems for security, privacy, and data protection applications. Drive technical and scientific innovation in security automation, data protection, and privacy-preserving technologies, with a focus on developing scalable solutions for cloud environments. Develop and/or apply formal verification techniques and automated theorem proving methods for different applications in cloud security and privacy. Collaborate with internal and external users to understand requirements and enhance formal verification and automated reasoning capabilities. Lead research and development efforts in AI security, specifically evaluate emerging threats and opportunities, including securing Generative AI systems and designing robust safeguards. Proactively identify and explore new opportunities for deploying and leveraging formal reasoning solutions across various domains.
GB, London
The Agentic Automated Reasoning Group is building the next generation of software verification tools combining advances in artificial intelligence, the computational capacity of the cloud, and our deep expertise in the domain. Join us if you want to be a part of this transformational endeavor. The Strata team (https://github.com/strata-org) is seeking an applied scientist with broad interest and expertise in model checking, interactive theorem proving, programming language semantics, and generative AI. You will combine your expertise with that of your coworkers to build new tools that solve code analysis problems previously considered beyond reach. Our application areas span all the way from Infrastructure as Code to high-performance cryptography written in assembly code, while our methods span from interactive theorem proving to automated test generation. Each day, hundreds of thousands of developers make billions of transactions worldwide on AWS. They harness the power of the cloud to enable innovative applications, websites, and businesses. Using automated reasoning technology and mathematical proofs, AWS allows customers to answer questions about security, availability, durability, and functional correctness. We call this provable security, absolute assurance in security of the cloud and in the cloud. https://aws.amazon.com/security/provable-security/ Key job responsibilities Work with customer teams to understand the nature of their software and the properties they need to establish of it. Identify tools and methods capable of addressing the verification needs of customers, including any novel analysis capabilities required. Use techniques spanning property-based testing to model checkers, and interactive theorem provers to establish program properties. Explore generative AI techniques to help customers formalize their requirements, find revealing tests, generate required boiler plate for testing and model checking, and find and repair program proofs. About the team The Agentic Automated Reasoning Group at AWS develops and applies state of the art formal methods and automated reasoning techniques to ensure the security, reliability, and correctness of AWS services and customer applications, with a strong focus on AI based agents. Our work innovates tools and services to perform verification at scale and apply them to build safe and secure systems at AWS. We are also pioneering the use of formal verification and automated reasoning to develop agentic systems, ensuring AI agents operate within defined safety boundaries.
US, CA, San Francisco
Join the next revolution in robotics at Amazon's Frontier AI & Robotics team, where you'll work alongside world-renowned AI pioneers to lead key initiatives in robotic intelligence. As a Member of Technical Staff, you'll spearhead the development of breakthrough foundation models that enable robots to perceive, understand, and interact with the world in unprecedented ways. You'll drive technical excellence in areas such as perception, manipulation, science understanding, sim2real transfer, multi-modal foundation models, and multi-task learning, designing novel algorithms that bridge the gap between state-of-the-art research and real-world deployment at Amazon scale. In this role, you'll combine hands-on technical work with scientific leadership, ensuring your team delivers robust solutions for dynamic real-world environments. You'll leverage Amazon's vast computational resources to tackle ambitious problems in areas like very large multi-modal robotic foundation models and efficient, promptable model architectures that can scale across diverse robotic applications. Key job responsibilities - Lead technical initiatives in robotics foundation models, driving breakthrough approaches through hands-on research and development in areas like open-vocabulary panoptic scene understanding, scaling up multi-modal LLMs, sim2real/real2sim techniques, end-to-end vision-language-action models, efficient model inference, video tokenization - Design and implement novel deep learning architectures that push the boundaries of what robots can understand and accomplish - Guide technical direction for specific research initiatives, ensuring robust performance in production environments - Mentor and support fellow scientists while maintaining strong individual technical contributions - Collaborate with engineering teams to optimize and scale models for real-world applications - Influence technical decisions and implementation strategies within your area of focus A day in the life - Develop and implement novel foundation model architectures, working hands-on with our extensive compute infrastructure - Guide and support fellow scientists in solving complex technical challenges, from sim2real transfer to efficient multi-task learning - Lead focused technical initiatives from conception through deployment, ensuring successful integration with production systems - Drive technical discussions within your team and with key stakeholders - Conduct experiments and prototype new ideas using our massive compute cluster - Mentor team members while maintaining significant hands-on contribution to technical solutions 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 At Frontier AI & Robotics, we're not just advancing robotics – we're reimagining it from the ground up. Our team is building the future of intelligent robotics through ground breaking foundation models and end-to-end learned systems. We tackle some of the most challenging problems in AI and robotics, from developing sophisticated perception systems to creating adaptive manipulation strategies that work in complex, real-world scenarios. What sets us apart is our unique combination of ambitious research vision and practical impact. We leverage Amazon's massive computational infrastructure and rich real-world datasets to train and deploy state-of-the-art foundation models. Our work spans the full spectrum of robotics intelligence – from multimodal perception using images, videos, and sensor data, to sophisticated manipulation strategies that can handle diverse real-world scenarios. We're building systems that don't just work in the lab, but scale to meet the demands of Amazon's global operations. Join us if you're excited about pushing the boundaries of what's possible in robotics, working with world-class researchers, and seeing your innovations deployed at unprecedented scale.
US, WA, Seattle
Innovators wanted! Are you an entrepreneur? A builder? A dreamer? This role is part of an Amazon Special Projects team that takes the company’s Think Big leadership principle to the limits. If you’re interested in innovating at scale to address big challenges in the world, this is the team for you. As an Applied Scientist on our team, you will focus on building state-of-the-art ML models for biology. Our team rewards curiosity while maintaining a laser-focus in bringing products to market. Competitive candidates are responsive, flexible, and able to succeed within an open, collaborative, entrepreneurial, startup-like environment. At the forefront of both academic and applied research in this product area, you have the opportunity to work together with a diverse and talented team of scientists, engineers, and product managers and collaborate with other teams. Key job responsibilities - Build, adapt and evaluate ML models for life sciences applications - Collaborate with a cross-functional team of ML scientists, biologists, software engineers and product managers
US, WA, Seattle
Join us at the forefront of Amazon's sustainability initiatives to work on environmental and social advancements that support Amazon's long-term worldwide sustainability strategy. At Amazon, we're working to be the most customer-centric company on earth. To get there, we need exceptionally talented, bright, and driven people who are passionate about making a meaningful impact on communities and the environment while helping shape the future of sustainable business practices. Sustainability Science and Innovation (SSI) is a multi-disciplinary team within WW Sustainability combining science, analytics, economics, statistics, machine learning, product development, and engineering expertise. We use data across the sustainability imperatives (carbon, water, waste, biodiversity, environmental risk and more) and these skills and capabilities to identify, develop, experiment, and scale the scientific solutions and innovations necessary for Amazon, customers and partners to help them solve their hardest unmet and evolving sustainability needs and goals. The Worldwide Sustainability (WWS) organization is seeking an exceptional scientific leader to join Amazon's Sustainability Science and Innovation team as a Researcher Scientist for Materials Chemistry Innovation. This role focuses on hands-on experimental research in materials chemistry to accelerate the discovery and validation of sustainable materials through systematic synthesis, characterization, and performance testing. You will lead the design and execution of experimental research campaigns targeting catalysts, functional materials, and sustainability-relevant chemistries across multivariate parameter spaces. You will establish scientific strategy and technical roadmaps for materials discovery while leading research initiatives that tackle complex sustainability challenges in critical industrial sectors. This position requires driving breakthrough solutions in materials synthesis and characterization through internal capabilities and strategic partnerships with universities, industry scientists, and government laboratories. You will mentor junior scientists and engineers while collaborating across Amazon's Innovation Lab Network to translate research into scalable solutions. Your leadership will be essential in developing early-stage, cost-effective materials that address significant technical and economic challenges fundamental to Amazon's operations, requiring you to navigate complex trade-offs between immediate deliverables and long-term environmental impact. You will also shape how emerging automation and AI tools are applied to accelerate materials discovery workflows. The ideal candidate demonstrates extensive experience in materials synthesis, advanced characterization techniques, and systematic experimental design for performance validations. You must possess proven ability to lead cross-functional teams, establish research priorities, and drive scientific innovation from concept to implementation. Deep technical expertise in materials testing methods, combined with strategic vision for translating research into practical applications is essential. Experience with high-throughput and combinatorial experimental approaches to efficiently explore large design spaces is highly valued. Your work will establish new paradigms in sustainable materials discovery through rigorous experimental research and performance testing, directly contributing to Amazon's sustainability goals while creating scalable solutions that extend beyond the company's immediate operations. Key job responsibilities - Develop scientific models that help solve complex and ambiguous sustainability problems, and extract strategic learnings from large datasets. - Work closely with applied scientists and software engineers to implement your scientific models. - Support early-stage strategic sustainability initiatives and effectively learn from, collaborate with, and influence stakeholders to scale-up high-value initiatives. - Support research and development of cross-cutting technologies for industrial decarbonization, including building the data foundation and analytics for new AI models. - Drive innovation in key focus areas including packaging materials, building materials, and alternative fuels. About the team Diverse Experiences: World Wide Sustainability (WWS) 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. Inclusive Team Culture: 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 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.
US, WI, Madison
As a Data Scientist on the Shopbop/Zappos Catalog Tech team, you will design and implement scientific approaches to revolutionize how we manage and enhance our product catalog data for our world-class selection of Shoes, Kids, and Active wear. You will work with Zappos' Senior leadership team to solve complex data challenges through advanced analytics and machine learning - creating innovative solutions and influencing product decisions through data-driven insights. You will lead critical initiatives to reduce catalog errors, accelerate product data capture, and develop state-of-the-art image classification systems for fashion features. You will partner daily with engineering teams and business stakeholders to provide expert guidance on model selection and implementation. As a member of the Zappos technical staff, you will leverage machine learning technologies and have access to industry leaders in AI/ML and E-Commerce to help grow your expertise. You will also routinely collaborate with data science teams across our sister companies at Amazon.com and Shopbop.com. You will push the boundaries of what's possible with applied machine learning and bring innovative solutions to bear for customers (including computer vision, NLP, and advanced ML models). You will think big about how data science can transform our catalog operations and be persistent in delivering robust, scalable solutions. Key job responsibilities Design and implement machine learning approaches to improve catalog data quality. Develop and validate scientific methodologies for automated data capture and classification. Partner with engineering teams to integrate ML models into production systems. Create and present analysis that drives decision-making at the senior leadership level. A day in the life You start the day reviewing model performance metrics, noting some drift in the image classification system that needs investigation. You spend the morning developing a new approach to reduce product attribute errors using recent advances in LLMs. In the afternoon, you meet with engineering teams to advise on model architecture for a new feature, and wrap up by analyzing the results of your latest A/B test on data capture efficiency improvements. About the team Zappos/Shopbop Catalog Tech team owns the software that drives our photostudio, product cataloging, and integration to Amazon's marketplace. We use Amazon's Leadership Principals and Engineering Expertise but have our own fun vibe. We are located in Madison WI, and Las Vegas NV.
US, WA, Seattle
The Alexa Connections team is building the worlds most trusted AI assistant, that helps get things done and creates moments of joy. We build LLM-powered, next-generation communication features that help customers connect within the household with features like announcements and drop-In, and with people they care about with features like calling, emailing and texting. Using GenAI we proactively personalize every single connection moment whether its connecting with grandparents or communicating with kids teachers, and you can do it all hands free with Alexa! We are hiring a mature Sr. Manager of Applied Science who is an entrepreneurial big thinker that invents and then biases towards action to solve highest priority customer problems. Our portfolio initiative range from highly confidential innovations to data driven quality problems that needs sciences solutions. You will be leading a team of scientists and partnering with product, engineering and design organizations to building on the latest AGI/LLM systems. If you are holding out for an opportunity to: - Join a leadership group that moves fast towards big audacious goals - Lead an organization to balance solving towards problems while working towards the long term vision - Be surrounded by super passionate mission driven colleagues who will challenge you to grow every day - Solve difficult challenges using your expertise in science to invest practical solutions - Create applications at a massive scale used by millions of people - Work with AGI/LLM systems to deliver real experiences, not just research And you are experienced with… - Driving applied science projects end-to-end from ideation, analysis, prototyping, development, metrics, and monitoring - Conducting deep analyses on massive user and contextual data sets - Proposing viable modeling ideas to advance optimization or efficiency, with supporting argument, data, or, preferably, preliminary results - Designing, developing, and maintaining scalable ML models and LLM's with automated training, validation, monitoring and reporting - Staying familiar with the field and apply state-of-the-art ML techniques to NLP and related optimization problems - Publishing peer-reviewed scientific papers in top journals and conferences And you constantly look for opportunities to… - Innovate, simplify, reduce waste, and increase efficiency - Use data to make decisions and validate assumptions - Automate processes otherwise performed by humans - Learn from others and help those around you grow ...then lets chat! Key job responsibilities As a senior leader, you will play a critical role in elevating the team’s scientific and technical rigor, identifying and implementing best-in-class algorithms, methodologies, and infrastructure that enable rapid experimentation and scaling. You will establish a long-term vision for continued scientific innovation, setting strategic goals to future-proof the organization’s technical stacks and ML/LLM frameworks to support new and emerging business objectives. Additionally, you will grow talents, fostering a culture of excellence and continuous learning to enhance the organization’s ability to solve complex problems.
US, WA, Seattle
The AWS Compliance & Security Assurance Engineering team builds tools and services that scale AWS's ability to exceed security and compliance expectations for our regulators, auditors, and customers globally. We create efficiencies for our teams while maintaining transparency for our customers. As a Data Scientist on our data team, you'll have a unique opportunity to build solutions that scale security assurance capabilities through AI-driven approaches. You'll leverage advanced analytics, machine learning techniques, and state-of-the-art AI technologies on top of highly complex datasets to transform our security assurance operations. You'll also help shape our data science roadmap, fostering data-driven decision-making and delivering significant business impact through innovative methodologies. The ideal candidate brings a strong background in automation by leveraging GenAI Large Language Models (LLMs), combined with experience analyzing complex datasets and a proven ability to transform business needs into deliverables. If you're passionate about applying AI to security challenges in a dynamic environment that offers startup-like autonomy with enterprise impact, we want to hear from you. Key job responsibilities * Analyze and extract hidden insights from complex, large-scale datasets using advanced statistical and AI techniques, using hands-on expertise in data wrangling and manipulation. * Identify high-impact business improvement opportunities, lead the design and execution of data science initiatives to address them. * Apply statistical and ML knowledge to specific business problems and data. * Leverage Vision Language Models (VLMs) and Large Language Models (LLMs) to analyze document/image structure, perform content understanding and metadata extraction. * Rapidly prototype and test AI solutions, while iterating quickly based on data and feedback. * Collaborate cross-functionally to deeply understand business requirements, customer needs, and technical constraints; transforming discovered information into data-driven solutions and actionable recommendations. * Communicate complex technical concepts to technical and non-technical stakeholders; present compelling insights and evidence-based recommendations to leadership. * Stay up-to-date on the latest advancements in AI and identify opportunities to apply emerging techniques to the space. * Collaborate with Business Intelligence, Data Engineers and SDEs to drive the collection of new data and refinement of existing data sources to continually improve data quality. * Actively participate in team design reviews, data modeling discussions, brainstorming activities while mentoring colleagues in state-of-the-art AI tools and methodologies. About the team Diverse Experiences Amazon Security 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 Amazon Security? At Amazon, security is central to maintaining customer trust and delivering delightful customer experiences. Our organization is responsible for creating and maintaining a high bar for security across all of Amazon’s products and services. We offer talented security professionals the chance to accelerate their careers with opportunities to build experience in a wide variety of areas including cloud, devices, retail, entertainment, healthcare, operations, and physical stores. Inclusive Team Culture In Amazon Security, it’s in our nature to learn and be curious. Ongoing DEI events and learning experiences inspire us to continue learning and to embrace our uniqueness. Addressing the toughest security challenges requires that we seek out and celebrate a diversity of ideas, perspectives, and voices. Training & 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, training, 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.
GB, London
Come build the future of entertainment with us. Are you interested in shaping the future of movies and television? Do you want to define the next generation of how and what Amazon customers are watching? Prime Video is a premium streaming service that offers customers a vast collection of TV shows and movies — all with the ease of finding what they love to watch in one place. We offer customers thousands of popular movies and TV shows from Originals and Exclusive content to exciting live sports events. We also offer our members the opportunity to subscribe to add-on channels which they can cancel at anytime and to rent or buy new release movies and TV box sets on the Prime Video Store. Prime Video is a fast-paced, growth business — available in over 240 countries and territories worldwide. The team works in a dynamic environment where innovating on behalf of our customers is at the heart of everything we do. If this sounds exciting to you, please read on. Prime Video Commerce's mission is to present the right offer to the right customer at the right time — across subscriptions, channels, and transactional video in every market and on every device. Our science team replaces static business rules with ML-driven decisions that personalise the entire commerce journey, from discovery through to checkout and beyond. We operate at scale across hundreds of millions of customers, and we are now expanding into new frontiers — combining the latest advances in agentic and generative AI, behavioural simulation, and causal inference to understand the impact of our decisions before they reach customers. We are looking for an Applied Scientist to join the Prime Video Commerce Insights team who will work on the latest research and machine learning to build scalable personalisation solutions. You will develop and deploy customer-facing models, understand customer behaviour at scale, and explore emerging techniques that help us make better decisions faster. This is a hands-on role working with a high performing and high visibility multidisciplinary group of engineers and scientists in the London office, focused on improving the customer experience for Prime Video and the wider Amazon organization. You will contribute to the design of machine learning models that scale to large quantities of data and serve low-latency recommendations to all customers worldwide. You will embody scientific rigor in designing and executing experiments to demonstrate the technical efficacy and business value of your methods. You will work alongside a science and engineering team that embodies the customer obsession principle by developing recommendation and decision systems that raise the profile of Prime Video Commerce as a global leader in machine learning and personalisation. Successful candidates will have strong technical ability, a focus on customers by applying a customer-first approach, and excellent teamwork and communication skills. The position offers exceptional opportunities for every candidate to grow their technical and non-technical skills. Key job responsibilities - Research, design, and implement recommendation systems that personalise across different customer experience touch points. - Collaborate with engineers to deploy and integrate successful model experiment results into large-scale, complex Amazon production systems with low latency. - Provide machine learning thought leadership to both technical and business leaders, with the ability to think strategically about business, product, and technical challenges. - Be a subject matter expert in reinforcement learning approaches for the team and actively contribute to the science roadmap - Define the science roadmap and research agenda that aligns with the organisation's priorities and production constraints. - Work with technical product managers to work backwards from what's important to customers and deliver machine-backed solutions. - Report and share results with the team and wider scientific community by authoring documents that are both statistically rigorous and compellingly relevant, exemplifying good scientific practice in a business environment. A day in the life You will be both a research leader and a hands-on innovator within the Commerce Insights organisation. You'll collaborate with talented engineers and senior leaders to solve problems that are uniquely challenging at Amazon's scale: personalising commerce decisions across multiple business lines balancing competing objectives across offerings, and positively impacting hundreds of millions of customers worldwide. The problems here are technically deep — combining large-scale ML, causal reasoning, and behavioural modelling in a domain where every decision carries real revenue and customer experience consequences. Your research will ship to production and move metrics that matter. About the team You will join a team of great team of engineers and applied scientists with a proven track record of solving highly complex, ambiguous problems — work that has produced patents and publications at top-tier conferences. The team has direct visibility to senior Prime Video leadership, and collaborates broadly across Commerce, Content, and Platform teams to shape how customers discover, subscribe to, and engage with video content. This is a team that operates at the intersection of rigorous research and real-world impact, where your ideas move from whiteboard to production for hundreds of millions of customers.