<?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 Diletta Chiaro on Medium]]></title>
        <description><![CDATA[Stories by Diletta Chiaro on Medium]]></description>
        <link>https://medium.com/@diletta.chiaro?source=rss-688fabb48f12------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*VAQAxVOzAc2OjdK-</url>
            <title>Stories by Diletta Chiaro on Medium</title>
            <link>https://medium.com/@diletta.chiaro?source=rss-688fabb48f12------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 19:07:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@diletta.chiaro/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[Satellites Don’t Lie: From Space to Land]]></title>
            <link>https://medium.com/@diletta.chiaro/satellites-dont-lie-from-space-to-land-8165f38a4d4b?source=rss-688fabb48f12------2</link>
            <guid isPermaLink="false">https://medium.com/p/8165f38a4d4b</guid>
            <dc:creator><![CDATA[Diletta Chiaro]]></dc:creator>
            <pubDate>Tue, 01 Jul 2025 21:12:03 GMT</pubDate>
            <atom:updated>2025-07-02T08:53:09.814Z</atom:updated>
            <content:encoded><![CDATA[<p>Unveiling the true face of urban heat with high-resolution LST and advanced Super Resolution technology</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o8mlvPMZ5fKUQJ3K5_YaOQ.gif" /><figcaption>Standard LST view vs Latitudo 40 10-meter LST, enhanced with Super Resolution, revealing Milan’s true thermal landscape.</figcaption></figure><p>Moved by a recent <a href="https://www.instagram.com/p/DLkPCyStQ_y/">post from the European Space Agency</a> highlighting Europe’s ongoing heatwave, I wanted to dive deeper into how satellite data helps us understand this critical challenge.</p><blockquote>Seeing it shared widely by friends and colleagues made me realize just how much this topic resonates, not just with businesses, but with people everywhere.</blockquote><p>The heat is undeniable. From scorching cities to parched landscapes, we feel it, and crucially, satellites confirm it. While our immediate focus is often on air temperature, there’s a deeper, more telling story being told from orbit: the Land Surface Temperature (LST).</p><p><strong>Beyond Air Temperature: The “Real” Heat Story</strong></p><p>LST is the actual temperature of the Earth’s surface, whether it’s concrete, soil, or water. Unlike ambient air readings, LST directly measures the thermal energy emitted, often revealing significantly higher temperatures, especially in dense urban environments. This critical data allows us to precisely identify “heat islands” and understand how our built environment absorbs and radiates heat.</p><p>At Latitudo 40, we derive this precise LST data by applying our cutting-edge Machine Learning algorithms to comprehensive satellite imagery from missions such as Sentinel-2, Landsat8/9, and Modis LST.</p><p><strong>Latitudo 40’s Edge: Unprecedented LST Detail</strong></p><p>At <a href="https://www.latitudo40.com/">Latitudo 40</a>, we’re transforming how we perceive and combat urban heat. Leveraging cutting-edge Machine Learning algorithms, we provide LST data with an exceptional <strong>10-meter spatial resolution</strong>. What’s more, our unique approach delivers <strong>four daily measurements</strong> (at 4:00 AM, 12:00 PM, 3:00 PM, and 11:00 PM local time). This granular, time-sensitive insight enables us to track the thermal dynamics throughout the day and night, offering a comprehensive view of heat accumulation and dissipation.</p><p><strong>Super Resolution: Pinpointing Heat Down to 1 Meter</strong></p><p>To truly empower smarter decisions, Latitudo 40 pushes the boundaries further with its proprietary <strong>super resolution technology</strong>. By applying advanced upscaling techniques, we transform Sentinel-2 imagery, boosting its resolution from 10 meters to an incredible <strong>1 meter</strong> for key spectral bands.</p><p>When this power is applied to LST data, the result is astonishing. We can identify micro-level heat variations — from specific building roofs to individual park sections — with unparalleled clarity. This hyper-detailed view empowers truly targeted interventions to mitigate heat risks.</p><blockquote>How is the heat impacting your city or project? Share your thoughts, or connect with us to explore how Latitudo 40’s solutions can make a difference!</blockquote><p>#Latitudo40 #EarthObservation #LST #LandSurfaceTemperature #SuperResolution #AI #MachineLearning #ClimateChange #UrbanPlanning #SmartCities #Heatwave #SatelliteData #Geospatial #Innovation #Technology #Sustainability #Sentinel2 #Copernicus</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8165f38a4d4b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Chain of Draft: Thinking Faster by Writing Less]]></title>
            <link>https://medium.com/@diletta.chiaro/chain-of-draft-thinking-faster-by-writing-less-d9837ce7326a?source=rss-688fabb48f12------2</link>
            <guid isPermaLink="false">https://medium.com/p/d9837ce7326a</guid>
            <category><![CDATA[chain-of-thought]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[chain-of-draft]]></category>
            <category><![CDATA[large-language-models]]></category>
            <dc:creator><![CDATA[Diletta Chiaro]]></dc:creator>
            <pubDate>Fri, 28 Feb 2025 22:06:22 GMT</pubDate>
            <atom:updated>2025-02-28T22:06:22.855Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*zF4i13Weu3nlrO5B.gif" /><figcaption>Image taken from <a href="https://giphy.com/gifs/splat-nicksplat-rocket-power-3ohjUYCZxt8nFtGk6s">Giphy</a>.</figcaption></figure><h3>Beyond Thinking Fast and Slow</h3><p>In my previous article, <a href="https://medium.com/@diletta.chiaro/ai-thinking-fast-and-slow-ea55199c5b35"><em>AI: Thinking, Fast and Slow</em></a>, I explored how test-time compute (TTC) is reshaping AI’s reasoning ability. By allowing models to think longer, we saw significant performance boosts — just like how humans sometimes need extra time to solve complex problems.</p><p>However, there’s a crucial nuance: <strong>thinking longer doesn’t always mean thinking better</strong>.</p><p>Enter <strong><em>Chain of Draft</em></strong> (CoD) — a new reasoning paradigm that challenges the conventional <em>Chain of Thought</em> (CoT) approach. Instead of verbose, step-by-step explanations, CoD mimics human efficiency: jotting down only essential information while reasoning.</p><p>This article explores how CoD offers a compelling alternative to CoT, reducing verbosity while maintaining accuracy, ultimately optimizing large language model (LLM) inference for speed and cost-effectiveness.</p><p>The original paper can be found here: “<a href="https://arxiv.org/abs/2502.18600">Chain of Draft: Thinking Faster by Writing Less</a>”.</p><h3>From CoT to CoD: What’s Changing?</h3><p>The CoT approach, introduced by <a href="https://arxiv.org/abs/2201.11903">Wei et al. (2022)</a>, revolutionized reasoning in LLMs. By prompting models to break problems into step-by-step logic chains, CoT improved performance on complex tasks like mathematical reasoning, commonsense inference, and symbolic logic.</p><p>But there’s a downside — CoT is <em>verbose</em>! AI models using CoT generate long, detailed explanations, consuming significantly more computational power and inference time. While this verbosity enhances interpretability, it often introduces unnecessary token overhead, increasing costs and latency.</p><p>On the other hand, CoD proposes a more efficient approach: instead of fully articulated reasoning steps, models produce <em>concise drafts</em> — highly informative but stripped of redundant details. This method mimics how humans solve problems: by writing shorthand notes instead of lengthy expositions.</p><h3>The Core Idea of Chain of Draft</h3><p>CoD operates on the principle of minimalism. It asks models to:</p><ul><li>Generate <em>shorter, denser</em> reasoning steps.</li><li>Focus only on <em>critical calculations</em> or <em>logical transformations</em>.</li><li>Avoid unnecessary verbosity, reducing token usage and latency.</li></ul><p>Consider a simple arithmetic problem:</p><blockquote><strong><em>Question:</em></strong><em> Jason had 20 lollipops. He gave some to Denny and now has 12 left. How many did he give away?</em></blockquote><p>Following the answers:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EBMVYKZZUy3ttb6dF8rhCQ.png" /></figure><p>By removing redundant explanations, CoD significantly reduces token count without sacrificing interpretability.</p><h3>Performance Gains: Accuracy vs. Efficiency</h3><p>The effectiveness of CoD has been evaluated across various benchmarks, including arithmetic, commonsense, and symbolic reasoning.<br><br><strong>Arithmetic Reasoning (GSM8k):</strong> CoD achieves comparable accuracy to CoT while significantly reducing token usage and latency. For example, with GPT-4o, CoD achieves 91.1% accuracy with only 43.9 tokens and 1.0s latency, compared to CoT’s 95.4% accuracy with 205.1 tokens and 4.2s latency.</p><p><strong>Commonsense Reasoning (BIG-bench):</strong> CoD reduces latency and cost by generating fewer tokens, sometimes even outperforming CoT in accuracy. In sports understanding, CoD reduced the average output tokens from 189.4 to 14.3 (a 92.4% reduction) for Claude 3.5 Sonnet.<br><br><strong>Symbolic Reasoning (Coin Flip):</strong> CoD achieves perfect accuracy (100%) while significantly reducing tokens compared to CoT. For instance, with GPT-4o, CoD and CoT both reached 100% accuracy, but CoD only used 16.8 tokens compared to CoT’s 52.4 tokens.</p><h3>Why CoD Matters</h3><ol><li><strong>Reduced latency:</strong> CoD leverages concise reasoning drafts to speed up response generation without sacrificing correctness, crucial for real-time applications.</li><li><strong>Cost efficiency:</strong> By compacting reasoning steps, CoD reduces the number of tokens required, lowering computational costs.</li><li><strong>Comparable or superior Accuracy:</strong> CoD maintains or improves accuracy compared to standard CoT in various tasks.</li><li><strong>Adaptability</strong>: CoD employs a per-step budget, allowing unlimited reasoning steps, making it more adaptable to various structured reasoning techniques.</li></ol><p>While CoD is a breakthrough, it’s not a one-size-fits-all solution. Some tasks still benefit from CoT’s detailed reasoning:</p><blockquote>Use CoD when efficiency is critical — real-time interactions, cost-sensitive applications, and general knowledge tasks.</blockquote><blockquote>Use<strong> </strong>CoT when interpretability is key — medical diagnosis, scientific explanations, and legal reasoning.</blockquote><p>A hybrid approach might be the future: dynamically selecting CoD for simple tasks and CoT for complex ones, further optimizing AI inference.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d9837ce7326a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AI: Thinking, Fast and Slow]]></title>
            <link>https://medium.com/@diletta.chiaro/ai-thinking-fast-and-slow-ea55199c5b35?source=rss-688fabb48f12------2</link>
            <guid isPermaLink="false">https://medium.com/p/ea55199c5b35</guid>
            <category><![CDATA[inference]]></category>
            <category><![CDATA[ttc]]></category>
            <category><![CDATA[test-time-compute]]></category>
            <category><![CDATA[large-language-models]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[Diletta Chiaro]]></dc:creator>
            <pubDate>Wed, 05 Feb 2025 16:23:54 GMT</pubDate>
            <atom:updated>2025-02-05T16:23:54.692Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/499/0*lOnaZFOtWcwBafVU.gif" /><figcaption>Source: <a href="https://giphy.com/gifs/SingleDrunkFemale-freeform-single-drunk-female-singledrunkfemale-HPPPyKQUBRW6kZoHKG">Giphy</a></figcaption></figure><p>Picture this: you’re playing chess against an AI like AlphaZero. You make your move, and within milliseconds, the AI responds. <em>Boom. Checkmate.</em> You barely had time to process what just happened. Now, imagine asking ChatGPT to explain quantum physics in a simple way. It types… and hesitates… and types again. That little pause? That’s AI <em>thinking time</em>, and it makes all the difference.</p><p>But is this extra thinking time just a fancy trick for chatbots, or does it really matter for all AI models? Should we be giving every AI system more <em>brain juice</em> before it makes a decision?</p><p>In a fascinating TED Talk “<a href="https://www.ted.com/talks/noam_brown_ai_won_t_plateau_if_we_give_it_time_to_think">AI won’t plateau — if we give it time to think</a>”, <a href="https://noambrown.github.io/">Noam Brown</a> from OpenAI argues that AI performance doesn’t just depend on bigger models, more data, or stronger GPUs — sometimes, just <strong>giving AI time to think</strong> <strong>dramatically improves results</strong>. Brown explores how integrating “System 2 thinking” — a slower, more deliberate reasoning process — can significantly boost AI capabilities, yielding improvements comparable to scaling models and training data by a factor of 100,000. Drawing from his experience developing poker-playing AIs, he illustrates how allowing the AI just 20 seconds to <strong>deliberate </strong>(technical term for “thinking”)<strong> </strong>led to remarkable performance gains. The ‘‘<strong>more time = better decisions</strong>’’ perspective shifts the focus of AI advancement from brute computational scaling to optimizing inference and decision-making time.</p><p>But this isn’t true for every AI model (of course)!</p><p>Some AI systems thrive on deliberation, refining their answers like a philosopher. Others need to be<strong> </strong>blazing fast, prioritizing speed over deep thinking.</p><p>So when exactly does AI need time to think? And how do we give it that extra moment without making everything unbearably slow?</p><p>While model size and data scaling have historically driven progress, these improvements only affect training. What happens at inference time?</p><p>That’s where <strong>test-time compute</strong> comes in.</p><h4>Large Language Models</h4><p>The rapid progression of large language models (LLMs) over the past few years has been staggering. Looking at the timeline in Fig.1, we can see the steady evolution from early models like GPT-1, BERT, and T5 to today’s cutting-edge systems such as GPT-4o, Claude 3, Gemini 1.5, and LLaMA 3. Each leap forward has brought <strong>larger architectures, more training data, and improved performance</strong>. However, one thing that remains constant is how these models <strong>process information at inference time, </strong>i.e. the moment they generate responses based on user input.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FXlI8SdP7JnN3s32RfJIcQ.png" /><figcaption>Fig.1: LLMs timeline taken from “<a href="https://www.sciencedirect.com/science/article/pii/S1566253524006183">Federated and edge learning for large language models</a>”.</figcaption></figure><blockquote>At their core, <strong>LLMs do not think in the human sense.</strong> Instead, they predict the next word based on patterns learned from vast datasets. This prediction-based mechanism allows them to mimic reasoning but doesn’t necessarily enable adaptive decision-making based on problem complexity.</blockquote><p>For instance, whether an LLM is asked “What is the capital of France?” or “How does quantum mechanics influence cryptography?”, it generally processes both queries using a fixed amount of computational power.<strong> </strong>This one-size-fits-all approach works well for simple look-up tasks but can struggle with complex multi-step reasoning, where<strong> </strong>a pause for deeper analysis would lead to better answers.</p><p>This brings us to <strong>test-time compute</strong> — a concept that aims to break away from static inference by introducing <strong><em>dynamic computation scaling based on task complexity</em></strong>.</p><h4>What is Test-Time Compute and Why It Matters?</h4><p>Conventional AI models utilize a fixed level of computational power for every query, regardless of its complexity. Test-time compute (TTC) refers to the computational resources required to generate responses from a LLM during inference. This differs from both <strong>training compute</strong> — the computational cost incurred while training the model on vast datasets — and <strong>post-training compute</strong>, which involves fine-tuning or adaptation after the initial training phase.</p><blockquote>Unlike traditional models that use a fixed amount of compute for every query, a TTC-enabled model optimizes resource allocation — using minimal processing power for straightforward tasks while scaling up computational effort for more complex queries.</blockquote><p>TTC encompasses a variety of techniques. These include generating chains of thought, refining answers through iterative revision, leveraging external verifiers, backtracking, and sampling multiple outputs to select the best one. What unites these approaches is their reliance on additional computational power beyond a single forward pass. In this sense, models like OpenAI’s <strong>o1, o3</strong>, and <strong>Gemini 2.0 Flash</strong>, which incorporate TTC, represent a fundamental shift from earlier models, marking a new paradigm in AI efficiency and adaptability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/746/1*v7oJViRhNUUOEsP8YWEI3g.png" /><figcaption>Fig.2: o1 AIME accuracy vs both train-time compute (lhs) and test-time compute (rhs). Image taken from <a href="https://openai.com/index/learning-to-reason-with-llms/">OpenAI</a>.</figcaption></figure><p>Fig.2, indeed, tells a compelling story: <strong>AI performance isn’t just about training — it’s also about thinking time at inference.</strong></p><p>On the left, we see that more compute during training leads to a steady improvement in accuracy (pass@1 score). No surprises here, as more training usually makes AI ‘‘smarter’’. But the right side is where things get interesting: e<strong>ven after training, allocating more compute at test-time further boosts accuracy.</strong> This suggests that AI benefits from extra “thinking time” when solving complex problems, rather than rushing to generate an answer. If you have used the o1 model, you will surely notice that multi-step reasoning takes more time because the model needs to construct a chain of thought to solve the problem (see Fig.3).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*UOuBOJVmW4XcBZkR11AIFw.gif" /><figcaption>Fig.3: Image taken from <a href="https://www.aisharenet.com/scaling-test-time-compute/">aisharenet</a>.</figcaption></figure><h4>How Test-Time Compute Works</h4><p>The AI first analyzes the input to <strong>assess task complexity</strong>: it looks for factors like ambiguity, required reasoning depth, and multi-step dependencies.</p><ul><li>If the task (query) is simple, the model generates an answer quickly with minimal effort.</li><li>For harder problems, the model engages in <strong>multiple rounds of internal reasoning</strong>. Rather than generating an immediate output, it improves accuracy step by step, similar to how a human writes a first draft, reviews it, and makes corrections before finalizing.</li></ul><p>A key advantage of TTC is that <strong>not all neural network layers need to be activated for every task</strong>. Instead, deeper layers are <strong>selectively</strong> engaged only when necessary, optimizing compute efficiency. This ensures that hardware resources (GPUs, TPUs, or other accelerators) <strong>scale dynamically</strong> based on computational demand, reducing unnecessary processing and improving energy efficiency. By preventing excessive resource usage on simple tasks, TTC helps strike a balance between performance and sustainability, marking a significant evolution in AI model design.</p><h4>Final Considerations</h4><p>As of 2025, TTC is increasingly recognized as a key driver of performance improvements in LLMs, as we’re running into data bottlenecks and diminishing returns from the original <a href="https://www.jonvet.com/blog/llm-scaling-laws">pre-training LLM Scaling Laws</a>.</p><p>For years, progress in AI has largely been driven by scaling laws, which dictated that bigger models trained on more data with higher compute would yield increasingly powerful systems. However, the traditional approach to scaling LLMs is hitting fundamental limitations — both in terms of data availability and computational sustainability. As high-quality training data becomes scarcer, the diminishing returns from raw model expansion have become evident.</p><blockquote><strong>Simply making models bigger is no longer a viable long-term strategy — not only because of the economic and environmental costs but also because new performance gains are becoming marginal.</strong></blockquote><p>The AI industry is increasingly constrained by:</p><ul><li><strong>Data Bottlenecks</strong>: Large-scale, high-quality pre-training datasets are limited, and collecting more reliable, unbiased, and diverse data is becoming exponentially more difficult.</li><li><strong>Diminishing Returns</strong>: The original LLM scaling laws (which predict exponential improvements with larger models) are plateauing, making it clear that brute-force scaling is not enough.</li><li><strong>Computational Costs</strong>: Training a cutting-edge LLM now costs hundreds of millions of dollars, requiring massive compute clusters that are difficult to sustain long-term.</li></ul><p>With these constraints limiting traditional pre-training gains, TTC emerges as a fundamental shift in AI development, offering a smarter and more sustainable pathway to improved performance.</p><p>But here are some questions:</p><ul><li>If test-time compute can dynamically allocate resources, does that mean we’ve reached the limits of pre-training? Or is there still untapped potential in larger datasets? Are we overestimating the long-term impact of TTC or is it a paradigm shift for real?</li><li>Could TTC introduce new vulnerabilities? For example, if a model decides a question is “simple” and uses minimal compute, could it overlook important nuances, leading to biased or incorrect answers?</li><li>If smaller AI labs can’t afford to pre-train massive models but can optimize TTC, will we see a shift in AI leadership away from big tech giants?</li><li>And what about interpretability? If AI dynamically adjusts its reasoning depth, how do we ensure interpretability and fairness across different use cases?</li></ul><p>Let’s dive into the discussion! 🚀</p><p>(P.S. My sincere apologies to Daniel Kahneman for unapologetically borrowing, and slightly tweaking, the title of his iconic book!)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea55199c5b35" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Create an Awesome Mailing List for Your Call for Papers]]></title>
            <link>https://medium.com/@diletta.chiaro/how-to-create-an-awesome-mailing-list-for-your-call-for-papers-90f52817568e?source=rss-688fabb48f12------2</link>
            <guid isPermaLink="false">https://medium.com/p/90f52817568e</guid>
            <category><![CDATA[call-for-submissions]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[call-for-papers]]></category>
            <category><![CDATA[mailing-lists]]></category>
            <dc:creator><![CDATA[Diletta Chiaro]]></dc:creator>
            <pubDate>Fri, 07 Jun 2024 12:40:26 GMT</pubDate>
            <atom:updated>2024-06-07T12:40:26.337Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/356/0*zTtxT2g4dihEEAXo.gif" /><figcaption>Lovely Sheldon taken from<a href="https://giphy.com/"> giphy.</a></figcaption></figure><p>So, here I am, fresh off the excitement of having my <a href="https://www3.cs.stonybrook.edu/~ieeebigdata2024/SpecialSessions.html#SpecialSession8">Special Session on <em>Federated Learning on Big Data</em></a> accepted at the <a href="https://www3.cs.stonybrook.edu/~ieeebigdata2024/">IEEE Big Data 2024</a> conference. It’s a dream come true, this is the first special session I’ve ever organized at a conference, hopefully the first of many!</p><p>For those who might not know how it works, the success and “importance” of the special session (the same should apply to workshops) are defined by the number of papers submitted. Specifically, the amount of time we get at the conference depends on the number of papers <strong>registered</strong>, which means accepted, which means submitted. And here’s where the hard work comes in: spreading the word about the special session and ensuring researchers in the field submit their work!</p><p>I’ve shared the news on my personal <a href="https://www.linkedin.com/in/dilettachiaro/">LinkedIn</a> page. However, even though I have a lot of connections, they aren’t specifically targeted enough.</p><blockquote>So, I thought, what if I could just spam emails to potential contributors? But how do I create a mailing list of people who might be interested?</blockquote><h3>The Plan: Building a Mailing List</h3><p>An effective mailing list can significantly boost your reach and ensure you get high-quality submissions. So, let’s dive into how you can create one, using some Python magic to make this process smooth and enjoyable.</p><p>A mailing list is essential because it allows you to:</p><ul><li><strong>Spread the Word</strong>: Share important info like deadlines, submission guidelines, and updates.</li><li><strong>Boost Participation</strong>: Reach a wide audience of researchers and professionals who are interested in your event or publication.</li><li><strong>Build a Community</strong>: Keep in touch with past participants and authors, fostering a network of engaged individuals.</li></ul><p><strong>And what if I told you that you could do it in just… 10 minutes?”</strong></p><h3>Step-by-Step Guide</h3><p>Just click and run this <a href="https://colab.research.google.com/drive/1_3Cp8VqqYYQ2isl0KHt2tmbJuLBLsWmg?usp=sharing">Colab</a>!</p><h4>Step 1: Gathering the Mails</h4><p>We start by extracting emails from the data sources. I used <a href="https://www.scopus.com/search/form.uri?display=basic&amp;zone=header&amp;origin=searchauthorfreelookup#basic">Scopus</a> and <a href="https://www.webofscience.com/">Web of Science</a> to gather the email addresses of researchers interested in #FederatedLearning. Both platforms store data differently (Excel for Web of Science and CSV for Scopus) and have unique ways to export results. For example, on Scopus, I searched for “federated learning,” which yielded 15,097 papers as of June 7. I selected all the results and exported the data in CSV format, but only the “Correspondence address” from the Bibliographical information. Similarly, on WoS, I exported the author information in Excel format, i.e. “Addresses” field.</p><h4>Step 2: Clean and Organize Data</h4><p>Next, we clean and organize the data. We handle missing values and split multiple emails that are in the same cell.</p><h4>Step 3: Identify Duplicates</h4><p>We convert our email lists into sets to easily identify duplicates and ensure that we only keep unique addresses.</p><h4>Step 4: Save the List</h4><p>Finally, we save our clean, unique list of email addresses to a text file.</p><h3>Conclusion</h3><p>Creating a mailing list for your Call for Papers doesn’t have to be a chore. With a bit of Python magic, you can efficiently gather and clean your email addresses, ensuring you reach the right audience. So, roll up your sleeves, fire up your Python environment, and start building that awesome mailing list!</p><p>Happy coding, and may your inbox be ever full of amazing submissions!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90f52817568e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Aggregation Techniques in Federated Learning: a brief overview]]></title>
            <link>https://medium.com/@diletta.chiaro/aggregation-techniques-in-federated-learning-a-brief-overview-90a8c168c560?source=rss-688fabb48f12------2</link>
            <guid isPermaLink="false">https://medium.com/p/90a8c168c560</guid>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[surveys]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[aggregation]]></category>
            <category><![CDATA[federated-learning]]></category>
            <dc:creator><![CDATA[Diletta Chiaro]]></dc:creator>
            <pubDate>Tue, 27 Feb 2024 21:57:35 GMT</pubDate>
            <atom:updated>2024-02-27T21:57:35.031Z</atom:updated>
            <content:encoded><![CDATA[<iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F0Av9l0VIc01y1isrDw%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExcHA4aG5yMDRrbTdpaXplc3cybDNyazEwZnA1MzQxdXpvdW5lNTNkYyZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2F0Av9l0VIc01y1isrDw%2Fgiphy.gif&amp;image=https%3A%2F%2Fmedia1.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExamc0MjZxa25kNGxuMmg2ZnN1M25yc2Q2aHFvb2xrZjA2anozNm00ciZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2F0Av9l0VIc01y1isrDw%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="326" frameborder="0" scrolling="no"><a href="https://medium.com/media/54dce7028728af9fc3b8d3ee27005504/href">https://medium.com/media/54dce7028728af9fc3b8d3ee27005504/href</a></iframe><p>As a big fan of Federated Learning (FL) and it being the primary focus of my doctoral studies, I’m excited to explore one of its key components in my second Medium story: aggregation techniques. If you have found your way here, one thing is certain: you’re on a quest for knowledge about aggregation techniques in FL! So, without further ado, let’s dive into the topic.</p><h3>Federated Learning</h3><p>For those new to the concept, FL is a clever way for many devices to team up and train a shared model without giving away their private data.</p><p>Since its very first introduction, machine learning (ML) has gained widespread popularity for its exceptional problem-solving abilities. However, the data-centric nature of ML raises significant privacy and security concerns. Traditional artificial intelligence (AI) models often rely on centralized data centers, making them vulnerable to security breaches and privacy infringements. In response, FL emerged as a distributed training approach aimed at safeguarding privacy by decentralizing data and model training processes.</p><p>In a typical federated setting is made up by four key elements: the central server, the clients, the communication framework, and the aggregation algorithm. Each one plays a distinct role in the FL process, defined as follows:</p><p>1. Server: it manages connections between entities in the FL environment and aggregates knowledge acquired by FL clients.</p><p>2. Clients: all computing parties/devices with data available for training the global model. These may be personal computers, servers, smartphones, smartwatches, sensor devices, and more.</p><p>3. Communication framework: it comprises the tools and devices utilized to connect servers and parties, which may vary from internal networks to intranets or the Internet.</p><p>4. Aggregation algorithm: it is responsible for aggregating knowledge acquired by parties from training with their local data and leveraging this aggregated knowledge to update the global model.</p><p>In the conventional setup of FL, training occurs through communication rounds, i.e.rounds of bidirectional communication between the server and clients. During each round, several key steps unfold:</p><p>1. Initially, each client downloads the latest model from the server to initialize their local model.<br>2. Next, clients utilize their own local datasets to conduct training and update their respective local models.<br>3. Subsequently, the clients transmit their updated models back to the server.<br>4. Finally, the server <strong><em>aggregates</em></strong> the received local models to produce a new, updated version of the global model.</p><p>These steps are iterated until the accuracy of the combined model reaches the target level or the server concludes the communication.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bXUpRt_waIToxjwI.gif" /><figcaption>Fig.1: A centralized-server approach to federated learning. Image from <a href="https://2cute2tech.substack.com/">2cute2tech</a>.</figcaption></figure><p>In contrast to traditional ML approaches, where all data is collected centrally, FL ensures that local data remains on client devices. This unique characteristic offers enhanced <em>privacy</em> and <em>security</em> assurances.</p><p>However, it’s important to note that there are some differences in how things are set up and optimized on both the client and server sides, which can lead to variations in the process. But generally, the setup we described is the most common one researchers use.</p><p>Now, let’s shift our focus to exploring the different ways information is shared between the clients and the server.</p><h3>Model Aggregation in Federated Learning</h3><p>In the world of FL, model aggregation is akin to orchestrating a harmonious symphony, where information, usually model parameters, from all players is blended together in each round of communication to craft an updated global model. ***violins playing in background***</p><p>This process ensures privacy by aggregating model parameters instead of raw training data.</p><p>Model aggregation comes in two types: parameter-based and output-based.</p><ul><li>Parameter-based aggregation focuses on melding trainable parameters like <em>weight parameters</em> or <em>gradients</em> of deep neural networks. In each communication round, local models share these parameters after iterative training on their local datasets.</li><li>Output-based aggregation centers on merging representations of the model, such as <em>output logits</em> or <em>compressed sketches</em>. Take, for example, the <a href="https://dl.acm.org/doi/abs/10.1145/3485730.3485929">Fedmask</a> approach, which tackles the limited computing resources of mobile devices in FL. Here, each device learns a binary mask, and the server combines overlapping masks to boost computational efficiency while ensuring effective model training.</li></ul><p>When it comes to the form of aggregation, in centralized FL, a central server takes the lead, gathering and merging models from individual clients to create an aggregated masterpiece. On the other hand, decentralized FL adds a dash of collaboration flair, as model aggregation happens through peer-to-peer (P2P) communication. Parties team up, exchanging and fusing models directly, with no need for a central server.</p><p>As FL research moves forward, there’s a wide array of model aggregation methods to explore. These techniques serve different goals, like boosting federated model performance, cutting down on communication overhead, and tackling data security and privacy issues.</p><h4><strong>FedAvg</strong></h4><p>One of the earliest and most widely used methods in FL is <a href="https://proceedings.mlr.press/v54/mcmahan17a.html">FedAvg</a>. In FedAvg, a subset of clients is randomly chosen at each round of training for aggregation. During the aggregation process, the parameters of each client are weighted and averaged to produce a global model, with the weight factor being proportional to the client’s data volume. It’s worth noting that FedAvg may introduce additional computation for each client by iterating the local update (local epochs) multiple times before the averaging step.</p><p>During the t-th communication round, FedAvg operates as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/0*9R31BNrz_JLHOwM0.png" /></figure><p>Here, <em>k</em> represents the members of the selected set of clients, nk/n is the weight factor, which is the ratio of the data volume of client <em>k</em> to the total data volume. Finally, w^{t+1}_k \ represents the updated model of client <em>k</em> after local training, and w^{t+1}_{global} represents the aggregated global model.</p><p>One key drawback of FedAvg is that the global model based on averaging may not outperform local models, particularly in the initial stages of training. This can cause FedAvg to diverge in practical situations (<em>drift</em>, see Fig.2), especially when data distribution varies among devices and the number of data samples greatly differs from one device to another, a situation which is referred to as non-IID-ness.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Cdpq2WLc6kvWn5ee.png" /><figcaption>Fig.2: Image taken from <a href="https://gaoxiangluo.github.io/2021/07/24/Notes-on-ICML-2021-about-Federated-Learning/">here</a>.</figcaption></figure><p>We have discussed FedAvg as the initial aggregation method. Now, for a more detailed explanation, we rely on the topology defined by my colleagues and me in our survey “<a href="https://www.sciencedirect.com/science/article/pii/S0167739X23003333">Model aggregation techniques in federated learning: A comprehensive survey</a>” published on <a href="https://www.sciencedirect.com/journal/future-generation-computer-systems">Future Generation Computer Systems</a>. In particular, we categorize the aggregation techniques into four types based on their aggregation form: synchronous, asynchronous, hierarchical, and robust.</p><h4>The topology</h4><p>To offer a thorough examination of the aggregation methodologies in FL, we have categorized them into four distinct groups, as illustrated in Fig.3, and provided comprehensive explanations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kG1KSTKcyQl2xP6GlSfAsQ.png" /><figcaption>Fig.3: A diagram of the proposed taxonomy as taken from the <a href="https://www.sciencedirect.com/science/article/pii/S0167739X23003333">survey</a>.</figcaption></figure><h4>Synchronous Aggregation</h4><p>In synchronous aggregation-based FL research, model aggregation occurs after all client updates have reached the server, with little consideration for the latency experienced on the client side. This means that in algorithms like FedAvg, the server randomly selects clients for training in each communication round, including their model parameters in the aggregation process, without explicitly addressing individual client delays. Despite the synchronous aggregation of client updates, discrepancies may still arise during this process, providing unique advantages to synchronous-based FL research. To address data heterogeneity in this scenario, recent research focuses on several approaches: (1) adding regularization terms to constrain local models, (2) adjusting aggregation weights to allocate appropriate shares for different clients, and (3) compressing the model to enhance its expressiveness.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o-YXTrV5x5jz1SrUY_B73w.png" /><figcaption>Fig.4: Synchronous Aggregation in FL. Image taken from the <a href="https://www.sciencedirect.com/science/article/pii/S0167739X23003333">survey</a>.</figcaption></figure><h4>Asynchronous Aggregation</h4><p>Asynchronous Federated Learning has garnered considerable attention due to the increasing influence of device heterogeneity in federated systems. Device heterogeneity refers to the diversity among the devices participating in the federated learning process. This diversity can manifest in various ways, including differences in computational capabilities, network bandwidth, and local dataset sizes. Such variations pose significant challenges to traditional synchronous approaches, as devices may progress through training at different rates.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/0*Y0W83Ehakdt0qVwe.png" /><figcaption>Fig.5: Device heterogeneity. Image taken from <a href="https://peilab.comp.polyu.edu.hk/project/efficient-federated-learning-framework/">here</a>.</figcaption></figure><p>Asynchronous FL allows clients to upload their local updates in a staggered manner, which helps alleviate the adverse effects of device variability. In traditional FL setups, delays stemming from poor network signals or client crashes during training may result in delays in uploading updates, thereby prolonging the waiting time for the server to receive updates from all clients. The primary objective of asynchronous aggregation is to expedite the training process. In fully asynchronous aggregation, aggregation occurs immediately after the server receives local updates from each client, enabling each client to train independently without waiting for others to complete their updates. This asynchronous approach enhances the efficiency and scalability of FL by reducing waiting times and enabling clients to contribute updates at their own pace.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5jlNYKmi17Mq-4HJqfbDwQ.png" /><figcaption>Fig.6: Asynchronous Aggregation in FL. Image taken from the <a href="https://www.sciencedirect.com/science/article/pii/S0167739X23003333">survey</a>.</figcaption></figure><p>Semi-asynchronous aggregation functions as an intermediary method between synchronous and asynchronous aggregation. <a href="https://ieeexplore.ieee.org/abstract/document/9562538?casa_token=jK6QTrPHPR0AAAAA:6RrKAhZpYGl9GGy5pZsoonfO-uEtrpP7NZLP0EKOc7dTukGdrxR4Cf13iC_CoajiO_7p5xVfaQ">FedSA</a>, with a predetermined communication budget, enables the server to perform a certain number of aggregations based on the order of client model arrivals in each round, thus optimizing the balance between waiting time and resource consumption. Similarly, <a href="https://ieeexplore.ieee.org/abstract/document/9093123?casa_token=KQhf2KCxRKoAAAAA:wLW3SEEQUSRzCIBgo9VbJ3OtcUPaJiWJFOI9QxfEeHPB5YFQnFlpZQfhCVUNz25k3Nqt4ZrQUw">SAFA</a> is a semi-asynchronous FL protocol that introduces the hyperparameter “lag tolerance” to coordinate lagging clients and adjust for the arrival order of client models.</p><h4>Hierarchical Aggregation</h4><p>In the realm of edge learning, the proliferation of numerous edge devices, such as IoT devices, can significantly hinder the efficiency of FL due to frequent model aggregation and the resulting high communication overhead. To address this challenge, researchers have proposed a hierarchical aggregation approach that integrates an edge layer to partially aggregate local models from closely related client devices before further aggregation on the cloud server. This hierarchical approach aims to mitigate communication overhead and reduce the number of model transfer rounds by introducing multiple aggregation centers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AMwaSbegmMGIZs0pMDKFjg.png" /><figcaption>Fig.7: Hierarchical Aggregation in FL. Image taken from the <a href="https://www.sciencedirect.com/science/article/pii/S0167739X23003333">survey</a>.</figcaption></figure><p>Several approaches have been proposed to optimize the hierarchical architecture of HFL and improve its performance. For instance, the <a href="https://ieeexplore.ieee.org/abstract/document/10161191?casa_token=lFpZxABmjVMAAAAA:1EwbHnbicTG4rFYbfbslV6Y172E18OgCOIDUAwitnUWVPVPYHBoep6r7purDUfsEfu77LT4nTw">FogL</a> architecture adopts a tree-based federated network structure where end devices serve as leaves and the master server acts as the root. By implementing multi-level and multi-stage tree aggregation techniques, FogL effectively mitigates the risk of system overload and enhances resource allocation efficiency.</p><h4>Robust Aggregation</h4><p>While FL offers superior data privacy and security assurances compared to centralized ML approaches, recent studies have unearthed various security vulnerabilities within FL. For instance, <a href="https://link.springer.com/chapter/10.1007/978-3-030-88418-5_23">attackers can launch inference attacks to deduce participants’ data distribution by scrutinizing local model parameters</a>, and <a href="https://dl.acm.org/doi/abs/10.1145/3460427">malicious actors can execute backdoor attacks by introducing rogue clients to the global model</a>. These risks have prompted researchers to devise strategies to bolster FL model robustness. To ensure secure aggregation throughout the FL process, researchers advocate for the adoption of diverse encryption techniques, such as <a href="https://en.wikipedia.org/wiki/Differential_privacy">differential privacy</a> and <a href="https://en.wikipedia.org/wiki/Homomorphic_encryption">homomorphic encryption</a>. Differential privacy involves injecting random noise into the output to thwart attackers from reverse-engineering sensitive data, while homomorphic encryption facilitates basic functional operations on encrypted data. Moreover, the utilization of decentralized model aggregation is recommended, for instance, through blockchain technology. This decentralized approach eliminates the central server from the system, thereby averting single points of failure. Other strategies encompass optimizing contract mechanisms, employing robust stochastic model aggregation, opting for a small committee instead of assigning sanitization factors, or circumventing small group domination. Additionally, ongoing efforts are evident in strategies like multi-party computation (MPC) and trusted execution environment (TEE) to address FL’s security vulnerabilities and bolster the system’s privacy protection.</p><h3>Conclusions</h3><p>In general, synchronous aggregation proves effective in achieving optimal model performance when the federated system comprises a relatively small number of devices. However, with an increasing number of clients, client heterogeneity, whether in terms of statistical variations or device disparities, becomes more pronounced, resulting in extended training times as clients await synchronization. In such scenarios, asynchronous aggregation emerges as a more favorable option. Conversely, hierarchical aggregation is particularly well-suited for large-scale IoT applications like the Internet of Vehicles, where numerous devices require coordination. This approach aids in diminishing communication overhead and the number of model transfer rounds. For applications demanding high system security, the robust aggregation method is preferred. This strategy addresses security concerns by incorporating techniques such as parameter encryption or blockchain technology, thereby enhancing the overall security of the federated system. By categorizing research methodologies and considering their specific attributes and advantages, FL practitioners can make well-informed decisions when selecting the most suitable model aggregation approach tailored to their unique requirements and constraints.</p><p>I hope you found this overview informative and insightful. For those eager to delve deeper into the subject, additional content and detailed insights can be found in the referenced survey <a href="https://www.sciencedirect.com/science/article/pii/S0167739X23003333"><em>Model aggregation techniques in federated learning: A comprehensive survey</em></a>.</p><p>P.S. I’d like to remind that the majority of the images accompanying this content are handcrafted and copyrighted: proper citation is essential should they be used elsewhere!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90a8c168c560" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Statistical Techniques for Classifiers Comparison with Python]]></title>
            <link>https://medium.com/@diletta.chiaro/statistical-techniques-for-classifiers-comparison-with-python-db178b081f51?source=rss-688fabb48f12------2</link>
            <guid isPermaLink="false">https://medium.com/p/db178b081f51</guid>
            <category><![CDATA[hypothesis-testing]]></category>
            <category><![CDATA[classification-algorithms]]></category>
            <category><![CDATA[classification-metrics]]></category>
            <category><![CDATA[marginal-homogeneity]]></category>
            <category><![CDATA[classifiers-comparison]]></category>
            <dc:creator><![CDATA[Diletta Chiaro]]></dc:creator>
            <pubDate>Sun, 28 Jan 2024 15:28:44 GMT</pubDate>
            <atom:updated>2024-01-28T15:28:44.757Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*Or7pmh0cIUvU7NP--BbL1A.gif" /><figcaption>Gif from <a href="https://giphy.com/gifs/shoes-disney-cinderella-qL1Ig46CJ8XAc">Giphy</a>.</figcaption></figure><p>Choosing the right model in the world of machine learning is like finding the perfect pair of shoes: it needs to fit just right for the task at hand! We often rely on techniques like <a href="https://en.wikipedia.org/wiki/Cross-validation_(statistics)">k-fold cross-validation</a> to give us a sense of how well our models perform. It’s like trying on those shoes and walking a bit to see how comfy they are.</p><p>But, here’s the twist: just looking at the average performance scores can be a bit like judging those shoes without considering if the fit difference is real or just a random hiccup: that’s where things get tricky!</p><p>To unravel this mystery, we may decide to turn to <a href="https://home.csulb.edu/~msaintg/ppa696/696stsig.htm#:~:text=Tests%20for%20statistical%20significance%20are%20used%20to%20estimate%20the%20probability,to%20filter%20out%20unpromising%20hypotheses.">statistical significance tests</a>. These tests play detective, helping us figure out if the differences in our model scores are for real or just a product of chance. 🔎 Imagine them as the fashion police, ensuring our chosen shoes aren’t just a fleeting trend!</p><p>So, why does this matter? Well, understanding and using these statistical stuff for comparing classifiers is like having a trusty fashion advisor. It ensures that when we say one model is better than the other, we’ve got the stats to back it up!</p><blockquote>Is the gap in performance between two given machine learning models for real, or is it just a product of statistical luck?</blockquote><p>To answer this question, in this article we explore statistical methodologies that can be applied to compare classifiers, <em>all of which do not assume knowledge of the true labels</em>.</p><h4>Classifiers comparison</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fg86s17P-bxGBfeLBo3lbw.png" /><figcaption>Fig. 1: Contingency table for the comparison of two classifiers, C_1 and C_2.</figcaption></figure><p>Let’s consider two classifiers, C_1 and C_2, that have undergone training. We evaluate their performance on the same test set, and the output for each sample is a label A, B, or C. This information can be organized into a contingency table, like the one shown in Fig. 1. In this table, n_AA represents the number of samples where both algorithms assign label A, n_AB is when C_1 assigns A and C_2 assigns B, n_BA is the reverse situation with the labels swapped, and so on.</p><p>The presence of non-zero values off the diagonal indicates imperfect agreement between the algorithms. Yet, we still want to assess the level of agreement more precisely, specifically checking if it’s less than what we would expect by random chance.</p><p>Various methods from statistical literature are suggested for comparison, including marginal homogeneity testing and log-linear modeling. We’ll dive into the first one in a bit, leaving log-linear modeling for future discussion. Cohen’s kappa is also a well-known go-to to see how well algorithms agree beyond just random chance; however, it crunches a whole contingency table into one number, possibly losing some key info. Indeed, according to <a href="https://books.google.it/books?hl=it&amp;lr=&amp;id=UOrr47-2oisC&amp;oi=fnd&amp;pg=PR13&amp;dq=A.+Agresti.+Categorical+Data+Analysis.+Wiley,+3rd+edition,+2013.&amp;ots=rRUg5G6r2y&amp;sig=Nxk8F3jgC7EJ2bLpofEc141Wk78&amp;redir_esc=y#v=onepage&amp;q=A.%20Agresti.%20Categorical%20Data%20Analysis.%20Wiley%2C%203rd%20edition%2C%202013.&amp;f=false">Agresti</a> (2013),<em> “In summarizing a contingency table by a single number the reduction of information can be severe”.</em> Still we’re going to discuss it. Throughout the article, it is assumed that the reader has a basic understanding of statistics and hypothesis testing.</p><h4>Marginal Homogeneity Tests</h4><p>Marginal homogeneity tests focus on examining the difference in the proportion of samples labelled as A by both models, the proportion of samples labelled as B by both models, the proportion of samples labelled as C by both models, and so on up to P categories. For P×P contingency tables, such as the one depicted in Fig.1 where P=3, all the differences can be collectively assessed for statistical significance using the <a href="https://www.jstor.org/stable/2333387?casa_token=OU-x4_Kr3p8AAAAA%3AoS9HkCMrEMHT4janrnaaIj_49WFVUbVHHlECfgvYOr11JxDyMe37Dkm06S_wsupIiM_RpMjOz6KX6LFNKlmFJZBg9C-ICZ9X605C6KhZEc7ydSjH_Sc"><strong>Stuart Maxwell test</strong></a>. If the resulting <em>p-value</em> is deemed significant, it implies that at least one of these P differences is statistically different from zero. The Stuart Maxwell test represents a broader version of the <a href="https://link.springer.com/chapter/10.1007/978-81-322-1038-2_2"><strong>McNemar test</strong></a>, which is commonly used in the comparison of binary classifiers.</p><p>The Stuart-Maxwell test examines marginal homogeneity across all P categories simultaneously. The null hypothesis is that, for each category <em>j</em> of the dependent variable, πj for the first paired group equals πj for the second paired group, where πj represents the population proportion in category<em> j</em>. Conversely, the alternative hypothesis suggests that for certain categories of the dependent variable πj for the first paired group is not equal to πj for the second paired group. It’s important to note that statistical tests rely on assumptions about the sampling procedure used to collect the sample data. In the case of the Stuart-Maxwell test, the assumption is that pairs are independent of each other.</p><p>The calculation of the test involves the following steps. Consider a PxP frequency table with the same structure as Fig.1. Let the column vector <strong>d</strong> consist of any P— 1 values, denoted as d1, d2, …, dP, where di = ni. — n.i (i = 1, …, P). Let S represent the (P— 1) × (P — 1) matrix containing the variances and covariances of the elements in d. The individual elements of S are given by:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/160/0*Q7TvcmpwRxAi8aW-.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/151/0*DadGX0CwuAYue_oh.png" /></figure><p>The Stuart-Maxwell statistic is then computed as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/218/0*xtsJSusyMENrAIMX.png" /></figure><p>The expression d’ represents the transpose of vector d, and the matrix S^{-1} denotes the inverse of matrix S. The resulting value X2 is interpreted as a chi-squared statistic with P — 1 degrees of freedom.</p><p>The <strong>Bhapkar test </strong>is a more potent alternative to the Stuart-Maxwell test. Similar to the latter, its calculation follows a comparable method, but the specific formulas differ. However, the Bhapkar and Stuart-Maxwell tests exhibit asymptotic equivalence: in situations with a large sample size, both tests yield the same X2 value.</p><h4>Cohen’s Kappa</h4><p><strong>Cohen’s Kappa</strong> is a single summary index that describes strength of inter-rater agreement. For PxP<em> </em>tables, it is computed as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/431/0*cCf3472jpp4ke4Z6.png" /></figure><p>This statistic compares the observed agreement to the expected agreement, computed assuming the ratings are independent. The null hypothesis that the ratings are independent is, therefore, equivalent to</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/191/0*h4gi8Uar7DXf6btv.png" /></figure><p>If the observed agreement is due to chance only, i.e., if the ratings are completely independent, then each diagonal element is a product of the two marginals.</p><p>Perfect agreement is indicated when K=1, signifying complete concordance. On the other hand, when K=0, it does not signify perfect disagreement, but rather, it suggests agreement that would occur solely by chance. In such cases, the diagonal cell probabilities are merely the products of the corresponding marginals. If the observed agreement surpasses the agreement expected by chance, then K is greater than or equal to 0; conversely, if the observed agreement falls below the agreement expected by chance, then K is less than or equal to 0. The minimum attainable value for K is -1. A K value exceeding 0.75 can be considered, somewhat arbitrarily, as indicative of “excellent” agreement, while a value below 0.4 suggests “poor” agreement. These threshold values serve as rough guidelines for interpreting the level of agreement assessed by the Kappa statistic.</p><h4>A pratical implementation</h4><p>In <a href="https://colab.research.google.com/drive/1H5N31cr55KMhHrM2jsYKwr9ig6QbjC-j?usp=drive_link">Colab</a>, I provide a straightforward implementation on the MNIST dataset, where I computed statistics using functions I developed based on the corresponding R code. All the referenced functions can also be found on my <a href="https://github.com/dilettachiaro/Statistical-Techniques-for-Classifiers-Comparison-with-Python/tree/main">GitHub</a>.</p><p>I swiftly ran two classification algorithms, a simple fully connected neural network (NN) and a single decision tree classifier (CLF), and conducted a comparison between them. The contingency table comparing the two algorithms on predictions on the test set is as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/618/1*gR352EHuMbeY50wBH1Sm1Q.png" /></figure><p>Both unweighted and weighted Cohen’s Kappas are high (0.857 and 0.861), indicating substantial agreement. This suggests that the two models are in good agreement in their classifications.</p><p>For the Stuart-Maxwell and Bhapkar tests, which give similar results due to the aforementioned asymptotic equivalence, the statistics is 14.50 with a p-value=0.11&gt;0.05. This implies that there is no statistically significant difference in the distribution between the paired groups, reinforcing the notion of consistent agreement between the two models in their overall classification patterns.</p><p>To challenge this, one can manipulate the contingency table to introduce more off-diagonal elements and then repeat the tests.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=db178b081f51" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>