<?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 Ankit Srivastava on Medium]]></title>
        <description><![CDATA[Stories by Ankit Srivastava on Medium]]></description>
        <link>https://medium.com/@ankitsriv?source=rss-fd66319385d3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*vT3mrU9OVpSQMq_7PSFiJA.jpeg</url>
            <title>Stories by Ankit Srivastava on Medium</title>
            <link>https://medium.com/@ankitsriv?source=rss-fd66319385d3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 04:14:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ankitsriv/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[Turning the dial down on AI hype]]></title>
            <link>https://medium.com/@ankitsriv/turning-the-dial-down-on-ai-hype-4d6de15a787b?source=rss-fd66319385d3------2</link>
            <guid isPermaLink="false">https://medium.com/p/4d6de15a787b</guid>
            <dc:creator><![CDATA[Ankit Srivastava]]></dc:creator>
            <pubDate>Wed, 05 Aug 2026 02:08:04 GMT</pubDate>
            <atom:updated>2026-08-05T06:36:17.545Z</atom:updated>
            <content:encoded><![CDATA[<p>The narrative on AI needs fixing. A lot of anxiety in the world gets induced and to an extent, the hype is necessary for sales but that’s about it.</p><p>Can AI help predict the next token — yes, thanks to the internet</p><p>Can AI reason — yes, to an extent</p><p>Can AI with access to tools perform actions — yes, to an extent</p><p>Can AI be governed and used responsibly — absolutely it must be</p><p>Human existence is not just about solving problems of the world. We are here for a purpose beyond solving problems. We have a very transient existence. We want to maximize the conditions in which we want to live — peace, freedom, leisure, relationships, health are what we attribute value to. We had a system of trading labor and knowledge to these things we value. The architecture was intentionally constrained to maximize value to few at cost of many. There is now a way to get past some of those constraints. We are having stockholm syndrome with the tasks we used to do to make this tradeoff — if machines can code now, they very well should be allowed to under good supervision. If business people want to extract value from AI, they should become trillionaires and deca-trillionaires if markets allow that value to them.</p><p>None of this is a problem. The problem is — lack of focus on limitations. We are being made to believe person X can’t have what they want because AI can do what they could in past. That narrative is worth challenging. What we should instead focus on — the limitation of living ~100 years. Time in the world is a true currency. The limitation of being physically in one place at one time — that is again a constraint. The limitation of non-renewable energy sources allowing us to trade, transport from one place to another. Limitation of potable water, good air to breathe. Limitations are causes of happiness — the limits makes us value what we have or can have.</p><p>We are so fickle that we can collectively attribute a billion plus views on a few minutes video. For a population like that, value is close to being arbitrary and that is why it is hard to ascertain what we value. It keeps changing — today we value item X, tomorrow it can be something Y. That arbitrariness is incredibly powerful. It comes from freedom of having an opinion. If in past 40 years, our opinion was knowing C++ is valuable, it was only because there was a constraint in knowing C++. There was again hype created in past to make C++ popular to learn. The exchange of value for cost will continue as long as there are limitations.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4d6de15a787b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using AI to thrive in economy]]></title>
            <link>https://medium.com/@ankitsriv/ai-as-an-employer-dfcae63a3d2b?source=rss-fd66319385d3------2</link>
            <guid isPermaLink="false">https://medium.com/p/dfcae63a3d2b</guid>
            <dc:creator><![CDATA[Ankit Srivastava]]></dc:creator>
            <pubDate>Fri, 21 Mar 2025 06:56:49 GMT</pubDate>
            <atom:updated>2025-03-21T06:57:56.599Z</atom:updated>
            <content:encoded><![CDATA[<p>It is always a good idea to focus on the edges of a graph compared to the nodes. Usage is the result of a recurring relationship (edge) between a user and a product/service.</p><p>When I was looking at community detection algorithms several years ago, this thought of looking at edges as nodes was a powerful one. Non-overlapping community detection was not as nuanced as overlapping community detection because non-overlapping community detection only assigned scalar membership while overlapping community detection was able to uncover various memberships for a single node. Same is the case in the world today where we tend to focus more on the entity nodes in a graph than on the relationships between the entities.</p><p>Whether it is humans or AI, they are entities in a graph interacting with each other deriving value from each other. There is a lot of talk around what happens when AI becomes very intelligent, and the intelligence surpasses that of humans across various benchmarks. Such comparisons are node level comparisons. We derive our identity from nodes but many a times we overlook the parts of our identity from the edges which are more crucial.</p><p>In below graph we have a simplistic worldview with 4 nodes and 9 edges. There are close to 8B humans, an estimate of 40B connected devices in coming decade, we are trending towards a single general purpose AI model and other species — 7.8M animal species and 300K plant species that we collectively can call life around us.</p><figure><img alt="Human AI interaction — sample graph" src="https://cdn-images-1.medium.com/max/1024/1*b7DppbgNK9fVCX4dVhNKTA.png" /><figcaption>Sample graph of connections between few entities</figcaption></figure><p>What happens when we turn edges to nodes in this graph. It looks like below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qXb-ufLOiGabXQ-oB7A25g.png" /><figcaption>Transformed graph with edges as nodes and relationships between them when there is a common link</figcaption></figure><p>For a large extent, we interacted with devices because devices provided us the ability to do more and become part of knowledge work economy. This led to immense proliferation of human device interactions since past 3 decades. Now with AI, the need for human-device interactions is becoming less. We are heading towards autonomy — whether it is at work, in transit (driving, travelling) or at home.</p><p><strong>What kind of economy will interactions with AI create that knowledge workers can become part of and thrive from?</strong></p><p>There is no doubt that we will have to pivot. Many knowledge workers are seeing the wave of AI disruption and trying to find how to adjust and embrace this change. Content creation has become its own economy. The question is what generates the next 100–200 million high paying and next 1 billion jobs for the existing and upcoming generations. If we assume a family of size 8, we need a billion jobs for 8B people to thrive for an extended period of time.</p><p>Just like 90% of the complexity of A/B testing is in the setup, 90% of complexity of generating a job for any individual is in the setup. Once a job is created, what do they do that is valuable to an organization for an extended period of time, let’s say 30 years. We have 250M organizations globally and ~100K large organizations. The gini coefficient of global economy has stayed above 0.6 for last 200 years.</p><p><strong>Can multi-agent AI workflows be the next entrepreneurs and your next employer?</strong></p><p>Taking risk and setting up an organization is not an easy endeavor. If the problem to solve for is job creation, what we should make AI learn is generation of a healthy and sustainable organization. If we train it on the problems in physical world and provide reliable agentic flows to register, generate an organization, setting up finances, legal work, marketing, HR, raising seed funds, that is a big set of initial work. If it fails at this step, there is not much to lose as the business is not even setup yet.</p><p>As business landscape changes, it adjusts and takes care of people it employs with human supervision. This is not an easy feat to accomplish but generating a sustainable and reliable job for everyone looks a good use of AI and agentic flows.</p><p>The cost of generating a stable organization using AI can be subsidized using government because it aligns to their goals of a thriving population and citizens would be ready to pay tax for such safety nets. These are all still just ideas and worth validating via prototypes.</p><p><strong>AI recursion</strong></p><p>If not every agentic workflow needs to be coded and agents can spawn new agentic workflows when needed, that is how we operate as well. We have reasoning capability, and we take actions needed. However, we don’t need to be prompted every time. We have a sense of purpose, and we execute based on that. AI needs similar capabilities.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dfcae63a3d2b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Generative AI will generate new jobs]]></title>
            <link>https://medium.com/@ankitsriv/generative-ai-will-generate-new-jobs-bc82a47f7ff5?source=rss-fd66319385d3------2</link>
            <guid isPermaLink="false">https://medium.com/p/bc82a47f7ff5</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[jobs]]></category>
            <dc:creator><![CDATA[Ankit Srivastava]]></dc:creator>
            <pubDate>Sat, 08 Apr 2023 02:57:31 GMT</pubDate>
            <atom:updated>2023-04-08T06:42:09.871Z</atom:updated>
            <content:encoded><![CDATA[<h3>Upcoming AI related jobs that’ll add enterprise value</h3><p>The landscape of large language models (LLMs) is expected to diversify into three categories:</p><ol><li>General-purpose LLMs, such as ChatGPT and its competitors, as well as their future iterations.</li><li>Industry-specific LLMs, custom-tailored to a certain industry like Finance, Healthcare</li><li>Device-specific LLMs, featuring hardware and LLM compression innovations for personalized applications.</li></ol><p>These advancements will generate an array of novel job opportunities, including:</p><ul><li>Enterprise product integrations: Organizations will integrate unique GPT-powered experiences within their products.</li><li>GPT Plugins: Extensions designed for general-purpose ChatGPT users.</li><li>Open Source Software (OSS) Tools: Solutions for language model tasks such as language chaining, prompt prediction, indexing, evaluation, and Responsible AI (RAI).</li><li>Architectural Improvements: Enhancements to LLMs for better control and reliability.</li><li>Multi-modal Applications: Progress in LLMs will involve both input and output in various formats, including images and videos.</li><li>Cost Optimization: Strategies for minimizing LLM utilization costs, potentially leveraging quantum computing.</li><li>AI for Good: Applying LLMs to address global challenges like health, agriculture, climate change, and education.</li><li>Management of Generative AI Models: Overseeing the development and deployment of AI models.</li><li>Wearable AI: Innovations in fitness and accessibility technology.</li><li>Migrations: Streamlining the transition of existing enterprise systems to AI-enabled platforms.</li><li>Security: Addressing new attack vectors using LLMs.</li><li>Base ML models building that feed into LLMs</li><li>Fact-checking: Ensuring the accuracy of AI-generated content as it grows in prevalence.</li><li>Last Mile Solutions: Automating proofreading, validation, editing, and execution of AI-generated drafts.</li><li>Generative Ads: Rethinking marketing strategies in the context of conversational interactions.</li></ul><p>As economic conditions fluctuate, organizations of all sizes rely on revenue growth. During downturns, enterprises naturally seek to maximize revenue with minimal costs. Consequently, the demand for AI-powered experiences within each organization will continue to surge. AI serves as a means of creating premium value and new revenue streams.</p><p>Existing revenue-generating operations that businesses rely on will not vanish overnight. The adoption of cloud technology, for example, took over a decade, with some companies still lagging. AI is in its infancy, and the opportunities it presents are immense and ever-expanding.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bc82a47f7ff5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Infinite Segmentation: Scalable Mutual Information Ranking on real world graphs]]></title>
            <link>https://medium.com/microsoft/infinite-segmentation-scalable-mutual-information-ranking-on-real-world-graphs-f4983ba81be3?source=rss-fd66319385d3------2</link>
            <guid isPermaLink="false">https://medium.com/p/f4983ba81be3</guid>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[graph]]></category>
            <category><![CDATA[segmentation]]></category>
            <dc:creator><![CDATA[Ankit Srivastava]]></dc:creator>
            <pubDate>Thu, 28 Mar 2019 00:23:38 GMT</pubDate>
            <atom:updated>2019-03-28T00:47:21.798Z</atom:updated>
            <content:encoded><![CDATA[<h3>Infinite Segmentation: Scalable Mutual Information Ranking on Real World Graphs</h3><h4>Ankit Srivastava, Joshua Allen, Ken Johnston, Microsoft</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/779/0*mfVt6R6ZzaO49krb" /></figure><h4>Abstract</h4><p><em>These days it’s not about normal growth, it’s about finding and driving hockey-stick levels of growth. Sales and marketing organizations are looking to AI to help growth hack their way to new markets and new segments. We have used Mutual Information (MI) Ranking for many years to help filter out noise and find the critical insights to new cohorts of users, devices, businesses, and networks and now we can do it at nearly infinite granularity across massive data sources and dimensions. In this paper, we will explain the problem space of fine grained segmentation and introduce an implementation of Mutual Information Ranking that works not just on binary partitions but can scale to real world graphs with billions of entities and millions of partitions leveraging Hadoop / Spark cluster computing frameworks. We shall showcase cross industry use cases of Mutual Information ranking in scenarios ranging from segmentation, feature engineering, newsfeed ranking, cohort validation, query expansion and link prediction.</em></p><h3>Introduction</h3><p>Random variables share information with each other. The amount of information shared between them is symmetric and can be computed via Mutual Information [1]. If you know the temperature is 90 degrees in a city like Seattle, you have information about what month of the year it might be. If the month is December, there is information about what temperature to expect in the city. We employed MI ranking in the past to distinguish devices used by teacher vs student, developer vs non-developer, and IT Professional vs non-IT professionals. This helps us make Windows better for the applications these key segments care about. The alternative is to develop labelled data for a custom ML model for each new segment which is expensive, time consuming, and many times not viable.</p><h4>1.1. Needs for segmentation</h4><p>Given a population of users for any product / service, segmentation is a fundamental need to learn about sub-populations of consumers and identify distinguishing patterns in which they interact with a product or service. These distinguishing patterns can then subsequently be fed into recommender systems, supervised learning classification, and regression models to assist personalization and deliver improved customer satisfaction. They can be fed into an organizations’ BI reports as inferred dimensions to help generate insights on growing and improving the services and overall market share.</p><h4>1.2. Identifying Blue Lakes</h4><p>There is an important marketing concept of identifying blue oceans [2] i.e. an entire segment where there is minimal competition and maximum opportunity to capture the market. Organizations are always on the lookout for such blue oceans. With pervasive nature of services and organizations in virtually all domains, it is hard to find such large blue oceans, however, it is possible to find small blue lakes i.e. sub-populations where focus of competitors is minimal and the ability for a company to deliver unique and differentiated value remains. Often these opportunities require rapid and timely identification and can allow for significant gains in market share. Highly scaled Mutual Information Ranking helps identify these blue lakes in a swift, highly repeatable, and privacy compliant way.</p><h4>1.3. Look-a-like modelling vs Seed Expansion</h4><p>Look-a-like modelling [3] is a popular advertising technique productized in many platforms like Facebook [4], Google Display Network [5] and Yandex [6]. Marketing teams use attributes available in the advertising platform to create cohorts that are like their current customers. using attributes available about the current customers. This technique is top down rules based where certain set of rules criterion helps filter down to the audience worth advertising to. Mutual Information (MI) ranking is a statistical approach which works bottom up by expanding on a set of seed entities like website hosted by the organization or set of search queries searched for on the web about an organization’s services. MI helps identify other websites / search queries that are distinguishing of the visitors of your organization’s websites / search queries. For example, visitors of microsoft.com are likely to visit azure.com, bing.com, msn.com and so on.</p><h3>Mutual Information</h3><p>Mutual Information of two discrete random variables X and Y can be defined as [1]:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/289/1*kezXuT-L3qQD3N4hTP1ZdA.png" /><figcaption>Equation I: Mutual Information Gain</figcaption></figure><p>where p(x, y) is the joint probability function of X and Y, and p(x) and p(y) are the marginal probability distribution of X and Y respectively. Mutual Information is a common measure of association used in machine learning applications, with one desirable property being that it is scale invariant, reducing the need for feature normalization.</p><h4>2.1. Data Format</h4><p>We can apply the above equation with input datasets stored in a cluster computing framework like Hadoop / Spark. The inputs are structured as two row sets — features and partitions. These are then passed through the Mutual Information Ranking implementation in Hive / PySpark to rank features by MI gain per partition.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/319/1*J66VcsAsQB-QACxnAhP9Fg.png" /><figcaption>Input Data Format required for Binary and N-ary MI Ranking</figcaption></figure><p>Features common in B2B can be any information carrying user intent like web page visit, search query, application used, network visited. Consumer features might be segmented using products purchased, music listened to, or locations visited. Partitions can be any categorical variable associated to the visitors like country they belong to, industry they work in, role they have in their organization. In the naïve binary scenario, partitions are binary as in Table IIA like visitor belongs to country X vs rest of population, works in specific industry Y vs rest of the industries, has a certain role in the organization Z or not.</p><h4>2.2. Algorithm</h4><p>The binary case is just a special case of N-ary MI with N partitions. Table III lists the steps to implement it in a scalable map-reduce environment given the row sets available to us in Table IIB.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/352/1*rK647e9pjwrh4REcMj6DuA.png" /><figcaption>Table III: N-ary Mutual Information Ranking Psuedocode</figcaption></figure><p>To calculate information gain, ‘CalcBinaryMI’ makes 4 calls to ‘CalcSingleMI’ and sums the results –</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/352/1*IxB976l8zW-nfVojPbyAVw.png" /><figcaption>Equation II: Mutual Information Gain Per Feature And Partition Label</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/199/1*FCT45NPTMJrBamjK-F2e2g.png" /><figcaption>Equation III: Direction of Association of Feature ‘x’ towards Partition Label ‘y’ denoted by a Boolean value ‘tip’</figcaption></figure><h4>2.3. Results</h4><p>The MI implementation in PySpark returns a result row set that contains all the intermediate probabilities and final information gain and tip columns as per Table III. The way we interpret the results is that the features who are ranked with high information gain are the ones whose presence or absence is very distinguishing of that label. Many times, we are interested only in positive association. For example, when we ran MI ranking on a sample of 5K StackOverflow posts subset to 3 arbitrarily chosen tags — “ml”, “iot” and “neo4j”, we found the most distinguishing unigrams for the 3 labels are ones whose presence is indicative that the post is related to that tag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/321/1*BSbclpDOb7J5CETM81hsdA.png" /><figcaption>Table IV: Distinguishing Unigrams per 3 StackOverflow Tags</figcaption></figure><p>Table IV shows that the top unigram is the same as the tag name itself like in the case of “iot” and “neo4j”. But “ml” being an abbreviation of “machine learning” has “learning” show up just below “training”. If we build a multi-class classifier to predict these classes using unigrams as predictors, unigrams in Table IV shall rank highest in feature importance. So, we look at Mutual Information ranking as a scalable way to compute feature importance per label without need for building the entire classifier. It can easily scale to terabyte and petabyte scale graphs within minutes. In later sections, we shall demonstrate use of MI ranking on unsupervised, semi-supervised and positive-unlabelled (PU) learning problems.</p><h3>Mutual Information Ranking Implementation in PySpark</h3><p>Below is our implementation of Scalable Mutual Information Ranking in PySpark run on <a href="https://docs.microsoft.com/en-us/azure/azure-databricks/what-is-azure-databricks?WT.mc_id=azuremedium-blog-brborges">Azure DataBricks</a> environment —</p><h4>3.1. User Defined Functions</h4><pre>import math<br>def CalcSingleMI(pr_x, pr_y, pr_xy):<br>  if(pr_xy / (pr_x * pr_y) &gt; 0):<br>    return pr_xy * math.log(pr_xy / (pr_x * pr_y))<br>  else:<br>    return 0<br>spark.udf.register(&quot;CalcSingleMI&quot;, CalcSingleMI, DoubleType())</pre><pre>def CalcBinaryMI(pr_x, pr_y, pr_xy):<br>  pr_notx = 1 - pr_x<br>  pr_noty = 1 - pr_y<br>  pr_xnoty = pr_x - pr_xy<br>  pr_notxy = pr_y - pr_xy<br>  pr_notxnoty = 1 - pr_xy - pr_xnoty - pr_notxy<br>  return CalcSingleMI(pr_x, pr_y, pr_xy) +\<br>                    CalcSingleMI(pr_x, pr_noty, pr_xnoty) +\<br>                    CalcSingleMI(pr_notx, pr_y, pr_notxy) +\<br>                    CalcSingleMI(pr_notx, pr_noty, pr_notxnoty)<br>spark.udf.register(&quot;CalcBinaryMI&quot;, CalcBinaryMI, DoubleType())</pre><h4>3.2. MI Implementation</h4><pre>from pyspark.sql.types import DoubleType<br>import pyspark.sql.functions as func</pre><pre># Create a view or table<br>partitionlabels = partitionlabels.selectExpr(&quot;Id&quot;, &quot;LabelId&quot;, &quot;LabelName&quot;)<br>featureData = featureusage.selectExpr(&quot;Id&quot;, &quot;Feature&quot;, &quot;Observation&quot;)<br>featureData = featureData.withColumn(&quot;Observation&quot;, featureData[&quot;Observation&quot;].cast(&quot;double&quot;))<br>featureData = featureData.filter(featureData.Observation &gt; 0.5)<br>featureData.createOrReplaceTempView( &quot;FeatureData&quot;)<br>partitionlabels.createOrReplaceTempView(&quot;PartitionLabels&quot;)</pre><pre>all = sqlContext.sql(&quot;SELECT FeatureData.Id,\<br>               FeatureData.Feature,\<br>               FeatureData.Observation,\<br>               PartitionLabels.LabelId,\<br>               PartitionLabels.LabelName\<br>        FROM FeatureData\<br>    INNER JOIN PartitionLabels\<br>    ON FeatureData.Id == PartitionLabels.Id\<br>    WHERE Observation &gt; 0&quot;)</pre><pre>per_user = spark.sql(&quot;SELECT Id,\<br>               SUM(Observation) AS UserSum\<br>        FROM all\<br>        GROUP BY Id&quot;)<br>per_user.createOrReplaceTempView(&quot;per_user&quot;)</pre><pre>#  Normalize it<br>all = spark.sql(&quot;SELECT all.Id,\<br>               all.Feature,\<br>               Observation /UserSum * 100.0 AS Observation,\<br>               LabelId,\<br>               LabelName\<br>        FROM all\<br>        INNER JOIN per_user\<br>        ON all.Id == per_user.Id&quot;)<br>all.createOrReplaceTempView(&quot;all&quot;)</pre><pre>n = spark.sql(&quot;select 1 AS key,\<br>               sum(Observation) AS n\<br>        from all&quot;)<br>n.createOrReplaceTempView(&quot;n&quot;)</pre><pre># P(X)<br>p_x = spark.sql(&quot;select Feature,\<br>               SUM(Observation) AS Observation\<br>        from all\<br>        group by Feature&quot;)<br>p_x.createOrReplaceTempView(&quot;p_x&quot;)</pre><pre>p_x = spark.sql(&quot;select 1 AS key,\<br>                       * from p_x&quot;)<br>p_x.createOrReplaceTempView(&quot;p_x&quot;)</pre><pre>p_x = spark.sql(&quot;select p_x.*,\<br>               n.n\<br>        from p_x\<br>        inner join n\<br>        on p_x.key == n.key&quot;)<br>p_x.createOrReplaceTempView(&quot;p_x&quot;)</pre><pre>p_x = spark.sql(&quot;select key,\<br>               Feature,\<br>               Observation/n AS p_x\<br>        from p_x&quot;)<br>p_x.createOrReplaceTempView(&quot;p_x&quot;)</pre><pre># P(X,Y)<br>p_xy = spark.sql(&quot;SELECT LabelId,\<br>               LabelName,\<br>               Feature,\<br>               Observation\<br>        FROM all&quot;)<br>p_xy.createOrReplaceTempView(&quot;p_xy&quot;)</pre><pre>p_xy = spark.sql(&quot;SELECT LabelId,\<br>               LabelName,\<br>               Feature,\<br>               SUM(Observation) AS Observation\<br>        FROM p_xy\<br>        GROUP BY LabelId, LabelName, Feature&quot;)<br>p_xy.createOrReplaceTempView(&quot;p_xy&quot;)</pre><pre>p_xy = spark.sql(&quot;select 1 AS key,\<br>                       *\<br>        from p_xy&quot;)<br>p_xy.createOrReplaceTempView(&quot;p_xy&quot;)</pre><pre>p_xy = spark.sql(&quot;SELECT p_xy.*,\<br>               n.n\<br>        FROM p_xy\<br>        INNER JOIN n\<br>        ON p_xy.key == n.key&quot;)<br>p_xy.createOrReplaceTempView(&quot;p_xy&quot;)</pre><pre>p_xy = spark.sql(&quot;SELECT key,\<br>               LabelId,\<br>               LabelName,\<br>               Feature,\<br>               Observation/n AS p_xy\<br>        FROM p_xy&quot;)<br>p_xy.createOrReplaceTempView(&quot;p_xy&quot;)</pre><pre># P(Y)<br>p_y = spark.sql(&quot;SELECT 1 AS key,\<br>               LabelId,\<br>               LabelName,\<br>               SUM(Observation) AS Observation\<br>        FROM all\<br>        GROUP BY LabelId, LabelName&quot;)<br>p_y.createOrReplaceTempView(&quot;p_y&quot;)</pre><pre>p_y = spark.sql(&quot;SELECT p_y.key,\<br>               LabelId,\<br>               LabelName,\<br>               p_y.Observation /n.n AS p_y\<br>        FROM p_y\<br>        INNER JOIN n\<br>        ON p_y.key == n.key&quot;)<br>p_y.createOrReplaceTempView(&quot;p_y&quot;)</pre><pre># Combined<br>mi = spark.sql(&quot;SELECT p_xy.LabelId,\<br>               p_xy.LabelName,\<br>               p_xy.Feature,\<br>               p_x,\<br>               p_y,\<br>               p_xy\<br>        FROM p_xy\<br>        INNER JOIN p_x\<br>        ON p_xy.Feature == p_x.Feature\<br>        INNER JOIN p_y\<br>        ON p_xy.LabelId == p_y.LabelId&quot;)<br>mi.createOrReplaceTempView(&quot;mi&quot;)</pre><pre>mi = spark.sql(&quot;SELECT LabelId,\<br>               LabelName,\<br>               Feature,\<br>               p_x,\<br>               p_y,\<br>               p_xy,\<br>               CalcBinaryMI(p_x, p_y, p_xy) AS mi\<br>               FROM mi&quot;)<br>mi.createOrReplaceTempView(&quot;mi&quot;)</pre><pre>ordered_mi = spark.sql(&quot;SELECT LabelId,\<br>               LabelName,\<br>               Feature,\<br>               p_x,\<br>               p_y,\<br>               p_xy,\<br>               mi\<br>        FROM mi\<br>        ORDER BY mi DESC&quot;)<br>ordered_mi.createOrReplaceTempView(&quot;ordered_mi&quot;)</pre><pre># Direction<br>ordered_mi = spark.sql(&quot;SELECT *,\<br>               (p_x - p_xy) AS pxminusy,\<br>               (p_xy/p_y) AS x\<br>        FROM ordered_mi&quot;)<br>ordered_mi.createOrReplaceTempView(&quot;ordered_mi&quot;)</pre><pre>ordered_mi = spark.sql(&quot;SELECT *,\<br>               y&gt;x AS tip\<br>        FROM ordered_mi&quot;)<br>ordered_mi.createOrReplaceTempView(&quot;ordered_mi&quot;)</pre><pre># Positive Association to label<br>%sql<br>select LabelId, LabelName, Feature, mi, tip from ordered_mi WHERE tip == false</pre><h3>Applications of Mutual Information Ranking</h3><h4>4.1. Segmentation without labels</h4><p>One of early applications we applied MI ranking was to an ask where we were about to release Windows 10S. Educators wanted a locked down experience for the devices owned by students with good security and manageability of applications that could be installed on the devices. Therefore, Win10S only supported apps in the Microsoft Store. The ask was to find which Win32 applications are used predominantly by teachers and students but not by rest of population. We wanted to make sure such Win32 applications are available in the Microsoft Store. However, there was no easy way to get labels for teacher and student devices in Windows 10 K-12 US install base.</p><p>From domain knowledge, we knew ‘Smart Ink’ was a popular Win32 application used for digitizing the markerboard heavily used by teacher devices but not on student devices. Using that as a seed application, we identified a cohort of US K-12 devices that had opted in for Full diagnostic data and Tailored experiences. We then categorized devices using ‘Smart Ink’ in one category and the rest of K-12 US devices population in second category. MI ranking helped us identify other such applications that were distinguishing of teacher devices vs student / admin devices.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/473/1*oHjNNMPARwV6XPDilC6t4g.png" /><figcaption>Example of Binary MI: Distinguishing Teacher vs Student Apps</figcaption></figure><p>This helped expand the cohort from just initial seed app we began with to then identify hundreds of applications that have high information gain in distinguishing teachers’ and students’ devices and thus let us building a segment of teacher and student devices. We also gained insight about student devices’ browser apps being locked down by applications like “lockdownbrowser.exe” for purposes of student testing. Instead of MI ranking, if we had just gone with top apps used, the browser apps would come up on top. But they do not have high information gain between teacher and student/admin devices.</p><h4>4.2. Multi-Class Classification at scale</h4><p>For Edge browser, website compatibility is a big focus area. We used sampled anonymized webpage visit logs per country from devices opted into collecting full diagnostic data. There are a lot of top websites that get visited by users across countries. To understand country specific compatibility needs, we applied MI ranking to understand websites predominantly visited by users of a specific country but not by others. MI ranking in a single run was able to identify top distinguishing websites for each of the 200+ countries. We pick 3 arbitrary countries from the per country results and showcase top distinguishing websites for them in Table VI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/521/1*ProXgC5thuv-emtiqwDH_Q.png" /><figcaption>Example of scalable MI: Distinguishing websites per Country</figcaption></figure><p>We found that telecom / ISP websites, national banks, government websites, regional sports, entertainment, news, search engines with geolocation prefixes/suffixes are distinguishing of the visitor’s geography.</p><h4>4.3. Cohort Validation</h4><p>A similar application of MI ranking was to validate a cohort of IT professionals and non-IT professionals who provided us their roles by filling our surveys or enrolling in our newsletters and opted into collecting full diagnostic data. Survey data suffers from self-enrolment biases. MI ranking helped identify if there were distinguishing patterns of application usage between the two cohorts of users on Microsoft Apps. We can clearly see distinguishing patterns of use and the labels being of sufficient quality to use for building a classifier in Table VII.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/517/1*p8mV-bNH0Kuam7e19OHQfg.png" /><figcaption>Example of Cohort Validation: IT Pro vs non-IT Pro Survey Validation using Microsoft Apps</figcaption></figure><h4>4.4. Query Expansion</h4><p>One of the key functions of marketing is to buy keywords on search engines. Often this is done with some basic analysis of query volumes and click through rates on competitors ads. This creates a bidding war over a small set of fairly generalized keywords. MI allows us to identify even more distinguishing keywords and often those will have a lower bid threshold CPC (Cost per Click). We had a similar need for understanding IoT enthusiasts who query on Bing search engine. <a href="https://azure.microsoft.com/?WT.mc_id=azuremedium-blog-brborges">Azure</a> offers a suite of IoT services. So, we started with a seed query of “azure iot” and applied MI ranking to find queries distinguishing of visitors who search for “azure iot” in a time span of 28 days.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/517/1*yuFRdOteIyRe3rVtBPlpVA.png" /><figcaption>Example of Query Expansion: Finding <a href="https://azure.microsoft.com/overview/iot/?WT.mc_id=azuremedium-blog-brborges">Azure IoT</a> enthusiast queries</figcaption></figure><p>From just a seed query with thousands of visitors, in just hours of processing and a few days of analysis we were able to derive a breadth of related search queries that are distinguishing of IoT enthusiasts and from there build a target audience that is suitable for ads around our service offering.</p><h4>4.5. Link Prediction</h4><p>In the StackOverflow posts example in Section 2.3, we showed that we could link unigrams that are distinguishing of certain tags. In a graph with a set of known linkages, information gain can help with weighted link prediction and establish graph triangles. Graph triangles help in ego-net splitting and overlapping community detection algorithms [8].</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/462/1*iGjy5iTWrzrZIgFIKALPtA.png" /><figcaption>Example of link prediction using MI Ranking</figcaption></figure><h4>4.6. Newsfeed Ranking and Anomaly Detection</h4><p>For business reporting, we track hundreds of metrics across our products and services across thousands of dimensions. Metrics change month over month and current dashboards hardcode the trends around some key metrics. But those are not necessarily the best ones with high information gain to look at. We developed a new ranked list of metric changes per dimension vector (per segment, country) sorted by information gain. If someone wanted to filter down to a specific set of dimensions, for example focus on highly informative metric changes in commercial segment in US, they could do so. Such a ranked list of metric changes also helps identify anomalous changes that might be caused by errors in data transformation.</p><h3>Symmetric Mutual Information</h3><p>Mutual Information gain between two random variables is symmetric i.e.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/368/1*5M7hO-XKDIkY_x-vFI-NJw.png" /></figure><p>where X and Y are two random variables.</p><p>So, we can reverse MI results from distinguishing feature per partition to distinguishing partitions per feature. This is of interest where we want to find specific segments where a given feature, for example a specific application is used as a distinguishing application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/513/1*W35V_83B_VtO-hTqM11i4w.png" /><figcaption>Example of reversing MI results to find distinguishing partitions per feature</figcaption></figure><p>We can see in Table IX that many entities are only distinguishing of a single segment (built for that segment) like Minecraft for Education is used as a distinguishing app in K-12 segment. Some entities are distinguishing of more than 1 segment. The feature or application might be used across all segments but some leverage it significantly more than others. For example, given the collaborative nature of industries like Partner Professional Services, Media, Telecommunications and Technology, Microsoft Teams is distinguishing app within those segments.</p><p>MI ranking works best when at least one of the sides of comparison is not too high-dimensional. For example, it’s fine to have billions of web sites compared with thousands of segments but comparing billions of entities on one side with billions of partitions on the other side will not perform well.</p><h3>N-Fold Mutual Information Ranking</h3><p>In certain applications, looking at one entity type is not enough. For example, to build a propensity model on which organizations are likely to purchase a service, there’s a need to tap into various customer touch points like Bing Search results, Microsoft marketing documentation visits, and Microsoft service subscriptions. So, we built a methodology to apply 2-fold MI.</p><p>Step 1: Start with seed entities on each entity type (doc visits, search queries, services) and expand the list of distinguishing entities.</p><p>Step 2: Cluster the distinguishing entities across entity types as a binary segment (positive or negative association to the offering for which we build the propensity model). We can link the entity to segments to now find distinguishing segments that have high positive association to entities that are in turn distinguishing of seed entities we pass in.</p><p>This process is illustrated in Fig 2. and the steps can be alternated repeatedly to expand the number of associated entities discovered.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/335/1*nKQVA1ESDThThrXgrOj-Nw.png" /><figcaption>Process Illustration of N-fold MI</figcaption></figure><h3>Mutual Information Cut-Off</h3><p>In the example mentioned in Section 4.2, we plot the MI gain from top distinguishing websites per country. We find that MI gain is disproportionate across partitions. For example, MSN with US suffix is more predictive that the visitor is from US (as the browser has already resolved the page to return using the visitor’s geolocation) compared to a travel website like IRCTC is for visitors from India. Visitors could be booking travel from another country for their connections in India.</p><p>MI gain ranked results follow a long tail distribution. There’s a need for MI cut-off after which the gain is not high enough for it to be considered a distinguishing feature. We can do label shuffling [9] and then set a false discovery rate (for example 0.01%) to get the row number after which MI gain is insignificant. Monte Carlo [10] is another common way to set false discovery rate. It’s sometimes more convenient to do label shuffling in our context because we can just re-run the analysis on the cluster.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/323/1*NvLXqz907BFDpbemNYNkeQ.png" /><figcaption>MI Ranking Cutoff</figcaption></figure><p>We recommend a sample size of at least 1,000 Ids per partition to keep a low false discovery rate.</p><h3>Conclusion</h3><p>We demonstrated a scalable implementation of Mutual Information Ranking that can be ported in any cluster computing framework. We then applied the implementation in a diverse range of problems and demonstrated sample results. We extended Mutual Information ranking to more than binary partitions and beyond single step. As future work, this can be leveraged as an operationalized library for use in commercial applications and on large-scale graphs.</p><p>Leveraging such a ranking algorithm at scale has potential for abuse. We have implemented data protection guidance and policies in place to help prevent that in compliance with GDPR [11] and other regulations. These include limited retention and expungement, delete processors, aggregation to prevent re-identification. Each use case scenario where MI ranking is leverage is reviewed by privacy team to ensure use is within policy. Such data protection measures and policies are imperative to prevent abuse and ensure compliance.</p><h4>Acknowledgment</h4><p>We would like to thank Core Data Engineering team in Azure COSINE who helped us setup the Azure Databricks environment. We work with a lot of partner teams within Microsoft and their collaboration have helped us immensely in developing and applying this methodology on a wide range of business problems.</p><h4>References</h4><p>[1] Cover, T.M.; Thomas, J.A. (1991). <em>Elements of Information Theory (Wiley ed.).</em> ISBN 978–0–471–24195–9.</p><p>[2] Kim, W. C., &amp; Mauborgne, R. (2005). <em>Blue ocean strategy: how to create uncontested market space and make the competition irrelevant</em>. Boston, Mass, Harvard Business School Press.</p><p>[3] Pai D., Sharang A., Yadagiri M.M., Agrawal S. (2014) <em>Modelling Visit Similarity Using Click-Stream Data: A Supervised Approach.</em> In: Benatallah B., Bestavros A., Manolopoulos Y., Vakali A., Zhang Y. (eds) Web Information Systems Engineering — WISE 2014. WISE 2014. Lecture Notes in Computer Science, vol 8786. Springer, Cham</p><p>[4] Yu D., Houg A. (2014) <em>Facebook Analytics, Advertising, and Marketing. In: Facebook Nation.</em> Springer, New York, NY</p><p>[5] Ruohonen, Anna-Aleksandra. (2018) <em>“Planning and running an internet marketing campaign: case SockAdore. com.”</em></p><p>[6] Baker, S. and Baker, K., (1995). <em>Desktop Direct Marketing: How to Use Up-to-the-minute Technologies to Find and Reach New Customers</em>. New York, NY: McGraw-Hill.</p><p>[7] Arnab Sinha, Zhihong Shen, Yang Song, Hao Ma, Darrin Eide, Bo-June (Paul) Hsu, and Kuansan Wang. 2015. An Overview of Microsoft Academic Service (MA) and Applications. In Proceedings of the 24th International Conference on World Wide Web (WWW ’15 Companion). ACM, New York, NY, USA, 243–246. DOI=http://dx.doi.org/10.1145/2740908.2742839</p><p>[8] Epasto, Alessandro, Silvio Lattanzi, and Renato Paes Leme. <em>“Ego-Splitting Framework: from Non-Overlapping to Overlapping Clusters.”</em> Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. ACM, 2017.</p><p>[9] Kim, Seoung Bum, et al. <em>“Controlling the false discovery rate for feature selection in high‐resolution NMR Spectra.”</em> Statistical Analysis and Data Mining: The ASA Data Science Journal 1.2 (2008): 57–66.</p><p>[10] Lin, D. Y. <em>“An efficient Monte Carlo approach to assessing statistical significance in genomic studies.”</em> Bioinformatics 21.6 (2004): 781–787.</p><p>[11] Voigt, Paul, and Axel Von dem Bussche. <em>“The EU General Data Protection Regulation (GDPR).”</em> A Practical Guide, 1st Ed., Cham: Springer International Publishing (2017).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f4983ba81be3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/microsoft/infinite-segmentation-scalable-mutual-information-ranking-on-real-world-graphs-f4983ba81be3">Infinite Segmentation: Scalable Mutual Information Ranking on real world graphs</a> was originally published in <a href="https://medium.com/microsoft">Microsoft</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>