<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Igor Shalamov</title>
    <description>The latest articles on DEV Community by Igor Shalamov (@shalamoov).</description>
    <link>https://dev.to/shalamoov</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4269785%2Fcd8ba7bb-b4cd-4685-b4ea-7ee789c3e1ae.jpg</url>
      <title>DEV Community: Igor Shalamov</title>
      <link>https://dev.to/shalamoov</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shalamoov"/>
    <language>en</language>
    <item>
      <title>Collaborative filtering vs content based filtering: when to use each</title>
      <dc:creator>Igor Shalamov</dc:creator>
      <pubDate>Fri, 04 Dec 2026 22:07:18 +0000</pubDate>
      <link>https://dev.to/shalamoov/collaborative-filtering-vs-content-based-filtering-when-to-use-each-2kfc</link>
      <guid>https://dev.to/shalamoov/collaborative-filtering-vs-content-based-filtering-when-to-use-each-2kfc</guid>
      <description>&lt;p&gt;A new song is uploaded and nobody has played it yet. One kind of recommender will never show it; the other will recommend it in the first minute and then keep showing more of the same. These are collaborative filtering and content based filtering. The video version of this note is linked at the end.&lt;/p&gt;

&lt;h2&gt;
  
  
  Content based filtering
&lt;/h2&gt;

&lt;p&gt;It describes each item by its features (genre, tempo, instruments, text, tags, images), builds a taste profile from the items a user liked and recommends the nearest items. Its strength is that a new item needs no history. Its weakness is repetition: it finds more of the same, the filter bubble.&lt;/p&gt;

&lt;h2&gt;
  
  
  Collaborative filtering
&lt;/h2&gt;

&lt;p&gt;It ignores what the item is and looks only at who interacted with what. If two users' histories overlap, items one of them liked become candidates for the other. Modern systems learn this with matrix factorisation or neural embeddings. Its strength is discovery: other people bridge the gap to things a user would never search for. Its weakness is cold start: a new item or a new user with no interactions is invisible.&lt;/p&gt;

&lt;h2&gt;
  
  
  Four questions for choosing
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Little interaction history but rich item data, as in a new marketplace: start content based.&lt;/li&gt;
&lt;li&gt;Millions of interactions: collaborative filtering usually wins.&lt;/li&gt;
&lt;li&gt;Discovery outside the user's usual taste matters: collaborative again.&lt;/li&gt;
&lt;li&gt;New items every day, as in news or video: you need both.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How production systems combine them
&lt;/h2&gt;

&lt;p&gt;Collaborative filtering supplies candidates from interaction history, content based retrieval fills the gap for new items and new users, and a ranking model scores all candidates using both kinds of signal. Another option is one model: a &lt;a href="https://igorshalamov.com/writing/two-tower-models-candidate-retrieval/?utm_source=devto&amp;amp;utm_medium=guest_post&amp;amp;utm_campaign=yt008&amp;amp;utm_content=inline" rel="noopener noreferrer"&gt;two-tower model&lt;/a&gt; with content features in the item tower.&lt;/p&gt;

&lt;h2&gt;
  
  
  Measure coverage next to accuracy
&lt;/h2&gt;

&lt;p&gt;Catalogue coverage, the share of items that get recommended at all, shows the difference that recall hides. Report it next to recall, on a train and test split by time. A random split leaks the future and flatters collaborative filtering.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three common mistakes
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Popularity bias in collaborative filtering: penalise popularity and watch coverage.&lt;/li&gt;
&lt;li&gt;Thin item features in content based filtering: a title and a category are not enough; use learned embeddings of text, audio or images.&lt;/li&gt;
&lt;li&gt;A random train and test split instead of a split by time.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The same choice appears in referral systems: whom to invite comes from what similar users did (collaborative) plus profile features (content).&lt;/p&gt;

&lt;h2&gt;
  
  
  Watch the episode
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://youtu.be/M-zMOlCA648" rel="noopener noreferrer"&gt;https://youtu.be/M-zMOlCA648&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Related research
&lt;/h2&gt;

&lt;p&gt;I describe the architecture and efficiency of neural personalization systems in my article “Personalization of news content using AI: architecture and efficiency of neural network systems” (European Journal of Technical and Natural Sciences, No. 4–5, 2025, DOI 10.29013/EJTNS-25-4.5-18-29): &lt;a href="https://igorshalamov.com/research/news-personalization-ai/?utm_source=devto&amp;amp;utm_medium=guest_post&amp;amp;utm_campaign=yt008&amp;amp;utm_content=paper" rel="noopener noreferrer"&gt;https://igorshalamov.com/research/news-personalization-ai/?utm_source=devto&amp;amp;utm_medium=guest_post&amp;amp;utm_campaign=yt008&amp;amp;utm_content=paper&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Originally published on igorshalamov.com: &lt;a href="https://igorshalamov.com/writing/collaborative-vs-content-based-filtering/?utm_source=devto&amp;amp;utm_medium=guest_post&amp;amp;utm_campaign=yt008&amp;amp;utm_content=footer" rel="noopener noreferrer"&gt;https://igorshalamov.com/writing/collaborative-vs-content-based-filtering/?utm_source=devto&amp;amp;utm_medium=guest_post&amp;amp;utm_campaign=yt008&amp;amp;utm_content=footer&lt;/a&gt;. Watch the full episode: &lt;a href="https://youtu.be/M-zMOlCA648" rel="noopener noreferrer"&gt;https://youtu.be/M-zMOlCA648&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Igor Shalamov is an AI systems architect who designs AI growth systems: referral and recommendation systems, AI-driven communication automation, semantic search and classification.&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>recommendersystems</category>
      <category>datascience</category>
      <category>ai</category>
    </item>
    <item>
      <title>Uplift modeling explained: pay the referral bonus only where it changes behaviour</title>
      <dc:creator>Igor Shalamov</dc:creator>
      <pubDate>Fri, 04 Dec 2026 21:17:40 +0000</pubDate>
      <link>https://dev.to/shalamoov/uplift-modeling-explained-pay-the-referral-bonus-only-where-it-changes-behaviour-gke</link>
      <guid>https://dev.to/shalamoov/uplift-modeling-explained-pay-the-referral-bonus-only-where-it-changes-behaviour-gke</guid>
      <description>&lt;p&gt;A referral bonus sent to 100,000 users raises invitations. Many of those users would have invited friends anyway, and a model trained on who invites will tell you to pay them again next month. Uplift modeling asks a different question: for which users does the bonus change what they do?&lt;/p&gt;

&lt;h2&gt;
  
  
  Four kinds of users
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Persuadables&lt;/strong&gt; invite only if they get the bonus.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sure things&lt;/strong&gt; invite anyway. For them, the bonus is a gift.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lost causes&lt;/strong&gt; never invite, with or without it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sleeping dogs&lt;/strong&gt; react badly: a push for invitations makes them leave.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Only persuadables are worth paying. A response model, also called a propensity model, ranks users by the chance they invite, so it puts sure things at the top and pays for invitations the product would get for free.&lt;/p&gt;

&lt;h2&gt;
  
  
  Uplift is a difference
&lt;/h2&gt;

&lt;p&gt;For a user with features x:&lt;/p&gt;

&lt;p&gt;uplift(x) = P(invite | bonus, x) − P(invite | no bonus, x)&lt;/p&gt;

&lt;p&gt;You never observe both outcomes for the same person, so the estimate comes from a randomised test. In the illustrative example from the episode, 5 in 100 users in the control group invite without a bonus and 8 in 100 in the treatment group invite with it. The average uplift is 3 points. The model's job is to predict that difference for each user.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building it with two models
&lt;/h2&gt;

&lt;p&gt;The simplest approach, often called the T-learner, trains one model on the bonus group and one on the control group. Each predicts the chance a user invites. For a new user, run both and subtract: the bonus model's score minus the control model's score. Direct methods such as causal forests estimate the difference in one model and are the next step when the two-model estimate is too noisy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Checking it with the uplift curve
&lt;/h2&gt;

&lt;p&gt;Run a fresh randomised test and target 30% of users in three ways. In the episode's illustrative numbers, random targeting earns 10 extra invitations per 1,000 users, the top 30% by response score earns 6, and the top 30% by uplift earns 24. Repeat this for every cut-off and you get the uplift curve; the Qini curve is its common variant. The gap above random targeting is what the model is worth.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three ways uplift models lie
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Training on past campaigns&lt;/strong&gt;, where someone chose who got the bonus. Train only on randomised tests and keep a random control group in every campaign.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ignoring sleeping dogs.&lt;/strong&gt; If predicted uplift is below zero, send no offer at all.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Judging by accuracy on the outcome.&lt;/strong&gt; A model can predict invitations well and still rank uplift badly. Judge it by the uplift curve on new data.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The same logic applies wherever an action costs money or attention: discounts and coupons, retention offers for users about to leave, and push notifications, where the cost is the user's patience.&lt;/p&gt;

&lt;h2&gt;
  
  
  Watch the episode
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://youtu.be/SQy7USs8L9I" rel="noopener noreferrer"&gt;https://youtu.be/SQy7USs8L9I&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Where uplift fits
&lt;/h2&gt;

&lt;p&gt;Uplift targeting sits in the models layer of an &lt;a href="https://igorshalamov.com/writing/what-is-an-ai-growth-system/?utm_source=devto&amp;amp;utm_medium=guest_post&amp;amp;utm_campaign=yt007&amp;amp;utm_content=inline" rel="noopener noreferrer"&gt;AI growth system&lt;/a&gt;: once a referral system knows who is likely to invite, uplift decides whom to pay.&lt;/p&gt;

&lt;h2&gt;
  
  
  Related research
&lt;/h2&gt;

&lt;p&gt;The research behind this topic is my paper &lt;a href="https://igorshalamov.com/research/neural-architectures-referral-funnels/?utm_source=devto&amp;amp;utm_medium=guest_post&amp;amp;utm_campaign=yt007&amp;amp;utm_content=paper" rel="noopener noreferrer"&gt;Neural network architectures for automating user funnels in referral marketing&lt;/a&gt; (2025).&lt;/p&gt;




&lt;p&gt;Originally published on igorshalamov.com: &lt;a href="https://igorshalamov.com/writing/uplift-modeling-explained/?utm_source=devto&amp;amp;utm_medium=guest_post&amp;amp;utm_campaign=yt007&amp;amp;utm_content=footer" rel="noopener noreferrer"&gt;https://igorshalamov.com/writing/uplift-modeling-explained/?utm_source=devto&amp;amp;utm_medium=guest_post&amp;amp;utm_campaign=yt007&amp;amp;utm_content=footer&lt;/a&gt;. Watch the full episode: &lt;a href="https://youtu.be/SQy7USs8L9I" rel="noopener noreferrer"&gt;https://youtu.be/SQy7USs8L9I&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Igor Shalamov is an AI systems architect who designs AI growth systems: referral and recommendation systems, AI-driven communication automation, semantic search and classification.&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>datascience</category>
      <category>statistics</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
