As brands across industries continue to adopt deep learning, learn how it is being adapted for the delivery of product recommendations that enhance the customer experience and generate meaningful revenue.
The future of personalization and product recommendations will be heavily shaped by deep learning, transformer models and large language models (LLMs), as well as their ability to predict the next natural item or product for a visitor.
Let’s walk through some of the main concepts behind deep learning, why it is starting to become more widely adopted and how its highly effective implementation in natural language processing (NLP) is being adapted to deep-learning-based recommendation engines.
In the last decade, the scientific world has been thrilled by the tremendous success of deep learning methods, playing a major role in how artificial intelligence (AI) has flourished over the past few years. The most notable of these revolutions have been made possible in computer vision and natural language processing (NLP).
Deep learning is a subfield of machine learning (ML) concerned with algorithms inspired by the structure and function of the brain. When scientists say deep learning, they are referring to a family of algorithms that abstractionally look and work as the human neural network does. Essentially, there are a number of neuron nodes connected together like a web, each receiving input information, processing it and then outputting processed information to nearby nodes.
The architecture of all deep learning models includes a multiple-layers structure, with every layer consisting of nodes that perform a particular mathematical operation, which is called an activation function.
It’s common to distinguish three types of layers: input, hidden and output.
The basic architecture of a deep learning algorithm
There are multiple reasons why deep learning is becoming more widely adopted; the first being great consolidation between the computational capacity required by deep learning and consistent growth in the power of cloud-based machines.
While the vast majority of traditional ML models analyze data insights in a linear way, the deep learning system’s architecture enables the processing of data insights in a nonlinear way. This grants deep learning algorithms the possibility to be more effective in identifying and actioning valuable insights.
But the biggest advantage of deep learning is its ability to construct additional features in an automatic manner. Features are variables such as age, region, day of the week, etc. that are used to predict how a user engages with a website, such as purchasing an item. In contrast to traditional ML, deep learning builds many new features based on different, often unexplainable, combinations from an initial set of given features.
Among the main reasons, deep learning algorithms have the advantage over traditional ML algorithms only with enough data insights. ML algorithms require fewer data insights and are, therefore, preferable in many instances.
Deep learning techniques also need more time for training and, as a result, a higher capability of infrastructure to handle the required calculations, which can increase server costs. Finally, the interpretability of deep-learning-based decisions is lower than that of classic ML algorithms as multiple transformations during modeling make it difficult to understand the pure impact of input information on the output result.
Recently, deep learning has stepped into the world of recommendation architectures, thanks to the perfect parallel between NLP and recommender frameworks. Both domains have a sequential nature and are thirsty to understand what the next natural item is in a sequence.
Take email mailbox providers. Some can predict the next word in a sentence as you compose an email. Now, imagine each word typed when drafting is a list of products a visitor has engaged with. The same exact concept can be applied to recommendations. And while this unlocks an extremely powerful tool for e-commerce brands, it’s still only the very beginning, with a wide range of opportunities on the forefront being made available to handle the challenges of recommendations.
Deep learning’s ability to capture non-linear and non-trivial relationships between users and products as well as incorporate rich information makes it almost limitless, producing a quality of recommendations the industry has yet to achieve until now.
Such information includes, but is not limited to:
Contextual: Day, weather, recency, engagement-type, item price and page
Textual: A product’s keywords and reviews, user’s search query
Visual: The visual similarity between products
When looking at the direction of research and current developments taking place in deep learning, its use in powering recommendation engines can be divided into three categories.
Content-based recommendations make full use of the user’s interests and description of the product to generate recommended items.
Collaborative filtering-based recommendations leverage the user’s browsing history and preferences without personal information, such as the user’s rating of the item, to generate recommended items.
Hybrid method recommendations seek to obtain the best recommendation results by combining content and collaborative filtering-based recommendation methods.
Long the industry standard, collaborative filtering has been adopted by the industry as the main approach for delivering personalized recommendations. Utilizing a user-product matrix of ranking, if a user named Jennifer displays interest in item A and B, and other women have engaged with items A, B and C, collaborative filtering recognizes the high likelihood that Jennifer would also be interested in item C.
But while collaborative filtering is broad in its application, capable of accurately recommending a wide range of products without needing to understand the essence of a particular item, deep learning provides a whole new level of sophistication.
Borrowing the NLP technique called word2vec — or in e-commerce, item2vec — the deep learning algorithms work to analyze the co-occurrence of items in a user’s browsing history and overall, generate recommendations at a higher accuracy.
Being a deep learning-based method, item2vec also has a number of technical benefits:
Scale: Can be trained on a huge number of data insights.
Relevancy: Can be trained very quickly and frequently, due to the ability to train such a model with only one hidden layer. Thus, it takes into account the latest on-site changes.
Catalog coverage: No limitation on feed length — every product is trained and has a chance to be recommended to the user.
Real time: Based on the most recent online context, it returns recommendations with very low latency.
Here’s a little more about how it works.
Item2vec is a representation of word by numeric vector that is obtained from deep learning modeling of items co-occurrence. Such a vector encodes enormously important information about other neighboring items that co-occur with a specific item. These neighbor items are called context.
A series of items that co-occur. Item_4 is a learned item, and the surrounding items are called context
With item2vec, an item can be inferred from the context, which are the items that tend to be around it. Similar surroundings of two items imply similarity in consuming patterns of items themselves. And the more often two items appear in similar contexts, the closer their representative vectors are.
Now, when each item from a catalog is represented by a numeric vector, and the vectors’ similarity reflects items’ contextual similarity, we are ready to serve the main “dish,” so to speak, with the most relevant items based on the user’s recent interests. This can be easily done by finding items with vectors similar to vectors of recently engaged products. Such similarity between vectors is called cosine similarity, and as items with the highest cosine similarity are expected to be very relevant, they should be recommended to the user.
Word2Vec algorithms are not without limitations, however. They use a fixed-size sliding window to capture context, which is limited to 5-10 words. Further, they learn word representations by predicting either target word from its context (what we call CBOW, or continuous bag-of-words), or vice versa (Skip-Gram). As a result, word embeddings are static, meaning each word has the same vector — regardless of its context in different sentences. Take these two sentences: "I went to the bank" vs "I went to the river bank.” In this case, the word "bank" would have the same representation, instead of something reflecting its financial vs. geographical meaning.
There is a way around this problem, but it requires a different approach for capturing the “context” of the sentence. Enter Transformer models.
Have you ever wondered how your streaming platform knows what show to recommend next, or how e-commerce retailers are able to suggest the perfect product? This transformation didn't happen overnight. It's the result of a fascinating journey that began with the introduction of a powerful technology — a type of deep neural network called the transformer model — in 2017. Since then, online shopping feels more like having a personal assistant who knows your taste better than you do.
When applied to e-commerce, transformer models can act as incredibly observant shopping companions. Just like a friend who remembers that you love vintage-style dresses or eco-friendly products, these AI models can get a sense of your taste. But they do it on a scale no human could match, processing millions of shopping patterns simultaneously.
Transformer models represent a revolutionary advancement in deep neural networks, standing alongside other architectures like RNNs and CNNs. What makes them special is their remarkable self-attention mechanism — a feature that works surprisingly like human perception.
Think about being at a crowded party. Despite the noise and multiple conversations happening around you, you can focus on a single person's voice while filtering out everything else. This is exactly how the self-attention mechanism works in transformer models — it can process multiple pieces of information simultaneously while identifying and focusing on the most relevant parts.
Unlike word2vec algorithms, transformers can capture relationships between words — regardless of their distance in the sequence. Transformers naturally incorporate both left and right context for each word and aren’t limited by window size. And while word2vec algorithms can process words sequentially, transformers process all words simultaneously, allowing them to capture more complex relationships between words.
Transformers also use positional encoding to maintain word order information, which word2vec doesn't explicitly handle. They feature multi-head attention, meaning they can learn about multiple types of relationships between words through different attention heads simultaneously.
Think of self-attention as a way for words to "look at" other words in a sentence to understand their proper meaning and context. This image demonstrates self-attention through a straightforward text example: "He is eating a yellow banana." Like how we humans naturally understand that "yellow" is specifically describing "banana" in this sentence, self-attention creates stronger connections (high attention) between related words like "yellow" and "banana," while maintaining weaker connections (low attention) with less related words.
Textual example of self-attention mechanism - “high” vs. “low” attention
The key advantage is that each word can directly connect with any other word in the sentence, regardless of their position, helping the model better understand relationships and meaning in language. Self-attention extends well beyond text processing into visual understanding. We can observe its power through an example detailing its analysis of a cat.
Think of self-attention as creating a dynamic map of relationships within an image. When examining a cat, the mechanism works like an attentive observer who simultaneously analyzes multiple visual connections. The colored boxes and connecting lines in the visualization represent these relationships — for example, how the model recognizes that the cat’s distinctive pointed ears are meaningfully connected to its alert facial expression is similar to how humans naturally perceive images. Rather than analyzing each feature of the cat in isolation — ears, face, tail or body shape — the model builds understanding through the interplay of elements in the three red boxes and accurately predicts what will show up in the yellow box. However, if only the body of the cat is visible, it cannot generate an accurate face.
Visual example of the self-attention mechanism – this concept extends beyond text
Let's dive into how this AI-driven breakthrough is reshaping our shopping experiences in many aspects at our shopping journey:
Sequential recommendation systems: These systems now analyze the complete temporal pattern of user interactions, going beyond simple product relationships to understand the entire customer journey. Through their self-attention mechanism, transformers can capture both long-term preferences and immediate shopping intent, creating a dynamic understanding of user needs that adapts in real time to changing interests and seasonal shifts.
Visual and text: Search capabilities have transformed product discovery by bridging the gap between how customers think and how they shop. Multi-modal transformers now enable seamless searching across different formats, allowing customers to find products using images, text or combinations of both. New features let users upload photos of items they've seen elsewhere and find related products. These systems understand semantic relationships between products, moving beyond simple keyword matching to grasp the deeper meaning behind search queries.
Chatbots: Intelligent conversational assistance has evolved from simple chatbots to sophisticated shopping companions. These AI assistants maintain context across multiple conversations, offer personalized recommendations through natural dialogue and understand complex product queries. They can proactively engage customers based on shopping patterns and guide them through multi-step product discovery processes, creating a more natural and helpful shopping experience.
Content enhancement: Transformer models can help generate engaging, SEO-optimized product descriptions while maintaining consistent tone and style across vast catalogs. They excel at extracting key features from manufacturers’ data insights, generating content in multiple languages and synthesizing customer reviews into useful summaries, ensuring product information is both comprehensive and accessible.
The true power of transformer models lies in their ability to handle long-range connections in text and data insights. When we read or process information, we naturally connect current information with what we've seen before, regardless of how far back it was. Transformer models replicate this ability through their self-attention mechanism, making them exceptionally good at understanding context and relationships.They can work with various types of data insights simultaneously, creating AI systems that better mimic human-like understanding and processing. But the real magic happens when this technology combines with the power of large language models (LLMs).
Built on revolutionary transformer architecture — the same building blocks that process information by paying attention to relationships between words and concepts — these models can understand context and generate human-like responses. This architectural foundation enables LLMs to serve as incredibly versatile tools that understand context and predict your shopping needs. It's like having a shopping assistant who's also a fashion expert, tech guru and trend analyst all rolled into one, powered by an architecture that can process vast amounts of information and understand complex patterns in customer preferences.
Here's what this means for your shopping experience:
More accurate recommendations
Less time wasted scrolling through irrelevant items
Personalized product descriptions that speak to your specific interests
Customized shopping guides based on your style and preferences
But it's not just about selling more stuff. These systems are actually making online shopping more human. They can understand context like recognizing that your sudden interest in gardening tools might be related to your recent house move. They can distinguish between a one-time purchase (like a wedding gift) and your actual ongoing interests.
For businesses, the impact is huge. Companies using these advanced recommendation systems are seeing widescale improvements in their recommendation accuracy. This translates to happier customers, better sales and more efficient operations.
The best part? This is just the beginning. As these systems continue to evolve, they're getting better at understanding not just what we buy, but why we buy it. They're learning to factor in everything from seasonal trends to personal milestones, creating shopping experiences that feel less like transactions and more like conversations.
So, the next time you're pleasantly surprised by a spot-on product recommendation, remember it's not magic — it's the power of transformer-based LLMs working behind the scenes to make your shopping experience better than ever.Not just a buzzword
Companies today need to better predict the next-best-product or piece of content and dynamically recommend and refine offers if they want to enhance the customer experience and continue to generate meaningful revenue.
As the world continues to move towards these advanced algorithms, deep learning is already becoming the industry’s go to-strategy, replacing the limited ranking power of collaborative filtering with that of more personalized recommendations. And as LLMs become more commonplace, customers will expect even more personal recommendations. Only the most advanced brands will be primed to deliver.