Editing
Recommendation Systems
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
<div style="background-color: #4B0082; color: #FFFFFF; padding: 20px; border-radius: 8px; margin-bottom: 15px;"> {{BloomIntro}} Recommendation systems are AI systems that predict which items a user is most likely to engage with, purchase, or find valuable β and surface those items proactively. They are the invisible backbone of the modern internet economy: Netflix's video suggestions, Spotify's Discover Weekly, Amazon's "customers also bought," TikTok's For You Page, and LinkedIn's job recommendations are all powered by recommendation algorithms. Recommenders generate enormous economic value by connecting users with relevant content at scale, but also raise significant concerns about filter bubbles, addiction amplification, and content homogenization. </div> __TOC__ <div style="background-color: #000080; color: #FFFFFF; padding: 20px; border-radius: 8px; margin-bottom: 15px;"> == <span style="color: #FFFFFF;">Remembering</span> == * '''Collaborative filtering''' β Recommends items based on the preferences of similar users or by finding items similar to those a user has liked. * '''Content-based filtering''' β Recommends items based on their attributes and the user's preference history (not other users). * '''Hybrid recommender''' β Combines collaborative and content-based approaches to leverage strengths of both. * '''User-item matrix''' β A matrix where rows are users, columns are items, and values are ratings or interaction signals; typically very sparse. * '''Matrix factorization''' β Decomposing the user-item matrix into lower-dimensional user and item embedding matrices (SVD, ALS). * '''Implicit feedback''' β Interaction signals without explicit ratings: clicks, views, time spent, purchases. Most real-world data is implicit. * '''Explicit feedback''' β Direct ratings (1-5 stars); less common in practice but higher signal. * '''Cold start problem''' β The difficulty of making recommendations for new users or new items with little or no interaction history. * '''Long tail''' β The vast number of niche items with few interactions; recommenders must balance popular items with relevant niche ones. * '''Click-through rate (CTR)''' β The fraction of recommended items that users click; a primary metric for recommendation quality. * '''Two-tower model''' β A neural architecture with separate encoders for users and items that are then combined (common in industrial recommenders). * '''Approximate Nearest Neighbor (ANN)''' β Fast similarity search in embedding space used to retrieve candidate items at scale (FAISS, ScaNN). * '''Explore-exploit tradeoff''' β Balancing recommending items predicted to be liked (exploit) vs. items with uncertain engagement potential (explore). * '''Diversity''' β Ensuring recommended items are not all from the same narrow category; improves user satisfaction and avoids filter bubbles. </div> <div style="background-color: #006400; color: #FFFFFF; padding: 20px; border-radius: 8px; margin-bottom: 15px;"> == <span style="color: #FFFFFF;">Understanding</span> == Recommendation systems solve the '''information overload''' problem: given millions of items and millions of users, what should each user see? The key insight is that users can be represented by their interaction history, and items can be represented by their features and interaction patterns. '''Collaborative filtering''' rests on the assumption that users who agreed in the past tend to agree in the future. User-based CF: find similar users, recommend what they liked. Item-based CF: find items similar to what you've liked before. Matrix factorization learns latent user and item embeddings that capture these similarity patterns efficiently. '''Neural recommenders''' have replaced classical CF for most large-scale systems. Two-tower models learn separate user and item representations; recommendation = nearest neighbors in the shared embedding space. Deep learning enables incorporating side features (user demographics, item attributes, context) that pure CF ignores. '''The industrial pipeline''': Production recommenders have multiple stages: 1. '''Candidate generation''' (retrieval): Given user context, quickly retrieve N=1000 candidate items from millions. Uses efficient ANN search over learned embeddings. 2. '''Ranking''': A more complex model re-ranks the N candidates using richer features, producing the top-K displayed items. 3. '''Re-ranking''': Apply business rules, diversity constraints, and policy filters to the final list. '''Beyond CTR''': Optimizing purely for CTR leads to clickbait and engagement traps. Production recommenders optimize multi-objective rewards: engagement + satisfaction + diversity + session length + business metrics. </div> <div style="background-color: #8B0000; color: #FFFFFF; padding: 20px; border-radius: 8px; margin-bottom: 15px;"> == <span style="color: #FFFFFF;">Applying</span> == '''Matrix factorization with implicit feedback (ALS):''' <syntaxhighlight lang="python"> import implicit import scipy.sparse as sp import numpy as np # Build user-item sparse matrix (e.g., play counts) # rows=users, cols=items, values=interaction count data = sp.load_npz("user_item_interactions.npz") # Alternating Least Squares for implicit feedback model = implicit.als.AlternatingLeastSquares( factors=128, # Embedding dimension regularization=0.01, iterations=30, calculate_training_loss=True ) model.fit(data * 40) # Scale confidence: alpha=40 common for implicit data # Recommend for a user user_id = 42 recommendations = model.recommend( user_id, user_items=data[user_id], # Exclude already interacted N=20, filter_already_liked_items=True ) item_ids, scores = recommendations # Find similar items similar_items = model.similar_items(item_id=100, N=10) </syntaxhighlight> ; Recommender system architecture by scale : '''Small scale (<100k users/items)''' β ALS matrix factorization (implicit), NMF : '''Medium scale''' β Two-tower neural model, LightFM (hybrid) : '''Large scale (production)''' β Two-tower retrieval + DNN ranking (YouTube, TikTok architecture) : '''Sequential recommendations''' β SASRec, BERT4Rec, GRU4Rec (session-based) : '''Cold start''' β Content-based initialization + gradual CF as data accumulates </div> <div style="background-color: #8B4500; color: #FFFFFF; padding: 20px; border-radius: 8px; margin-bottom: 15px;"> == <span style="color: #FFFFFF;">Analyzing</span> == {| class="wikitable" |+ Recommender Approach Comparison ! Approach !! Cold Start !! Scalability !! Side Features || Real-Time Update |- | User-based CF || Poor || Poor || No || No |- | Matrix factorization (ALS) || Poor || Good || No || Batch |- | Two-tower neural || Moderate || Excellent || Yes || Near-real-time |- | Content-based || Good || Good || Yes || Real-time |- | Sequential (BERT4Rec) || Poor || Moderate || Limited || Near-real-time |- | Hybrid || Good || Good || Yes || Near-real-time |} '''Failure modes''': Filter bubbles β users receive increasingly narrow recommendations, reducing exposure to diverse content. Popularity bias β popular items are over-recommended because they have more interaction data. Feedback loops β recommending an item increases its interactions, making it more recommendable, amplifying initial biases. Engagement optimization can conflict with user wellbeing (recommending addictive content). </div> <div style="background-color: #483D8B; color: #FFFFFF; padding: 20px; border-radius: 8px; margin-bottom: 15px;"> == <span style="color: #FFFFFF;">Evaluating</span> == Offline metrics: '''Precision@K''', '''Recall@K''', '''NDCG@K''' (Normalized Discounted Cumulative Gain β weights items by their position in the list). Split data chronologically (temporal holdout) β never random split for sequential recommendation. Online metrics: '''CTR''', '''conversion rate''', '''session length''', '''return rate'''. Business metrics: '''revenue''', '''user retention'''. Expert practitioners always run online A/B tests before deploying β offline metrics predict online performance poorly, especially for novel recommendation strategies. </div> <div style="background-color: #2F4F4F; color: #FFFFFF; padding: 20px; border-radius: 8px; margin-bottom: 15px;"> == <span style="color: #FFFFFF;">Creating</span> == Designing a production-grade recommendation system: # Data pipeline: collect implicit signals (views, clicks, purchases) with timestamps and context. # Two-tower retrieval: train user encoder (embedding user history + demographics) and item encoder (content features + popularity) with in-batch negatives; serve via FAISS. # Ranking: train GBM or DNN with user-item pair features, session context, position bias correction. # Multi-objective: Pareto-optimal reward combining engagement + diversity + freshness. # Explore-exploit: epsilon-greedy or contextual bandit for new item discovery. # A/B testing: every change tested with statistical significance before full rollout. # Feedback loop monitoring: check for filter bubble amplification weekly; apply diversity regularization if detected. [[Category:Artificial Intelligence]] [[Category:Machine Learning]] [[Category:Recommendation Systems]] </div>
Summary:
Please note that all contributions to BloomWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
BloomWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Template used on this page:
Template:BloomIntro
(
edit
)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information