<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Nicolas Tastevin on Medium]]></title>
        <description><![CDATA[Stories by Nicolas Tastevin on Medium]]></description>
        <link>https://medium.com/@ntastevin?source=rss-907859325fbc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*HfPHI4Z7y5-gQ3vKHM3uQg.jpeg</url>
            <title>Stories by Nicolas Tastevin on Medium</title>
            <link>https://medium.com/@ntastevin?source=rss-907859325fbc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 09:34:43 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ntastevin/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[LR is all you need]]></title>
            <link>https://medium.com/weborama/lr-is-all-you-need-20963d683e88?source=rss-907859325fbc------2</link>
            <guid isPermaLink="false">https://medium.com/p/20963d683e88</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[mlops]]></category>
            <category><![CDATA[logistic-regression]]></category>
            <category><![CDATA[vector-database]]></category>
            <category><![CDATA[embedding-model]]></category>
            <dc:creator><![CDATA[Nicolas Tastevin]]></dc:creator>
            <pubDate>Thu, 09 Jan 2025 08:40:04 GMT</pubDate>
            <atom:updated>2025-01-09T08:40:04.930Z</atom:updated>
            <content:encoded><![CDATA[<p>Naturally, <strong>LR (</strong>Logistic Regression) isn’t the only machine learning model to have in hands. The title here is deliberately “provocative” for two reasons:</p><ol><li>It pays homage to the seminal paper <em>“</em><a href="https://proceedings.neurips.cc/paper_files/paper/2017/file/3f5ee243547dee91fbd053c1c4a845aa-Paper.pdf"><em>Attention Is All You Need</em></a><em>”</em> which sparked a major leap forward in natural language understanding, and thus boosted Weborama semantic AI suite.</li><li>It serves as a tongue-in-cheek challenge to the typical AI mindset that automatically opts for the most sophisticated model.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BFCJCeSXindkbBMSk_EJqQ.png" /><figcaption>LR is all you need — AI generated</figcaption></figure><h3><strong>Aligning Tools with Tasks</strong></h3><p>We want to stress that tackling a small-scale data science challenge and deploying a large-scale solution are two different tasks , though being able to do both is certainly valuable. The primary differences stem not only from MLOps architectural choices but also from fundamental data science considerations. In this short article, we’ll showcase a scenario where Logistic Regression is, in fact, the right ML model for the job.</p><p>AI is becoming more accessible to everyone, from the general public (as shown by the rapid adoption of ChatGPT), to those with minimal tech skills (building an internal chatbot from documentation is now relatively straightforward), to engineers, and to professionals in a wide range of fields. However, what we’re really witnessing is the adoption of Large Language Models (LLMs), rather than the complete AI ecosystem.</p><p>It’s true that LLMs can solve many problems quickly without requiring a deep understanding of the technology behind them. But there are still situations where opting for a simpler, more “modest” solution, needing some depth understanding in AI, is the better choice, at least for now.</p><p>We can revisit the metaphor from the<a href="https://huggingface.co/blog/modernbert"> ModernBert release blog post</a> to illustrate that every scenario calls for its own distinct AI solution.</p><blockquote>“Basically, a frontier model like OpenAI’s O1 is like a Ferrari SF-23. It’s an obvious triumph of engineering, designed to win races, and that’s why we talk about it. But it takes a special pit crew just to change the tires and you can’t buy one for yourself. In contrast, a BERT model is like a Honda Civic. It’s <em>also</em> an engineering triumph, but more subtly, since <em>it</em> is engineered to be affordable, fuel-efficient, reliable, and extremely useful. And that’s why they’re absolutely everywhere.”</blockquote><p>In continuation of our recent previous Medium articles:</p><ul><li><a href="https://medium.com/weborama/boosting-semantic-categorization-with-recent-ai-paradigm-9357324da74a">Boosting Semantic Categorization with recent AI paradigm</a></li><li><a href="https://medium.com/weborama/document-similarities-a-continuous-loop-between-pocs-and-production-db3acdc019a5">Document Similarities: A Continuous Loop Between POCs and Production</a></li></ul><p>which offer a glimpse into our work on scaling semantic categorization with Transformers, we briefly note that we chose a Logistic Regression (vs LightGBM for example) model to refine the rankings originally provided by a cosine similarity score. While this might seem surprising at first, once you consider the entire system, the choice makes perfect sense, this is our “Honda Civic.”</p><h3><strong>Synergy in Action: Blending Vector Databases and Linear Models</strong></h3><p>As a quick recap, our previous work focused on finding and rank <strong>a large set of URLs</strong> most relevant to a given topic. Essentially, we transform an input text into a vector using a Transformer model, then use a big vector database, relying on cosine similarity, to identify URLs that align with this input text. This method leverages cutting-edge AI to target URLs based on natural language cues in an ad marketing ecosystem. This scenario differs from typical RAG (Retrieval-Augmented Generation) chatbot use cases, which only extract a small number of documents to enrich a prompt, and from standard recommender systems which generally return a small set of items to the user.</p><p>In that work, we showed that combining an LLM to label “good” URLs with an additional ML model for URL scoring significantly boosts precision. At Weborama, we operate in a Big Data environment (handling billions of URLs) with strict response-time requirements. To achieve quick, large-scale results (as outlined in our previous article), we use a vector database. Our aim was to build on that existing system while adding an ML model on top.</p><p>However, using a more complex, non-linear model than LR like LightGBM isn’t feasible here. Doing so would mean abandoning our vector database and spinning up a massive GPU cluster to score up to a billion URLs per query in parallel, clearly not practical. While we do have a cluster for creating embedding vectors for URLs, it’s not equipped to handle real-time scoring during user interactions. This distinction is, in a way, comparable to the difference between employing a bi-encoder and a cross-encoder architecture. With a cross-encoder, each incoming query must be evaluated against the entire database by passing it through the model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/0*_jsY6VzPDNbE5tQU" /><figcaption>Bi-Encoder VS Cross-encoder (credits: <a href="https://www.sbert.net/examples/applications/cross-encoder/README.html">https://www.sbert.net/examples/applications/cross-encoder/README.html</a>)</figcaption></figure><p>For us, it felt like the same challenge: how do we avoid applying the <strong>predict</strong> function of the query-specific ML model over the entire database every time a user tweaks their query?</p><p>The key insight is that we can still take advantage of our vector database by using a linear model. While this doesn’t completely eliminate running the model on the entire database whenever a user refines their query, it avoids using the predict function in a naive way as we would do with a ML library such as <a href="https://scikit-learn.org/stable/">scikit-learn</a>. In fact, if we understand how ML models work behind the scenes, we don’t need to stuck to calling the <strong>predict</strong> method of the Logistic Regression at all. Instead, we can simply extract the model’s learned coefficients and use them as an input vector for our vector database. And thus, we can retrieve our desired set of URLs just as quickly as performing a normal query on the vector database.</p><p>This highlights just how important it is for a team working on Data Science projects to own a solid grasp of theoretical concepts. Here, we illustrate this point with a simple example using Logistic Regression, but the same logic also applies to Transformer models. For instance, it’s important to understand how to interpret the raw cosine similarity score in models trained with a contrastive loss (see our <a href="https://medium.com/weborama/boosting-semantic-categorization-with-recent-ai-paradigm-9357324da74a">previous article</a> for more details).</p><p><strong>Why Marrying Vector Databases with Linear Models Just Works?</strong></p><p>Let A and B be two vectors in R^{n}.</p><p>When both vectors are normalized so their L2 norms equal 1, <strong>their cosine similarity is effectively the same as their inner product</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/892/0*35bQlOrXCucnic4C" /></figure><p>As a consequence, in a vector database setting, if your vectors are normalized with L2 norm, there’s no difference between using cosine similarity or the inner product. In our case, we store normalized vectors, so to compute the cosine score, we simply use the <strong>inner product</strong> metric.</p><p>A <strong>Logistic Regression</strong> model is used for binary classification, where the decision boundary between two classes is determined by the weighted sum of the input features:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/226/1*TmEhFag_EXej4LOaPyGzkw.png" /></figure><p>where:</p><ul><li><strong>x</strong> is the feature vector (e.g: the embedding vector of an URL).</li><li><strong>w</strong> are the learned weights of the model (<strong>also a vector</strong>). The LR model tries to learn the optimal <strong>w </strong>vector (weights), thus the better linear combination of the input features (input features are in our use case the coefficients of the embedding vector of URLs).</li><li><strong>b</strong> is the bias term (as in a affine transformation).</li><li><strong>σ</strong> is the <strong>sigmoid function.</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/152/0*2ri3UvpG9ynx87uV" /></figure><p>When we have trained a Logistic Regression model, the learned weights vector <strong>w</strong> represents the model’s understanding of the importance of each feature in distinguishing between classes (URL is positive or negative). We can use this weight vector <strong>w</strong> to compute the inner product with the vectors of all the URLs in our database.</p><p><em>fun fact 1</em>: thus if we have a vector Database where the <strong>metric type is Inner Product,</strong> we can <strong>directly perform a vector database query with the weight vector</strong> <strong>W </strong>to rank URLs. However, the score at this point will not be a probability.</p><p><em>fun fact 2</em>: to convert the inner product into a probability score, just add the learned bias term <strong>b</strong> and apply the sigmoid function. Of course, the probability score can be skewed if the training data contains an uneven proportion of positive and negative labels. In most cases, sticking to “fun fact 1” alone is sufficient.</p><p>Hence, to rank the URLs in our database according to a user query, we train a Logistic Regression model and extract its coefficients as the query vector. This demonstrates how to layer an ML model on top of a vector database to refine a straightforward cosine similarity score.</p><p>An alternative perspective is to see Logistic Regression as a more sophisticated way of deriving a query vector from positive URL examples, compared to the simpler non-ML approach of averaging those vectors (centroid). The main difference is that Logistic Regression also incorporates negative URLs to refine the query vector through an optimization process, whereas the naive centroid method relies only on positive samples and a simple average.</p><h3>Conclusion</h3><p>At Weborama, when we set out to enhance our semantic AI suite using the latest language model advances, we approached the project with an industrial mindset, ensuring it could scale to the massive datasets we handle. Achieving this required more than just hands-on practice, it demanded a solid theoretical understanding of vector databases and machine learning models behind the scenes. This blog post highlights the importance of choosing the right tool for the right job and of having a comprehensive grasp of the AI ecosystem to build actionable solutions for specific use cases.</p><p>Feel free to explore all our Medium posts that delve into this use case:</p><ul><li><a href="https://medium.com/weborama/boosting-semantic-categorization-with-recent-ai-paradigm-9357324da74a">Boosting Semantic Categorization with recent AI paradigm</a></li><li><a href="https://medium.com/weborama/document-similarities-a-continuous-loop-between-pocs-and-production-db3acdc019a5">Document Similarities: A Continuous Loop Between POCs and Production</a></li></ul><p>Finally, I’d like to thanks the entire Data Science team for their contributions throughout this project. Their collective expertise made it possible.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=20963d683e88" width="1" height="1" alt=""><hr><p><a href="https://medium.com/weborama/lr-is-all-you-need-20963d683e88">LR is all you need</a> was originally published in <a href="https://medium.com/weborama">Weborama</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Decoding Google Topics (3/3)]]></title>
            <link>https://medium.com/weborama/decoding-google-topics-3-3-5d91053911d1?source=rss-907859325fbc------2</link>
            <guid isPermaLink="false">https://medium.com/p/5d91053911d1</guid>
            <category><![CDATA[cookies]]></category>
            <category><![CDATA[privacy]]></category>
            <category><![CDATA[marketing]]></category>
            <category><![CDATA[advertising]]></category>
            <category><![CDATA[google]]></category>
            <dc:creator><![CDATA[Nicolas Tastevin]]></dc:creator>
            <pubDate>Mon, 12 Sep 2022 14:10:15 GMT</pubDate>
            <atom:updated>2022-09-12T14:36:48.783Z</atom:updated>
            <content:encoded><![CDATA[<p><em>On July 27th, Google announced that the phasing out of 3rd party cookies in Chrome was postponed to S2 2024. Google has also decided to expand the origin trials that were supposed to end on Aug 22. We are publishing our article based on the initial trial period; we will continue to test the Topics API and will come back with further observations.</em></p><p>At the beginning of 2022, Google dropped the FLoC solution and proposed Topics, a new initiative to enhance privacy on the Web. Quickly, Google published some guidelines describing the Topics API mechanism, making it possible for Weborama to simulate the approach on our Web Surfing history database. At the end of March, we published episodes <a href="https://medium.com/weborama/decoding-google-topics-9356502105ba">1</a> and <a href="https://medium.com/weborama/decoding-google-topics-2-2-8415b14d11f7">2</a> focusing on this simulation and presenting the first obtained results. We also evoked some use cases and highlighted how Topics could be used in the AdTech industry. In April, Google Origin Trials for Topics API started, conducting us to do more research and to write this third episode.</p><h3>Chrome Origin Trials</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G1dfY8prXuVwKnNETH4v1A.jpeg" /><figcaption><strong>Mountain bike trials</strong></figcaption></figure><p>The <a href="https://developer.chrome.com/origintrials/#/trials/active">Origin Trials</a> are a way for Chrome to experiment with new features before making them available to all users. Origin Trials for the Topics API started in April 2022. By design, Origin trials only run on a very small portion of overall Chrome Traffic. Indeed only opt-in users, using Chrome 101 <a href="https://www.google.com/chrome/beta/">Beta</a> or above, surfing on websites having enabled Origin Trials, can lead to a topic set output. At Weborama we have collected Topics API output whenever it has been possible in the European market. User opt-in and site opt-in requirements lead unsurprisingly, a fortiori in the European Market, to a low volume of data. By means of example, in our surfing history data on the FR market, records with topics represent only around 0.001% of the total traffic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/617/1*AdEnSlrFzhJibOluuuHk6g.png" /><figcaption>Example of Topics API output obtained for a web visit</figcaption></figure><p>As explained in the two previous episodes, Topics mechanism relies on a classifier which maps web hostnames to topics. When a user visits an URL, the classifier takes as input only the host part of the URL, attaches topics to the visited URL and then builds Topics browsing history for the user. During Origin Trials multiple classifier model versions have been released. We have recorded 5 different versions with the following volume:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/246/1*RKYMN7rph9C4ceuSNK2ZgA.png" /><figcaption>Number of hits per model version</figcaption></figure><p>Note that the version name corresponds to the date of the release. Each version corresponds to a different experiment. Each model is used in a separate process. This means that, for example, the process involving the model version <em>2206021246</em> is completely unaware of what happened with the model version <em>2205161354</em>. So to explore output obtained from the Topics API, we decided to only focus on one model, the model <em>2206021246</em> implying the highest traffic.</p><h3>Volume Evolution</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/385/0*vOCVTfV7bbcRJYSX" /><figcaption>Number of Topics API outputs per day (including all model versions)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/391/0*Hp4FZUSVbsoupqcT" /><figcaption>Number outputs per day, model version <em>2206021246, </em>with conditions on the number of topics present in the output.</figcaption></figure><p>The picture above reflects well an aspect of the <a href="https://github.com/patcg-individual-drafts/topics">specific details</a> described in the documentation of the Topics API. As a reminder, the API returns for a user a maximum of 3 topics, each one associated to a different previous epoch (week) of the web surfing history of the user. That’s why it is not surprising to see a one week shift between the beginning of the increase of the blue, orange and green curves. Similarly, to get Topics output for a user on a specific website, we need to wait at least one week after the first time the user has been seen. This is the time needed to compute the user’s top 5 topics based on his web surfing history. That is why the blue curve does not start straight after the model <em>2206021246 </em>was released<em>.</em></p><p>We also notice that the curve presents week seasonality corresponding to classic Web traffic seasonality in Europe.</p><h3>User exploration</h3><p>Topics Origin Trials happen in a context where cookies are still available, making it possible to collect cookie IDs alongside Topics output. Thanks to cookie ID collection, we can get the set of users involved in the Origin Trials in our surfing history database and draw a profile of Origin Trials web users.</p><p>As a reminder from the first episode, Weborama has created and maintained for several years a Generic Taxonomy covering many basic topics (e.g: baseball, dogs, literature, minivan …). Each one is linked to a list of lemmas allowing to score each Web URL upon the Generic Taxonomy segments. By extension, we can also score a web user upon the Generic Taxonomy by aggregating scores obtained on visited URLs.</p><p>In order to profile the set of users participating in the Origin Trials in the French market, we aggregated the Generic Taxonomy profile of those users. Then we removed bias from the results by transforming scores thanks to an uplift measure, taking as reference the whole set of users in our FR surfing history database. Thus we could highlight Generic Taxonomy subjects over-represented in the set of Origin Trials users.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/405/1*UaD-Z0DSJvNxuKzP0kSoFA.png" /><figcaption>Top 10 GT over-represented segments in the French market — Origin Trials population</figcaption></figure><p>According to the results, it seems that web users involved in Topics Origin Trials are <strong>“Tech-lovers”</strong>. Since users participate in the Origin Trials by opting-in, it is not very surprising to obtain such an aggregated profile, that could be assimilated to developers’ area of interests. Indeed only a very few web visitors are aware of the new Topics API and want to study it.</p><p>For the most curious, the topic in last position is <em>Reality Television</em>.</p><h3>Site Exploration</h3><p>Let’s now focus on the websites involved in the Origin Trials. Similar to users, websites need to opt-in to be taken into account in the Topics API process. During first part of Origin trials, we have encountered around 600 web domains, which is very small,. Note that this low number can be explained both by the site opt-in process, but also by the user opt-in process. Indeed, even if a website opts in, if there is no opt-in user visiting the site, it will never output topics.</p><p>Anyway, we have run the Chrome classifier model on collected domains. In addition to the model, Chrome has provided a manual annotation file mapping around 10K very popular domains to topics.The file annotation prevails and overrides classifier output for those domains. All in all, we have classified the domains involved in Origin Trials in our surfing database. We see that only 56 topics among 349 topics are represented among the domains collected. Below the top 10 topics with highest traffic attached to domains during Origin Trials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/891/0*8ofCTDNUCrgG04VH" /><figcaption>Percentage of Origin Trials traffic covered by topics assigned to domains</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/617/1*Xjss9qiwoQIMaLD-ZiKVjg.png" /><figcaption>Example of topics attached to domains</figcaption></figure><p>The table above shows examples of topics mapping to domains. The source indicates if topics were obtained thanks to the classifier or thanks to the manual annotation list which overrides classifier results. We see that the model encounters difficulties to correctly classify the <a href="http://www.mma.fr/"><em>www.mma.fr</em></a><em> </em>website which is a famous French insurance company. Indeed, as the model relies only on the domain name, results got mixed up with the MMA martial art. Anyway, from what we see, globally the model works well. The <a href="http://www.leboncoin.fr/"><em>leboncoin.fr</em></a><em> </em>example illustrates well the loss of information when operating at domain scale, especially for domains tackling lots of topics. Did the leboncoin visitor search for DIY tools or laptops when visiting the website?</p><p>It is important not to be confused between Topics attached to domains, and Topics output by the API on a web visit. The first one corresponds to topics tackled by the website while the second one corresponds to topics drawn from the past surfing history of the user.</p><p>Besides, while we have found only 59 different topics when exploring topics attached to domains, we have found the whole 349 topics in API outputs. The additional 290 topics come from random topics elected with a 5% probability. Indeed, the API outputs with a 5% chance a topic randomly chosen among the full taxonomy. Although a caller only sees, for a user, topics corresponding to sites it has observed the user visit, topics elected by the random mechanism escape this rule, explaining why we were able to catch the whole 349 topics even if domains we have collected only covered 56 topics. In our case, decoding one of those 290 does not make any sense as we are sure they were picked randomly and do not correspond to any web behavior.</p><p>In the chart above, we see that <em>News </em>topic domains covered more than 30% of the traffic during Origin Trials in our database. Because this topic is often attached to domains, by construction most users will have <em>News </em>topic in their top 5 web navigation topics thus leading to Topics API outputs containing most of the time <em>News </em>topic. For Origin Trials, at user scale, this can be a bit deceiving because it dilutes information and avoids, in a way, tracking in the past web navigation of the user that makes them different from other users.</p><p>Let’s see below the distribution of topic sets obtained by the Topics API during Origin Trials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/563/0*serYV33PKEELLiuf" /><figcaption>Topic set distribution during Origin Trials</figcaption></figure><p>As expected we see that most topic sets are equal to “News”, an information which has little value.</p><h3>Back to simulations</h3><p>From what we said previously, values at user scale will only exist for some users visiting a lot of specific topics on the web. But “average” users not having a strong connection with a specific topic, risk to always output common “high traffic” topics in the database such as “News” in our case, and random topics. Here, due to the low volume of records during the Origin Trials, because of opt-in mechanisms on both user and site sides, it is difficult to make a deeper exploration involving statistics to compute a “dilution factor” in order to see to what extent this phenomenon impacts tracking. But we can expect that in a higher volume context, for example if Topics API were made available to every Chrome users, this “dilution” could not be a real problem. Indeed, it will act as a filter which will only reveal users very attracted by a topic and reject “average” users. Volume being high, the set of filtered users should be enough to reach a good audience. We just have to be cautious regarding “rare” topics which could come from random scenarios. When dealing with an “average” user returning common and less informative high traffic topics, an adtech actor could always use contextual targeting on the url. It would be possible to switch and/or combine Topics API output with a contextual approach.</p><p>Topics API mechanism could evolve in the future and actors could expect that it will integrate, inside the pipeline, an uplift correction when building the top 5 topics attached to a user to detect weak signals instead of common high traffic topics. At this step, this is discussed but only an hypothesis.</p><p>Anyway, when doing macro studies such as Decoding Topics, Topics API output brings lots of information. Indeed with huge amounts of data, we can collect a high number of topic sets which are not very common and thus with the help of uplift metric applied at the end of the pipeline, we can highlight interesting insights. That’s what we have done in previous episodes by building a simulation of Topics API in our full GB market database.</p><p>When writing episodes 1 and 2, we did not know how to attach topics to domains. That’s why we had used a Word2vec model to generate a list of lemmas describing each topic and then scored domains by detecting key lemmas in the content of URLs being part of a domain. However, as part of the Origin Trials, Chrome provided publically the model to attach topics to domains. So, we relaunched our simulation by replacing the <em>Domains to Topics</em> mapping step of the pipeline by the true Chrome classifier model.</p><p>We run our Decoder tool upon the topic: Games/Computer &amp; Video Games. To have a better understanding of the way the Decoder works, you may refer to <a href="https://medium.com/weborama/decoding-google-topics-9356502105ba">episode 1</a>. Below we show obtained results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/685/0*en_cs99ajAwHKEjV" /><figcaption>Most over-represented co-occurring topics with Games/Computer &amp; Video Games</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/693/0*j5zAu7_qsbWFjunI" /><figcaption>Most over-represented domains with Games/Computer &amp; Video Games</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/582/1*ePyuRe2v299Dh4e9ok6PNg.png" /><figcaption>Most over-represented Generic Taxonomy segments with Games/Computer &amp; Video Games</figcaption></figure><p>Pictures above show that the mapping proposed by Chrome is accurate enough, even if operating only on the domain name, to get interesting insights and to make a macro study of topics output. Keep in mind that high traffic domains are manually annotated and stored in an override file, so even if the classifier could be wrong regarding some domains, important ones are perfectly mapped. Moreover, at a big scale, we collect enough not diluted information to be able to describe a particular topic. Those observations bring hope into the Topics API.</p><p>To go further in this direction of a macro study and illustrate how we can combine a contextual approach with the Topics API output, we designed a new tool aiming at profiling a domain/URL. The purpose is to build the behavioral profile of a domain/URL by highlighting over-represented topics returned on a domain/URL. The tool works as follows. It looks for all entries in the surfing history where the domain/URL is involved. Then it collects all topics returned on these hits. Thanks to an uplift metric, we can get over-represented topics. This set of top topics characterize the most probable area of interest of users visiting the domain/URL. In a nutshell, the tool gives insights about the behavior profile of a site visitor.</p><p>Below results obtained on the domain <a href="http://www.planetf1.com/">www.planetf1.com</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*U8PmOQTGnUbngD8r8NLhCQ.png" /><figcaption>User’s behavior profile of <a href="http://www.planetf1.com/">www.planetf1.com</a> website</figcaption></figure><p>For example, an adtech actor could take advantage of a macro observation of Topics API to learn that he could target <em>Classic Rock &amp; Oldies </em>lovers by targeting <a href="http://www.planetf1.com/">www.planetf1.com</a> visitors. In a cookieless world, this is impossible to do for a third party player, making Topics API valuable. This illustrates well why the dilution aspect of the Topics mechanism is not that crucial.</p><p>To sum up, when facing a hit with common user topic set output, resulting from the dilution effect, it could be possible to use a contextual approach or the domain behavioral profiler presented above. This would lead to more reach. When facing specific and less common topics, it would be possible to target them directly based on the topic set output with a high accuracy — except if it comes from the random selection process of course.</p><h3>Conclusion</h3><p>This post detailed observations we made as part of Topics Origin Trials. Even if the volume collected was low, we could get enough data to illustrate Topics API mechanism, showing the epoch system, and observing the random selection process. Low volume was also enough to describe the potential dilution effect.</p><p>Topics Origin Trials brought with them the method to map topics to domains which was unknown during previous posts. It was the occasion to re-do some simulation taking into account this new piece of information. We discover that observations made during <a href="https://medium.com/weborama/decoding-google-topics-9356502105ba">episode 1</a> and <a href="https://medium.com/weborama/decoding-google-topics-2-2-8415b14d11f7">2</a> remain relevant today with this mapping. Furthermore, it encouraged us to develop a new tool aiming at building a domain/URL behavioral profile, thanks to the Topics API output. Such a tool could help third party players obtain insights on a domain/URL audience without owning any first party data.</p><p>We noticed that Origin Trials population has started to increase significantly since August and will continue to increase a lot in the future, as July 27th <a href="https://blog.google/products/chrome/update-testing-privacy-sandbox-web/">Google blog post</a> states. Google aims at expanding trials to millions of users globally, opt-in process will remain but it will be simplified by a prompt message giving users option to participate, instead of proposing a more technical enrolling process as done in the first part of Origin Trials. Future exploration will rely on a higher volume context. We’ll get back to this.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5d91053911d1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/weborama/decoding-google-topics-3-3-5d91053911d1">Decoding Google Topics (3/3)</a> was originally published in <a href="https://medium.com/weborama">Weborama</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Decoding Google Topics (2/3)]]></title>
            <link>https://medium.com/weborama/decoding-google-topics-2-2-8415b14d11f7?source=rss-907859325fbc------2</link>
            <guid isPermaLink="false">https://medium.com/p/8415b14d11f7</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[semantics]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[adtech]]></category>
            <category><![CDATA[privacy]]></category>
            <dc:creator><![CDATA[Nicolas Tastevin]]></dc:creator>
            <pubDate>Fri, 15 Apr 2022 13:56:19 GMT</pubDate>
            <atom:updated>2022-09-12T14:18:12.592Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*eZ51uXqV9tITHzmzZcXVDg.png" /></figure><p>In the <a href="https://medium.com/weborama/decoding-google-topics-9356502105ba">first episode</a> we presented a faithful simulation of the Topics API, the new Google initiative to enhance privacy on the Web while preserving the behavioral ad tech industry. This simulation was based on Weborama Surfing History database, allowing us to test the Topics API behavior <a href="https://blog.chromium.org/2022/03/what-to-expect-from-ps-testing.html">in advance</a> and to share some observations before its broad release. We also introduced the Decoder which aims at decoding a Google topic set (up to three topics), with bar-charts showing co-occurring topics, dominant web domains for a topic or a topic set, representative lemmas (words) and correlated Weborama Generic Taxonomy semantic segments.</p><p>The first study revealed hidden connections between simulated Google topics, the possibility to build insights based on topics, and the potential gain for a marketer to study topic combinations before launching a digital campaign. First observations encouraged us to pursue our Topics API simulation, and see how we can leverage this thanks to the use of semantic AI tools.</p><p>As a quick reminder, a caller requesting the Topics API at the time of the visit of a web user on a URL will receive at most three topics related only to the past web navigation of the user. This will help AdTech companies to market campaigns based on user behavior in a cookieless world. And this can come in addition to contextual marketing directly inferred from site content.</p><p>We are now going to see how interest based ad targeting may survive in a cookieless environment, or even be reinforced in certain conditions, and how we could do the most of the solution proposed by Google. What’s at stake for us at Weborama, and for many other companies of the AdTech sector is the evolution of the Product offer. For instance: how should a behavioral targeting feature be adapted to Topics API, and lead to campaigns targeted on complex topic sets (combinations)? How could a contextual tool be strengthened by the Topics API?</p><p><strong>TL ; DR</strong></p><p>This article describes ways an AdTech could benefit from the Topics API for digital marketing:</p><blockquote><em>The Topics API can be exploited in order to enhance </em><strong><em>contextual targeting</em></strong><em> with the help of semantic similarity algorithms, and dataviz tools</em></blockquote><p>i) a topic set can directly lead to a web inventory — that is, a set of web pages — thanks to a tool like the Decoder:</p><ul><li>this set of web pages (URLs) can be used as is for contextual targeting (<em>from Google Topics to Contextual Targeting</em>)</li><li>the URL list can be amplified and turned into a web contextual inventory thanks to the use of lookalikes computed via semantic AI (w2v or SBERT): reach may be increased</li></ul><p>ii) another way is to extract insights from the inventory directly matching the topic set:</p><ul><li>this would allow the user to answer the question: what kind of content is truly, deeply, behind a Google topic set? Is there something more than just a label? Is the content attached to a label, or a few labels (on the intersection mode) consistent? How specific may it be?</li><li>in order to achieve this, we use SunFish, a Weborama interactive visualization tool allowing the exploration and selection of semantic segments</li><li>these semantic segments may then be used as a basis in order to build a matching web inventory</li></ul><blockquote><em>The Topics API can be used for rich semantic </em><strong><em>behavioral targeting</em></strong><em>, thanks to a recommendation engine</em></blockquote><ul><li>a user may enter words, explore the semantic universe, create a custom segment, and this can be translated into most representative, specific, topic sets, for behavioral targeting</li></ul><h3>Use Case</h3><p>Let’s consider an organization — for instance, the website nature.org — promoting an ecology event with a digital campaign. Obviously, they can start by directly targeting websites with ecology content. But such a simple interpretation could lead to low volumes and to an audience made of environment-conscious people only.</p><p>Nature.org would have to find connected topics, typical user behaviors to broaden their target and maybe draw the attention of people showing similar navigation patterns.</p><p>Google Topics API aims at solving this. In this case, the organization targets topic sets including either <em>Science/Ecology &amp; Environment</em> or <em>Food &amp; Drink/Cooking &amp; Recipes/Cuisines/Vegetarian </em>or <em>Cuisine/Vegan Cuisine.</em> But, due to the special randomness of the Topics API (one topic is selected among the user’s <strong>top</strong> five per week), volumes would be lower than the ones obtained with a classic cookie based scenario. In other words, a user slightly interested in ecology will not be associated with this Google topic (because it would not be in the user’s top 5), and may not be even if the topic is a great interest for them, simply because of the randomness in the process.</p><p>Moreover nature.org would have no control over what’s behind those Google topics, and cannot be sure they are accurate enough for the campaign’s purpose. That’s why we think it is important to start by decoding in depth a topic set, and we do this by generating rich visual insights.</p><h3>Visual Semantic Insights</h3><p>In addition to drawing bar charts, the <a href="https://medium.com/weborama/decoding-google-topics-9356502105ba">Decoder</a> allows users to download the set of URLs derived from a topic set. Those URLs are simply all the URLs where the Topics API has returned a combination of topics which includes the targeted topic set. Due to the behavioral property of the Topic API, it is important to keep in mind that a URL derived from a topic set does not necessarily embed content directly related to it. That’s why decoding the set of URLs obtained thanks to visual semantic insights should bring added value and widen the area of interest of web users attached to the topic set in the first place.</p><p>Weborama’s semantic tool, SunFish, allows the description of a corpus via word bubbles organized hierarchically and grouped according to semantic similarity. (Nota Bene : insight extraction is not limited to web content and can be performed on various kinds of sources. For example, the <a href="https://medium.com/weborama/ai-big-brother-ea79e8d09bd4"><em>AI &amp; Big Brother</em></a> post demonstrates how visual semantic insights may suggest a new reading experience of the novel <a href="https://en.wikipedia.org/wiki/Nineteen_Eighty-Four">1984</a>. Visual insights may also be applied to encyclopedic content like Wikipedia which we commonly use at Weborama, in particular but not only for training purposes.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vRX7P8puHjZl9Xop" /><figcaption>View of a corpus about <em>Ecology</em> (source Wikipedia)</figcaption></figure><p>The hierarchical lemma bubble view can have up to 4 depth levels. This means a lemma bubble may have one parent, one grandparent, one great grandparent bubble. For instance, the lemma <em>wildfire </em>is included in the <em>Natural disasters </em>bubble, itself included in the <em>Phenomena </em>bubble, itself included in the <em>Natural environment </em>bubble.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/0*Octr6roJMfaVvsAO" /><figcaption>Zoom in on a depth-2 bubble <em>Natural Environment</em></figcaption></figure><p>SunFish Bubble View relies on 4 big tech modules:</p><ul><li>a lemmatization module whose goal is to transform a text into canonical forms of inflected words called lemmas</li><li>a keyword extraction module inspired from the <a href="https://en.wikipedia.org/wiki/PageRank">page rank</a> algorithm, which is a good compromise between fast computational time and accuracy</li><li>a custom hierarchical clustering algorithm (dendrogram computation)</li><li>a bubble tagging method allowing to assign a common concept label to a set of lemmas. (Nota Bene: this has been and remains a challenge for many reasons. First, no rule could be established from global occurrence on the web. Parents could be less specific than children (e.g:<em> sports</em> is more present on the web than <em>handball), </em>or parents could be more specific than children (<em>immunology</em> is less present than <em>vaccination</em>). Also, a lemma can have a huge number of acceptable parents (e.g: <em>Iphone</em> could belong to <em>smartphone</em>, <em>Apple product</em>s…)</li></ul><p>But let’s go back to our use case — Nature.org.</p><p>The organization feeds SunFish with the ensemble of URLs obtained with the decoder, matching the desired topic sets. We expect to get a very different Bubble View than the one corresponding to a Wikipedia corpus. For two reasons : a) content is web content, and not encyclopedic ; b) this is subtle difference : it’s a user-centric approach since content will come from sites visited by users interested in Ecology, and not a site-centric approach where content would be directly parsed from sites about Ecology.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/871/0*roQjE0S7lnsDTnkP" /><figcaption>Bubble View of {Ecology, Vegan} (source Google Topics API)</figcaption></figure><p>Without any surprise we encounter vocabulary about weather, animals, edible fruits, nuclear etc. Those segments can be selected, refined, and activated for a contextual campaign. Other segments, having an indirect connection to the underlying topic, such as <em>Social Sciences</em>, may be explored before taking actions. As we zoom in on this bubble, sub-bubbles appear, including one tagged with <em>childcare</em> which is itself divided into new sub-bubbles as we can see:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/753/0*opxs_DdayNGwOZDW" /><figcaption>Zoom in on the <em>Social Sciences</em> bubble</figcaption></figure><p>The client, nature.org, can use SunFish in order to explore the corpus, and highlight some selected lemmas, this will give context:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/459/0*qajt1q_M8hmVlkbj" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/465/0*kLYy5MEfIE0wVu-D" /></figure><p>Now we understand that web users flagged with the topic set {ecology, vegan} visit websites about parenting, family life. Knowing that, in our use case, the client can create an accurate semantic segment set about parenting, childcare, working mom, to get a bigger audience for their contextual digital campaign. They could also quickly decode the <em>People &amp; Society/Family &amp; Relationships/Parenting </em>Google topic so as to decide whether to include this topic or not in the campaign.</p><h3>Enriching the Contextual Campaign</h3><p>As we’ve seen, using visual semantic insights will help to go beyond the obvious and create large and specific contextual campaigns based on lemma segments. The visual insights also confirm in a way the relevance of the chosen topic set. Another possibility for nature.org is to directly use the URLs obtained with the decoding phase as an advertising inventory. Targeting a URL inventory presents some advantages and drawbacks over targeting topic sets.</p><p>A URL set can be enriched using AI methods, based on URL similarity calculation. At Weborama, we built a set of algorithms solving this problem with various strategies. Most techniques rely on URL content — it comes to vectorizing the content in space where proximity between URLs is measured thanks to a <a href="https://scikit-learn.org/stable/modules/metrics.html#cosine-similarity">cosine similarity</a> metric. We used <a href="https://en.wikipedia.org/wiki/Word2vec">w2v</a> to take advantage of our <a href="https://medium.com/weborama/decoding-google-topics-9356502105ba">lexicon</a> on the one hand, and on the other hand with the help of transformers and state of the art deep learning techniques. Another direction is to embed a URL according to User Surfing History. The algorithm mimics the philosophy of the skip-gram w2v implementation, but using sequences of consecutive URLs visited by a user as input, instead of sentences made of lemmas. We call this “Prime Profiling”.</p><p>However the traffic of a web page is evolutive and a URL can have a large traffic only during a short period of time. That’s the case of course of news articles and blog sites. That’s why targeting a fixed inventory of past URLs could lead to a poor audience, which is not the case a priori regarding topic sets since these are frequently refreshed and returned on the fly each time the API is called. But contextual targeting may also be operated in a streaming mode, where new URLs are constantly feeding the inventory. Furthermore, a temporal model allows us to predict the future of a URL in terms of traffic. This is useful to see to what extent the URL set is ephemeral, and thus to anticipate the volume.</p><h3>From Custom Semantic Segments to Google Topics Behavioral Targeting</h3><p>So we have described an approach which starts with a topic set. We decode the topic set, explore and create a taxonomy, build an inventory of URLs ready for contextual targeting : <em>From Topics to Contextual</em>. But another strategy would be to use a reciprocal process: starting with a custom taxonomy made of words owned by the brand, and create a list of relevant matching topic sets that can be used for behavioral targeting: <em>From Custom Semantic Segments to Behavioral.</em></p><p>Classically when building a cookie based behavioral campaign, we begin by elaborating a taxonomy of topics we want to target. We collect past data, user IDs visiting websites matching the taxonomy. Then we activate the audience. Allowing marketers to construct taxonomies is crucial. The more the lemmas in the segment, the more accurate they are, the bigger the volume of relevant user IDs will be available for the client. We are going to check how this method can lead to Google topic sets and not cookies or user IDs.</p><p>Here is a snapshot of the recommendation engine we use to build semantic segments:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*b6J832KYZDFFKPEf" /><figcaption>MoonFish in action</figcaption></figure><p>The user enters a seedword, a word representing its taxonomy, and the engine will recommend lemmas that can be added into the taxonomy. The user gets a real time audience estimation: numbers of cookies or IDs matching the words. The accuracy of the engine depends in particular on the underlying lexicon, its capacity to handle N-grams and disambiguation. We <a href="https://medium.com/weborama/decoding-google-topics-9356502105ba">emphasized</a> for instance that bigrams usually are more specific than unigrams. Let’s illustrate this fact by comparing the recommandations obtained with the unigram <em>climate, </em>used as seedword, to the ones obtained with the bigram <em>climate change</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/923/0*eRlZMHhROST3-GCC" /><figcaption>Recommendation for a unigram</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/926/0*1TtCChmLhDE8vbW4" /><figcaption>Recommendations for a bigram</figcaption></figure><p>In a cookie-less world, collecting user IDs becomes impossible for third party players. <strong>But we can adapt the strategy by replacing the collection of user IDs by a collection of topic sets.</strong></p><p>In our use case, the client nature.org creates in MoonFish, Weborama’s product, a custom segment of lemmas representing the Ecology theme with the recommendation engine. Then MoonFish will filter the Surf History table on URLs matching this segment and collect Google topics returned by the Topics API on those touchpoints. Thanks to an <a href="https://medium.com/weborama/decoding-google-topics-9356502105ba">uplift metric</a>, the adapted MoonFish will draw a bar-chart presenting dominant topic sets on the matching corpus of URLs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xx06nZ3wYd9HczPu" /><figcaption>Topics MoonFish Creation Menu</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*c1cvgOmhdqk5p-al" /><figcaption>Topics MoonFish Exploration Menu</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*a2LLfUkxRm0NYD9b" /><figcaption>Bar Chart Zoom</figcaption></figure><p>Let’s have a close look at the returned topic sets. The combination {<em>Food &amp; Drink, Early Childhood Education, News/Weather</em>} appears in first position and confirms SunFish previous insights exploration about childcare.</p><p>Regarding the <em>Ecology &amp; Environment</em> topic, it appears in the fifth topic set. One can wonder legitimately why this topic does not belong to the top topic set. The thing is that Google Topics aims at synthesizing past navigation of users — Topics are derived from browsing behavior patterns. And most people visiting URLs related to ecology do have other areas of interest in life. For example, environment-conscious people are overrepresented among students, maybe searching for a solution to finance their university tuition with a personal loan, and this could very well explain the presence of the Loans topic.</p><p>Moreover, Google Topics decided to assign topics at the domain level while a web visit happens at the finer URL level. As a consequence, a news website domain dealing with multiple society subjects (politics, sports, economy, people, justice, ecology …) will not necessarily be related to {<em>Ecology &amp; Environment} </em>even if it publishes a large amount of ecology articles. In fact, websites focusing especially on this topic will have higher chances to be profiled with this topic. And so, in our example, apparently many URLs dealing with ecology belong to domains not restricted to ecology. This is consistent with the coarse grained approach purposely established by Google.</p><p>That’s why converting a custom taxonomy into a collection of topic sets is essential to reach a large audience. Limiting the activation to the <em>Ecology &amp; Environment</em> a priori matching topic would result in capturing only people frequently visiting specialized ecology websites, people strongly involved in the cause.</p><p>The client may finally activate a campaign by targeting the obtained topic sets. They now have full control regarding the description of their audience, in a more accurate and flexible way than just choosing directly coarse grained Google topics. Also, this reciprocal process allows clients to design behavioral audiences in areas that do not exist in the Google Topics Taxonomy. In a way, the adapted MoonFish acts as a <em>Custom Taxonomy ⇒ Google Topics </em>converter.</p><h3><strong>Conclusion</strong></h3><p>This post shows how, as a player of the AdTech industry, we can make the most of the Topics API as it is presented by Google, in order to enhance both Contextual and Behavioral Targeting. All this preliminary work has been possible due to a simulation of Google Topics API, the official API not being available broadly at the time this article has been written. Topics are currently testable (via the JavaScript API) in the <a href="https://www.google.com/intl/fr/chrome/canary/">development version of Chrome: Canari</a>, by activating the experimental flag privacy-sandbox-ads-apis.</p><p>The trials have been <a href="https://groups.google.com/a/chromium.org/g/blink-dev/c/oTwd6VwCwqs/m/jPkW3T-mCgAJ?pli=1">announced by Google</a>, and Google also <a href="https://privacysandbox.com/intl/en_us/open-web/#:~:text=Fight%20spam%20and%20fraud%20on%20the%20web%20proposals%20phases%3A%20Testing,%2C%20stage%202%3A%20Q3%202023.&amp;text=OT%20STARTED%3A%20The%20Trust%20Tokens,open%20since%20Q3%20of%202020.">shares a timeline for the privacy sandbox</a>. Once Topics get deployed in the real world (meaning, available by default on real Chrome instances on the web), we’ll be able to collect them on our network, and to describe real world tests with observed and collected Google Topics data. How will a 3rd party player be impacted by Google’s strategy, limiting the scope of accessible data? What will the distribution of topics on URLs look like? Will Google use a <a href="https://github.com/patcg-individual-drafts/topics/issues/42#issuecomment-1033828347">TF-IDF strategy</a>? This is something we would be able to observe and monitor. What may be expected in terms of accuracy, reach, and of course, performance? This will be for our next episode.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8415b14d11f7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/weborama/decoding-google-topics-2-2-8415b14d11f7">Decoding Google Topics (2/3)</a> was originally published in <a href="https://medium.com/weborama">Weborama</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Decoding Google Topics (1/3)]]></title>
            <link>https://medium.com/weborama/decoding-google-topics-9356502105ba?source=rss-907859325fbc------2</link>
            <guid isPermaLink="false">https://medium.com/p/9356502105ba</guid>
            <category><![CDATA[adtech]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[privacy]]></category>
            <category><![CDATA[google-topics]]></category>
            <category><![CDATA[nlp]]></category>
            <dc:creator><![CDATA[Nicolas Tastevin]]></dc:creator>
            <pubDate>Thu, 31 Mar 2022 17:01:53 GMT</pubDate>
            <atom:updated>2022-09-12T14:17:52.260Z</atom:updated>
            <content:encoded><![CDATA[<p>At the beginning of 2020, Google announced the Privacy Sandbox initiative designed to enhance privacy on the Web, making third party cookies obsolete. But the AdTech ecosystem and interest-based advertising have been relying on third party cookies and Chrome represents around<a href="https://gs.statcounter.com/browser-market-share"> 65% of browser market share</a>.</p><p>In order to both ensure user privacy and preserve the advertisement business, Google envisaged, among other things, a controversial <a href="https://privacysandbox.com/proposals/floc">FLoC</a> (Federated Learning of Cohorts) proposal. Chrome users would be aggregated into cohorts depending on their surfing behavior, and these cohorts would be communicated to third party players. However Google recently dropped this solution since FLoCs would add fingerprinting surface — <a href="https://www.reuters.com/article/alphabet-google-advertising-privacy-idCNL1N2U41TE"><em>the system carried the risk of exposing an individual’s browsing history</em></a>, according to Google product director Vinay Goel. Now the Topics API, driven by the aim of providing more human-understandable transparency, replaces FLoC. Topics involve a certain amount of randomness and are supposed to be a lot less granular than FLoCs, at least when they’re considered individually.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*LZ9JvjKiuIByuL9HnCgD3Q.jpeg" /></figure><p>What could we expect from the Topics API, in terms of insights, interest-based ad capabilities, and of course, performance?</p><p>Trying to answer these questions, thanks to in-house NLP and semantic AI tools, is the purpose of our series of articles.</p><p>As we’re writing this first episode, Topics proposal has not yet been launched for testing. Trials <a href="https://www.mindmedia.fr/adtechs-martechs/privacy-sandbox-google-va-lancer-les-tests-pour-ses-api-fledge-topics-et-attribution-reporting/">have just been announced</a>, but we’ve decided a while ago not to wait for the trials and to start exploring the subject by building our own <strong>simulations</strong>, relying on the collect data accessible to Weborama’s Data Science Team.</p><p><strong>Too Long ; Didn’t Read</strong></p><ul><li>Google is replacing the FLoC initiative by <a href="https://blog.chromium.org/2022/03/what-to-expect-from-ps-testing.html">Topics API</a> which is supposed to provide less granularity in terms of insights (but to what extent?), and to be more efficient regarding privacy.</li><li>Weborama wants to question the Topics API approach: usefulness for behavioral targeting, richness of information and insights, consistency, contextual targeting opportunities.</li><li>Topics not being available yet, Weborama has decided to start working on data computed based on Surf History thanks to semantic AI, reproducing Google’s announced methodology: we’ve launched simulations, and we’ve built a Decoder app.</li><li>The Decoder allows us by design to understand what a topic or a topic set is actually made of, semantically speaking: what are its representative lemmas (words)?</li><li>First results from the Decoder let us believe that there will be insights when considering not only topics, but topic sets (up to 3 topics combined), making these combinations relevant for behavioral targeting.</li></ul><h3>Google Topics briefly explained</h3><p>We won’t deep dive into the Google Topics process, you may check the <a href="https://github.com/jkarlin/topics">Topics Github</a> if you’d like to have a close look.</p><p>A reminder of the key Topics API concepts should be enough to follow the process of the experiments described further. Third party players calling Chrome Topics API will receive a set of maximum 3 ad topics (this set is referred to below as a <strong>topic set</strong>) for a page visitor — one topic per past week. Thus AdTechs will be aware of user interests without receiving any kind of identity information.</p><p><strong><em>Topics selection process</em></strong></p><p>A web user surf history is divided into 7 day epochs by Google. For each of the last 3 complete epochs, the top 5 most visited topics on web pages (NB: topics for a web page only depend on the page’s domain, all web pages within a domain get the same topic profile according to Google’s methodology) are retained. 1 additional random topic is considered. Then with a 95% rate, 1 of the top 5 topics is selected randomly per epoch. The remaining 5% times, the additional random topic is selected. Whatever topic is selected for a given epoch, will continue to be returned for a third party player on that site for the three following epochs. A caller will not get topics inferred from the navigation of the user on sites outside of the caller’s observed touchpoints.</p><p>In a nutshell it is important to keep in mind those two concepts:</p><ul><li>The non ordered topic set returned for a call made on a site visited by a user remains unchanged during a full epoch</li><li>Sites visited weekly will learn at most one new topic per week per user</li></ul><p>Due to the randomness injected in the selection process, different sites often get different topic sets for the same user, making it hard to cross-identify the user. This strongly encourages privacy.</p><h3>Weborama’s simulation</h3><p><strong><em>Assigning G-Topics to domains</em></strong></p><p>Google provides an<a href="https://github.com/jkarlin/topics/blob/main/taxonomy_v1.md"> initial hierarchical taxonomy</a> containing 349 topics such as “Sports”, “Sports/Skiing &amp; Snowboarding”, “Finance”, “Finance/Insurance/Health Insurance”, etc. The first thing we have to do is to assign a maximum of 5 of these Google topics organized in tiers to every domain site in Weborama’s database.</p><p>Weborama’s Surfing History database records touchpoints (visits) of users (cookies) on web pages in the scope of our collect layer. We store data such as the visitor id, the url, the date of the touchpoint. In addition we extract the content of the page and lemmatize it. Lemmatization is a Natural Language Processing task, aiming at transforming a text into canonical forms of inflected words called <strong>lemmas. </strong>Lemmatization and morphosyntactic analysis facilitate<strong> </strong>text mining operations using AI tools. These tasks also include challenges such as N-gram grouping and disambiguation. As a rule of thumb, bigrams are often less ambiguous than unigrams, three-grams less ambiguous than bigrams, etc. Think of words like “Roissy Charles de Gaulle” (which refers directly to the airport) — disambiguated compared to “Roissy” (city), and “Charles de Gaulle” (person), or the 4-gram “12 year old whiskey”, which has a complete different meaning than “12 year old”, and is more specific than “whiskey” or even “old whiskey”. Part of speech tagging and disambiguation are enhanced when relying on an up-to-date lexicon. Weborama’s lexicon is continuously enriched with filtered, annotated, “realistic”, Web data.</p><p>For every topic in the taxonomy suggested by Google, we started by automatically generating a list of specific lemmas belonging to the topic. Then we scored domains by looking up (that’s what we call semantic matching) these lemmas inside lemmatized URL content. Lists of lemmas have been established thanks to the <a href="https://en.wikipedia.org/wiki/Word2vec">W2V model</a>, a model learning semantic proximity between lemmas. When a Google topic is entered as input, the model will recommend a list of lemmas corresponding to the topic. Historically, the W2V algorithm has been broadly used in Weborama products. We periodically retrain such a model on the corpus made of lemmatized web pages in our database, leading to very accurate and unique word embeddings. That’s why we decided to use these embeddings to score domains. In addition, we included a normalization phase to make sure that low level, specific, tier-2 or tier-3 topics get a higher chance to be assigned to a domain, rather than high level, more common, topics (e.g. “Pets &amp; Animals/Pets/Dogs” vs. “Pets &amp; Animals”).</p><p>Example for the “Beauty &amp; Fitness/Fitness/Bodybuilding” tier-3 Google topic.</p><p>Here is a list (sample) of lemmas matching the topic:</p><blockquote>[‘bodybuilding’, ‘bodybuilder’, ‘powerlifting’, ‘Dorian Yates’, ‘Mr. Olympia’, ‘CrossFit’, ‘powerlifter’, ‘Phil Heath’, ‘Functional Fitness’, ‘Ronnie Coleman’, ‘Olympic weightlifting’, ‘weightlifter’, ‘kickbox’, ‘Arnold Classic’, ‘weight training’, ‘weightlifting’, ‘calisthenics’, ‘IFBB’, ‘Mat Fraser’, ‘kickboxing’…]</blockquote><p>And here’s a list (sample) of domains within our collect perimeter matching the topic (we also show other matching Google topics) :</p><blockquote><a href="http://www.muscleandfitness.com/">www.muscleandfitness.com</a></blockquote><blockquote>Beauty &amp; Fitness/Fitness</blockquote><blockquote><strong>Beauty &amp; Fitness/Fitness/Bodybuilding</strong></blockquote><blockquote>Beauty &amp; Fitness</blockquote><blockquote>Sports/Running &amp; Walking</blockquote><blockquote><a href="https://strengthlevel.com/">strengthlevel.com</a></blockquote><blockquote><strong>Beauty &amp; Fitness/Fitness/Bodybuilding</strong></blockquote><blockquote>Beauty &amp; Fitness/Fitness</blockquote><blockquote>Sports/Gymnastics</blockquote><blockquote>Autos &amp; Vehicles/Motor Vehicles (By Type)/Hybrid &amp; Alternative Vehicles</blockquote><blockquote>Beauty &amp; Fitness/Face &amp; Body Care/Clean Beauty</blockquote><blockquote><a href="http://www.setforset.com/">www.setforset.com</a></blockquote><blockquote>Beauty &amp; Fitness/Fitness</blockquote><blockquote>News</blockquote><blockquote><strong>Beauty &amp; Fitness/Fitness/Bodybuilding</strong></blockquote><blockquote>Business &amp; Industrial/Business Operations/Flexible Work Arrangements</blockquote><blockquote><a href="http://www.bellamagazine.co.uk/">www.bellamagazine.co.uk</a></blockquote><blockquote>Home &amp; Garden/Home &amp; Interior Decor</blockquote><blockquote>Arts &amp; Entertainment/Concerts &amp; Music Festivals</blockquote><blockquote>Arts &amp; Entertainment/TV Shows &amp; Programs/TV Dramas/TV Soap Operas</blockquote><blockquote><strong>Beauty &amp; Fitness/Fitness/Bodybuilding</strong></blockquote><blockquote>Hobbies &amp; Leisure/Diving &amp; Underwater Activities</blockquote><blockquote><a href="http://www.t-nation.com/">www.t-nation.com</a></blockquote><blockquote><strong>Beauty &amp; Fitness/Fitness/Bodybuilding</strong></blockquote><blockquote>Beauty &amp; Fitness/Fitness</blockquote><blockquote>Sports/Running &amp; Walking</blockquote><blockquote>Internet &amp; Telecom/Web Design &amp; Development</blockquote><blockquote><a href="https://barbend.com/">barbend.com</a></blockquote><blockquote>Internet &amp; Telecom/Email</blockquote><blockquote><strong>Beauty &amp; Fitness/Fitness/Bodybuilding</strong></blockquote><blockquote>Beauty &amp; Fitness/Fitness</blockquote><blockquote>Sports/Running &amp; Walking</blockquote><blockquote><a href="https://powerliftingtechnique.com/">powerliftingtechnique.com</a></blockquote><blockquote><strong>Beauty &amp; Fitness/Fitness/Bodybuilding</strong></blockquote><blockquote>Beauty &amp; Fitness/Fitness</blockquote><blockquote>Beauty &amp; Fitness/Fashion &amp; Style</blockquote><blockquote>Arts &amp; Entertainment/Visual Art &amp; Design/Design</blockquote><blockquote><a href="https://fitnessvolt.com/">fitnessvolt.com</a></blockquote><blockquote><strong>Beauty &amp; Fitness/Fitness/Bodybuilding</strong></blockquote><blockquote>Beauty &amp; Fitness/Fitness</blockquote><blockquote>Home &amp; Garden/Home &amp; Interior Decor</blockquote><blockquote>Sports/Rugby</blockquote><blockquote><a href="http://www.trailrunningmag.co.uk/">www.trailrunningmag.co.uk</a></blockquote><blockquote>Sports/Running &amp; Walking</blockquote><blockquote><strong>Beauty &amp; Fitness/Fitness/Bodybuilding</strong></blockquote><blockquote>Beauty &amp; Fitness/Fitness</blockquote><blockquote>Arts &amp; Entertainment/Music &amp; Audio/Musical Instruments</blockquote><p><strong><em>Selecting the topic set</em></strong></p><p>Now that domains are characterized by 5 Google Topics max, the second part of the job is to emulate the Google Topics API behavior explained earlier. In order to do this we followed the details described in the<a href="https://github.com/jkarlin/topics"> Topic github</a>, and we took the discussed <a href="https://github.com/jkarlin/topics/issues">issues</a> into account. We wanted to go through all the process without making it simpler than it already purposely is.</p><p>Technically, this simulation hasn’t been done on the fly on streaming data. We used a BigQuery snapshot of our Surfing History data between September 2021 and February 2022. The idea was to backtrack the simulation and run it over 6 months. For example this period on the French market represents 3,728,664,822 web visits, 163,853,950 web users and 40,019,697 URLs.</p><p>The topic sets returned after a web visit have been added to each record of the Surfing History database, thus replicating, or rather, <em>anticipating</em>, real world data we should obtain when the Google Topics API is launched.</p><h3>Topics Decoder Streamlit APP</h3><p>In the past four years, we, the Weborama R&amp;D Data Science Team, have started to build our own (Flask/Python) Web Apps. And that’s what we did to explore our new Surfing History table enriched by Google Topics. But we’ve deviated from our Flask technology habit to test the popular and simple<a href="https://docs.streamlit.io/"> Streamlit</a> open-source Python library, which perfectly fits our needs here — mainly having to display bar charts.</p><figure><img alt="Home Page of the App" src="https://cdn-images-1.medium.com/max/800/0*VIikYvSQ6R4aucRX" /><figcaption>Home Page of the App</figcaption></figure><p>The web app is quite simple. The user selects 1, 2 or 3 Google topics, which will be looked up in our Surfing History table. Bar charts of the most important elements characterizing the topic set are then displayed:</p><ul><li>Lemmas (e.g. what are the most representative words on web pages related to a user interested in Gardening?)</li><li>Topics <em>co-occurring</em> with the entered topic set (e.g. if a user is interested in Electric Cars, what are his or her other interests?)</li><li>Weborama Generic Taxonomy segments (we will describe what this is further)</li></ul><p>Let’s take the example of “Lemmas” to explain how our Topics Decoder works.</p><p>Once the user has selected the topic combination they wish to inspect (example: {“Books &amp; Literature”, “Food &amp; Drink”}), they indicate the period of the desired study (example: February 2022).</p><p>The decoder starts by retrieving from our Web Surfing History table visits occurring on web pages, in the specified period, where the simulated Topics API has returned a topic set containing all the topics entered by the user. Then it counts the occurrences of every lemma appearing in these web pages. Simply ranking the lemmas according to their frequency would be naive because very common lemmas (“be”, “do”, “have” …) will most of the time have much higher counts than specific lemmas (“house music”, “apple pie” …). To solve this we prefer to use an uplift metric, which has the same spirit and goal as <a href="https://scikit-learn.org/stable/modules/feature_extraction.html#tfidf-term-weighting">TFIDF</a> . We need to both calculate:</p><ul><li>counts of lemmas in the <strong>global </strong>surfing history table on the desired period</li><li>counts in the<strong> local</strong> table (the one obtained after filtering the global table on the topics requested by the users)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/532/0*1ii8zckA2UV3lyzz" /><figcaption>Uplift formula</figcaption></figure><p>We also propose a set of options to the user for refined results but it is out of the scope of this article. All in all we obtain the following bar charts showing most important lemmas characterizing the topic set in a <strong>Google Topics Web Surf context</strong> (another approach would be to directly use topic assignments to Web pages, which corresponds in fact to an option in the Topics decoder):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/705/0*NRaLRFcpWJE3srnD" /><figcaption>Uplift of top 10 lemmas for the topic set {“Books &amp; Literature” , “Food &amp; Drink”}</figcaption></figure><p>We notice that the top lemmas could match a “cooking blog” vocabulary, which seems to be well related with the topic set {“Books &amp; Literature” , “Food &amp; Drink”}.</p><p>We also check the topics that are co-occurring with the ({“Books &amp; Literature” , “Food &amp; Drink”}) topic set entered by the user, and display a bar chart for the most relevant co-occurring topic, as it could be very useful, for our clients, to discover hidden associations between topics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/0*94epNtxrR8oeEZnn" /><figcaption>Top co-occurring topics with the {“Books &amp; Literature”, “Food &amp; Drink”} topic set</figcaption></figure><p>Using this type of representation, we may sometimes confirm expectations: we see here that the “Home appliances” topic often co-occurs in user profiles with the {“Books &amp; Literature” , “Food &amp; Drink”} topic set, and this seems to make sense. But thanks to this view, we also find out that “Jobs &amp; Education”, appearing in the 5th position, is correlated with the input topic couple.</p><p>Let’s now introduce the Weborama Generic Taxonomy. In order to analyze web URLs and build audiences, Weborama has created and maintained for several years a Generic Taxonomy. The philosophy is quite similar to the one we have constructed based on Google’s approach. The main difference is that the Generic Taxonomy is very detailed and accurate while the one we have emulated regarding Google Topics has been calculated thanks to W2V recommendations without any human annotation. It becomes interesting for us to visualize the Weborama Generic Taxonomy clusters and how they relate to Google Topics, using Surfing History data, to see what this kind of mapping could look like. We hope this can bring extra insights and widen results previously obtained with co-occurring topics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/0*8k_L9O_17uFvce06" /><figcaption>Top Weborama Generic Taxonomy topics describing URLs linked to the {“Books &amp; Literature” , “Food &amp; Drink”} topic set</figcaption></figure><p>As expected, Topics related to foods appear on top. But now we know <em>what kind of food </em>specifically. Moreover this view is consistent with the “co-occurring Google topics” decoding described earlier: “Kitchen Appliances” pops up again. The Decoder used with the Weborama Generic Taxonomy reveals that the cluster “Laundry” is not far away.</p><p>In the following episodes, we will see:</p><ul><li>How content can be derived from the Decoder, leading to the creation of visual semantic insights.</li><li>How this content can be used as is, or extended via Lookalike algorithms, or even broken down into specific semantic segments allowing therefore a bridge between Topics — made in the first place for Behavioral Targeting — and Contextual Targeting.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9356502105ba" width="1" height="1" alt=""><hr><p><a href="https://medium.com/weborama/decoding-google-topics-9356502105ba">Decoding Google Topics (1/3)</a> was originally published in <a href="https://medium.com/weborama">Weborama</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>