<?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 Surabhi Mathur on Medium]]></title>
        <description><![CDATA[Stories by Surabhi Mathur on Medium]]></description>
        <link>https://medium.com/@sur.mathur?source=rss-90928d59b104------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*1_iKSOi-JyeQgdymvfzFOA@2x.jpeg</url>
            <title>Stories by Surabhi Mathur on Medium</title>
            <link>https://medium.com/@sur.mathur?source=rss-90928d59b104------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 14:58:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sur.mathur/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[CHIrP.CHIrP — “THE FLIGHT OF SEMICONDUCTOR TECHNOLOGY”]]></title>
            <link>https://medium.com/@sur.mathur/chirp-chirp-the-flight-of-semiconductor-technology-20e2c3280b53?source=rss-90928d59b104------2</link>
            <guid isPermaLink="false">https://medium.com/p/20e2c3280b53</guid>
            <category><![CDATA[semiconductors]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[nvidia]]></category>
            <dc:creator><![CDATA[Surabhi Mathur]]></dc:creator>
            <pubDate>Sun, 10 Dec 2023 18:02:36 GMT</pubDate>
            <atom:updated>2023-12-23T13:50:23.795Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>“THE FLIGHT OF SEMICONDUCTOR TECHNOLOGY”</strong></h3><figure><img alt="Created through wombo dream AI illustrator" src="https://cdn-images-1.medium.com/max/960/1*iGEG7LIgXU-iWUmW0ASXAw.jpeg" /></figure><p>This article contains following topics: <br>“<strong><em>Moore’s Law”, “The Basics (of Semiconductor technology)”, “Chip Designing — By AI For AI”, “Fabs &amp; Top Chips manufacturing companies”, “SuperComputing”, “Chips Regulations”</em></strong>.</p><h3>MOORE’S LAW</h3><p><strong>Gordon Moore</strong> was born on January 3, 1929, in San Francisco, California. He earned a Bachelor’s degree in Chemistry from the University of California, Berkeley, and a Ph.D. in Chemistry and Physics from the California Institute of Technology (Caltech). In 1968, along with Robert Noyce, Moore co-founded <strong>Intel Corporation</strong>, which went on to become one of the most influential and successful companies in the semiconductor industry. Intel played a pivotal role in the development of the microprocessor, a key component in modern computers.</p><p>Moore’s Law, articulated in a 1965 paper, reflects his insightful understanding of the <strong>trajectory of semiconductor technology</strong>. His philosophy on technology advancement and the regular doubling of transistor density became a <strong>driving force</strong> for the entire industry, shaping the way engineers approached <strong>chip design and manufacturing</strong>.</p><blockquote>“ Moore’s formulation was that the density of transistors on an integrated circuit <strong>doubles</strong> every 18 months which means Computers can improve by a factor of 100 in 10 years. It’s like the evolution of living things. Tiny changes aggregate into eventually massive changes, different species even, using ‘order of magnitude’ to imply a change so great that it requires new thought processes.…<strong>It’s not simply more, it’s different.</strong>”</blockquote><blockquote>— Excerpts from an article in ‘The Wired — How Pixar Used Moore’s Law to Predict the Future<strong>’</strong></blockquote><h3>THE BASICS</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JcyYZd-yLDytZurl" /><figcaption>Photo by <a href="https://unsplash.com/@bermixstudio?utm_source=medium&amp;utm_medium=referral">Bermix Studio</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>A <strong>Semiconductor</strong> can be defined as a material that has the characteristics and ability to conduct a small amount of electrical current. <strong>Its properties lie between those of conductors and insulators</strong>. Unlike conductors (e.g., metals) that allow easy flow of electricity and insulators (e.g., rubber) that resist the flow, semiconductors can be <em>controlled to conduct or resist electricity based on external conditions</em>.</p><p><strong><em>Silicon</em></strong> is the most widely used semiconductor material. Few other materials used in making semiconductor are <em>germanium, gallium arsenide, </em>and <em>silicon carbide</em>.</p><blockquote><strong>Atomic Structure and Band Gap:<br></strong>Semiconductors have a crystalline atomic structure. The “<strong>band gap</strong>” is the energy difference between the valence band and the conduction band.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/413/1*UYBN-xcS2j7jeCz_6BSBBw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/413/1*Kng8ixs96C8NRLMhd8rKkA.png" /></figure><blockquote><strong>Doping:<br></strong>Doping involves intentionally introducing <strong>impurities</strong> into the semiconductor crystal to <strong>alter its electrical properties</strong>. Adding small amounts of other elements, like <strong>phosphorus</strong> or <strong>boron</strong>, can increase the number of charge carriers (electrons or holes) and make the material more conductive or resistive. Doping creates <strong>N-type </strong>(extra electrons) and <strong>P-type</strong> (holes for electrons) semiconductors. This distinction is crucial for electronic devices.</blockquote><blockquote><strong>Semiconductor Devices:<br></strong>Semiconductor devices include diodes (allow current flow in one direction) and transistors (act as switches or amplifiers). Transistors are fundamental to integrated circuits, forming the basis of electronic devices and follow the trend of miniaturization. <strong>Integrated circuits (ICs) </strong>combine multiple semiconductor components on a single chip. These chips, also known as <strong>microchips</strong>, form the basis of electronic devices like computers and smartphones. The miniaturization of components on ICs follows Moore’s Law.</blockquote><blockquote><strong>Fabrication Process:</strong><br>The fabrication involves processes like <strong>lithography </strong>and <strong>deposition</strong> to create intricate circuits on <strong>silicon wafers</strong>.</blockquote><blockquote><strong>Scaling and Miniaturization:</strong><br>Scaling refers to the continuous reduction in the size of transistors. This enhances performance, reduces power consumption, and aligns with Moore’s Law.</blockquote><p>(R<em>eferences / Further Reading: </em><a href="https://www.shindengen.com/products/semi/column/basic/semi/semi_basic.html"><em>https://www.shindengen.com/products/semi/column/basic/semi/semi_basic.html</em></a><em> , </em><a href="https://resources.pcb.cadence.com/blog/2023-ic-fabrication-process-flow-chart"><em>https://resources.pcb.cadence.com/blog/2023-ic-fabrication-process-flow-chart</em></a>)</p><h3>CHIP DESIGN: By AI For AI</h3><p>Jensen Huang (Co-founder NVIDIA), in his latest interview with New York Times said that —</p><blockquote><strong>“Any of the current </strong><a href="https://www.nvidia.com/en-in/data-center/dgx-h100/"><strong>DGX H100</strong></a><strong> NVIDIA chips won’t be possible without AI designing them in order to fit in as many number of transistsors in the chip and optimize the algorithms”</strong></blockquote><p>Traditionally, human engineers meticulously crafted the architecture of chips, optimizing for performance, power consumption, and space constraints. As AI algorithms become increasingly sophisticated, their application now extends beyond software to the very hardware that powers them. The concept of ‘Chip Design — By AI for AI’ represents a groundbreaking synergy where <strong>artificial intelligence is not just a user but an active contributor to the design process</strong>.<br>Machine learning algorithms analyze vast datasets to identify optimal configurations, pushing the boundaries of what’s achievable in chip architecture.<br>This symbiotic relationship not only shapes the future of AI-centric applications but also marks a paradigm shift in how we conceive and craft the very tools driving technological progress.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/994/1*n1lHCwkYjHoSnHS8Q0JcAg.jpeg" /></figure><p><em>(References / Further Reading:<br> </em><a href="https://www.nvidia.com/en-in/data-center/dgx-h100/"><em>NVIDIA DGX H100 — The gold standard for AI infrastructure</em></a><em> , <br></em><a href="https://www.youtube.com/watch?v=Pkj-BLHs6dE&amp;t=152s"><em>Jensen Huang of Nvidia on the Future of A.I. | DealBook Summit 2023</em></a><em> , <br></em><a href="https://research.nvidia.com/publication/2020-09_accelerating-chip-design-machine-learning"><em>NVIDIA Research — Accelerating Chip Design with Machine Learning</em></a><em>,<br></em><a href="https://www.youtube.com/watch?v=zR9IusOpEzk"><em>Google’s Chip Designing AI</em></a><em>)</em></p><h3>FABS &amp; TOP SEMICONDUCTOR CHIP MANUFACTURING COMPANIES</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/283/1*6-TuWT_lfWvy_5w5r-jk4w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*F_h94O1h72oGbx1CuT0eyw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/370/1*FDQnWx2rTR1-2IOT584GIA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/276/1*FMB0dkgRyB1rVN--iu_5Ng.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*Hv_uKQdxtHxNBNlfho9oDQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*kzn_lCQ5CvtWfYa5XooA3A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/346/1*jTXm1f6txcpGogx2AR5Bcw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/262/1*vgCypf0R_gocxdqkEoGblA.png" /></figure><p><strong>Fabs: <br></strong>Behind the scenes of semiconductor innovation lies the critical role of Semiconductor Fabrication Facilities, commonly known as Fabs. These are <strong>advanced manufacturing plants</strong> where the intricate process of creating semiconductor devices unfolds. Fabs are equipped with cutting-edge technology for the fabrication of chips, involving processes like photolithography, deposition, and etching.</p><blockquote>The significance of Fabs in the semiconductor ecosystem is immense.</blockquote><p>Top Semiconductor Manufacturing companies of 2023 are,</p><ul><li><strong>Taiwan Semiconductor Manufacturing Company (TSMC) — </strong>Taiwan</li><li><strong>Intel Corporation — </strong>United States</li><li><strong>Nvidia Corporation — </strong>United States</li><li><strong>Qualcomm Incorporated — </strong>United States</li><li><strong>Broadcom Inc — </strong>United States</li><li><strong>AMD Inc — </strong>United States</li><li><strong>Texas Instruments Incorporated — </strong>United States</li><li><strong>SK hynix Inc — </strong>South Korea</li><li><strong>Micron Technology Inc (MU) —</strong> United States</li><li><strong>MediaTek Inc —</strong> Taiwan</li><li><strong>Samsung Electronics —</strong> South Korea</li><li><strong>ASML —</strong> Netherlands</li></ul><p>During the <strong>2021 chip shortage</strong>, the world realised that chip supply chains have heavy <a href="https://techwireasia.com/2021/03/drought-hits-taiwan-drive-to-plug-global-chip-shortage/">r</a>eliance on Taiwan and South Korea, with APAC being the largest consumer market also. The U.S Government has since pledged a tech funding of US$52 billion for US chip production.</p><p><em>(References / Further Reading:<br></em><a href="https://www.statista.com/chart/30041/global-semiconductor-wafer-fabrication-capacity-by-type-and-location/"><em>https://www.statista.com/chart/30041/global-semiconductor-wafer-fabrication-capacity-by-type-and-location/</em></a><em> )</em></p><h3>SUPERCOMPUTING</h3><blockquote>Supercomputing is a form of high-performance computing that determines or calculates using a powerful computer, a supercomputer, reducing overall time to solution. — IBM</blockquote><p><strong>NVIDIA DGX H100/H200:</strong><br>NVIDIA’s next-generation of AI supercomputer chips are significantly more efficient for large language models (LLMs) like — OpenAI’s GPT-4, Meta’s Llama.</p><p>DGX weights 70 pounds, has 35K parts (8 chips from TSMC), need robots to build it, consumes 10K amps power, costs $250K and it takes another supercomputer to test it.</p><p>The way it was programmed was to show/teach it the outputs that were wanted. Results of this method were remarkably accurate.</p><p><em>(*Elon Musk was the first to purchase a DGX from NVIDIA)</em></p><p><strong>AMD MI300X<br></strong>As of 2023, the GPU with the highest transistor count is <a href="https://en.wikipedia.org/wiki/AMD">AMD</a>’s MI300X, built on TSMC’s N5 process and totalling 153 billion MOSFETs.</p><p>The MI300X is designed to accelerate generative AI applications, such as natural language processing, computer vision, and deep learning. AMD’s ROCm software stack, which provides a unified programming model and tools for developing and deploying generative AI applications on AMD hardware.</p><p><em>( *MOSFET, or Metal-Oxide-Semiconductor Field-Effect Transistor, is a type of transistor widely used in the field of electronics for amplification and switching applications)</em></p><h3>CHIP Regulations</h3><ul><li><strong>The European Chips Act:</strong><br>Enforced on <strong>September 2023</strong>, European Chips Act is a Regulation that establishes a framework for strengthening the semiconductor ecosystem in the EU, in particular through:<br>(a) the establishment of the Chips for Europe Initiative (the ‘Initiative’)(b) setting the criteria to recognise and to support integrated production facilities and open EU foundries that are first-of-a-kind facilities and that foster the security of supply and the resilience of the Union’s semiconductor ecosystem;<br>( c) setting up a coordination mechanism between the Member States and the Commission for mapping and monitoring the Union’s semiconductor sector as well as crisis prevention and response to semiconductor shortages and, where relevant, consulting stakeholders from the semiconductor sector.</li><li><strong>U.S Chips and Science Act:<br></strong>U.S Govt pleadged multibillion-dollar investments in expanded microchip manufacturing. According to Reuters, U.S. has also imposed sweeping restrictions on shipments of advanced chips and chipmaking equipment to China. . This is to prevent American chipmakers from selling semiconductors to China that circumvent government restrictions.</li></ul><p>This article barely covers a drop in vast ocean of semiconductor technology knowledge.</p><p>Leaving you with some powerful quotes to ponder on -</p><blockquote><strong>“Deep Learning and AI are not a chip problem, but a re-inventing of computing problem. The way AI is developed now is fundamentally different from past as it has retrieval plus generation.NVIDIA was one of the first ones to get it.” </strong>— Jensen Huang (Co-Founder NVIDIA)</blockquote><blockquote><strong>“People usually compare the computer to the head of the human being. I would say that hardware is the bone of the head, the skull. The semiconductor is the brain within the head. The software is the wisdom. And data is the knowledge. “</strong>—Masayoshi Son (Co-Founder SoftBank)</blockquote><p>Thank you for reading and hope you would find below further reading suggestions helpful too!</p><h3>References / Further Reading</h3><ul><li><a href="https://en.wikipedia.org/wiki/Microprocessor_chronology">Microprocessor chronology - Wikipedia</a></li><li><a href="https://research.aimultiple.com/ai-chip-makers/">Top 10 AI Chip Makers of 2023: In-depth Guide</a></li></ul><p><a href="https://www.visualcapitalist.com/nvidia-vs-amd-vs-intel-comparing-ai-chip-sales/">https://www.visualcapitalist.com/nvidia-vs-amd-vs-intel-comparing-ai-chip-sales/</a></p><ul><li><a href="https://en.wikipedia.org/wiki/Transistor_count">Transistor count - Wikipedia</a></li><li><a href="https://www.technologyreview.com/2023/01/03/1065959/whats-next-chip-industry-2023/">What&#39;s next for the chip industry</a></li><li><a href="https://www.wired.com/2013/04/how-pixar-used-moores-law-to-predict-the-future/">How Pixar Used Moore&#39;s Law to Predict the Future</a></li><li><a href="https://ourworldindata.org/moores-law">What is Moore&#39;s Law?</a></li><li><a href="https://www.electronicsandyou.com/blog/how-semiconductor-works.html">How Semiconductor Works: Properties, Types &amp; Uses</a></li></ul><p><a href="https://www.blackridgeresearch.com/blog/list-of-global-top-largest-semiconductor-companies-manufacturers-makers-suppliers-in-the-world">https://www.blackridgeresearch.com/blog/list-of-global-top-largest-semiconductor-companies-manufacturers-makers-suppliers-in-the-world</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=20e2c3280b53" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Detecting Bias using Bayesian Modeling]]></title>
            <link>https://medium.com/@sur.mathur/detecting-bias-using-bayesian-modelling-43352f163338?source=rss-90928d59b104------2</link>
            <guid isPermaLink="false">https://medium.com/p/43352f163338</guid>
            <category><![CDATA[equality]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[philosophy]]></category>
            <category><![CDATA[math]]></category>
            <dc:creator><![CDATA[Surabhi Mathur]]></dc:creator>
            <pubDate>Sat, 03 Jun 2023 01:44:28 GMT</pubDate>
            <atom:updated>2023-06-03T01:48:04.090Z</atom:updated>
            <content:encoded><![CDATA[<p><em>“Identify gender bias in hiring process, using PyMC3 python package</em><strong><em>”</em></strong></p><h3>Bayes Theorem</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*m_rgt3FC8caMqoo7" /><figcaption>Photo by <a href="https://unsplash.com/@framesbyfin?utm_source=medium&amp;utm_medium=referral">Heidi Fin</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Imagine, a tool that enables us to navigate the uncertain seas of knowledge with greater clarity — a compass for the mind.</p><p>Enter <strong>Bayes’ theorem</strong>, a remarkable mathematical principle that sheds light on how we <strong>update our beliefs in the face of new evidence</strong>.</p><p>Here’s how it works-</p><p>— First, we start with an initial hunch, which is called the “<strong>prior probability”</strong>. It’s like a gut feeling. But gut feelings aren’t enough!</p><p>— As we investigate further, we collect clues or <strong>new evidences</strong>. Each evidence adds a piece to the puzzle, making our understanding more complete, about the “<strong>likelihood” </strong>of an event.</p><p>— Now, armed with the prior probability and the evidences found, we put them all together using Bayes’ theorem. The theorem calculates the <strong>“posterior probability”</strong>, which is our <strong><em>updated belief</em></strong>, taking into account both the initial hunch and the evidence gathered. It’s like seeing the mystery unfold before your eyes as you piece together the puzzle.</p><blockquote>Bayes’ theorem is a powerful tool, for analyzing data, making predictions, or weighing different options, It helps you think more logically and take into account the probabilities involved.</blockquote><h3>The Formula</h3><p>Input — “<strong>prior probability” </strong>and <strong>“likelihood based on new evidences”<br></strong>Output — <strong>“posterior probability”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*OG585r9nIHaT_0D1TK6U8Q.jpeg" /><figcaption>Image by author</figcaption></figure><p>The underlying concept of this formula is the idea that <em>“</em><strong><em>rational inquiry is an iterative process”</em></strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/403/1*xgIAbavo6ZWPUZ9Q99t7Yw.jpeg" /></figure><h3>Example</h3><p><a href="https://www.3blue1brown.com/lessons/bayes-theorem"><strong>3blue1brown </strong></a>— This video clearly explains Bayes theorem through an example, where most people assume that a shy and withdrawn person is more likely to be a librarian rather than a farmer, without even thinking to incorporate the population of farmers and librarians in the world. Statistically the probability of a person being a farmer are significantly higher than of being a librarian.</p><h3><em>“The Road Not Taken”</em> by Robert Frost</h3><blockquote>Two roads diverged in a yellow wood,<br>And sorry I could not travel both<br>And be one traveler, long I stood<br>And looked down one as far as I could<br>To where it bent in the undergrowth</blockquote><p>The poem reflects on the uncertainty of life choices and the diverging paths one can take.</p><p>We are faced with choices and decisions every day, ranging from small and mundane ones to significant and life-altering ones — from what to have for breakfast to career decisions.</p><p>Choices can indeed be represented by probabilities. When faced with multiple options or decisions, we often consider the likelihood or probability of different outcomes associated with each choice.</p><h3>Probabilistic Programming</h3><p>Probabilistic programming is a programming paradigm that allows us to describe and solve problems involving <strong>uncertainty or randomness.</strong></p><p>It combines principles from <strong>probability theory </strong>and <strong>computer programming</strong> to model and reason about uncertain events or variables.</p><p>In traditional programming, we typically write <em>deterministic code</em> where the output is determined by the input and a series of well-defined steps. However, in probabilistic programming, we introduce <em>randomness or uncertainty</em> into our models. Instead of providing exact values, we assign probabilities or distributions to variables, representing the uncertainty associated with them.</p><blockquote>By using probabilistic programming, we can build models that can make predictions or inferences based on incomplete or noisy data.</blockquote><p>This has applications in machine learning, artificial intelligence, data analysis, and many other fields where uncertainty plays a significant role.</p><h3><strong>PyMC3</strong></h3><p>PyMC3 is a probabilistic programming framework for Python that allows you to define and perform Bayesian statistical modeling and inference.</p><p>It provides a high-level interface for specifying probabilistic models, and it uses advanced Markov chain Monte Carlo (MCMC) techniques to estimate the posterior distribution of model parameters.</p><p>Theano is the deep-learning library PyMC3 uses to construct probability distribution.</p><h3>Detecting Bias</h3><p>Detecting bias is a complex and nuanced task that often requires careful consideration of the data, model assumptions, and potential confounding factors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*if51n6ZxFryPS7YJ" /><figcaption>Photo by <a href="https://unsplash.com/@claybanks?utm_source=medium&amp;utm_medium=referral">Clay Banks</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Lets try to create a model to detect possibility of <strong>gender bias in a hiring process,</strong></p><p><strong>STEP 1:</strong> Install PyMC3</p><pre># Install  pymc3<br>pip install pymc3<br><br># Tip:<br># Some errors popped up during installation of pymc3 package<br># To resolve these,<br># I had to upgrade Anaconda and Python version to 3.10<br># Also had to install dependency packages -<br># pip install dill/wrapt/xarray/..</pre><p><strong>STEP 2:</strong> Import libraries and Create Sample Data. The number of male and female applicants hired and the total number of male and female applicants.</p><pre>import pymc3 as pm<br>import arviz as az<br>import numpy as np<br><br># Sample data:<br># The number of male and female applicants hired <br># and the total number of male and female applicants.<br>male_hired = 60<br>male_total = 100<br>female_hired = 30<br>female_total = 100</pre><p><strong>STEP 3:</strong> Define the prior probabilities based on the hired-to-total ratios for each gender.</p><pre># Prior probabilities<br>prior_male = male_hired / male_total<br>prior_female = female_hired / female_total</pre><p><strong>STEP 4: </strong>Create the PyMC3 model, specifying the prior distributions for the probabilities of hiring a male (p_male) and a female (p_female).</p><p>The probabilistic model captures the relationship between the variables of interest, including gender, and the outcome or predictions.</p><p>By providing the prior probabilities as initial values , we are informing the model about our <strong><em>prior beliefs</em></strong> before seeing the data. The model will then update these beliefs based on the observed data through the sampling process.</p><p>We have used <a href="https://towardsdatascience.com/beta-distribution-intuition-examples-and-derivation-cf00f4db57af"><strong>Beta distribution</strong></a> with equal alpha and beta values, representing non-informative priors.</p><p>The <strong>likelihoods </strong>are modeled using <a href="https://towardsdatascience.com/using-binomial-distribution-in-python-c9002ac2a424"><strong>Binomial distribution</strong></a>, with the observed data being the number of male and female hires.</p><p>We define the difference in probabilities (diff_prob) as a deterministic variable to examine the gap between the hiring probabilities for each gender.</p><p>Finally, we sample from the posterior distribution using PyMC3’s sample() function, specifying the number of iterations and the tuning steps. The sampling process used by PyMC3 is a form of <a href="http://The sampling process used is a form of Markov Chain Monte Carlo"><strong>Markov Chain Monte Carlo (MCMC)</strong></a>.</p><pre><br># Number of iterations for the MCMC sampling<br>n_iterations = 5000<br><br># Model definition (**This step took 2 mins to run on my pc)<br>with pm.Model() as model:<br>    # Priors<br>    p_male = pm.Beta(&quot;p_male&quot;, alpha=1, beta=1, testval=prior_male)<br>    p_female = pm.Beta(&quot;p_female&quot;, alpha=1, beta=1, testval=prior_female)<br><br>    # Likelihood<br>    male_likelihood = pm.Binomial(&quot;male_likelihood&quot;, n=male_total, p=p_male, observed=male_hired)<br>    female_likelihood = pm.Binomial(&quot;female_likelihood&quot;, n=female_total, p=p_female, observed=female_hired)<br><br>    # Difference in probabilities<br>    diff_prob = pm.Deterministic(&quot;diff_prob&quot;, p_male - p_female)<br><br>    # Sampling<br>    trace = pm.sample(n_iterations, tune=1000, cores=1)<br><br># Posterior analysis<br>az.plot_posterior(trace, var_names=[&quot;p_male&quot;, &quot;p_female&quot;, &quot;diff_prob&quot;], ref_val=0)</pre><p><strong>STEP 5:</strong> Generate Posterior probability</p><p>After the sampling, we can analyze the posterior distribution using ArviZ’s plot_posterior() function, which visualizes the posterior distributions of p_male, p_female, and diff_prob, with a reference line at 0 for comparison.</p><p>This will help us to quantify the uncertainty and make probabilistic statements about the relationship between gender and the outcome.</p><p><strong>STEP 6:</strong> Analyzing the output of above PyMC3 model</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/893/1*-Ma5S09yfOM0RM2ZVtIaVg.jpeg" /></figure><blockquote><strong>Posterior mean = Most likely estimate </strong><br><em> </em><em>p_male = 60% <br></em><em>p_female= 30%</em></blockquote><blockquote><strong>Posterior credible interval = Range of values within which true probabilities of hiring a male or a female are likely to fall with a certain degree of certainty (95%).</strong></blockquote><blockquote>p_male credible interval (<strong>0.51 to 0.69</strong>): <em>Suggests that, based on the observed data, there is a 95% probability that the true probability of hiring a male candidate falls within this range. </em><br>p_female credible interval (<strong>0.22 to 0.39</strong>): <em>Similarly, this interval suggests that there is a 95% probability that the true probability of hiring a female candidate falls within this range.</em></blockquote><blockquote><em>Based on the data, there is evidence to suggest that the probability of hiring a female candidate is relatively lower compared to hiring a male candidate.</em></blockquote><blockquote>Mean of <em>diff_prob</em> (0.29): <em>Suggests that, on average, the probability of hiring a male candidate is approximately 0.29 higher than the probability of hiring a female candidate.</em></blockquote><blockquote>Credible interval for diff_prob (0.17 to 0.42):<em> This means that here is a 95% probability that the true difference in hiring probabilities falls within this range.</em></blockquote><h4><strong>Conclusion:</strong></h4><p>Since the credible intervals of p_male and p_female, <strong>do not overlap</strong>, it indicates that there is a significant difference in the estimated probabilities of hiring between male and female candidates.</p><p>The credible intervals suggest that the hiring probability for males is higher, as the entire interval of p_male lies above the upper limit of the p_female interval.</p><p>This suggests evidence of gender bias in the hiring process, where male candidates have a higher likelihood of being hired than female candidates.</p><p><em>**It’s important to note that these interpretations are based on the specific example and the assumed data. In a real-world scenario, you would need to carefully consider the context, data quality, and potential confounding factors before drawing conclusions about gender bias.</em></p><p>PyMC3 is a powerful tool for Bayesian analysis, but it does not replace the need for thoughtful data analysis and critical thinking when it comes to addressing biases in data and models. Detecting bias will additionally involve other techniques beyond PyMC3, such as exploratory data analysis, statistical tests, fairness metrics, and interpretability methods.</p><h3>Has this analysis inspired you to become a Bayesian ?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/473/1*k6D_Dm9pdgaqt1nY19nvTg.png" /></figure><h4>References</h4><ul><li><a href="https://www.3blue1brown.com/lessons/bayes-theorem">3Blue1Brown - Bayes&#39; theorem</a></li><li><a href="https://telescoper.blog/2014/09/15/frequentism-the-art-of-answering-the-wrong-question/">Frequentism: the art of probably answering the wrong question</a></li><li><a href="https://juandiegorr.com/blog/introduction-to-bayes-theorem/">Bayes&#39; Theorem: Simple but powerful framework of reasoning</a></li></ul><p><a href="https://www.cs.ubc.ca/~murphyk/Bayes/economist.html">https://www.cs.ubc.ca/~murphyk/Bayes/economist.html</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=43352f163338" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[‘Very Good, AGIves!’]]></title>
            <link>https://medium.com/@sur.mathur/very-good-agives-e7f4b8d31337?source=rss-90928d59b104------2</link>
            <guid isPermaLink="false">https://medium.com/p/e7f4b8d31337</guid>
            <category><![CDATA[philosophy]]></category>
            <category><![CDATA[ai-ethics]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Surabhi Mathur]]></dc:creator>
            <pubDate>Sat, 13 May 2023 17:42:15 GMT</pubDate>
            <atom:updated>2023-12-29T13:44:46.953Z</atom:updated>
            <content:encoded><![CDATA[<h3>Artificial General Intelligence, the next frontier – How LLMs are a stepping stone for AGI</h3><p>(If ‘Artificial General Intelligence’ was like Jeeves — Inspired from <strong><em>‘Very Good, Jeeves!’ </em></strong>by<strong><em> P.G. Wodehouse)</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*iEhTNfnj252HymJ1DeVh_g@2x.jpeg" /></figure><p>(<em>With an apology to those who haven’t read P.G. Wodehouse’s novels and aren’t familiar with the humour in them</em>)</p><p>Bertie Wooster often finds himself in awkward situations, be it family drama, love triangles, or a case of mistaken identity. These social problems often stem from his attempts to help others.</p><p>It’s no wonder Bertie relies on his trusted confidant <strong>Jeeves </strong>for everything — from choosing his ties — to solving his most complex social problems, for Jeeves is a man of impeccable taste, unerring judgement and with a wit as sharp as a hot knife.</p><blockquote>Have you recently found ChatGPT to be a similar confidant? Do you find yourself asking philosophical questions to it ? or maybe you have a query that you know deep down a computer program isn’t intended to provide you the solution to, but you still decide to ask it for advice anyway?</blockquote><h3>OpenAI say Generative AI is a significant step towards building Artificial General Intelligence (AGI).</h3><p><a href="https://openai.com/blog/planning-for-agi-and-beyond"><strong><em>*Having mentioned this, now lets forget for a brief moment about a doom’s day scenario when machines say toodle-oo to the human species</em></strong></a><strong><em>.</em></strong></p><p>In a retrospective mood- sipping morning tea- I ask myself — would it be so bad having a Jeeves who can help extricate one from tricky social situations or save from simply a feeling of existential crisis ? — Not a bad idea ! <br>How hard could it be? What was in that tea ?</p><p>Here is a possibly-simplest recipe to create a basic <strong>Jeeves</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2PUidkIBFzf3pSAeXPdN3g.png" /><figcaption>Recipe for Jeeves like AGI</figcaption></figure><h3>Model Training Data :</h3><p>Training a language model on humour involves feeding it a large dataset of humorous texts and using techniques in natural language processing, neural networks, and deep learning to help the model understand what makes something witty and funny .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/545/1*VDjIZZotIIjRyi7KlCY_Pw.jpeg" /><figcaption>Image :by author, content: P.G. Wodehouse novels</figcaption></figure><p>Let’s test the newest pre-trained LLMs (Google Bard and ChatGPT) on their knowledge about Jeeves.</p><h4>Google Bard (Foundation Model — PaLM2)</h4><p>Launched on May 10, 2023 — PaLM2 has taken up residence as the most recent addition in the neighborhood of Generative AI Foundation models.<br>Know about PaLM2 <a href="https://blog.google/technology/ai/google-palm-2-ai-large-language-model/"><strong>here</strong></a>. Access Google Bard <a href="https://bard.google.com/"><strong>here</strong></a>.</p><p><strong>Prompt:</strong> From now on can you act like the character Jeeves from P.G Wodehouse and I am Bertie Wooster?<br><strong>Response(Google Bard)</strong>: I do not have enough information about that person to help with your request. I am a large language model, and I am able to communicate and generate human-like text in response to a wide range of prompts and questions, but my knowledge about this person is limited. Is there anything else I can do to help you with this request?</p><blockquote>Sadly, Bard couldn’t recognize the fictional character of Jeeves.</blockquote><h4><strong>(2) ChatGPT (Foundation Model — GPT3.5)</strong></h4><p><strong>Prompt: </strong>From now on can you act like the character Jeeves from P.G Wodehouse and I am Bertie Wooster?<br><strong>ChatGPT:</strong> Certainly, sir. I shall do my utmost to provide you with the impeccable service that you have come to expect from Jeeves. How may I be of assistance?<br><strong>Prompt: </strong>“Jeeves, I’m in a bit of a pickle. Honoria Glossop wants me to marry her, but I have no intention of doing so. What should I do?”<br><strong>Response(Google Bard)</strong>:<br>Ah, indeed a delicate matter, sir. May I inquire as to the reason why you do not wish to marry Miss Glossop?<br><strong>Prompt (Bertie): </strong>I don’t like her shrill voice<br><strong>Response(ChatGPT/Jeeves)</strong>:I understand, sir. If I may suggest, perhaps there is a way to avoid any unwanted proposals without causing offense. One possibility is to engage in some subtle maneuvering that might make Miss Glossop lose interest in you. For instance, you might try to appear less desirable in her eyes by pretending to be interested in a hobby or pursuit that she finds tedious. Alternatively, you might spend time with her in a public setting where her behavior might be observed by others, which might give her pause. Of course, if all else fails, feigning an illness or being called away on some urgent business might be a last resort. However, such tactics should be used with caution and only after all other options have been exhausted.</p><blockquote>The character and his smart and polite gestures were rather well understood by ChatGPT, who also made some workable recommendations. We won’t discuss whether these behaviours would be polite.</blockquote><p>Wondering if it might be possible to train a customized personal language model that can apprehend the particularities of Jeeves’ humor and wisdom?</p><p>Since humour is a complex and multidimensional phenomenon that significantly depends on context, tone, and cultural allusions, training a model on humour will be challenging.</p><p>You can start by referring to these open-source <a href="https://github.com/topics/humor-detection"><strong>github</strong></a><strong> </strong>projects and train a <strong>Transformers </strong>model.</p><p>Example code snippet using Python and the Hugging Face Transformers library to fine-tune a pre-trained language model on a dataset of humor:</p><pre>from transformers import pipeline, TextClassificationPipeline, AutoTokenizer, AutoModelForSequenceClassification<br>import pandas as pd<br><br># Load the Jeeves humour dataset<br>humour_data = pd.read_csv(&#39;jeeves_humour_dataset.csv&#39;)<br><br># Define the model and tokenizer<br>model_name = &#39;bert-base-uncased&#39;<br>tokenizer = AutoTokenizer.from_pretrained(model_name)<br>model = AutoModelForSequenceClassification.from_pretrained(model_name, num_labels=2)<br><br># Fine-tune the model on the humour dataset<br>model.train()<br>trainer = TextClassificationPipeline(model=model, tokenizer=tokenizer)<br>trainer.train(humor_data[&#39;text&#39;], humor_data[&#39;label&#39;])<br><br># Test the model on a new humorous text<br>text = &quot;I have always found that a spot of fresh air and exercise is most invigorating, especially when one has something unpleasant to do. It clears the head, sir.&quot;<br>result = trainer(text)<br><br>print(result)</pre><p>In general, training a BERT model on humour/wit/wisdom, would call for a sizable and varied corpus of texts, as well as highly sophisticated algorithms that can examine the language and cultural context of each text and produce jokes that are both funny and appropriate for social situations.</p><p>While common souls like us were busy navigating our way through impacts of recession/ bank failures/ rising cost of living, our attentions were swooped by the Generative AI war and before our startled selves could catch a breath, we are hearing that the competition to win the AGI race has already begun !</p><p>Jeeves has an apt explanation for the look on face of a common man these days —</p><p><em>“When one contemplates the essential weirdness of life — the way everything continually changes, the way they say one thing today and another tomorrow — I confess I am not surprised that the person in the street appears somewhat startled.” ~ Jeeves</em></p><h3>References:</h3><h4>LOL BOT –</h4><p><a href="https://m.youtube.com/watch?v=Vhe-JOP7PCs&amp;pp=ygUtY2FuIG1hY2hpbmUgbGVhcm5pbmcgYWkgbW9kZWwgdW5kZXJzdGFuZCBqb2tl">https://m.youtube.com/watch?v=Vhe-JOP7PCs&amp;pp=ygUtY2FuIG1hY2hpbmUgbGVhcm5pbmcgYWkgbW9kZWwgdW5kZXJzdGFuZCBqb2tl</a></p><h4>Jokes DataSet:</h4><p><a href="https://data.world/datasets/jokes">https://data.world/datasets/jokes</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e7f4b8d31337" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[“Artificial Intelligence Act “— EU attempts to tame the tech dragon]]></title>
            <link>https://medium.com/@sur.mathur/artificial-intelligence-act-eu-attempts-to-tame-the-tech-dragon-f87a6516177d?source=rss-90928d59b104------2</link>
            <guid isPermaLink="false">https://medium.com/p/f87a6516177d</guid>
            <category><![CDATA[ml-so-good]]></category>
            <category><![CDATA[ai-ethics]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[eu-ai-act]]></category>
            <dc:creator><![CDATA[Surabhi Mathur]]></dc:creator>
            <pubDate>Sat, 18 Mar 2023 13:55:16 GMT</pubDate>
            <atom:updated>2023-05-16T03:06:42.050Z</atom:updated>
            <content:encoded><![CDATA[<h3>AI Act — EU attempts to tame the tech dragon.</h3><p>EU’s Artificial Intelligence Act</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6BklGcpmXwPzC_C-" /><figcaption>Photo by <a href="https://unsplash.com/@itssecondkaki?utm_source=medium&amp;utm_medium=referral">Sei</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Flashback to the year <strong>1950</strong>, an eventful decade was turning in— The first <em>credit card</em> (made of cardboard) made its appearance, the first African — American <em>Gwendolyn Brooks</em> won Pulitzer prize for her poetry book ‘<em>Annie Allen’,</em> Disney released <em>Cinderella </em>which became its highest grossing movie of the year, ‘<em>Peanuts</em>’ the famous cartoon strip by <em>Charles M. Schulz</em> began as a daily strip in seven newspapers, U.S. declared its support to develop the <em>Hydrogen bomb </em>and <em>Winston Churchill </em>lost the general elections as the Labour party won but with a much reduced majority.</p><p>In the same year, <strong>Alan Turing</strong> released a path breaking and prophetic paper called “<em>Computing Machinery and Intelligence</em>”, popularly known as “<em>Imitation Game</em>”, in which he enquired — “<strong>Can machines think ?</strong>”. This was much before the term ‘<em>Artificial Intelligence</em>’ was coined in 1955.</p><p>Turing came up with an idea for a test that would measure a machine’s ability to exhibit intelligent behavior equivalent to, or indistinguishable from that of a human. This test became known as the <strong>Turing test</strong>.</p><p>Turing proposed that a human judge would engage in a conversation with a <strong>machine </strong>and a <strong>human</strong>, without knowing which was which. If the judge could not reliably distinguish the machine’s responses from the human’s, then the machine would be considered to have passed the Turing test and be considered as having human-like intelligence.</p><p>Years passed, and many attempts were made to create machines that could pass the Turing test. Some came close, but none were able to fully convince the judges that they were human. Nonetheless, the pursuit of artificial intelligence continued to drive progress in computer science and robotics.</p><p>And then in 1997, <strong>Deep Blue</strong> developed by IBM defeated Garry Kasparov the world chess champion.</p><p>In present day, we are seeing AI systems that appear truly intelligent, machines that can not only mimic human behavior, but also learn, reason, and solve complex problems in ways that were once thought impossible.</p><p>This raises an important question -</p><blockquote>“Are machines above morality and more importantly above law? “</blockquote><p>Regulators are now working on creating effective regulations, that will help to shape the future of AI in a way that is safe, ethical, and beneficial for all.</p><blockquote>The <strong>EU AI Act</strong> is a proposed piece of legislation that seeks to regulate the development and deployment of artificial intelligence (AI) systems across the European Union.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*78OvHN-XsWJWXhHm" /><figcaption>Photo by <a href="https://unsplash.com/@guillaumeperigois?utm_source=medium&amp;utm_medium=referral">Guillaume Périgois</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>EU AI Act: History and <strong>Timeline</strong></h3><p><strong>2018 </strong>: EU Commission starts pilot project on ‘Explainable AI’.</p><p><strong>2019 </strong>: EU Commission president <em>Ursula Van Der Leyen</em> talks about aim of making the EU a world-class hub for AI and ensuring that AI is human-centric and trustworthy through AI Ethics guidelines.</p><p><strong>2020 </strong>: Consultation and evaluation of pilot phase of AI Ethics guidelines begins. <em>Ursula Van Der Leyen </em>releases the white book for artificial intelligence and data strategy and says EU wants to attract €20 billion per year through AI.</p><p><strong>2021 </strong>: Draft “Artificial Intelligence Act” is unvieled. The act imposes checks on technology considered ‘high-risk’ and includes a ban on most surveillance and live facial scanning as well as AI systems to filter out school, job or credit scoring.</p><p>2022 : Launch of first AI Regulatory Sandbox.</p><h3>EU AI Act: Definition of AI</h3><p>To begin with a neutral definition of AI is established with an aim to cover all AI (symbolic AI, Machine Learning, and Hybrid systems) and include techniques that are not yet known or developed.</p><blockquote><em>“</em>a software that is developed with one or more of the techniques and approached listed in Annex I and can, for a given set of human-defined objectives, generate outputs such as content, predictions, recommendations, or decisions influencing the environments they interact with<em>”</em></blockquote><p>The quality of a robust law is that it is “Open” and “Abstract”, e.g. our Constitutions. Keeping this in mind, AI regulations are also being drafted in a manner that any future technology advancement and use cases can be brought into the regulatory framework easily.</p><h3>EU AI Act: Summary of Ethical guidelines</h3><p>As per the act, a trustworthy AI should be <em>lawful</em>, <em>ethical </em>and <em>robust</em>.</p><p>AI systems must satisfy the seven assessment guidelines — <strong>1.</strong> Human agency and oversight<em> </em><strong>2.</strong> Technical robustness and safety <strong>3.</strong> Privacy and data governance <strong>4.</strong> Transparency <strong>5.</strong> Diversity, non-discrimination and fairness <strong>6.</strong> Societal and environmental well-being 7. Accountability</p><h3>EU AI Act: A Risk Based Approach</h3><p>The risk-based approach of the EU Commission’s AI Act draft refers to the way in which the regulation categorizes different types of AI systems according to their potential risks to human health, safety, and fundamental rights.</p><p>The AI Act classifies AI systems into four categories,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/1*zg-Ts9LVD927JCzaeKr18w.png" /><figcaption>EU AI Act is based on risk categorization (Image by author)</figcaption></figure><h3>EU AI Act: What it could mean for Financial Services Industry</h3><p>The provisions of the act are not expected to impact most of the core business of Banks, but only the AI systems which are high risk. Financial services will have obligations in their role as a software importer, provider, distributor and user.</p><p>Under the purview will be any system that uses machine learning or is logic-knowledge based or uses statistical methods.</p><p>Fines for violation of the rules can be up to <strong>6% of global turnover</strong>, or <strong>30 million euros</strong> for private entities.</p><p><strong>CE marking</strong> indicates that a high-risk AI system is compliant with the regulation after undergoing a conformity assessment procedure.</p><h3>Below table summarizes how the AI act will impact some of the use cases of AI in Financial Industry.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E2euh6gaKK_vr90sLfPlFg.png" /><figcaption>EU AI Act — Financial Industry Impact (Image by author)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ItOYLdfkcAHo4NZYJELGqQ.png" /><figcaption>EU AI Act — Financial Industry Impact (Image by author)</figcaption></figure><h3>EU AI Act: The political-will backing this regulation</h3><blockquote><strong><em>“EU’s vision for AI”</em></strong></blockquote><blockquote>Through the ‘<em>Horizon Europe</em>’ and ‘<em>Digital Europe’</em> programs, the Commission plans to invest €1 billion per year in AI and generate €20 billion revenue per year in future.</blockquote><p><strong><em>Paul Nemitz</em></strong>, a key contributor to <em>GDPR </em>and now actively involved in forming the <em>EU AI Act, </em>explains how unregulated AI can be a threat to Democracy.</p><blockquote>“Democracy in danger”</blockquote><p><strong><em>“</em></strong>There has been reshaping of public space of discourse as algorithms are deciding what political news we see on the internet. There may be different variety of messages being sent from the same party which might not match their published manifesto. This is contrary to newspapers publishing the same news and point of view for everyone.”</p><blockquote><strong><em>EU Commission wants to propose a regulation of ‘</em>Election Party Register ‘ <em>that will provide a comparable overview of all messages a party pays for online discourse.</em></strong></blockquote><blockquote>“Burden of Complexity”</blockquote><p><strong><em>Nemtiz</em></strong><em> </em>adds further<em> </em>-</p><p>“Code is upgraded on daily basis which is difficult to keep check on. The big tech giants can take advantage of this for their business benefits while no-one else can transparently understand the changes.”</p><p>Another, political point of view behind the EU AI Act, is explained by<strong> Anu Bradfor</strong>d in her book -</p><blockquote>“The Brussels Effect”</blockquote><p>It states, in order to gain access to EU’s markets, companies must comply with EU regulations and standards. As a result, the EU is able to set global standards through its <strong>regulatory power</strong>.</p><p>With the AI Act, EU will have a starter advantage, as organizations would also push on having a consistent global framework to comply with and hence EU regulations will get world wide acceptance.</p><p><strong>Conclusion</strong></p><p>AI can be both powerful and unpredictable. Harnessing its power to improve our lives and solve our greatest challenges, requires us to understand how this technology works by improving our knowledge and skills. Creating frameworks to bring transparency and ensure use of AI for good, will be key in shaping the future. The Artificial Intelligence Act is an important step towards this direction as EU looks towards AI innovation for its economic growth. The draft still has loop holes however with support from governments, organizations and people the legal frameworks can be strengthened with time. In parallel we are seeing legal frameworks for AI systems management, being formulated by other strong democracies of the world like U.S., Britain, France, Canada, Japan and India.</p><p>For everyone&#39;s benefit we hope that the EU and rest of the world is able to tame and harness the power of the sharp-clawed beast called AI.</p><h4><a href="https://mlearning.substack.com/about"><strong>BECOME a WRITER at MLearning.ai</strong></a></h4><p><a href="https://medium.com/mlearning-ai/mlearning-ai-submission-suggestions-b51e2b130bfb">Mlearning.ai Submission Suggestions</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f87a6516177d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[“NLP topic modeling for ESG”]]></title>
            <link>https://medium.com/@sur.mathur/nlp-topic-modeling-for-esg-3ccac8aa574d?source=rss-90928d59b104------2</link>
            <guid isPermaLink="false">https://medium.com/p/3ccac8aa574d</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[esg]]></category>
            <dc:creator><![CDATA[Surabhi Mathur]]></dc:creator>
            <pubDate>Mon, 23 Jan 2023 17:48:52 GMT</pubDate>
            <atom:updated>2023-01-23T17:55:52.230Z</atom:updated>
            <content:encoded><![CDATA[<h3>NLP topic modeling for ESG -1</h3><p><strong><em>Part 1 — “Understanding the Geometry of LDA (Latent Dirichlet Allocation)”</em></strong></p><p>Have you been wondering what are the best ways machine learning can help make sense of ESG data ?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1yDSsyguBRwgX89I" /><figcaption>Photo by <a href="https://unsplash.com/@ryutarouozumi?utm_source=medium&amp;utm_medium=referral">Ryutaro Uozumi</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>ESG data, is a lot of unstructured text, with significantly diverse topics from varied sources with no standardization. The first step would be to start untangling the web of data, so that further analysis on ESG performance can be done.</p><p>This series in an attempt to explore one such <em>NLP Topic Modeling </em>algorithm (<strong>LDA</strong>) that can help make sense of your ESG data.</p><p><strong><em>To make things interesting and unique, let’s learn and explore the algorithm through eyes of Geometry.</em></strong></p><h3>What is Topic Modeling in Natural Language Processing?</h3><p>Topic models are statistical NLP tools for discovering the <strong>hidden semantic structure </strong>in a collection of documents.</p><p>Topic modeling analyzes documents/essays to learn meaningful patterns of words. It performs unsupervised classification of different documents. Underlying is a statistical technique for determining <strong>probability distribution </strong>applied on a set of words.</p><p>Let’s say, we have a large corpus of sustainability related documents or collection of text, from multiple organizations, and we want to categorize these based on Industry sectors — <em>Banking / Cement / IT Services / Vehicle manufacturer, etc. </em>Based on the patterns of word embeddings, a topic modeling algorithm can do this categorization within seconds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*d-cCU5sJbmPqfFhc" /><figcaption>Photo by <a href="https://unsplash.com/@ro_ka?utm_source=medium&amp;utm_medium=referral">Robert Katzki</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Geometry:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CsfpB4MYcz29W0HR" /><figcaption>Photo by <a href="https://unsplash.com/@harlynkingm?utm_source=medium&amp;utm_medium=referral">Max Harlynking</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Geometry through properties and relations of points, lines, surfaces, solids, and higher dimensional analogs, can help us understand probability distributions in a visual and simpler fashion . Fascinating indeed !</p><p>This article is an attempt to explain in a simple way, what <em>Geometric Probability Distribution</em> is and how Geometry is beautifully integrated in one of the the key use cases of Natural Language Processing — <em>Topic Modeling</em>.</p><p>Then we will deep dive into a popular topic modeling algorithm <strong><em>LDA</em> </strong>(Latent Dirichlet Allocation) and how it can be utilized in <strong>ESG </strong>use cases.</p><p><em>Untangling the data chaos step-by-step,</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/348/0*Os3U_Pbh9m4_zimd" /></figure><h3>Some basic concepts of Geometric Probability:</h3><p>A good topic-modeling algorithm will be able to identify grouping of words under precise topics with higher probability.</p><p><strong>Probability — </strong>Below image is a depiction of probability of a blue or red ball selection from a bag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/1*7jIZhLKvknQ5nVQoKKRyrA.png" /></figure><p>This concept will need to be applied to a bag of words (one-gram, two-gram, …., n-gram) within a corpus of text (e.g. sustainability reports/ web articles), to predict the topic.</p><p>Geometric probability is a tool to deal with the problem of infinite outcomes by measuring the number of outcomes geometrically, in terms of <strong>length, area, or volume</strong>.</p><p><strong>One dimensional Geometric probability:</strong></p><p>E.g. Probability of an outcome being closer to 0 than to 1 on a one-dimensional line-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/508/1*g7lS_3az8eWc_zrHdcL-eA.png" /></figure><p><strong>Two dimensional Geometric probability :</strong></p><p>In many probability use-cases, such as topic modeling using a bag of words, more than one variable are involved. In 2-dimensions, we will measure the probability using <strong>area</strong>.</p><p>E.g. Probability that a dart lands closer to the center than to the edge -</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/627/1*CsF6tNnZi-fZLOmAQ_Lgkw.png" /></figure><p>Extending this in T<strong>hree dimensions</strong>, probability will be measured using <strong>volume</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/995/0*gGvpKom8dqJF1B5r.png" /><figcaption>3D Scatter Plot</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/288/0*xZIvfIniAY-U_x63" /><figcaption>3-D Shapes</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/526/1*7BtPoDct8uM6mBkj1cBggg.png" /><figcaption>Volume of Tetrahedron</figcaption></figure><p>We are entering the world of calculus now, but not to be scared, lets be brave and keep diving into a couple of more topics -</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*B_fku-WlG957PIWJ.gif" /></figure><h3>Dirichlet distribution</h3><p>LDA uses Dirichlet distribution, underlying which is <strong>Beta </strong>distribution. The Dirichlet distribution is a multivariate probability distribution.</p><p>(<em>Beta Distribution</em>: The beta distribution is a probability distribution of a probability. It is commonly used to model continuous variables that are bounded between 0 and 1.)</p><p>The Dirichlet distribution is a multivariate probability distribution that describes k≥2 variables X1,…,Xk, such that each xi∈(0,1) and ∑Ni=1xi=1, that is parametrized by a vector of positive-valued parameters α=(α1,…,αk).</p><p><strong><em>Formula :</em></strong></p><p><strong><em>θ </em></strong>is the multinomial category, and <strong><em>α </em></strong>is the vector or β parameters,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/312/1*UuTW6ykBbCRN5_O7o24-eA.png" /></figure><p>Applying the concept of <strong>2-Dimensional probability</strong>, based on the <strong>area</strong>, generated by the Dirichletian distribution, likeliness (probabilities) of a document belonging to each topic can be guessed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/411/1*WizQEkCVR7K7F4-xCkpglg.png" /></figure><p>e.g. Tri-variate Dirichlet distribution -</p><p>(topic1: <em>Green Energy</em>, topic2: <em>Supply Chain</em>, topic3: <em>Health &amp; Safety</em>)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/788/1*kUf_VcMf9Gp7CN6SrrBF-w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*FaTonA4vHg1zvK9m-9Rr0Q.png" /></figure><p>While running LDA on our data, we won’t necessarily be required to know the mathematics behind it. However, understanding the mechanism of the algorithm significantly contributes to better configuration of the parameters to avoid unexpected and unwanted behavior and get accurate results.</p><p>In <strong>Part 2</strong> we will explore application of LDA on ESG data, with code snippets. Stay tuned !</p><p>Thank you for reading.</p><p><strong>References</strong>:<br>Serrano academy — <a href="https://www.youtube.com/watch?v=T05t-SqKArY">https://www.youtube.com/watch?v=T05t-SqKArY</a><br>Geometric Probability | Brilliant Math &amp; Science Wiki — brilliant.org<br>Geeks For Geeks — <a href="http://www.geeksforgeeks.org/">www.geeksforgeeks.org</a><br>Bayes Theorem — <a href="https://www.youtube.com/watch?v=HZGCoVF3YvM">https://www.youtube.com/watch?v=HZGCoVF3YvM</a><br>Topic Modeling and Latent Dirichlet Allocation (LDA) — datascienceplus.com</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3ccac8aa574d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[If your AI was a Utilitarian]]></title>
            <link>https://medium.com/@sur.mathur/if-your-ai-was-a-utilitarian-318b1980e549?source=rss-90928d59b104------2</link>
            <guid isPermaLink="false">https://medium.com/p/318b1980e549</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ml-so-good]]></category>
            <category><![CDATA[utilitarianism]]></category>
            <category><![CDATA[philosophy]]></category>
            <category><![CDATA[ai-ethics]]></category>
            <dc:creator><![CDATA[Surabhi Mathur]]></dc:creator>
            <pubDate>Tue, 08 Mar 2022 04:28:47 GMT</pubDate>
            <atom:updated>2022-03-09T12:13:57.137Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Utilitarianism — “Choosing the outcome that will produce the greatest good for the greatest number”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GowkYht19putHEUU" /><figcaption>Photo by <a href="https://unsplash.com/@lukelung1991?utm_source=medium&amp;utm_medium=referral">Luke Lung</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>As a host,</p><p>(i) Would you cook only one dish that most people like, while it is disliked by a few guests? or (ii) Would you cook more variety of dishes so that all the guests are happy though this might mean more efforts and cost for you as host?</p><p>If your Robo-Chef was a Utilitarian and was responsible for planning the party menu, it would opt for option (i).</p><p>The world we live in, is driven by Dollar savings and Utilitarianism is one of the popular reasoning behind business decisions.</p><p>There is constant research and thoughts put forth on how AI would solve the classic trolley problem or the organ donor dilemma (<a href="https://www.youtube.com/watch?v=yg16u_bzjPE">https://www.youtube.com/watch?v=yg16u_bzjPE</a>). However, these discussions have been mostly restricted to academia. Infusion of AI in small and large systems interacting with us is faster than one can say “supercalifragilistic expialidocious”. With remarkable speed, extraordinary amount of data is extracted and insights generated. One wonders, are the algorithms generating these insights sensitive to what is happening around and making decisions based on “good” and “inclusiveness”.</p><p>How do we or the algorithm decide what is “good”, a topic on which the greatest of philosophers have pondered from the beginning of human civilization.</p><p>In case of a Robo-Jury, which is cognitive enough to pass judgement on relatively simpler cases, would the algorithm reflect the philosophy/thoughts/beliefs of the Data Scientist who wrote the code, or the Business Manager who drove the requirements or would it be some common philosophy of “good”, or a legal framework that clearly defines the expectations?</p><p>Lets look at some more examples of Utilitarianism.</p><p>A Hiring-Robo algorithm is trained to hire people. Goal-1 is testing skills through an online exam, by adjusting toughness and weightage of questions as per candidate’s responses in order to find the best-fit person for the job. It is also trained on a second goal to maximize fulfillment, so that as many positions as possible can be fulfilled using this AI-driven hiring software. If the weightage of Goal-2 is not correctly adjusted, the algorithm might turn Utilitarian, by adjusting the online test questions to mostly simpler questions. This will maximize candidate-to-job mapping satisfying Goal-2, however will lead to a poor quality of work-force.</p><p>A Mozart-Robo, if trained only on one-month of data about the compositions played in concerts and ticket sales, might learn to only suggest and play a limited number of tunes. It will be unable to appreciate the beauty of diversity and how a musician needs to experiment with new tunes and compositions to keep creativity as well as interest of the audience alive.</p><p>Diversity in datasets is crucial in making your AI truly cognitive. Being human means to try newer things at the risk of temporary hardships or losses. A utilitarian mindset might result in making life mundane at the assumption of making profits in short term.</p><p>As per data, ethical and innovative companies are more profitable in the long run. The need to have a conversation about “Ethics” and “Human Values” with the Data Science teams is now.</p><p><a href="https://medium.com/mlearning-ai/mlearning-ai-submission-suggestions-b51e2b130bfb">Mlearning.ai Submission Suggestions</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=318b1980e549" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>