<?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 Roopa Uma Shiv on Medium]]></title>
        <description><![CDATA[Stories by Roopa Uma Shiv on Medium]]></description>
        <link>https://medium.com/@roopaumashiv?source=rss-901af2c9ba75------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dmbNkD5D-u45r44go_cf0g.png</url>
            <title>Stories by Roopa Uma Shiv on Medium</title>
            <link>https://medium.com/@roopaumashiv?source=rss-901af2c9ba75------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 10:50:14 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@roopaumashiv/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[Understanding Bias in Language Models: A Journey of Ethical AI]]></title>
            <link>https://medium.com/@roopaumashiv/understanding-bias-in-language-models-a-journey-of-ethical-ai-a482a00bda2a?source=rss-901af2c9ba75------2</link>
            <guid isPermaLink="false">https://medium.com/p/a482a00bda2a</guid>
            <dc:creator><![CDATA[Roopa Uma Shiv]]></dc:creator>
            <pubDate>Sat, 01 Feb 2025 22:46:08 GMT</pubDate>
            <atom:updated>2025-02-01T23:45:00.052Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Big Picture: What Are We Trying to Solve?</h3><p>In the rapidly evolving world of artificial intelligence, language models have become powerful tools that can understand and generate human language. These models are reshaping how we interact with technology, from digital assistants to automated content creation. However, as these systems become more integrated into our daily lives, we face a critical challenge: ensuring they serve all members of society fairly and ethically.</p><h3>The Challenge: Why AI Bias Matters</h3><p>At the heart of this challenge lies a hidden problem: bias. Language models, trained on vast amounts of text data, often inadvertently learn and amplify societal prejudices. These biases aren’t just technical glitches — they can have real-world consequences when these models are deployed in applications like hiring systems, content moderation, or educational tools.</p><p>This problem becomes particularly nuanced when working with regional languages like Malayalam. As a language deeply rooted in cultural context, Malayalam carries its own unique set of societal patterns and biases. Traditional gender roles, caste hierarchies, religious prejudices, and professional stereotypes are often deeply embedded in the language itself. When a language model learns these patterns, it can reinforce these prejudices — for instance, by consistently associating leadership roles with men or making assumptions about someone’s capabilities based on their caste.</p><h3>Understanding AI Unlearning: A Key to Reducing Bias</h3><p>Before diving into the project specifics, it’s crucial to understand how AI systems can be taught to overcome their learned biases. Think of it like helping someone unlearn a prejudice they’ve unconsciously absorbed from their environment. Just as humans sometimes need to consciously overcome ingrained biases, AI models need to “unlearn” problematic patterns they’ve absorbed from their training data. This process is more complex than simply avoiding biased data during training — it requires actively identifying and correcting learned biases.</p><p>In this project, several unlearning techniques were applied, each designed to remove or diminish the model’s bias. These unlearning strategies help modify the model’s behavior, making it more aligned with ethical standards and more likely to generate fairer, more inclusive outputs.</p><h3>Approach: Tackling Bias with Systematic Techniques</h3><h4>1. Corpus Collection and Analysis</h4><p>For this project, the first step was to collect a comprehensive dataset for training the language model. The <strong>OSCAR dataset</strong> was chosen, a large multilingual corpus that contains diverse textual content from publicly available sources. The selection was made to ensure that the dataset represented a broad range of real-world language use in Malayalam.</p><p>To ensure linguistic purity, I carried out the following preprocessing steps:</p><ol><li><strong>Removing Non-Malayalam Characters:</strong> Language models require clean, consistent input to learn effectively. By removing characters outside the Malayalam script (Unicode range U+0D00-U+0D7F), we ensure that:</li></ol><ul><li>Only authentic Malayalam characters are processed</li><li>Potential noise or interference from foreign scripts is eliminated</li><li>The model can focus on genuine linguistic patterns</li></ul><p><strong>2. Normalizing text to lowercase</strong>: By standardizing the case of all text, the model wouldn’t mistakenly treat upper and lower case as separate entities, which could distort understanding.</p><p><strong>3. Transliteration:</strong> Transliteration bridges the gap between Malayalam script and Roman characters, offering several significant advantages:</p><ul><li>Converts Malayalam script to its Roman transliteration, aiding in non-Malayalam script processing and providing a consistent Latin representation.</li><li>Retains original words if they are not in the transliteration map, ensuring no data loss while maintaining flexibility.</li><li>Maintains the semantic meaning of words, captures linguistic nuances, and supports cross-script research.</li></ul><h4>2. Identifying Biases: Bias Indicator Mapping</h4><p><strong>Bias Indicator Mapping</strong> is a technique used to detect specific markers in the language that can indicate bias. In this project, a detailed mapping was created across four categories: <strong>gender</strong>, <strong>caste</strong>, <strong>religion</strong>, and <strong>profession</strong>.</p><ul><li><strong>Gender Bias</strong>: In Malayalam, just like in many languages, certain words or phrases have a gendered connotation. For example, specific terms often describe women in domestic roles or frame men as powerful figures in professional and public contexts. Bias Indicator Mapping allowed the identification of such gendered phrases within the dataset.</li><li><strong>Caste Bias</strong>: Caste-related terminology is deeply embedded in the social fabric of many Indian languages, including Malayalam. Words that either uplift or denigrate individuals based on their caste were flagged using this mapping. This step ensured that such biases were recognized before being encoded by the model.</li><li><strong>Religious Bias</strong>: Bias against particular religious groups can also be encoded in language models. In Malayalam, specific expressions can reflect a subtle or overt preference for one religion over others. This mapping helped highlight such patterns in the training data.</li><li><strong>Professional Bias</strong>: This category focused on identifying language that reinforced stereotypical notions of who belongs in certain professions. For example, assuming men are suited for leadership roles or that women are more likely to hold care-giving jobs can perpetuate harmful societal stereotypes. Bias Indicator Mapping was used to flag these terms.</li></ul><h4>3. Statistical and Mathematical Analysis: Quantifying Bias</h4><p>After identifying these biased patterns, the next step was to measure their impact on the model’s predictions. I used several mathematical and statistical tools to quantify the bias and evaluate its significance:</p><ul><li><strong>Cosine Similarity</strong>: This method compares the angle between two vectors in a high-dimensional space. It was applied to identify how closely biased terms (e.g., gendered or caste-related terms) were associated with negative sentiments. A higher similarity indicated that these biased terms were influencing the model’s predictions in a harmful way.</li><li><strong>Euclidean Distance</strong>: This approach was used to measure how distant different groups (gender, caste, religion) were from each other in the vector space. If one group (e.g., women) was too close to negative sentiment vectors and another group (e.g., men) was far away, this was a clear indicator of bias.</li><li><strong>Dot Product Analysis</strong>: This technique was used to check how much influence specific biased words or phrases had on the final prediction of the model. By comparing the weights of these biased features, I could understand which terms were driving biased outputs.</li><li><strong>Jensen-Shannon Divergence</strong>: This tool measured the difference in output distributions for different groups (gender, caste, religion). If the model was assigning higher probabilities for negative outcomes to one group (e.g., lower caste individuals or women), it was clear evidence of bias.</li></ul><p>Through these statistical techniques, a clear picture of the biases present in the model was created, providing a quantitative foundation for addressing them.</p><h4>4. Unlearning Techniques: Forgetting Harmful Biases</h4><p>The final phase involved unlearning, a technique designed to help the model “forget” learned biases. A bias score was first calculated for each model output to track progress in mitigating bias, providing a measurable way to assess fairness at each training stage. Next, unlearning techniques were applied to systematically reduce or remove the influence of biased terms and features, ensuring a more balanced and fair model output.</p><ol><li><strong>Targeted Token Unlearning</strong>: This method targets specific tokens or words in the model’s vocabulary that carry biased associations. The idea is to “unlearn” these biases by ensuring that the model does not over-emphasize these tokens when making predictions.</li><li><strong>Progressive Layer Modification</strong>: By focusing on the layers of the neural network that exhibit the most bias, this method allows for gradual changes in how the model processes certain data. This approach helps the model to prioritize neutral information over biased associations.</li><li><strong>Adaptive Attention Adjustment</strong>: In a neural network, attention mechanisms help the model focus on certain features of the data. By adjusting how the model attends to biased features, this method reduces the model’s reliance on problematic associations.</li></ol><h3>Results: Measuring Success in Numbers</h3><p>The project achieved meaningful improvements in model fairness, with specific results showing both successes and areas for future work:</p><p><strong>Initial State:</strong></p><ul><li>Starting Bias Score: 0.6289</li><li>This baseline measurement revealed significant embedded biases</li></ul><p><strong>Strategy Effectiveness:</strong></p><ol><li>Progressive Layer Modification achieved a 10.06% reduction in bias, showing particular success in addressing structural biases and gender stereotypes.</li><li>Adaptive Attention Adjustment also achieved a 10.06% reduction, proving especially effective at reducing profession-related biases.</li><li>Targeted Token Unlearning showed a slight increase in bias (-4.57%), highlighting the complexity of bias reduction and providing valuable insights for future refinements.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*0K5dCGHX86J0kg0NRnKtdA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/867/1*ZQnE4-HgyGMiLspSUt1ntg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*fQZuYARYjVNHV0CshRUmwg.png" /></figure><p>Overall, the project achieved a 5.18% reduction in total bias, while maintaining the model’s ability to understand and process Malayalam text effectively.</p><h3>Beyond Bias: A Window into AI Safety</h3><p>Our journey with Malayalam language models has revealed something fascinating about AI safety: sometimes the most valuable insights come from unexpected places. The varying success rates of our debiasing attempts — from a 10.06% improvement with Progressive Layer Modification to a 4.57% increase in bias with Token Unlearning — tell us something crucial about AI systems. They’re like complex ecosystems where changing one element can create ripple effects we don’t fully understand.</p><p>Working with Malayalam, with its intricate grammar and rich cultural context, exposed a critical blind spot in AI safety research. Most safety measures are developed and tested on major world languages, but our experience shows that a safety mechanism that works in English might falter when faced with Malayalam’s unique linguistic patterns. This raises an important question: how many other blind spots exist in our AI safety measures simply because we haven’t tested them across diverse enough contexts?</p><p>The project’s modest overall bias reduction of 5.18% might seem small, but it teaches us something profound about AI safety. Just as removing bias from a language model requires understanding both technical architecture and cultural nuance, making AI systems truly safe demands more than technical solutions alone. We need a deep understanding of how these systems interact with the full complexity of human language and culture.</p><p>As we push forward in AI development, these lessons from Malayalam remind us that true AI safety isn’t about finding universal solutions — it’s about understanding and embracing the complexity of human diversity in our safety measures. Perhaps this is the most important insight: the path to safer AI systems lies not just in better algorithms, but in testing our assumptions across the full spectrum of human language and experience.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a482a00bda2a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>