Low-precision arithmetic makes robot localization more efficient

Using different levels of precision for different arithmetic tasks reduces computational burden without compromising performance.

Simultaneous localization and mapping (SLAM) is the core technology of autonomous mobile robots. It involves simultaneously building a map of the robot’s environment and finding the robot’s location within that map.

SLAM is computationally intensive, and deploying it on resource-constrained robots — such as consumer household robots — generally requires techniques for making computations more tractable.

Related content
Two Alexa AI papers present novel methodologies that use vision and language understanding to improve embodied task completion in simulated environments.

One such technique is the use of low-precision floating-point arithmetic, or reducing the number of bits used to represent numbers with decimal points. The technique is popular in deep learning, where halving the number of bits (from the standard 32 to 16) can double computational efficiency with little effect on accuracy.

But applying low-precision arithmetic to SLAM is more complicated. Where deep-learning-based classification models are discrete-valued, SLAM involves solving a nonlinear optimization problem with continuous-valued functions, which require higher accuracy.

At Amazon, we’ve tackled this problem by designing a novel mixed-precision solver, which combines 64-bit (fp64), 32-bit (fp32), and 16-bit (fp16) precisions for nonlinear optimization problems in the SLAM algorithm. This innovation paves the way for faster and greener on-device navigation.

General framework

A SLAM algorithm has two key components: visual odometry and loop closure. Visual odometry gives real-time estimates of the robot’s pose, or its orientation and location on the map, based on the most recent observations. When the robot recognizes that it has arrived at a place that it previously visited, it closes the loop by globally correcting its map and its location estimate.

Related content
A model that estimates depth from 2-D images learns to adjust to differences between images produced by different cameras, reducing error by about 20%.

Both visual odometry and loop closure involve solving nonlinear optimization problems — bundle adjustment (BA) and pose graph optimization (PGO), respectively. To solve them efficiently, SLAM systems typically use approximate methods that recast them as sequences of linearized optimization problems. If the goal is to find the pose estimate x, then each linear problem minimizes the linearized error function, which is the sum of the current error function and its first-order correction. The first-order correction is the product of the Jacobian, which is the matrix of the function’s first-order derivatives, and the update to the pose estimation. The linear problems are typically solved through factorization, using either Cholesky or QR methods. The solution of each linearized optimization problem is the update for the current pose estimate.

The general procedure is to start with the current approximation of x, compute the error function and the Jacobian, solve a linear optimization problem, and update x accordingly, repeating the process until certain stopping criteria are met. At each iteration, the value of the error function is known as the residual, since it’s the residual error left over from the previous iteration.

General framework.png
General framework for mixed-precision nonlinear optimization.

The most expensive computations in the nonlinear optimizations for both BA and PGO are the computation of the Jacobian (about 15% of the optimization time) and the solution of the linear problem (about 60%). Simply solving either problem at half-precision (fp16) from beginning to end will result in lower accuracy and sometimes numerical instability.

To mitigate these difficulties, we regularize and scale the matrices to avoid overflow and rank deficiency. The rank deficiency occurs when columns of the Jacobian are linearly dependent. Through careful experiments, we further identified the computations to be done at precision higher than fp16 and proposed a mixed-precision nonlinear optimization solver.

Related content
Deep learning to produce invariant representations, estimations of sensor reliability, and efficient map representations all contribute to Astro’s superior spatial intelligence.

We found that, to match the accuracy of the solution in pure double-precision, the following two components have to be computed in precision higher than fp16:

  • The residual must be evaluated in single or higher precision;
  • The update of x, which is a six-degree position-angle update, must be done in double precision.

Although this general optimization framework applies to both BA and PGO, the details vary across the two applications, because of the different structures and properties of the matrices in the linear problems. We thus propose two mixed-precision solving strategies for the relevant linear systems.

Visual odometry

For visual odometry, people traditionally use filter-based methods, which can suffer from large linearization error. Nonlinear optimization-based methods have become more popular in recent years. These methods estimate the position and orientation of the robot by minimizing an error function, which is the difference between the re-projection of landmarks and their observation in the image frame. This procedure is called bundle adjustment because we are adjusting a bundle of light rays to match the projection with the observation.

fp16 SLAM.png
Bundle adjustment, in which “bundles” of light rays are adjusted to match projection with observation.

BA-based visual odometry operates over a sliding window that contains a fixed number of (key) frames. On average, a new key frame comes at 10Hz. The challenge is to solve the BA problem within a given time budget. One popular way to do this is to solve the normal equation that is the equivalent of the linearized optimization problem; this involves the approximation of the Hessian matrix, or the matrix of second-order derivatives of the residual.

Sparsity pattern.png
Sparsity patterns of Hessian matrices from bundle adjustment (left) and pose graph optimization (right).

The BA problem involves two sets of unknown state variables: one indicates the robot’s pose and the other indicates the landmark location. One way to reduce the computational burden of the BA problem is to marginalize the constraints between camera poses and landmarks and focus on the camera poses first. In the SLAM community, this procedure is known as Schur elimination or landmark marginalization.

Related content
Measuring the displacement between location estimates derived from different camera views can help enforce the local consistency vital to navigation.

This marginalization step can greatly reduce the size of the linear system that needs to be solved. For a 50-frame BA problem, the Jacobian matrix is usually of the size 5,500 x 1,000, and the Hessian is of size 1,000 x 1,000. Decoupling constraints reduces the size of the linear system to 300 x 300, small enough to be solved with direct or iterative solvers. However, this strategy requires both the formulation of the Hessian matrix and a partial-elimination step, which are expensive to employ in practice.

Our mixed-precision linear solver, which mixes single and half-precision, is based on the conjugate gradient normal-equation residual (CGNR) method, which is an iterative method directly applied to the linear-optimization problem without explicit formulation of the Hessian.

As in the general framework, a naïve casting of all computations to half-precision will result in lower accuracy. In our experiments, we found that if we compute matrix-vector products in half-precision and all other operations in single precision, we will maintain the overall accuracy of the SLAM pipeline.

Solver comparison.png
A comparison of the naïve half-precision solver (left) and the mixed-precision solver (right) on a single trajectory estimation.
Histogram.png
The cumulative-error histogram for 1,703 trajectory estimations where the VO is solved with mixed precision, half-precision, and double precision, respectively.

The matrix-vector products, which are the major computation in CGNR iterations, usually account for 83% of the computing cost, in terms of number of floating-point operations. That means that, if run on NVIDIA V100 GPUs, the mixed-precision solver could save at least 41% solving time compared to the single-precision linear solver.

Loop closure

In the SLAM pipeline, the local pose estimates from VO usually exhibit large drift, especially in the long run. Loop closure corrects this drift.

Loop closure.png
Illustration of loop closure.

For a real-world mapping estimate, without LC correction, the average trajectory error could be at the order of 0.1 meter, which is not acceptable in practice. This error is reduced to 10-4 meters after applying LC corrections.

ATE w/o LC (m)

ATE with LC (m)

Max

4.03E-01

5.83E-04

99%

2.65E-01

5.71E-04

90%

2.00E-01

5.57E-04

Mean

9.72E-02

3.19E-04

The LC adjustment involves solving a global PGO problem. Like the BA problem, it is a nonlinear optimization problem and can be solved within the same mixed-precision framework. But the linear systems arising from PGO problems are much larger and sparser than those of the BA problem.

Related content
“Body language” and an awareness of social norms help Amazon’s new household robot integrate gracefully into the home.

As more and more loops are closed, the problem size could grow from several hundreds of poses to several thousands of poses. If we measure the size of a matrix by the number of its rows, during loop closure, the size could grow from the order of 100 to the order of 10,000. Directly solving sparse matrices of this size in double precision is challenging, especially considering the time and computation constraints of on-device applications. For a real-world trajectory estimation, the solving time for the PGO problem could grow up to eight seconds with full CPU usage.

Solving times.png
Time for solving PGO problems during trajectory estimation. The x-axis represents the total number of key frames in each pose graph, and the y-axis represents the time for solving each PGO problem.

This results in a different strategy for designing a mixed-precision solver for PGO problems. Due to the sparsity of the Jacobian matrix, our mixed-precision method is still based on the iterative CGNR method. But to accelerate the convergence of the CGNR iterations, we apply a static incomplete Cholesky preconditioner in each iteration. Cholesky factorization decomposes a symmetric linear system into a product of two triangular matrices, meaning that all of their nonzero values are concentrated on one side of a diagonal across the matrix. This decomposition step is expensive, so we do it only once for the whole problem. The computational cost is mostly dominated by the application of the preconditioner, which involves solving two triangular systems. In our timing analysis, this step consumes around 50% of the computation in each linear solving.

To accelerate the optimization, instead of computing matrix-vector products in half-precision, we solve the triangular system in half-precision, keeping all other operations in single precision. With this mixed-precision solver, we could almost match the accuracy of the full-precision solver while reducing computing time by 26% on average.

ATE histogram
Cumulative ATE histogram for solving 800 PGO problems from a real-world trajectory estimation. Each PGO problem is solved with a mixed-precision solver and a single-precision solver, respectively.

Our results across both the VO and LC applications show that because of the high-efficiency and low-energy nature of half-precision arithmetic, mixed-precision solvers could make on-device SLAM faster and greener.

Acknowledgments

The following contributed equally to this work: Tong Qin, applied scientist, Amazon Hardware; Sankalp Dayal, applied-science manager, Hardware; Joydeep Biswas, software development engineer, Amazon Devices; Varada Gopalakrishnan, vice president and distinguished engineer, Hardware; Adam Fineberg, senior principal engineer, Devices; Rahul Bakshi, senior manager of software, machine learning, and mobility, Hardware.

Research areas

Related content

US, WA, Seattle
Economists in this role partner with business stakeholders to distill complex problems into testable economic questions and generate actionable insights. They collaborate with engineers and scientists to estimate models on large-scale data, design pilots, measure impact, and scale successful prototypes into improved policies and programs. They leverage AI tools to scale economic study for broader business impact. They communicate findings to business leaders, incorporate feedback, and deliver customer-centric solutions at scale.
US, NY, New York
Are you passionate about solving big problems from ground-up? Do you enjoy building new state-of-the-art products at internet scale? Come lead the innovation in this startup team, vertical ad products. This is a green field problem without a known answer or a pattern to follow. We have ambitious vision to simplify full funnel advertising solutions, at scale, with specialized agentic AI-powered models and diversify the demand to strategic verticals including finserv, autos, locals.. etc. We are seeking an experienced Applied Scientist to drive innovation in our Ads Foundational Model. In this individual contributor role, you will apply advanced machine learning techniques to improve advertiser performance and customer experience. Key job responsibilities As an Applied Scientist on this team, you will: 1. Develop and drive the science strategy for Ads Foundational Model (Ads-FM), aligning it with the program's objectives and overall business goals. 2. Identify high-impact opportunities within Ads-FM program and lead the ideation, planning, and execution of science initiatives to address them. 3. Build and deploy machine learning models using computer vision, natural language processing, and deep learning to evaluate and enhance ad effectiveness. 4. Develop algorithms that extract meaningful signals from image, video, and audio content to predict and improve customer engagement 5. Leverage Amazon's extensive data repository to create predictive models that generate actionable recommendations for more compelling ad creative 6. Collaborate with business leaders and cross-functional teams to implement ML-powered solutions 7. Contribute to the ML roadmap for the Ads-FM program through innovation and research.
US, WA, Seattle
This role will contribute to developing the Economics and Science products and services in the Fee domain, with specialization in supply chain systems and fees. Through the lens of economics, you will develop causal links for how Amazon, Sellers and Customers interact. You will be a key and senior scientist, advising Amazon leaders how to price our services. You will work on developing frameworks and scaleable, repeatable models supporting optimal pricing and policy in the two-sided marketplace that is central to Amazon's business. The pricing for Amazon services is complex. You will partner with science and technology teams across Amazon including Advertising, Supply Chain, Operations, Prime, Consumer Pricing, and Finance. We are looking for an experienced Principal Economist to improve our understanding of seller Economics, enhance our ability to estimate the causal impact of fees, and work with partner teams to design pricing policy changes. In this role, you will provide guidance to scientists to develop econometric models to influence our fee pricing worldwide. You will lead the development of causal models to help isolate the impact of fee and policy changes from other business actions, using experiments when possible, or observational data when not. Key job responsibilities The ideal candidate will have extensive Economics knowledge, demonstrated strength in practical and policy relevant structural econometrics, strong collaboration skills, proven ability to lead highly ambiguous and large projects, and a drive to deliver results. They will work closely with Economists, Data / Applied Scientists, Strategy Analysts, Data Engineers, and Product leads to integrate economic insights into policy and systems production. Familiarity with systems and services that constitute seller supply chains is a plus but not required. About the team The Stores Economics and Sciences team is a central science team that supports Amazon's Retail and Supply Chain leadership. We tackle some of Amazon's most challenging economics and machine learning problems, where our mandate is to impact the business on massive scale.
US, CA, San Diego
The Private Brands team is looking for a Research Scientist to join the team in building science solutions at scale. Our team applies Optimization, Machine Learning, Statistics, Causal Inference, and Econometrics/Economics to derive actionable insights about the complex economy of Amazon’s retail business and develop Statistical Models and Algorithms to drive strategic business decisions and improve operations. We are an interdisciplinary team of Scientists, Engineers, and Economists. Key job responsibilities You will work with business leaders, scientists, and economists to translate business and functional requirements into concrete deliverables, including the design, development, testing, and deployment of highly scalable optimization solutions and ML models. This is a unique, high visibility opportunity for someone who wants to have business impact, dive deep into large-scale problems, enable measurable actions on the consumer economy, and work closely with scientists and economists. As a Research Scientist, you bring business and industry context to science and technology decisions. You set the standard for scientific excellence and make decisions that affect the way we build and integrate algorithms. Your solutions are exemplary in terms of algorithm design, clarity, model structure, efficiency, and extensibility. You tackle intrinsically hard problems, acquiring expertise as needed. You decompose complex problems into straightforward solutions. We are particularly interested in candidates with experience in Operations Research and predictive models and working with distributed systems. Academic and/or practical background in Operations Research, Machine Learning and Reinforcement Learning are particularly relevant for this position. To know more about Amazon science, Please visit https://www.amazon.science
US, CA, Palo Alto
Alexa for Shopping (previously Rufus) is seeking a Senior Manager, Applied Science to lead multidisciplinary teams of Applied Scientists and Machine Learning Engineers building next-generation conversational AI and multi-agent systems powering customer-facing experiences at scale. This leader will drive both scientific innovation and execution across large language models (LLMs), agent orchestration, retrieval and grounding systems, evaluation frameworks, and scalable AI infrastructure. The role requires a combination of deep technical judgment, organizational leadership, product and engineering partnership, and operational excellence. The ideal candidate has a strong track record of building high-performing science and engineering teams, translating ambiguous business problems into scalable AI solutions, and delivering measurable customer impact through applied machine learning and generative AI technologies. Key job responsibilities - Lead and grow teams of Applied Scientists and Machine Learning Engineers working on conversational AI and multi-agent orchestration systems. - Define and drive technical strategy for large-scale generative AI systems, including LLM routing, prompting, grounding, memory, tool use, personalization, and response optimization. - Partner closely with Product, Engineering, and Tech leadership to align AI investments with long-term business and customer goals. - Drive end-to-end delivery of production AI systems balancing quality, latency, scalability, safety, and operational reliability. - Establish scientific and engineering best practices across experimentation, evaluation, model iteration, and production deployment. - Lead roadmap prioritization and execution across research innovation and product delivery timelines. - Build scalable evaluation methodologies and quality frameworks for multilingual and global customer experiences. - Mentor and develop technical leaders across both science and engineering disciplines. - Foster a high-performance culture centered on customer obsession, innovation, operational excellence, and strong cross-functional collaboration.
US, NY, New York
We are seeking a Human-Robot Interaction (HRI) Applied Scientist to develop cutting-edge interactions that make robots feel alive, personal, and fun. In this role, you will focus on verbal and non-verbal conversational systems, social dynamics, memory, and long-term relationship formation between robots, their environments, and the people they interact with. Your contributions will be essential in advancing robotics by enabling expressive, socially intelligent, and trustworthy interactions between robots and humans. Key job responsibilities - Develop interactive systems that leverage large language models, multimodal inputs and outputs, reinforcement learning from human feedback, or other advanced techniques to achieve fluid, engaging, and socially appropriate robot behavior - Design and implement intelligent conversational systems that handle turn-taking, grounding, interruption, and incorporates context drawn from a robot's physical environment and shared history with a user - Integrate perceptual sensor streams including gaze, facial expression, gesture, posture, and more to understand social context and produce coherent, lifelike interactions. - Develop memory and personalization systems that allow robots to form lasting relationships with individual users, learn their environments, and adapt their behavior over weeks and months - Stay updated on advancements in HRI, NLP, multimodal AI, and cognitive and social science to apply cutting-edge techniques to robot interaction challenges - Lead technical projects from conception through production deployment - Mentor junior scientists and engineers - Bridge research initiatives with practical engineering implementation
IN, KA, Bengaluru
Do you want to join an innovative team of scientists applying machine learning and advanced statistical techniques to protect Amazon customers and enable a trusted eCommerce experience? Are you excited about modeling terabytes of data and building state-of-the-art algorithms to solve complex, real-world fraud and risk challenges? Do you enjoy owning end-to-end machine learning problems, directly influencing customer experience and company profitability, while collaborating in a diverse, high-performing team? If so, the Amazon Buyer Risk Prevention (BRP) Machine Learning team may be the right fit for you. We are seeking an Applied Scientist to design, develop, and deploy advanced algorithmic systems that safeguard millions of transactions every day. In this role, you will independently drive model development from problem formulation to production deployment, build scalable ML solutions, and leverage emerging technologies—including Generative AI and LLMs—to enhance fraud detection and next-generation risk prevention systems. Key job responsibilities Own end-to-end development of machine learning models for large-scale risk management systems Analyze large volumes of historical and real-time data to identify fraud patterns and emerging risk trends Design, develop, validate, and deploy innovative models to production environments Apply GenAI/LLM technologies to automate risk evaluation and improve operational efficiency Collaborate closely with software engineering teams to implement scalable, real-time model solutions Partner with operations and business stakeholders to translate risk insights into measurable impact Establish scalable and automated processes for data analysis, model experimentation, validation, and monitoring Track model performance and business metrics; communicate insights clearly to technical and non-technical stakeholders Research and implement novel machine learning and statistical methodologies
IN, KA, Bengaluru
Do you want to join an innovative team applying machine learning and advanced statistical techniques to protect Amazon customers and enable a trusted eCommerce experience? Are you excited about working with large-scale datasets and developing models that solve real-world fraud and risk challenges? If so, the Amazon Buyer Risk Prevention (BRP) Machine Learning team may be the right fit for you. We are seeking an Applied Scientist to help develop scalable machine learning solutions that safeguard millions of transactions every day. In this role, you will partner with senior scientists and engineers to translate business problems into data-driven solutions, build and evaluate models, and contribute to next-generation risk prevention systems, including applications of Generative AI and LLM technologies. Key job responsibilities Apply machine learning and statistical techniques to build and improve risk management models Analyze large-scale historical data to identify risk patterns and emerging trends Develop, validate, and deploy innovative models under the guidance of senior scientists Experiment with emerging technologies, including GenAI/LLMs, to enhance automation and risk evaluation Collaborate closely with software engineers to implement models in real-time production systems Partner with operations and business teams to improve risk policies and operational efficiency Build scalable, automated pipelines for data analysis, model training, and validation Monitor model performance and provide clear reporting on key risk and business metrics Research and prototype new modeling approaches to improve system performance
IN, KA, Bengaluru
Do you want to join an innovative team of scientists applying machine learning and advanced statistical techniques to protect Amazon customers and enable a trusted eCommerce experience? Are you excited about modeling terabytes of data and building state-of-the-art algorithms to solve complex, real-world fraud and risk challenges? Do you enjoy owning end-to-end machine learning problems, directly influencing customer experience and company profitability, while collaborating in a diverse, high-performing team? If so, the Amazon Buyer Risk Prevention (BRP) Machine Learning team may be the right fit for you. We are seeking an Applied Scientist to design, develop, and deploy advanced algorithmic systems that safeguard millions of transactions every day. In this role, you will independently drive model development from problem formulation to production deployment, build scalable ML solutions, and leverage emerging technologies—including Generative AI and LLMs—to enhance fraud detection and next-generation risk prevention systems. Key job responsibilities Own end-to-end development of machine learning models for large-scale risk management systems Analyze large volumes of historical and real-time data to identify fraud patterns and emerging risk trends Design, develop, validate, and deploy innovative models to production environments Apply GenAI/LLM technologies to automate risk evaluation and improve operational efficiency Collaborate closely with software engineering teams to implement scalable, real-time model solutions Partner with operations and business stakeholders to translate risk insights into measurable impact Establish scalable and automated processes for data analysis, model experimentation, validation, and monitoring Track model performance and business metrics; communicate insights clearly to technical and non-technical stakeholders Research and implement novel machine learning and statistical methodologies
IN, KA, Bengaluru
Do you want to lead the development of advanced machine learning systems that protect millions of customers and power a trusted global eCommerce experience? Are you passionate about modeling terabytes of data, solving highly ambiguous fraud and risk challenges, and driving step-change improvements through scientific innovation? If so, the Amazon Buyer Risk Prevention (BRP) Machine Learning team may be the right place for you. We are seeking a Senior Applied Scientist to define and drive the scientific direction of large-scale risk management systems that safeguard millions of transactions every day. In this role, you will lead the design and deployment of advanced machine learning solutions, influence cross-team technical strategy, and leverage emerging technologies—including Generative AI and LLMs—to build next-generation risk prevention platforms. Key job responsibilities Lead the end-to-end scientific strategy for large-scale fraud and risk modeling initiatives Define problem statements, success metrics, and long-term modeling roadmaps in partnership with business and engineering leaders Design, develop, and deploy highly scalable machine learning systems in real-time production environments Drive innovation using advanced ML, deep learning, and GenAI/LLM technologies to automate and transform risk evaluation Influence system architecture and partner with engineering teams to ensure robust, scalable implementations Establish best practices for experimentation, model validation, monitoring, and lifecycle management Mentor and raise the technical bar for junior scientists through reviews, technical guidance, and thought leadership Communicate complex scientific insights clearly to senior leadership and cross-functional stakeholders Identify emerging scientific trends and translate them into impactful production solutions