RecSys: Rajeev Rastogi on three recommendation system challenges

In a keynote address, the Amazon International vice president will discuss recommendations in directed graphs, training models whose target labels change, and using prediction uncertainty to improve model performance.

Rajeev Image 2.jpg
Rajeev Rastogi, vice president of applied science in Amazon’s International Emerging Stores division.

In a keynote address at this year’s ACM Conference on Recommender Systems (RecSys), which starts next week, Rajeev Rastogi, vice president of applied science in Amazon’s International Emerging Stores division, will discuss three problems his organization has faced in its work on recommendation algorithms: recommendations in directed graphs; training machine learning models when target labels change over time; and leveraging estimates of prediction uncertainty to improve models’ accuracy.

“The connections are that these are general techniques that cut across many different recommendation problems,” Rastogi explains. “And these are things that we actually use in practice. They make a difference in the real world.”

Directed graphs

The first problem involves directed graphs, or graphs whose edges describe relationships that run in only one direction.

“Directed graphs have applications in many different domains out there — from citation networks, where an edge U-V indicates paper U cites paper V, or in social networks, where an edge U-V would show that user U follows another user V, and in e-commerce, where an edge U-V indicates that customers bought product U before they bought product V,” Rastogi explains.

Although the problem of exploring directed graphs is general, the researchers in Rastogi’s organization focused on this last case: related-products recommendation, where the goal is to predict what other products might interest a customer who has just made a purchase.

“The interesting part here is that the related-products relationship is actually asymmetric,” Rastogi explains. “If you have, say, two nodes, a phone and a phone case, given a phone, you want to recommend a phone case. But if the customer has bought a phone case, you don't want to recommend a phone, because they most likely already have one.”

Like many graph-based applications, the Amazon team’s solution to the problem of asymmetric related-product recommendation involves graph neural networks (GNNs), in which each node of a graph is embedded in a representational space where geometric relationships between nodes carry information about their relationships in the network. The embedding process is iterative, with each iteration factoring in information about nodes at greater removes, until each node’s embedding carries information about its neighborhood.

“A single embedding space does not have the expressive power to model the asymmetric relationships between nodes in directed graphs,” Rastogi explains. “Something that we borrowed from past work is to represent each node with dual embeddings, and one of our novel contributions is really to learn these dual embeddings in a GNN setting that leverages the entire graph structure.”

BLADE.png
At center is a graph indicating the relationships between cell phones and related products such as a case, a power adaptor, and a screen guard. At left is a schematic illustrating the embedding (vector representation) of node A in a traditional graph neural network (GNN); at right is the dual embedding of A, as both a recommendation target (A-t) and a recommendation source (A-s), in BLADE. From "BLADE: Biased neighborhood sampling based graph neural network for directed graphs".

“Then we had additional techniques, like adaptive sampling,” Rastogi adds. “These vanilla GNNs sample fixed neighborhood sizes for every node. But we found that low-degree nodes” — that is, nodes with few connections to other nodes — “have suboptimal performance when you have fixed neighborhood sizes for every node, because low-degree nodes have sparse connectivity structures. And so less information gets transmitted when you're aggregating information from neighbors and so on.

“So we actually choose to sample larger neighborhoods for low-degree nodes and smaller neighborhoods for high-degree nodes. It's a little bit counterintuitive, but it gives us much better results.”

Delayed feedback

A typical machine learning (ML) model is trained on labeled data, and the model must learn to predict the labels — its training targets — from the data. The second problem Rastogi addresses in his talk is how best to train a model when you know that some of the target labels are going to change in the near future.

“This is, again, a very common problem across many different domains,” Rastogi says. “In recommendations, there can be a time lag of a few days between customers viewing a recommendation and purchasing the product.

“There's a trade-off here: If you use all the training data in real time, some of those more recent training examples may have target labels that are incorrect, because they are going to change over time. On the other hand, if you ignore all the training examples you got in the last five days, then you're missing out on recent data, and your model isn't going to be as good — especially in environments where models need to be retrained frequently.

Delayed feedback.png
An illustration of true negatives, delayed positives and true positives, from "Modelling delayed redemption with importance sampling and pre-redemption engagement".

“Here, what we've done is come up with an importance-sampling strategy that essentially weighs every training example with an importance weight. Let P(X,Y) be the true data distribution, and Q(X,Y) be the data distribution that you observe in the training set. Our importance-sampling strategy uses the ratio P(X,Y) divided by Q(X,Y) as the importance weight.

“Our key innovation centers on techniques to compute these importance weights in new scenarios. One is where we take into account preconversion signals. People tend to do something before they convert; they may add to cart, or they may click on the product to research it before completing the purchase. So we take into account those signals, and that helps us overcome data sparsity.

“But then it makes the computation of importance weights a little bit more complex. If it's very likely that the target label will actually change from 0 — a negative example — to 1 , then the importance weight would be much lower than if the likelihood of the example not changing was very low. Essentially, what you're trying to do is learn from the data the likelihood that the target label is going is change in the future and capture that in the importance weights.”

Prediction uncertainty

Finally, Rastogi says, the third technique he’ll discuss in his talk is the use of uncertainty estimates to improve the accuracy of model predictions.

“ML models typically will return point estimates,” Rastogi explains. “But usually you have a probability distribution. In some cases, you could know there's a 0.5 chance this customer is going buy the product. But in some cases, it could be anywhere between 0.2 and 0.8. What we found is, if you’re able to generate uncertainty estimates for model predictions, we can exploit them to improve model accuracy.

“We trained a binary classifier to predict ad click probability for an ads recommendation application. For every sample in the holdout set, we generated both the model score, which is the probability prediction, and also an uncertainty estimate, which is how certain I am about the predicted probability.

“If I looked at a lot of examples in the holdout set with a model score of 0.5, you would expect that about 50% of them resulted in clicks: that’s the empirical positivity rate. If it were 0.8, then the empirical positivity rate should be around 80%.

“But what we found is that as the variance of the model score increased, the empirical positivity rates went down. If I have a score of 0.8, I could say, well, it's between 0.79 and 0.81, which corresponds to a low variance. Or I could say, it's between 0.65 and 0.95, which indicates a high variance. We found that for the same model score, as the confidence intervals became larger, the empirical positivity rate started dropping.

“That has implications on selecting the decision boundary for binary classifiers. Traditionally, binary classifiers used a single threshold on model scores. But now, since the empirical positivity rate depends on both the model score and the uncertainty estimate, just selecting a single threshold value turns out to be suboptimal. If we select multiple thresholds, one per uncertainty level, we found that we can get much higher recall for a given precision.”

Members of Rastogi’s organization are currently writing a paper on their prediction uncertainty work — but the method is already in production.

“There are a lot of things that people publish papers about, and they're forgotten and never really used,” Rastogi says. “Coming from Amazon, we do science that actually makes a difference to customers and solves customer pain points. These are three examples of doing customer-obsessed science that actually makes a difference in the real world.”

Related content

US, CA, Sunnyvale
The Artificial General Intelligence (AGI) team is looking for a passionate, talented, and inventive Member of Technical Staff with a strong deep learning background, to build industry-leading Generative Artificial Intelligence (GenAI) technology with Large Language Models (LLMs) and multimodal systems. Key job responsibilities As a Member of Technical Staff with the AGI team, you will lead the development of algorithms and modeling techniques, to advance the state of the art with LLMs. You will lead the foundational model development in an applied research role, including model training, dataset design, and pre- and post-training optimization. Your work will directly impact our customers in the form of products and services that make use of GenAI technology. You will leverage Amazon’s heterogeneous data sources and large-scale computing resources to accelerate advances in LLMs. About the team The AGI team has a mission to push the envelope in GenAI with LLMs and multimodal systems, in order to provide the best-possible experience for our customers.
US, CA, Sunnyvale
The Artificial General Intelligence (AGI) team is looking for a passionate, talented, and inventive Member of Technical Staff with a strong deep learning background, to build industry-leading Generative Artificial Intelligence (GenAI) technology with Large Language Models (LLMs) and multimodal systems. Key job responsibilities As a Member of Technical Staff with the AGI team, you will lead the development of algorithms and modeling techniques, to advance the state of the art with LLMs. You will lead the foundational model development in an applied research role, including model training, dataset design, and pre- and post-training optimization. Your work will directly impact our customers in the form of products and services that make use of GenAI technology. You will leverage Amazon’s heterogeneous data sources and large-scale computing resources to accelerate advances in LLMs. About the team The AGI team has a mission to push the envelope in GenAI with LLMs and multimodal systems, in order to provide the best-possible experience for our customers.
US, CA, Sunnyvale
The Artificial General Intelligence (AGI) team is looking for a passionate, talented, and inventive Member of Technical Staff with a strong deep learning background, to build industry-leading Generative Artificial Intelligence (GenAI) technology with Large Language Models (LLMs) and multimodal systems. Key job responsibilities As a Member of Technical Staff with the AGI team, you will lead the development of algorithms and modeling techniques, to advance the state of the art with LLMs. You will lead the foundational model development in an applied research role, including model training, dataset design, and pre- and post-training optimization. Your work will directly impact our customers in the form of products and services that make use of GenAI technology. You will leverage Amazon’s heterogeneous data sources and large-scale computing resources to accelerate advances in LLMs. About the team The AGI team has a mission to push the envelope in GenAI with LLMs and multimodal systems, in order to provide the best-possible experience for our customers.
US, CA, Sunnyvale
The Artificial General Intelligence (AGI) team is looking for a passionate, talented, and inventive Member of Technical Staff with a strong deep learning background, to build industry-leading Generative Artificial Intelligence (GenAI) technology with Large Language Models (LLMs) and multimodal systems. Key job responsibilities As a Member of Technical Staff with the AGI team, you will lead the development of algorithms and modeling techniques, to advance the state of the art with LLMs. You will lead the foundational model development in an applied research role, including model training, dataset design, and pre- and post-training optimization. Your work will directly impact our customers in the form of products and services that make use of GenAI technology. You will leverage Amazon’s heterogeneous data sources and large-scale computing resources to accelerate advances in LLMs. About the team The AGI team has a mission to push the envelope in GenAI with LLMs and multimodal systems, in order to provide the best-possible experience for our customers.
US, CA, Sunnyvale
The Artificial General Intelligence (AGI) team is looking for a passionate, talented, and inventive Member of Technical Staff with a strong deep learning background, to build industry-leading Generative Artificial Intelligence (GenAI) technology with Large Language Models (LLMs) and multimodal systems. Key job responsibilities As a Member of Technical Staff with the AGI team, you will lead the development of algorithms and modeling techniques, to advance the state of the art with LLMs. You will lead the foundational model development in an applied research role, including model training, dataset design, and pre- and post-training optimization. Your work will directly impact our customers in the form of products and services that make use of GenAI technology. You will leverage Amazon’s heterogeneous data sources and large-scale computing resources to accelerate advances in LLMs. About the team The AGI team has a mission to push the envelope in GenAI with LLMs and multimodal systems, in order to provide the best-possible experience for our customers.
US, CA, Sunnyvale
We are looking for a Senior Inference Engineer to own inference for real-time multimodal conversational AI. This is a full-stack inference role: you will work across the entire path a model takes from research to production — shaping model architecture so it is servable, building the real-time runtime that serves it within hard latency budgets, and building the offline systems that train and reinforce it. You will operate at the boundary of Science and Inference, taking frontier-scale speech and audio models and making them run within real-time latency budgets on production hardware. You will co-design architectures with scientists to make them inference-friendly from inception, own the low-latency streaming serving path, and build the training and reinforcement-learning infrastructure that closes the loop. You will have the compute, data, and runway to solve problems that few teams in the world are positioned to tackle. As a Senior Engineer, you will own a significant area of the inference stack end to end, drive its technical execution, contribute to the team's roadmap, and work closely with scientists and hardware partners to ensure our models run fast enough to feel human in real time — and at a cost that makes them viable at scale. You may go deep in one of the areas below while contributing across the others. Key job responsibilities Model Architecture & Inference Co-Design • Partner with research scientists to make model architectures servable from inception — surfacing the latency, memory, and cost implications of architecture choices before they are locked in • Implement and optimize the inference path for large-scale multimodal models — attention and KV-cache mechanisms, multimodal/autoregressive decoding, and the compute primitives on the critical path Apply efficiency techniques across the stack — quantization (per-tensor/per-channel/per- group, INT8/FP8/BF16), speculative decoding, operator fusion, and paged KV-cache — and quantify their quality/latency trade-offs • Develop and tune high-performance kernels for critical operations where off-the-shelf implementations leave performance on the table, integrating them into production serving with minimal overhead • Profile end-to-end performance with tools such as Nsight Compute/Systems and roofline analysis to identify and eliminate bottlenecks in large-scale inference workloads Real-Time & Interactive Runtime • Own the real-time serving path for streaming multimodal conversational AI, meeting sub- second, streaming latency budgets under concurrent session load • Build and tune continuous batching, scheduling, and preemption to balance throughput against per-request latency SLAs for interactive workloads • Customize production serving frameworks (e.g., vLLM, PyTorch) for real-time streaming generative models that fall outside standard LLM serving patterns — sustained low-latency output under concurrent session load • Implement multi-GPU inference (tensor parallelism, collective communication) for latency- critical paths, and drive cost toward parity with existing production baselines • Establish latency, throughput, and cost benchmarking, and publish the operational metrics that gate deployment Offline Systems: Training, RL & Evaluation Infrastructure • Build and scale the offline inference systems behind post-training — high-throughput rollout generation and reward-model serving for reinforcement learning (RL/RLHF/RLAIF) • Ensure train/serve consistency — that the inference path used in RL and evaluation faithfully matches production online behavior (e.g., parity across sampling and logit processing) • Work with the evaluation team to enable offline inference that captures the quality dimensions unique to real-time conversation — latency sensitivity, audio quality, and interaction naturalness
US, TX, Austin
Are You Ready to Redefine How the World Receives Its Packages? What if your algorithms defined the most efficient path for millions of deliveries — every single day? At Amazon, we're building the science that makes that possible, and we're looking for exceptional scientists to help lead the way. The Last Mile Routing & Planning organization develops the software, algorithms, and tools that power the "magic" of home delivery. Our planning and routing intelligence systems drive billions of daily decisions — enabling safe, efficient, and frustration-free routes for drivers across the globe. What You'll Do In this role, you'll sit at the intersection of state-of-the-art research and real-world impact. You will: - Design and build algorithms that solve large-scale, complex logistics problems - Synthesize data from diverse sources to identify high-value business opportunities - Provide research direction and data-driven insights to guide strategic decisions - Translate complex technical approaches into clear communication for scientists, engineers, and business stakeholders - Partner closely with scientists and engineers in a collaborative, high-impact environment What You'll Work On We have an exciting and growing portfolio of research areas, including: - Routing for same-day and grocery deliveries - Planning for electric and autonomous vehicles - District-level and stop-level planning - Forecasting solutions for diverse delivery programs All of this is powered by the latest methods in Operations Research (OR), Machine Learning (ML), and Generative AI — at a truly global scale. Successful candidates will lead one or more of these problem spaces. What We're Looking For - Deep expertise in Operations Research and/or Machine Learning methods - Proven experience applying these methods to large-scale, real-world business problems - Ability to translate models into production-ready code in Python or Java - Strong communication skills — you can explain complex technical concepts to diverse audiences - A bias for action and an iterative mindset when tackling ambitious research challenges Why Amazon We're passionate about your growth. Whether you want to explore emerging technologies, take on broader scope, or accelerate your career trajectory, we'll invest in helping you get there. Our business is scaling fast — and so are the opportunities for the people who build it. If you're driven by the challenge of optimizing one of the world's most complex logistics systems and excited to see your work impact millions of customers daily, we'd love to hear from you. Key job responsibilities - Invent and design novel solutions for scientifically complex problem areas, and identify opportunities for invention within existing and new business initiatives - Deliver large-scale, high-impact solutions to complex problems in support of medium-to-large business goals - Shape the design of scientifically complex software systems, personally contributing significant portions of the critical scientific novelty - Apply mathematical optimization, machine learning, and Generative AI techniques to develop solution methodologies for in-house decision support tools and software - Research, prototype, simulate, and experiment with models — and actively participate in their production-level deployment in Python or Java - Engage with the broader scientific community by publishing research articles and participating in leading research conferences
US, WA, Redmond
We are searching for a talented candidate with experience in orbital mechanics, orbit determination, launch vehicle trajectories, and launch vehicle mission planning. In this position, a successful candidate would serve as a Research Scientist in support of Amazon Leo’s constellation with particular focus on Launch Vehicle support. Strong analysis skills are required to develop engineering studies of complex large-scale dynamical systems. This position requires demonstrated expertise in computational analysis automation and tool development. Export Control Requirement: Due to applicable export control laws and regulations, candidates must be a U.S. citizen or national, U.S. permanent resident (i.e., current Green Card holder), or lawfully admitted into the U.S. as a refugee or granted asylum. Key job responsibilities Working with the Leo GNC team, you will: • Perform spacecraft maneuver or navigation analysis in support of multi-disciplinary trades within the Amazon Leo team. • Contribute to prototype software development of flight algorithms. • Test and assess navigation software for integration into flight systems. • Assess and trouble-shoot the performance of Leo on-board GNSS hardware and software systems. • Work closely with GNC engineers to manage on-orbit performance and develop flight dynamics operations processes. • Manage engineering trades as needed for various launch vehicle mission designs. • Support Leo’s Launch Vehicle Mission Management team with technical expertise in Launch Vehicle trajectory requirements specification • Evaluate Launch Vehicle performance and compliance with mission requirements • Develop tools to support Mission Management planning for over 80 launches! • Work collaboratively with launch vehicle system technical teams About the team The Flight Dynamics team is responsible for the guidance, navigation, control and safety of the spaceflight of the Amazon Leo constellation. This team provides solutions to spaceflight challenges in constellation design, orbit selection, launch vehicle insertion requirements, navigation, trajectory design, space situational awareness, and space traffic coordination.
US, WA, Seattle
We are looking for a Principal Applied Scientist to drive the research and development of real-time multimodal conversational AI. You will operate across two focus areas: advancing foundation models for speech and audio, and building the post-training systems (reward modeling, reinforcement learning) that shape natural, human-like conversational behavior. You will be the expert in your area while contributing across the full model lifecycle — from pre-training and architecture design through post-training alignment and real-time deployment. You will work at the frontier of what's possible in conversational AI, with the compute, data, and runway to pursue problems that few teams in the world have the resources to tackle. As a Principal Scientist, you will set the technical direction for your research area, influence the broader roadmap, and work closely with inference engineers to ensure your models are designed for real-time production deployment from inception. Key job responsibilities Foundation Model Scaling - Build and train large-scale multimodal foundation models for real-time speech and audio generation, from architecture design through production-scale training - Advance the scaling and efficiency of conversational modes, including the relationship between data, model size, and real time performance. - Design model architectures informed by hardware constraints and inference requirements, working with inference engineers to ensure models are servable from inception - Develop training methodologies for multimodal models that jointly process and generate speech, language, and audio in real-time streaming contexts Post-Training & Reinforcement Learning - Design and build reward models and reward functions for speech systems — capturing naturalness, fluency, conversational quality, and real-time responsiveness - Develop and apply reinforcement learning methods to shape conversational behavior — teaching models natural timing, responsiveness, and fluid interaction - Build the post-training pipeline from SFT through RL alignment, optimized for real-time multimodal outputs rather than text-only generation - Design evaluation frameworks that capture the quality dimensions unique to real-time conversation Real-Time Perception & Generation - Advance the team's capabilities in real-time perception - Work at the intersection of model architecture and production constraints to ensure multimodal capabilities function within hard real-time latency budgets
DE, Berlin
The Amazon Robotics team is seeking an experienced Applied Scientist to join our team. In this role you will apply the latest trends in research to solve real-world problems in robotics and AI. You will collaborate with a team of scientists and engineers building these applications. We holistically design, build, and deliver end-to-end robotic systems. Our team is also responsible for core infrastructure and tools that serve as the backbone of our robotic applications, enabling roboticists, machine learning scientists, software engineers, and hardware engineers to collaborate and deploy systems in the field. Key job responsibilities • Research, design, develop, and evaluate complex perception, motion planning, and decision making algorithms integrating across multiple disciplines and leveraging machine learning. • Create experiments and prototype implementations of new learning algorithms and prediction techniques. • Work closely with software engineering team members to drive scalable, real-time implementations. • Collaborate with machine learning and robotic controls experts to implement and deploy algorithms, such as machine learning models. • Collaborate closely with hardware engineering team members on developing systems from prototyping to production level. • Represent Amazon in academia community through publications and scientific presentations. • Work with stakeholders across hardware, science, and operations teams to iterate on systems design and implementation. About the team Watch this video to learn more about Vulcan Pick team in Amazon Robotics: https://www.amazon.science/publications/vulcan-pick-a-robotic-system-for-picking-targeted-objects-from-fabric-pods