How the Lean language brings math to coding and coding to math

Uses of the functional programming language include formal mathematics, software and hardware verification, AI for math and code synthesis, and math and computer science education.

This post is an adaptation of a keynote address that Leo de Moura delivered at the International Conference on Computer Aided Verification (CAV), in July 2024.

LEAN logo.png
The Lean logo.

In 2013, I launched the Lean project with the goal of bridging the gap between automated and interactive theorem provers. Since its inception, Lean has seen unparalleled adoption in the mathematical community, surpassing previous efforts in formalized mathematics. Lean 4, the latest version, is implemented in Lean itself and is also a fully fledged, extensible programming language with robust IDE support, package management, and a thriving ecosystem.

In 2023, Sebasian Ullrich and I founded the Lean Focused Research Organization (FRO), a nonprofit dedicated to advancing Lean and supporting its community. The Lean project embraces a philosophy that promotes decentralized innovation, empowering a diverse community of researchers, developers, and enthusiasts to collaboratively push the boundaries of mathematical practice and software development. In this blog post, we will provide a brief introduction to the project and describe how it is used at AWS.

A brief introduction to Lean

Lean is an open-source, extensible, functional programming language and interactive theorem prover that makes writing correct and maintainable code easy. Lean programming primarily involves defining types and functions, allowing users to focus on the problem domain and its data rather than on coding details. Lean has four primary use cases: formal mathematics, software and hardware verification, AI for math and code synthesis, and math and computer science education.

Formal mathematics

Lean allows mathematicians to work with advanced mathematical structures using syntax that feels natural to them. The math community recognizes its usefulness: for instance, Fields medalists Peter Scholze and Terence Tao used Lean to confirm their new results; Quanta Magazine has lauded Lean as one of the biggest breakthroughs in mathematics, and it has been featured in numerous popular scientific and academic publications, including the Wired magazine article “The effort to build the mathematical library of the future”. Recently, DeepMind used Lean to build an AI engine that met the silver-medal standard at the International Math Olympiad.

As of July 2024, the Lean Mathematical Library has received contributions from over 300 mathematicians and contains 1.58 million lines of code, surpassing other formal-mathematics systems in use. This remarkable growth has come despite Lean’s concision and youth: it’s at least a decade younger than comparable libraries.

Software and hardware verification

Lean’s combination of formal verification, user interaction, and mathematical rigor makes it invaluable for both software and hardware verification. Lean is a system for programming your proofs and proving your programs. An additional benefit is that Lean produces efficient code, and its extensibility features, originally designed for mathematicians, are also highly convenient for creating abstractions when writing clean and maintainable code. Its benefits extend to any system requiring exceptional accuracy and security, including industries such as aerospace, cryptography, web services, autonomous vehicles, biomedical systems, and medical devices. Later on, we will provide several examples of Lean's applications at AWS.

AI for math and code synthesis

Lean is popular with groups developing AI for mathematics and code synthesis. One of the key reasons is that Lean formal proofs are machine checkable and can be independently audited by external proof checkers. Additionally, Lean's extensibility allows users to peer into the system internals, including data structures for representing proofs and code. This capability is also used to automatically generate animations from Lean proofs.

AI researchers are leveraging large language models (LLMs) to create Lean formal proofs and automatically translate prose into formalized mathematics. OpenAI has released lean-gym, a reinforcement learning environment based on Lean. Harmonic used Lean in the development of its Mathematical Superintelligence Platform (MSI), an AI model designed to guarantee accuracy and avoid hallucinations. Meta AI created an AI model that has solved 10 International Mathematical Olympiad problems, and DeepMind has formalized a theoretical result related to AI safety in Lean. Additionally, LeanDojo is an open-source project using LLMs to automate proof construction in Lean.

Lean's unique combination of machine-checkable proofs, system introspection, and extensibility makes it an ideal tool for advancing AI research in mathematics and code synthesis. The synergy between LLMs and Lean formal proofs is emphasized in Terence Tao's colloquium lecture at the American Mathematical Society, “Machine Assisted Proof”; in the Scientific American article “AI will become mathematicians' co-pilot”; and in the New York Times article “A.I. Is coming for mathematics, too.”

Math and CS education

Millions of people learn mathematics as students and use it throughout their careers. Since its inception, the Lean project has supported students' mathematical-reasoning needs and enabled a more diverse population to contribute to the fields of math and computer science. Numerous educational resources are available for learning Lean, including interactive computer games such as the Natural Number Game, computer science and mathematics textbooks, university courses, and on-demand tutorials. The Lean FRO is committed to expanding Lean’s educational content and envisions a future where children use Lean as a playground for learning mathematics, progressing at their own paces and receiving instantaneous feedback, similar to how many have learned to code.

A quick tour of Lean

Lean combines programming and formal verification. Let's take a quick tour through a small example to see how we write code in Lean and prove properties about that code.

Writing code in Lean

First, let's define a simple function that appends two lists:

def append (xs ys : List a) : List a :=
  match xs with
  | [] => ys
  | x :: xs => x :: append xs ys

This function is defined using pattern matching. For the base case, appending an empty list [] to ys results in ys. The notation x :: xs represents a list with head x and tail xs. For the recursive case, appending x :: xs to ys results in x :: append xs ys. Additionally, the append function is polymorphic, meaning it works with lists of any type a.

Extensible syntax

The notation x :: xs used above is not built into Lean but is defined using the infixr command:

infixr:67 " :: " => List.cons

The infixr command defines a new infix operator x :: xs, denoting List.cons x xs. This command is actually a macro implemented using Lean's hygienic macro system. Lean's extensible syntax allows users to define their own domain-specific languages. For example, Verso, the Lean documentation-authoring system, is implemented in Lean using this mechanism. Verso defines alternative concrete syntaxes that closely resemble Markdown and HTML.

Proving properties about code

Next, we'll prove a property about our append function: that the length of the appended lists is the sum of their lengths.

theorem append_length (xs ys : List a)
        : (append xs ys).length = xs.length + ys.length := by
  induction xs with
  | nil => simp [append]
  | cons x xs ih => simp [append, ih]; omega

Here, theorem introduces a new theorem named append_length. The statement (append xs ys).length = xs.length + ys.length is what we want to prove. The by ... block contains the proof. In this proof,

  • induction xs with initiates a proof by induction on xs;
  • the nil case proves the base case using simp, the Lean simplifier. The parameter append instructs the simplifier to expand append’s definition; and
  • the cons x xs ih case proves the inductive step where ih is the inductive hypothesis. It also uses simp and omega, which complete the proof using arithmetical reasoning.

In this proof, induction, simp, and omega are tactics. Tactics, which transform one state of the proof into another, are key to interactive theorem proving in Lean. Users can inspect the states of their proofs using the Lean InfoView, a panel in the IDE. The InfoView is an interactive object that can be inspected and browsed by the user. In the following picture, we see the state of our proof before the simp tactic at line 10. Note that the proof state contains all hypotheses and the goal (append (x :: xs) ys).length = (x :: xs).length + ys.length, which remains to be proved.

LEAN example.png
The state of the proof before the simp tactic at line 10, as visualized in the Lean InfoView.

How Lean is used at AWS

At AWS, Lean is used in several open-source projects to address complex verification and modeling challenges. These projects not only highlight the practical applications of Lean in different domains but also emphasize AWS's commitment to open-source development and collaboration. We cover four key projects: Cedar, LNSym, and SampCert, whose Lean source code is already available on GitHub, and AILean, which is exploring the relationship between LLMs and formal mathematics and whose code is not open source yet. 

Cedar: an open-source policy language and evaluation engine 

Cedar is an open-source policy language and evaluation engine. Cedar enables developers to express fine-grained permissions as easy-to-understand policies enforced in their applications and to decouple access control from application logic. Cedar supports common authorization models such as role-based access control and attribute-based access control. It is the first policy language built from the ground up to be verified formally using automated reasoning and tested rigorously using differential random testing.

The Cedar project uses Lean to create an executable formal model of each core component of the Cedar runtime (such as the authorization engine) and static-analysis tools (such as the type checker). This model serves as a highly readable specification, allowing the team to prove key correctness properties using Lean.

Lean was chosen for modeling Cedar due to its fast runtime, extensive libraries, IDE support, and small trusted computing base (TCB). The fast runtime enables efficient differential testing of Cedar models. The libraries provide reusable verified data structures and tactics built by the open-source community. Lean’s small TCB allows Cedar to leverage these contributions confidently, as Lean checks their correctness, requiring trust only in Lean’s minimal proof-checking kernel.

LNSym: Symbolic simulation for cryptographic verification

LNSym is a symbolic simulator for Armv8 native-code programs. It’s currently under development, with a focus on enabling automated reasoning of cryptographic machine-code programs. Many cryptographic routines are written in assembly to optimize performance and security on the underlying processor. LNSym aims to reduce the cost of verifying cryptographic routines, particularly block ciphers and secure hashes, ultimately empowering cryptography developers to formally reason about their native-code programs.

LNSym uses Lean as a specification language to model the Arm instruction semantics and cryptographic protocols and as a theorem prover for reasoning about these artifacts. Since Lean programs are executable, the specifications achieve a high degree of trust through thorough conformance testing. Lean orchestrates proofs such that the heavy and often tedious lifting is done automatically, using decision procedures like SAT solvers or custom domain-specific tactics. When proof automation fails, users can employ Lean as an interactive theorem prover. This combination of interactive and automated theorem proving ensures that progress on verification tasks is not hindered by the limitations of proof automation.

SampCert: formally verified differential-privacy primitives

SampCert is an open-source library of formally verified differential-privacy primitives used by the AWS Clean Rooms Differential Privacy service for its fast and sound sampling algorithms. Using Lean, SampCert provides the only verified implementation of the discrete Gaussian sampler and the primitives of zero concentrated differential privacy.

Although SampCert focuses on software, its verification relies heavily on Mathlib, the Lean Mathematical Library. The verification of code addressing practical problems in data privacy depends on the formalization of mathematical concepts from Fourier analysis to number theory and topology.

AILean: AI for math and math for AI

AILean is exploring the relationship between LLMs and formal mathematics in collaboration with the Technology Innovation Institute (TII). This exploration works in both directions: AI for math and math for AI. In AILean, LLMs are used to enhance proof automation and user experience in formal mathematics. LLMs can analyze theorem statements and existing proof steps, suggesting relevant lemmas, definitions, or tactics to guide users in completing proofs. They can also identify common mistakes or inconsistencies, proposing corrections or alternative approaches that avoid dead ends and thereby improving the proof development process.

Takeaways

Lean is a complex system, but its correctness relies only on a small trusted kernel. Moreover, all proofs and definitions can be exported and independently audited and checked. This is a crucial feature for both the mathematical and software verification communities because it eliminates the trust bottleneck. It doesn't matter who you are; if Lean checked your proof, the whole world can build on top of it. This enables large groups of mathematicians who have never met to collaborate and work together. Additionally, it allows users to extend Lean without fearing the introduction of soundness bugs that could compromise the logical consistency of the system.

Lean's extensibility enables customization, which was particularly important during its first ten years, when resources were limited. Lean’s extensibility allowed the community to extend the system without needing to synchronize with its developers. Self-hosting, or implementing Lean in Lean, also ensured that users can access all parts of the system without having to learn a different programming language. This makes it easy and convenient to extend Lean. Packages such as ProofWidgets and SciLean are excellent examples of user-defined extensions that leverage these features.

The FRO model introduced by Convergent Research has been instrumental in supporting Lean and helping it transition to a self-sufficient foundation. The Lean project has grown significantly, and driving it forward would have been difficult without Convergent Research’s efforts to secure philanthropic support. Just as foundations like the Rust and Linux Foundations are vital for the success and sustainability of open-source projects, the support of Convergent Research has been critical for Lean's ongoing progress.

To learn more about Lean, visit the website.

Research areas

Related content

IN, KA, Bengaluru
The Cross-Border (XB) Science & Analytics team is at the heart of Amazon's international marketplace expansion, powering science-driven solutions that enable customers across 20+ countries to discover and purchase products seamlessly across borders. Our work directly impacts millions in annualized business value through ML models, algorithms, and data-driven systems that solve some of Amazon's most complex cross-border challenges. We are a lean, high-impact team of scientists working across various programs spanning search ranking, demand forecasting, pricing optimization, product recommendations, language understanding, and generative AI. We partner closely with product, engineering, and business teams across Amazon's global retail organization to take science from ideation to production at scale. Key job responsibilities We are looking for a passionate and technically strong Applied Scientist to join our team. In this role, you will design, develop, and deploy machine learning models and algorithms that directly improve the cross-border shopping experience for millions of Amazon customers worldwide. You will work on challenging, ambiguous problems—from improving search relevance across languages to building ML-powered pricing and recommendation systems—with significant autonomy and end-to-end ownership. This is a hands-on, high-visibility role. You will publish your research internally and externally, collaborate with world-class scientists and engineers, and see your work go live across Amazon's global marketplaces. A day in the life Research & Experimentation Analyze large-scale datasets to identify patterns, formulate hypotheses, and design experiments Develop and iterate on ML models (deep learning, NLP, ranking, causal inference) to improve cross-border product discovery, relevance, and conversion Design and run A/B experiments on live traffic to measure model impact against business and customer metrics Building & Shipping Write production-quality code (Python, Java/Scala) and work with SDEs to deploy models into real-time and batch inference pipelines Build end-to-end ML pipelines—from data ingestion and feature engineering to training, evaluation, and online serving Own model monitoring, performance debugging, and iterative improvements post-launch Collaboration & Communication Participate in weekly science syncs, design reviews, and cross-functional standups with product managers, engineers, and business stakeholders Translate business problems into well-defined science problems, and communicate results and trade-offs to both technical and non-technical audiences Contribute to technical documentation—architecture wikis, experiment write-ups, and model cards Growth & Community Present at internal ML paper reading sessions and science forums Stay current with state-of-the-art research (NeurIPS, ICLR, ACL, KDD) and bring new ideas to the team Mentor junior scientists and interns; participate in hiring interviews and debriefs Publish findings in top-tier venues and file patents where applicable
US, CA, Sunnyvale
Amazon is looking for an Applied Scientist with a strong deep learning background to help build the training environments that teach large language models to reason, use tools, and complete complex, multi-step tasks. Key job responsibilities You will design, build, and evaluate reinforcement learning environments (RL gyms) for LLM training: realistic, verifiable task environments where models learn through interaction and feedback. This includes defining tasks and reward signals, building the infrastructure to run environments at scale, measuring how well environments transfer into model capability, and developing rigorous methods to verify environment quality and correctness. You will work closely with model training teams to understand where environments are most valuable and iterate based on what the models learn. Your work will directly shape products and services that use generative AI. About the team The Foundational AI (FAI) team has a mission to push the envelope in GenAI with LLMs, in order to provide the best-possible experience for our customers.
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 push the boundaries of what's possible in robotic intelligence. As a Member of Technical Staff, you'll be at the forefront of developing breakthrough foundation models that enable robots to perceive, understand, and interact with the world in unprecedented ways. You'll drive independent research initiatives in areas such as perception, manipulation, science understanding, locomotion, manipulation, sim2real transfer, multi-modal foundation models and multi-task robot learning, designing novel frameworks that bridge the gap between state-of-the-art research and real-world deployment at Amazon scale. In this role, you'll balance innovative technical exploration with practical implementation, collaborating with platform teams to ensure your models and algorithms perform robustly in dynamic real-world environments. You'll have access to Amazon's vast computational resources, enabling you 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 - Drive independent research initiatives across the robotics stack, including robotics foundation models, focusing on breakthrough approaches in perception, and manipulation, for example 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 - Lead full-stack robotics projects from conceptualization through deployment, taking a system-level approach that integrates hardware considerations with algorithmic development, ensuring robust performance in production environments - Collaborate with platform and hardware teams to ensure seamless integration across the entire robotics stack, optimizing and scaling models for real-world applications - Contribute to the team's technical strategy and help shape our approach to next-generation robotics challenges A day in the life - Design and implement novel foundation model architectures and innovative systems and algorithms, leveraging our extensive infrastructure to prototype and evaluate at scale - Collaborate with our world-class research team to solve complex technical challenges - Lead technical initiatives from conception to deployment, working closely with robotics engineers to integrate your solutions into production systems - Participate in technical discussions and brainstorming sessions with team leaders and fellow scientists - Leverage our massive compute cluster and extensive robotics infrastructure to rapidly prototype and validate new ideas - Transform theoretical insights into practical solutions that can handle the complexities of real-world robotics applications 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 innovative 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, NY, New York
MULTIPLE POSITIONS AVAILABLE Employer: AMAZON.COM SERVICES LLC Offered Position: Economist III Job Location: New York, New York Job Number: AMZ9674737 Position Responsibilities: Lead pioneering research and collaborate with the chief economist and senior management to architect innovative solutions for complex business problems across retail, international retail, cloud computing, third party merchants, search, Kindle, streaming video, and operations. Drive thought leadership in applying frontier economic thinking to innovate in market design, pricing strategies, forecasting, program evaluation, and online advertising. Design and oversee sophisticated econometric models using extensive data systems, while developing novel methodologies for processing large datasets and contributing to automated system architecture. Lead the advancement of cutting-edge tools from applied micro-econometrics (e.g. experimental design, difference-in-difference, regression discontinuity, and IV) and forecasting (state-of-theart time series models). Drive cross-functional research initiatives leveraging big data tools for complex analysis, mentor junior economists in research excellence, and synthesize groundbreaking findings into presentations for executive leadership. Position Requirements: PhD degree or foreign equivalent in Economics, Finance, or a related field and two years of post-doctoral research or work experience in the job offered or a related occupation. Must have one year of research or work experience in the following skill(s): (1) developing and applying methodologies in program evaluation, forecasting, time series analysis, panel data, and high dimensional problems; (2) using one or more of the following statistical programming languages: Python, Matlab, R, SAS, or Stata to perform data analysis and develop analytical models; and (3) using SQL and big data technologies to design and implement data processing solutions. Amazon.com is an Equal Opportunity-Affirmative Action Employer – Minority / Female / Disability / Veteran / Gender Identity / Sexual Orientation. 40 hours / week, 8:00am-5:00pm, Salary Range $175,100/year to $236,900/year. Amazon is a total compensation company. Dependent on the position offered, equity, sign-on payments, and other forms of compensation may be provided as part of a total compensation package, in addition to a full range of medical, financial, and/or other benefits. For more information, visit: https://www.aboutamazon.com/workplace/employee-benefits.#0000
US, NY, New York
MULTIPLE POSITIONS AVAILABLE Employer: AMAZON.COM SERVICES LLC Offered Position: Data Scientist III Job Location: New York, New York Job Number: AMZ10563850 Position Responsibilities: Own the data science elements of various products to help with data based decision making, product performance optimization, and product performance tracking. Work directly with product managers to help drive the design of the product. Work with Technical Product Managers to help drive the build planning. Translate business problems and products into data requirements and metrics. Initiate the design, development, and implementation of scientific analysis projects or deliverables. Own the analysis, modelling, system design, and development of data science solutions for products. Write documents and make presentations that explain model/analysis results to the business. Bridge the degree of uncertainty in both problem definition and data scientific solution approaches. Build consensus on data, metrics, and analysis to drive business and system strategy. Position Requirements: Bachelor's degree or foreign equivalent degree in Statistics, Applied Mathematics, Economics, Engineering, Computer Science or a related field and three years of experience in the job offered or a related occupation. Must have three years of experience in the following skills: (1) building statistical models and machine learning models using large datasets from multiple resources; (2) building complex data analyses by leveraging scripting languages including Python, Java, or related scripting language; and (3) communicating with users, technical teams, and management to collect requirements, evaluate alternatives, and develop processes and tools to support the organization. Amazon.com is an Equal Opportunity-Affirmative Action Employer – Minority / Female / Disability / Veteran / Gender Identity / Sexual Orientation. 40 hours / week, 8:00am-5:00pm, Salary Range $175,100/year to $236,900/year. Amazon is a total compensation company. Dependent on the position offered, equity, sign-on payments, and other forms of compensation may be provided as part of a total compensation package, in addition to a full range of medical, financial, and/or other benefits. For more information, visit: https://www.aboutamazon.com/workplace/employee-benefits.#0000
US, WA, Seattle
MULTIPLE POSITIONS AVAILABLE Company: Amazon Data Services, Inc. Position Title: Applied Scientist II (AMZ1513176) Location: Seattle, WA Position Responsibilities Participate in the design, development, evaluation, deployment and updating of data-driven models and analytical solutions for machine learning (ML) and/or natural language (NL) applications. Develop and/or apply statistical modeling techniques (e.g. Bayesian models and deep neural networks), optimization methods, and other ML techniques to different applications in business and engineering. Routinely build and deploy ML models on available data. Research and implement novel ML and statistical approaches to add value to the business. Mentor junior engineers and scientists. (AMZ1513176) 40 hrs/week, Mon-Fri, 8:00 a.m. - 5:00 p.m. Salary Range: $163,617 - $193,200/yr. Amazon is an Equal Opportunity – Affirmative Action Employer – Minority/Female/Disability/Veteran/Gender Identity/Sexual Orientation
IN, TS, Hyderabad
At Amazon, we strive to be Earth's most customer-centric company, where customers can find and discover anything they want to buy online. Our mission in International Seller Services (ISS) is to provide technology solutions for improving the seller and customer experience, drive seller compliance, maximize seller success, and improve internal workforce productivity. Team's main focus is to build products that are scalable across different regions of the world, while working in partnership with ISS regional stakeholders and multiple partner teams across Amazon. As a Data Scientist, you will be responsible for modeling complex problems, discovering insights, and building risk algorithms that identify opportunities through statistical models, machine learning, and visualization techniques to improve operational efficiency. As a Data Scientist, you will leverage your expertise in Machine Learning, Natural Language Processing (NLP), and Large Language Models (LLM) to develop innovative solutions for Amazon's ISS team. You'll be responsible for modeling complex problems, building innovative algorithms, and discovering actionable insights through statistical models and visualization techniques to enhance operational efficiency in the e-commerce space. The role combines usage of latest AI technology with practical business applications, requiring someone passionate about transforming the way we interact with technology while delivering measurable impact through advanced analytics and machine learning solutions. You will need to collaborate effectively with business and product leaders within ISS and cross-functional teams to build scalable solutions against high organizational standards. The candidate should be able to apply a breadth of tools, data sources, and Data Science techniques to answer a wide range of high-impact business questions and proactively present new insights in concise and effective manner. The candidate should be an effective communicator capable of independently driving issues to resolution and communicating insights to non-technical audiences. This is a high impact role with goals that directly impacts the bottom line of the business. Key job responsibilities Analyze terabytes of data to define and deliver on complex analytical deep dives to unlock insights and build scalable solutions through Data Science to ensure security of Amazon’s platform and transactions Build Machine Learning and/or statistical models that evaluate the transaction legitimacy and track impact over time Ensure data quality throughout all stages of acquisition and processing, including data sourcing/collection, ground truth generation, normalization, transformation, and cross-lingual alignment/mapping Define and conduct experiments to validate/reject hypotheses, and communicate insights and recommendations to Product and Tech teams Develop efficient data querying infrastructure for both offline and online use cases Collaborate with cross-functional teams from multidisciplinary science, engineering and business backgrounds to enhance current automation processes Learn and understand a broad range of Amazon’s data resources and know when, how, and which to use and which not to use. Maintain technical document and communicate results to diverse audiences with effective writing, visualizations, and presentations
US, WA, Bellevue
Alexa+ is Amazon's next-generation, AI-powered virtual assistant. Building on the original Alexa, it uses generative AI to deliver a more conversational, personalized and effective experience. The Alexa Sensitive Content Intelligence (ASCI) team builds responsible AI (RAI) solutions for Alexa+, so it can provide useful information responsibly. We are looking for an experienced Manager, Applied Science with a strong background in NLP and/or CV. You will lead a team that designs and develops generative AI–based ML solutions in the RAI space across all languages and countries. As a Manager, Applied Science, you will lead a team of exceptional scientists who develop novel algorithms and modeling techniques that advance the state of the art in NLP and CV. You will work in a dynamic, fast-paced organization where scientists, engineers and product managers build customer-facing experiences together. You will mentor scientists and raise the bar of scientific research at Amazon. Your work will directly impact customers through products and services that use speech, language and computer vision technologies. We are looking for a leader with strong technical experience and a passion for building science-driven solutions in a fast-paced environment. You should have a good understanding of Artificial Intelligence (AI), Natural Language Understanding (NLU), Machine Learning (ML), generative AI and large language models (LLMs), and know where to apply them in different business cases. You will use deep technical expertise, a sound grasp of Computer Science fundamentals and practical experience with large-scale distributed systems to create reliable, scalable, high-performance products. Beyond technical depth, you must have exceptional communication skills and know how to influence key stakeholders. You will join a select group of people making history with one of the most highly rated products in Amazon's history. If you want a challenging, innovative role where you can solve important problems while growing as a leader, this may be the place for you. Key job responsibilities - Define and own the scientific roadmap for your team, aligning research priorities with organizational goals and annual planning processes to maximize business impact. - Lead, mentor, and grow a team of applied scientists, machine learning engineers, and analysts — creating an environment where team members develop their skills, take smart risks, and deliver high-quality work. - Partner with engineering, product, and business stakeholders to translate complex scientific research into production-ready models and actionable insights, ensuring solutions meet both technical and business requirements. - Evaluate and improve machine learning model performance using rigorous experimentation, feature engineering, and data-modeling techniques, while determining when and how to integrate generative AI tools to augment team productivity. - Communicate scientific strategy, results, and trade-offs clearly to technical and non-technical audiences through well-structured narratives and presentations, driving alignment and informed decision-making across teams. A day in the life As a Manager, Applied Science on the ASCI team, you'll lead scientists and ML engineers who build AI systems that keep Alexa safe and trustworthy for millions of users worldwide. You'll combine technical leadership with strategic decisions, working with product teams, policy experts and data annotators to deliver engaging, safe experiences across Amazon devices. You'll keep up with advances in generative AI to design, develop and own state-of-the-art NLP and CV solutions. You'll coach scientists to spot and reduce risks early and to build more robust ML systems. You'll balance near-term delivery with long-term innovation so solutions stay robust, interpretable and scalable. Your work directly affects delivery reliability, cost efficiency and customer experience at massive scale. About the team The mission of the ASCI team is to (1) minimize negative surprises to customers caused by sensitive content, (2) detect and prevent potential brand-damaging interactions, and (3) build customer trust through appropriate interactions on sensitive topics. "Sensitive content" covers a wide range of categories, such as offensive content (e.g., hate speech, racist speech), profanity, content suitable only for certain age groups, and politically or religiously polarizing content. "Content" means any material Alexa exposes to customers, in both 1P and 3P experiences, including text, speech, audio and video.
US, WA, Bellevue
Fulfillment by Amazon (FBA) lets sellers outsource supply chain and fulfillment to Amazon. Sellers use Amazon's world class science, technology, and logistics infrastructure to deliver billions of products from manufacturing hubs to customers worldwide with a fast delivery promise. As FBA expands into end-to-end supply chain and fulfillment management, its science problems are growing in complexity and strategic importance. FBA is looking for a Senior Applied Science Manager with deep expertise in Operations Research and Reinforcement Learning, plus strong modeling and analytical skills. You will join a cross-domain group of applied scientists, research scientists, economists, and data scientists building the intelligence layer for FBA's supply chain. As a leader in this space, you will manage a team of interdisciplinary scientists developing cutting edge supply chain solutions. These solutions span the full journey: from the moment a seller procures product at origin, through upstream warehousing and distribution, and into Amazon's fulfillment network. Your work will impact millions of third-party sellers globally. You will set the scientific culture (including research, publication, and innovation) and the short-and-long term research vision for the organization. You will manage the execution of science projects, help business and tech partners turn scientific results into policies, programs, and products, and influence other business teams across the Amazon Consumer organization. The role has high visibility with senior Amazon business leaders and involves working with engineering and product teams to integrate science models into production systems. The ideal candidate brings scientific and technical expertise, strong business intuition, and a desire to grow and develop others. You have excellent written and verbal communication skills to influence business direction up to the VP level, frame solutions for non-technical partners, and advocate for science in the organization. You are comfortable with ambiguity and enjoy working in a fast-paced environment. Key job responsibilities - Lead a team of scientists (Data Scientists, Applied Scientists, Research Scientists, BIEs), and hire and develop top science talent. - Own the science development of inventory routing, replenishment, product selection, mechanism design, and transportation distribution algorithms that power FBA's supply chain across Amazon's fulfillment network. - Partner with Sr. Leaders across the organization to frame business problems, establish science vision, and execute roadmap. Partner with Engineering teams to bring modeling solutions to frontline applications across the business. - Set the scientific culture and leadership within the organization, advocating for science innovation and rigor at leadership level - Be a thought leader on modeling engineering, scientific research, and business strategy, be able to make trade off and executive decisions spanning the end-to-end science workflow. - Be able to translate and communicate out data and science driven results - Identify new opportunities to leverage various science techniques within the organization. - Drive and execute scientific projects/products end-to-end: from ideation, analysis, prototyping, development, metrics, and monitoring. Review and audit modeling processes and results. A day in the life You will lead a team of scientists and define a multiyear science and data vision and strategy to support seller fulfillment. You will design and launch new systems that solve real world inventory, transportation, replenishment, pricing, and mechanism design problems. These problems involve millions of unique products, hundreds of thousands of Selling Partners, and tens of millions of customers around the world. You will guide your team as they develop models using data analysis, scientific methods, and experimentation. You will explain the properties of your analysis and models to business partners and fold their feedback and requests into your projects. You will own the research agenda and prioritization for the team and make sure projects address business needs. You will make decisions about technology, models, and methodology, striving for simplicity and showing judgment backed by scientific reasoning and data. You will also work with world class economists and scientists across Amazon's broader decision and research science community to widen the scope of your work, and you will mentor engineers and scientists. About the team Sellers play a vital role in Amazon's ecosystem and are central to our mission of offering Earth's largest selection, lowest prices, and fastest delivery. FBA is an optional service that lets third party sellers outsource order fulfillment to Amazon and use Amazon's world class facilities to offer customers a fast delivery promise. Because we are committed to taking on more supply chain and operational complexity for our selling partners, Amazon now offers an end-to-end suite of supply chain and fulfillment services. This suite helps sellers move products reliably from manufacturing sites to customers worldwide. The FBA team is the core group responsible for warehousing, inventory management, inbound placement, fulfillment, capacity control, reimbursement, inventory defects, and a range of recommendation services for sellers. We learn seller behavior, understand the seller experience, recommend the right actions to sellers, design seller policies and incentives, and build science products and services that help sellers grow their businesses. To do this, we draw on operations research, economics, machine learning, statistics, and data analytics. Our culture centers on rapid prototyping, rigorous experimentation, and data driven decisions.
US, NY, New York
The Sequence Models team builds foundation models of the Amazon customer journey across Stores, Prime Video, Audible, Amazon Music, and Twitch. Teams across the company use these models to decide what to show a customer and when. One shared model does the work that narrow, surface-specific models do today. Our methods span generative sequence modeling, representation learning, recommendation and retrieval, causal inference, and probabilistic inference at scale. Key job responsibilities - Own novel model development end to end. Work backwards from partner and customer needs to extend established methods or invent new ones. - Train and evaluate large-scale sequence models on behavioral data. - Define benchmarks, metrics, and evaluation methodology. - Apply causal inference to measure what your models change, and calibrate model-based estimates against randomized experiments. - Write production-quality code, integrate your models into production systems, and own their accuracy, efficiency, and inference cost at serving scale. - Partner with scientists on other teams to compare models on shared benchmarks, separate real differences from noise, and agree the next steps together. - Develop and document scientific research to be shared with the greater science community at Amazon - Mentor and coach scientists and engineers across the organization, raising the technical bar through knowledge sharing, design reviews, and active participation in the broader scientific community. A day in the life You might start your morning reviewing experiment results from a model you recently proposed, digging into metrics to understand where performance gaps remain. By mid-morning, you are whiteboarding a new approach with engineers to address an ambiguous product challenge that existing methods cannot solve. After lunch, you lead a science review for a colleague's design document, offering constructive feedback and alternative directions. Later, you draft a research proposal for a new initiative, then close the day mentoring a junior scientist on best practices for experiment design and evaluation.