Improving complementary-product recommendations

New modeling approach increases accuracy of recommendations by an average of 7%.

One way that e-commerce sites make life easier for customers is by recommending products that complement whatever the customer is looking for: someone buying a tennis racket, for instance, may also want to buy tennis balls; someone buying a camera may want an SD card for extra storage.

At this year’s Conference on Information and Knowledge Management, my colleagues at the University of California, Los Angeles, and Amazon and I will present a new deep-learning-based method for doing complementary-product recommendation (CPR) that, in our tests, was 7% more likely to find a product that the customer wanted to buy than existing methods. 

That improvement comes from three main strategies: better selection of training data for the CPR model; greater diversity in the types of products recommended; and respect for the asymmetry of the CPR problem (while an SD card may a be a good product to complement a camera, a camera is not a good product to complement an SD card).

Our approach also addresses the problem of cold start, or predicting complementary products for items that were added to the product catalogue after the machine learning model was trained. To do that, we use an embedding scheme developed at Amazon, called Product2vec, to represent the inputs to the CPR model — the products we seek to complement — according to their attributes and their relationships with other products, rather than simply using their names or ID numbers.

Implicit signals

For training data, our model, like most other CPR models, relies on implicit signals from customers. We consider three ways that product x might be related to product y: co-purchase, meaning customers who purchased 𝑥 also purchased y; co-view, meaning customers who viewed x also viewed y; and purchase after view, meaning customers who viewed x eventually bought y.

CPR models typically use co-views and purchase after view as an indication of similarity and co-purchase as an indication of complementarity. But there is considerable overlap between these three categories.

Our intuition was that training a CPR model on product pairs that show up in the co-purchase data but not in the co-view and purchase-after-view data would lead to better predictions. 

User studies in which participants rated pairs of products as substitutable, complementary, or irrelevant bore out this intuition: the complementarity ratings of co-purchase-only product pairs were 30% higher than those of co-purchase product pairs that also showed up in the co-view and purchase-after-view data. Accordingly, we used co-purchase-only product pairs to train our model.

The inputs to our model are Product2vec embedding vectors. Embeddings represent data items as points in a multidimensional space, such that proximity in the space indicates some relationship between the items. In our case, that relationship is similarity: points representing different brands of tennis rackets should cluster together in the space, as should points representing cameras, and so on.

Product2vec differs from other embedding schemes in that its inputs are graphs, data structures consisting of nodes (in our case, the nodes contain product information) and edges connecting the nodes (in our case, the edges represent relationships such as co-purchases and co-views).

Graphical representation of relationships between products.
In our graphical representation of relationships between products, each node includes information such as a product’s category, type, and image, and edges represent relationships such as the co-viewing and co-purchase of products.

In the same way that we train our CPR model on co-purchase-only data, we train Product2vec on pairs of products that show up in the co-view and purchase-after-view data but not in the co-purchase data. The idea is that customers might view variations of the same product before selecting one for purchase, but co-purchased products are likely to be complementary rather than similar.

Product2vec embedding helps solve the cold-start problem, as it will produce a meaningful embedding even for products it hasn’t seen before.

Diversification

CPR models are typically trained to output the most frequent co-purchases for each input product. But this can lead to homogeneity of outputs: the top three co-purchases for a tennis racket, for instance, might be three different brands of tennis balls. We believe that customers would prefer more-diverse complementary-product recommendations: for instance, the top three recommendations for a tennis racket should be something like a can of tennis balls, a pack of overgrips, and a headband.

We enforce diversity through our model architecture. For every input product, we pass its product-type embedding through a neural network (the type transition network) that outputs the embeddings of complementary product types. Each of those embeddings is then concatenated with the embedding of the input product before passing to the module that generates the recommendations (the type-item prediction module).

Diagram of the CPR model architecture.
The architecture of our model. For each input, the type transition module outputs a set of vectors representing complementary product types. These are combined with the representation of the input product before it passes to the type-item prediction module, to ensure diversity in the model’s outputs.

The whole model is trained end to end: that is, during training, the type transition network is evaluated solely according to the accuracy of the type-item prediction module’s outputs. But each output of the type transition network is associated with a single output of the type-item prediction module, which naturally leads to greater type diversity among recommendations.

The addition of the type transition network also breaks the symmetry between related products that can cause problems for the typical CPR system. The typical system bases its judgments of complementarity on proximity in the embedding space. But in that space, an SD card is as close to a camera as a camera is to an SD card.

The type transition network, however, learns to output different product-type embeddings for cameras and SD cards, which enables our model to better respond to other, asymmetric signals in the data.

In experiments, we used co-purchase data to compare our model’s performance to that of three leading CPR systems. We scored the models’ recommendations according to the frequency with which their recommended products were co-purchased with the input product.

On two different data sets — electronics and grocery — and three different accuracy measures — the accuracy of the top recommendation, the top three recommendations, and the top ten recommendations — our model outperformed the others across the board.

Related content

US, CA, Santa Clara
AWS AI is looking for passionate, talented, and inventive Research Scientists with a strong machine learning background to help build industry-leading Conversational AI Systems. Our mission is to provide a delightful experience to Amazon’s customers by pushing the envelope in Natural Language Understanding (NLU), Dialog Systems including Generative AI with Large Language Models (LLMs) and Applied Machine Learning (ML). As part of our AI team in Amazon AWS, you will work alongside internationally recognized experts to develop novel algorithms and modeling techniques to advance the state-of-the-art in human language technology. Your work will directly impact millions of our customers in the form of products and services that make use language technology. You will gain hands on experience with Amazon’s heterogeneous text, structured data sources, and large-scale computing resources to accelerate advances in language understanding. We are hiring in all areas of human language technology: NLU, Dialog Management, Conversational AI, LLMs and Generative AI. About the team Diverse Experiences AWS values diverse experiences. Even if you do not meet all of the qualifications and skills listed in the job description, we encourage candidates to apply. If your career is just starting, hasn’t followed a traditional path, or includes alternative experiences, don’t let it stop you from applying. Why AWS? Amazon Web Services (AWS) is the world’s most comprehensive and broadly adopted cloud platform. We pioneered cloud computing and never stopped innovating — that’s why customers from the most successful startups to Global 500 companies trust our robust suite of products and services to power their businesses. Utility Computing (UC) AWS Utility Computing (UC) provides product innovations — from foundational services such as Amazon’s Simple Storage Service (S3) and Amazon Elastic Compute Cloud (EC2), to consistently released new product innovations that continue to set AWS’s services and features apart in the industry. As a member of the UC organization, you’ll support the development and management of Compute, Database, Storage, Internet of Things (IoT), Platform, and Productivity Apps services in AWS, including support for customers who require specialized security solutions for their cloud services. Inclusive Team Culture Here at AWS, it’s in our nature to learn and be curious. Our employee-led affinity groups foster a culture of inclusion that empower us to be proud of our differences. Ongoing events and learning experiences, including our Conversations on Race and Ethnicity (CORE) and AmazeCon (gender diversity) conferences, inspire us to never stop embracing our uniqueness. Mentorship & Career Growth We’re continuously raising our performance bar as we strive to become Earth’s Best Employer. That’s why you’ll find endless knowledge-sharing, mentorship and other career-advancing resources here to help you develop into a better-rounded professional. Work/Life Balance We value work-life harmony. Achieving success at work should never come at the expense of sacrifices at home, which is why we strive for flexibility as part of our working culture. When we feel supported in the workplace and at home, there’s nothing we can’t achieve in the cloud.
US, VA, Herndon
Machine learning (ML) has been strategic to Amazon from the early years. We are pioneers in areas such as recommendation engines, product search, eCommerce fraud detection, and large-scale optimization of fulfillment center operations. The Generative AI team helps AWS customers accelerate the use of Generative AI to solve business and operational challenges and promote innovation in their organization. As an applied scientist, you are proficient in designing and developing advanced ML models to solve diverse challenges and opportunities. You will be working with terabytes of text, images, and other types of data to solve real-world problems. You'll design and run experiments, research new algorithms, and find new ways of optimizing risk, profitability, and customer experience. We’re looking for talented scientists capable of applying ML algorithms and cutting-edge deep learning (DL) and reinforcement learning approaches to areas such as drug discovery, customer segmentation, fraud prevention, capacity planning, predictive maintenance, pricing optimization, call center analytics, player pose estimation, event detection, and virtual assistant among others. Key job responsibilities The primary responsibilities of this role are to: • Design, develop, and evaluate innovative ML models to solve diverse challenges and opportunities across industries • Interact with customer directly to understand their business problems, and help them with defining and implementing scalable Generative AI solutions to solve them • Work closely with account teams, research scientist teams, and product engineering teams to drive model implementations and new solution About the team ABOUT AWS: Diverse Experiences Amazon values diverse experiences. Even if you do not meet all of the preferred qualifications and skills listed in the job description, we encourage candidates to apply. If your career is just starting, hasn’t followed a traditional path, or includes alternative experiences, don’t let it stop you from applying. Why AWS Amazon Web Services (AWS) is the world’s most comprehensive and broadly adopted cloud platform. We pioneered cloud computing and never stopped innovating — that’s why customers from the most successful startups to Global 500 companies trust our robust suite of products and services to power their businesses. Work/Life Balance We value work-life harmony. Achieving success at work should never come at the expense of sacrifices at home, which is why we strive for flexibility as part of our working culture. When we feel supported in the workplace and at home, there’s nothing we can’t achieve in the cloud. Inclusive Team Culture Here at AWS, it’s in our nature to learn and be curious. Our employee-led affinity groups foster a culture of inclusion that empower us to be proud of our differences. Ongoing events and learning experiences, including our Conversations on Race and Ethnicity (CORE) and AmazeCon (gender diversity) conferences, inspire us to never stop embracing our uniqueness. Mentorship and Career Growth We’re continuously raising our performance bar as we strive to become Earth’s Best Employer. That’s why you’ll find endless knowledge-sharing, mentorship and other career-advancing resources here to help you develop into a better-rounded professional.
US, WA, Seattle
Our team's mission is to improve Shopping experience for customers interacting with Amazon devices via voice. We research and develop advanced state-of-the-art speech and language modeling technologies. Do you want to be part of the team developing the latest technology that impacts the customer experience of ground-breaking products? Then come join us and make history. Key job responsibilities We are looking for a passionate, talented, and inventive Applied Scientist with a background in Machine Learning to help build industry-leading Speech and Language technology. As an Applied Scientist at Amazon you will work with talented peers to develop novel algorithms and modelling techniques to drive the state of the art in speech synthesis. Position Responsibilities: * Participate in the design, development, evaluation, deployment and updating of data-driven models for Speech and Language applications. * Participate in research activities including the application and evaluation of Speech and Language techniques for novel applications. * Research and implement novel ML and statistical approaches to add value to the business. * Mentor junior engineers and scientists.
CN, 31, Shanghai
The AWS Shanghai AI Lab is looking for a passionate, talented, and inventive staff in all AI domains with a strong machine learning background as an Applied Scientist. Founded in 2018, the Shanghai Lab has been an innovation center of for long-term research projects across domains as machine learning, computer vision, natural language processing, and open-source AI system. Meanwhile, these incubated projects power products across various AWS services. As part of the lablet, you will take a leadership role and join a vibrant team with a diverse set of expertise in both machine learning and applicational domains. You will work on state-of-the-art solutions on fundamental research problems with other world-class scientists and engineers in AWS around the globe and across the boarders. You will have the responsibility to design and innovate solutions to our customers. You will build models to tame large amount of data, achieve industry-level scalability and efficiency, and along the way rapidly grow and build the team.
US, WA, Bellevue
Amazon is looking for an outstanding Senior Economist to help build next generation selection/assortment systems. On the Specialized Selection team within the Supply Chain Optimization Technologies (SCOT) organization, we own the selection to determine which products Amazon offers in our fastest delivery programs. We build tools and systems that enable our partners and business owners to scale themselves by leveraging our problem domain expertise, focusing instead on introspecting our outputs and iteratively helping us improve our ML models rather than hand-managing their assortment. We partner closely with our business stakeholders as we work to develop state-of-the-art, scalable, automated selection. Our team is highly cross-functional and employs a wide array of scientific tools and techniques to solve key challenges, including supervised and unsupervised machine learning, non-convex optimization, causal inference, natural language processing, linear programming, reinforcement learning, and other forecast algorithms. Some critical research areas in our space include modeling substitutability between similar products, incorporating basket awareness and complementarity-aware logic, measuring speed sensitivity of products, modeling network capacity constraints, and supply and demand forecasting. We're looking for a candidate with a background in experiment design and causal analysis to lead studies related to selection and speed. Potential projects include understanding the short-term and long-term customer impact of assortment changes across different speed. As an Senior Economist, you'll build econometric models using our world-class data systems and apply economic theory to solve business problems in a fast-moving environment. You will work with software engineers, product managers, and business teams to understand the business problems and requirements, distill that understanding to crisply define the problem, and design and develop innovative solutions to address them. To be successful in this role, you'll need to communicate effectively with product and tech teams, and translate data-driven findings into actionable insights. You'll thrive if you enjoy tackling ambiguous challenges using the economics toolkit and identifying and solving problems at scale. We have a supportive, fast-paced team culture, and we prioritize learning, growth, and helping each other continuously raise the bar. Key job responsibilities - Lead data-driven econometric studies to create future business opportunities - Consult with stakeholders in Selection and other teams to help solve existing business challenges - Independently identify and pursue new opportunities to leverage economic insights - Advise senior leaders and collaborate with other scientists to drive innovation - Support innovative delivery program growth worldwide - Write business and technical documents communicating business context, methods, and results to business leadership and other scientists - Serve as a technical lead and mentor for junior scientists, ensuring a high science bar - Serve as a technical reviewer for our team and related teams, including document and code reviews
US, CA, Pasadena
The Amazon Web Services (AWS) Center for Quantum Computing in Pasadena, CA, is looking to hire a Research Scientist specializing the design of microwave components for cryogenic environments. Working alongside other scientists and engineers, you will design and validate hardware performing microwave signal conditioning at cryogenic temperatures for AWS quantum processors. Candidates must have a background in both microwave theory and implementation. Working effectively within a cross-functional team environment is critical. The ideal candidate will have a proven track record of hardware development from requirements development to validation. Key job responsibilities Our scientists and engineers collaborate across diverse teams and projects to offer state of the art, cost effective solutions for the signal conditioning of AWS quantum processor systems at cryogenic temperatures. You’ll bring a passion for innovation, collaboration, and mentoring to: Solve layered technical problems across our cryogenic signal chain. Develop requirements with key system stakeholders, including quantum device, test and measurement, cryogenic hardware, and theory teams. Design, implement, test, deploy, and maintain innovative solutions that meet both performance and cost metrics. Research enabling technologies necessary for AWS to produce commercially viable quantum computers. A day in the life As you design and implement cryogenic microwave signal conditioning solutions, from requirements definition to deployment, you will also: Participate in requirements, design, and test reviews and communicate with internal stakeholders. Work cross-functionally to help drive decisions using your unique technical background and skill set. Refine and define standards and processes for operational excellence. Work in a high-paced, startup-like environment where you are provided the resources to innovate quickly. About the team AWS values diverse experiences. Even if you do not meet all of the qualifications and skills listed in the job description, we encourage candidates to apply. If your career is just starting, hasn’t followed a traditional path, or includes alternative experiences, don’t let it stop you from applying.
US, CA, San Francisco
We are seeking a highly motivated PhD Research Scientist Intern to join our robotics teams at Amazon. This internship offers a unique opportunity to work on cutting-edge robotics projects that directly impact millions of customers worldwide. You will collaborate with world-class experts, tackle groundbreaking research problems, and contribute to the development of innovative solutions that shape the future of robotics and artificial intelligence. As a Research Scientist intern, you will be challenged to apply theory into practice through experimentation and invention, develop new algorithms using modeling software and programming techniques for complex problems, implement prototypes, and work with massive datasets. You'll find yourself at the forefront of innovation, working with large language models, multi-modal models, and modern reinforcement learning techniques, especially as applied to real-world robots. Imagine waking up each morning, fueled by the excitement of solving intricate puzzles that have a direct impact on Amazon's operational excellence. Your day might begin by collaborating with cross-functional teams, exchanging ideas and insights to develop innovative solutions in robotics and AI. You'll then immerse yourself in a world of data and algorithms, leveraging your expertise in large language models and multi-modal systems to uncover hidden patterns and drive operational efficiencies. Throughout your journey, you'll have access to unparalleled resources, including state-of-the-art computing infrastructure, cutting-edge research papers, and mentorship from industry luminaries. This immersive experience will not only sharpen your technical skills but also cultivate your ability to think critically, communicate effectively, and thrive in a fast-paced, innovative environment where bold ideas are celebrated. Amazon has positions available for Research Scientist Internships in, but not limited to, Bellevue, WA; Boston, MA; Cambridge, MA; New York, NY; Santa Clara, CA; Seattle, WA; Sunnyvale, CA, and San Francisco, CA. We are particularly interested in candidates with expertise in: Robotics, Computer Vision, Artificial Intelligence, Causal Inference, Time Series, Large Language Models, Multi-Modal Models, and Reinforcement Learning. In this role, you gain hands-on experience in applying cutting-edge analytical and AI techniques to tackle complex business challenges at scale. If you are passionate about using data-driven insights and advanced AI models to drive operational excellence in robotics, we encourage you to apply. The ideal candidate should possess the ability to work collaboratively with diverse groups and cross-functional teams to solve complex business problems. A successful candidate will be a self-starter, comfortable with ambiguity, with strong attention to detail, and have the ability to thrive in a fast-paced, ever-changing environment. A day in the life Work alongside global experts to develop and implement novel scalable algorithms in robotics, incorporating large language models and multi-modal systems. Develop modeling techniques that advance the state-of-the-art in areas of robotics, particularly focusing on modern reinforcement learning for real-world robotic applications. Anticipate technological advances and work with leading-edge technology in AI and robotics. Collaborate with Amazon scientists and cross-functional teams to develop and deploy cutting-edge robotics solutions into production, leveraging the latest in language models and multi-modal AI. Contribute to technical white papers, create technical roadmaps, and drive production-level projects that support Amazon Science in the intersection of robotics and advanced AI. Embrace ambiguity, maintain strong attention to detail, and thrive in a fast-paced, ever-changing environment at the forefront of AI and robotics research.
US, WA, Seattle
Here at Amazon, we embrace our differences. We are committed to furthering our culture of diversity and inclusion of our teams within the organization. How do you get items to customers quickly, cost-effectively, and—most importantly—safely, in less than an hour? And how do you do it in a way that can scale? Our teams of hundreds of scientists, engineers, aerospace professionals, and futurists have been working hard to do just that! We are delivering to customers, and are excited for what’s to come. Check out more information about Prime Air on the About Amazon blog (https://www.aboutamazon.com/news/transportation/amazon-prime-air-delivery-drone-reveal-photos). If you are seeking an iterative environment where you can drive innovation, apply state-of-the-art technologies to solve real world delivery challenges, and provide benefits to customers, Prime Air is the place for you. Come work on the Amazon Prime Air Team! Our Prime Air Drone Vehicle Design and Test team within Flight Sciences is looking for an outstanding engineer to help us rapidly configure, design, analyze, prototype, and test innovative drone vehicles. You’ll be responsible for assessing the Aerodynamics, Performance, and Stability & Control characteristics of vehicle designs. You’ll help build and utilize our suite of Multi-disciplinary Optimization (MDO) tools. You’ll explore new and novel drone vehicle conceptual designs in both focused and wide open design spaces, with the ultimate goal of meeting our customer requirements. You’ll have the opportunity to prototype vehicle designs and support wind tunnel and other testing of vehicle designs. You will directly support the Office of the Chief Program Engineer, and work closely across all vehicle subsystem teams to ensure integrated designs that meet performance, reliability, operability, manufacturing, and cost requirements. About the team Our Flight Sciences Vehicle Design & Test organization includes teams that span the following disciplines: Aerodynamics, Performance, Stability & Control, Configuration & Spatial Integration, Loads, Structures, Mass Properties, Multi-disciplinary Optimization (MDO), Wind Tunnel Testing, Noise Testing, Flight Test Instrumentation, and Rapid Prototyping.
US, WA, Seattle
This is a unique opportunity to build technology and science that millions of people will use every day. Are you excited about working on large scale Natural Language Processing (NLP), Machine Learning (ML), and Large Language Models (LLM)? We are embarking on a multi-year journey to improve the shopping experience for customers using Alexa globally. In 2024, we started building all Shopping experiences leveraging LLMs in the US. We create customer-focused solutions and technologies that makes shopping delightful and effortless for our customers. Our goal is to understand what customers are looking for in whatever language happens to be their choice at the moment and help them find what they need in Amazon's vast catalog of billions of products. We are seeking an Applied Scientist to lead a new, greenfield initiative that shapes the arc of invention with Machine Learning and Large Language Models. Your deliverables will directly impact executive leadership team goals and shape the future of shopping experiences with Alexa. We’re working to improve shopping on Amazon using the conversational capabilities of LLMs, and are searching for pioneers who are passionate about technology, innovation, and customer experience, and are ready to make a lasting impact on the industry. You'll be working with talented scientists, engineers, across the breadth of Amazon Shopping and AGI to innovate on behalf of our customers. If you're fired up about being part of a dynamic, driven team, then this is your moment to join us on this exciting journey!
US, WA, Seattle
The vision for Alexa is to be the world’s best personal assistant. Such an assistant will play a vital role in managing the communication lives of customers, from drafting communications to coordinating with people on behalf of customers. At Alexa Communications, we’re leveraging Generative AI to bring this vision to life. If you’re passionate about building magical experiences for customers, while solving hard, complex technical problems, then this role is for you. You will operate at the intersection of large language models, real time communications, voice and graphical user interfaces, and mixed reality to deliver cutting-edge features for end users. Come join us to invent the future of how millions of customers will communicate with and through their virtual AI assistants. Key job responsibilities The Comms Experience Insights (CXI) team is looking for an experienced, self-driven, analytical, and strategic Data Scientist II. We are looking for an individual who is passionate about tying together huge amounts of data to answer complex stakeholder questions. You should have deep expertise in translating data into meaningful insights through collaboration with Data Engineers and Business Analysts. You should also have extensive experience in model fitting and explaining how the insights derived from those models impact a business. In this role, you will take data curated by a dedicated team of Data Engineers to conduct deep statistical analysis on usage trends. The right candidate will possess excellent business and communication skills, be able to work with business owners to develop and define key business questions, and be able to collaborate with Data Engineers and Business Analysts to analyze data that will answer those questions. The right candidate should have a solid understanding of how to curate the right datasets that can be used to train data models, and the desire to learn and implement new technologies and services to further a scalable, self-service model.