<?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 Rui Pedro Porfírio on Medium]]></title>
        <description><![CDATA[Stories by Rui Pedro Porfírio on Medium]]></description>
        <link>https://medium.com/@ruipedroporfirio?source=rss-62e390200f3d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*_N17MBg39_j7mDxTSCEQpg.jpeg</url>
            <title>Stories by Rui Pedro Porfírio on Medium</title>
            <link>https://medium.com/@ruipedroporfirio?source=rss-62e390200f3d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 10:35:39 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ruipedroporfirio/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[A Diagnosis Is Not the Endpoint: What Agronomists Told Us About Explainable AI]]></title>
            <link>https://medium.com/@ruipedroporfirio/a-diagnosis-is-not-the-endpoint-what-agronomists-told-us-about-explainable-ai-3c552a39c099?source=rss-62e390200f3d------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c552a39c099</guid>
            <category><![CDATA[agronomy]]></category>
            <category><![CDATA[research]]></category>
            <category><![CDATA[agriculture]]></category>
            <category><![CDATA[human-ai-interaction]]></category>
            <category><![CDATA[explainable-ai]]></category>
            <dc:creator><![CDATA[Rui Pedro Porfírio]]></dc:creator>
            <pubDate>Fri, 24 Apr 2026 23:43:48 GMT</pubDate>
            <atom:updated>2026-04-24T23:51:07.456Z</atom:updated>
            <content:encoded><![CDATA[<p>When we talk about AI making mistakes, the examples that usually come to mind are the dramatic ones. A self-driving car misreading a stop sign. A medical model missing a diagnosis. But most of the AI errors that touch our daily lives are much quieter. We accept the route our navigation app suggests even when we know a faster shortcut. We trust the autocomplete suggestion even when it slightly changes the meaning of our sentence. We let the recommendation feed shape what we read next. This tendency to defer to the machine is usually referred to as <strong>automation bias</strong>.</p><p>In low-stakes contexts, the cost of automation bias is usually an inconvenience. We take a slightly longer route home. We send a message with a typo. In high-stakes domains, however, the same bias starts to have consequences that we cannot sweep under the rug. This is why fields like medicine and law have been central to Human-Centered AI research over the last few years. When an AI output shapes a biopsy decision or a legal summary, questioning the system is not an optional feature. It is part of the professional workflow itself.</p><p>Agriculture belongs to this <strong>high-stakes category</strong>. A flawed recommendation can travel down the chain of decisions an agronomist makes during the growing season and land in the field, where the consequences are measured in crop loss, wasted treatments, or environmental harm. Add to this that agriculture is already under pressure from food security demands and sustainability goals, and that smart farming adoption remains limited in practice, especially in the Global South. The stakes are real, but the research landscape is still mostly dominated by work focused on improving the models rather than testing the interfaces with the people who will actually use them.</p><p>This is the gap my co-authors and I set out to explore in the paper we recently published at ACM CHI conference. If the goal of Explainable AI in agriculture is to support expert decision-making, then we need to understand<strong> how agronomists actually interact with explanations in their workflow</strong>. Do these explanations help them verify predictions? Do they encourage scrutiny, or do they quietly push experts toward passive acceptance?</p><h3>The Study</h3><p>We conducted a qualitative case study with nine professional Portuguese agronomists. The cohort had an average of 7.3 years of professional experience and all of them held a university degree. They reported high familiarity with AI-based tools in general but moderate-to-low familiarity with XAI concepts specifically, which made them a good fit for studying the initial perceptions of these systems. We used a within-subjects design, meaning each participant evaluated every condition. To control for ordering effects, we counterbalanced the scenarios using a balanced Latin Square. Each session ran for about 45 minutes and was audio and video recorded.</p><p>For the prototype, we built an interactive web application localized in Portuguese that simulated a deep learning tool for plant disease diagnosis. The explanations were pre-generated and cached so every participant saw the same output for the same input. Participants engaged with the prototype under a think-aloud protocol, describing their reasoning as they went.</p><h3>The Scenarios and the Verification Case</h3><p>Each participant evaluated three conditions:</p><ul><li><strong>C1: Baseline.</strong> Only the model’s diagnosis.</li><li><strong>C2: Feature-Attribution.</strong> A Grad-CAM heatmap overlaid on the leaf, highlighting the pixels the model considered most important to “reach its decision”.</li><li><strong>C3: Example-Based.</strong> Two visually similar, confirmed cases from the training dataset, retrieved via a search on feature embeddings from a pre-trained Vision Transformer. Each retrieved example is shown alongside its ground-truth label, so the participant sees not just a similar image but a confirmed case.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UuQnH00BP1yWB2lujUQaiA.png" /><figcaption>C1: Baseline</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ath0SfFynqFARSAdpfWNxQ.png" /><figcaption>C2: Grad-CAM (Heatmap)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U5FpaxiPbLebUBunqtMlig.png" /><figcaption>C3: Example-Based condition. In this case, it is displaying the misleading diagnosis made by the AI model alongside verified healthy examples for visual comparison. Basically, the model predicted Apple Scab but the examples are conflicting because they are verified examples of Healthy leaves.</figcaption></figure><p>Three plant images served as the inputs. Two were correctly classified, a grape leaf with black rot and a potato leaf with leaf blight. The third was different... <strong>It was a healthy apple leaf that the model incorrectly classified as having apple scab.</strong> This was our verification scenario. Its purpose was not to test accuracy. It was to study whether each explanation condition helped experts catch a flawed output.</p><h3>The Co-Design Task</h3><p>After finishing the three scenarios, participants moved to a semi-structured interview and a generative co-design task. We built a simple UI construction tool for this phase, with a palette of pre-defined components that participants could drag onto a canvas, plus a drawing tool to sketch new elements. The goal was to let agronomists describe the interface they would actually want, using their own vocabulary and their own priorities, rather than reacting to something we had already designed for them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u2L97SATjl8__nU6AVQtFA.png" /><figcaption>Co-Design Task: The participant was asked to build their ideal diagnosis UI. We offered two features: pre-built components (the participant could use none, some, or all of them) and a draw feature similar to MS Paint to boost creative ideas.</figcaption></figure><p>Alongside the qualitative data, we collected quantitative measures to contextualize the observations. These were used to add precision to the story rather than to make claims of statistical significance.</p><h3>What We Found</h3><p>A few patterns came through clearly.</p><p>Example-based explanations (C3) were the top pick for seven of the nine participants. This condition also scored highest for decision confidence and trust, and it imposed the lowest reported cognitive load. Put simply, when given the choice, the agronomists in our study gravitated toward explanations grounded in comparable cases rather than explanations grounded in model’s attention.</p><p>The verification scenario was more ambiguous, and I want to clarify a few things regarding this scenario. With only three participants per condition, the sample was small. In the heatmap condition, none of the three participants rejected the misleading diagnosis. In the example-based condition, one of the three did. That is a difference of a single participant, and it should be read as an anecdotal observation rather than statistical evidence. <strong>What I think is worth noting is the reasoning participants verbalized, not the count itself.</strong></p><p><strong>For the heatmap condition</strong>, one participant (P8) misread the red regions of the Grad-CAM visualization as literal temperature readings. This is a small but vivid example of how an abstract visualization can convey an unearned sense of scientific authority. The heatmap looks precise, so it reads as precise, even when it is communicating something quite different from what the viewer assumes. It is an early signal that feature-attribution visuals may sometimes be interpreted in ways their designers did not intend, though a single quote cannot carry the full weight of that claim.</p><p><strong>For the example-based condition</strong>, the one participant who did reject the misleading diagnosis (P1) justified the decision by comparing the input image to one of the retrieved examples, noting:</p><blockquote>“I have little confidence… because it seems to me that the initial image is the same as one of the [healthy] examples.”</blockquote><p>Another participant (P4) who did not catch the error rationalized the AI’s label by reinterpreting the healthy reference image:</p><blockquote>“I think the other one (the healthy image) is a little bit dry. That might be the part that is the pathology.”</blockquote><p>So… the<strong> example-based format does not guarantee error detection</strong>. It appears to support the kind of side-by-side comparison that agronomists already do in the field, but the outcome depends on the expert’s prior knowledge of the specific crop. Therefore, we treated this as a preliminary signal worth studying with a larger and more diverse sample, not a confirmed advantage of one explanation type over another.</p><p>Despite all the above, the pattern we identified to be the most common was the one around <strong>actionability</strong>. Across participants and across conditions, agronomists did not treat the diagnosis as the end of the interaction. They treated it as a prerequisite for the next question, which was always some version of “what do I do now?”. P8 put it plainly:</p><blockquote>“The next step, after knowing the disease, is to know how to cure it”</blockquote><p>A static label, no matter how accurate or how well-explained, was not enough on its own. The tool only starts to earn its place in the workflow when it supports the path from detection to intervention.</p><h3>Design Considerations</h3><p>These observations led us to <strong>four design considerations</strong>. I will summarize them here, but the paper goes into each in more depth.</p><p><strong>Design for scrutiny and contestability: </strong>Agronomists in our study did not treat the predictive system as an oracle. They treated it as a colleague whose opinion is one input among several. A system built for this kind of user should make it easy to assess the raw evidence first, before the prediction steers the interpretation. Several participants, during the co-design task, highlighted the value of conversational tools such as chatbots for asking contrastive questions or requesting alternative evidence when a diagnosis looks suspect.</p><p><strong>Align with temporal and environmental context:</strong> Agronomic reasoning is not episodic. A single image of a single leaf is rarely enough to close a diagnosis. As P3 put it: <em>“Normally with just one leaf, it is difficult to reach a diagnosis. It would be important to have an image of how the tree looks”</em>. A useful tool should let the expert verify predictions against seasonal cycles, regional weather patterns, and the broader state of the crop.</p><p><strong>Support situated seeing through analogical reasoning:</strong> When explanations were grounded in similar examples, participants could layer the digital evidence over their own embodied knowledge of the field.</p><p><strong>Support accountability through actionability.</strong> If the tool stops at the label, the agronomist has to leave the tool to decide what to do next, and that is where the value leaks out. Integrating actionable recommendations for treatment or prevention is what seems to keep the system inside the workflow rather than outside it.</p><h3>Closing Thoughts</h3><p>I want to be upfront about what this study can and cannot say. It was a qualitative case study with nine Portuguese professional agronomists. The sample was small but very specific, and the verification scenario in particular used a single case where not every participant had crop-specific domain knowledge. These findings are exploratory, and they are best read as hypotheses for future investigation rather than definitive results.</p><p>What I take away from the work is that the conversation about XAI in agriculture is missing something when it focuses only on which technique produces the most faithful explanation. The experts were asking for tools that behave like a colleague whose reasoning they can question, a second opinion that travels with the seasons, and a starting point for action rather than a static label. Transparency is useful, but, in my opinion, contestability is what allows transparency to do any real work in the field.</p><p>If you are interested in the full methodology, and the broader discussion of how these findings relate to human-centered XAI (HCXAI), you can read the paper here:</p><p><strong>From Explanation to Action: A Case Study of Agronomist Workflows</strong> (CHI EA ’26) <a href="https://doi.org/10.1145/3772363.3799333">https://doi.org/10.1145/3772363.3799333</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c552a39c099" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Dual Identity in Explainable AI]]></title>
            <link>https://medium.com/@ruipedroporfirio/the-dual-identity-in-explainable-ai-b321afc2fdd1?source=rss-62e390200f3d------2</link>
            <guid isPermaLink="false">https://medium.com/p/b321afc2fdd1</guid>
            <category><![CDATA[research]]></category>
            <category><![CDATA[explainable-ai]]></category>
            <category><![CDATA[human-computer-interacion]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Rui Pedro Porfírio]]></dc:creator>
            <pubDate>Tue, 31 Mar 2026 23:38:10 GMT</pubDate>
            <atom:updated>2026-04-06T19:00:41.545Z</atom:updated>
            <content:encoded><![CDATA[<p>There is a common assumption in machine learning that if we can just show the math behind a model, we have made it explainable. We often treat explainability as a purely technical puzzle to be solved. But when we take predictive systems powered by state-of-the-art XAI techniques out of the lab and put them into the hands of real end users, that assumption becomes highly debatable. This is why whenever we discuss the role of Explainable AI today, one of the most important questions to ask is “in what dimension of it?”</p><p>I have spent the last few years researching as part of my PhD how domain experts in high-stakes domains, specifically agronomists and agricultural advisors, actually perceive and interact with XAI-powered solutions. What I found through the research process is that the field seems to be struggling with a dual identity. On the technical side, the focus is on understanding exactly how a complex model reached a specific prediction. On the human side, it faces the challenge of explaining that internal process to a real user in a way they can actually understand it. This leaves the field stretching itself thin while trying to serve two different masters:</p><ol><li>Algorithmic Transparency</li><li>Human-Centered Explanations</li></ol><h3><strong>The Technical View: Algorithmic Transparency</strong></h3><p>Let us imagine you are building a computer vision system to classify images of dogs and cats. The technical approach to explainability usually focuses on algorithmic transparency. The goal here aligns with making the internal logic of a complex model clear and transparent. It breaks down the process to answer one specific question. How exactly did the model reach the decision to classify the image as a dog or a cat?</p><p>We can often tackle this in two main ways. The first is to use inherently transparent models. A good example of this is a decision tree. This algorithm works like a simple flowchart of questions. It allows us to look at the architecture and see the exact sequence of logical steps the model took to reach a prediction. If we look at an experiment I ran in the past to predict crop yield, it allows us to look at the architecture and see the exact sequence of logical steps the model took. We can see exactly how it split the data based on variables like pesticide use, temperature, or precipitation to reach a final prediction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BaKab5ajthjzLFmurybwgQ.png" /><figcaption>Decision Tree Visualization for an instance crop yield prediction.</figcaption></figure><p>The second way is a popular approach when we work with complex black box models, like deep learning architectures. The term “black box” is used because the internal inference process of how the model reaches a specific prediction is completely hidden from us. In these cases, we have to rely on post-hoc explanations. This means creating external tools that analyze the model after it makes a decision.</p><p>State-of-the-art examples of these post-hoc methods include SHapley Additive exPlanations (SHAP), LIME, counterfactuals, and saliency maps. It is quite a menu that fits different explanation strategies and tackles different data types. For instance, Grad-CAM uses gradient information to highlight the important regions in an input image. Returning to our computer vision scenario, if the model classifies an image as a dog, Grad-CAM generates a heatmap showing exactly which pixels the model looked at to make that choice.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*xIVse_2GIldETOc7oIAftQ.jpeg" /><figcaption>Grad-CAM technique highlighting the dog’s face (<a href="https://www.sciencedirect.com/science/article/pii/S1566253519308103">Arrieta et al. (2020)</a>).</figcaption></figure><p>For a machine learning engineer debugging the system, this is incredibly useful. It checks that the model actually looked at the animal’s face rather than a random watermark in the background. It answers a very specific technical question. How did the model reach this result?</p><h3><strong>The Human View</strong></h3><p>Now, making those technical weights visible does not automatically mean a user can understand them. It is true that some techniques were designed to be more intuitive than others. However, the broader problem in the field remains. We often build tools that only make sense to the engineers who built them. As researchers like <a href="https://dl.acm.org/doi/abs/10.1145/3491101.3503727">Upol Ehsan</a> and<a href="https://www.sciencedirect.com/science/article/pii/S0004370218305988"> Tim Miller</a> highlight when discussing the human factors of XAI:</p><blockquote>There is a tendency to design AI explanations as if people like the XAI developers are going to use their systems, earning an infamous reputation of ‘inmates running the asylum’. (<a href="https://dl.acm.org/doi/abs/10.1145/3491101.3503727">Ehsan et al. 2022</a>)</blockquote><p>To avoid this trap, we need to step outside of pure computer science and look at how the social sciences define a good explanation. This perspective makes it clear that the human must be a focus, highlighting that tailoring explanations to the specific needs of different users is key. It is this exact realization that has driven the growth of research concepts like <strong>Human-Centered Explainable AI (HCXAI)</strong>. Taking this human-first approach is especially relevant in high-stakes domains like agriculture, where a misunderstood explanation can easily trigger automation bias or lead to bad reputation.</p><p>While it is clear that the human should always be part of the equation, the current research landscape is still heavily leaning toward the technical view. Although we are seeing a rise in XAI publications applied to high-stakes domains like agriculture over the last five years, the vast majority of this work remains strictly focused on the technical side of applying XAI techniques.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bw_tWGEo_-yQgbm6oeDmCQ.jpeg" /><figcaption>Bar chart showing the increase in XAI publications from 2021 to 2025 (Web of Science search for XAI-related research in Digital Agriculture)</figcaption></figure><p>Also, much of this technical research operates on a very hopeful premise. It assumes that adding an explainability feature will drive user trust and adoption. The missing piece of the puzzle is that we often lack the human studies to verify those outcomes. I believe this hits at a massive opportunity for high-stakes domains. It shows exactly why a priority should be the human factor, testing these tools with real experts to see what actually works.</p><h3><strong>Moving Forward</strong></h3><p>So, where do we go from here? From my point of view, I believe we need to acknowledge this dual identity. We are not choosing between a tool for developers or a tool for end users. We are trying to build something that handles algorithmic transparency while also providing human-centered explanations.</p><p>If you are working on AI products or researching in this AI space, here are a few practical points to consider:</p><ul><li><strong>Cognitive Overload: </strong>A common trap is assuming that showing every single mathematical weight helps the user. Throwing a massive data dump at a user may just cause cognitive overload. An effective explanation filters out the noise. For end users, it may be that the explanation highlights only the information the user needs to take the next informed action.</li><li><strong>Treat it as a design challenge:</strong> Whether you are researching in Responsible AI or deploying machine learning pipelines, I believe we can agree that XAI is not just an algorithmic transparency issue. In my opinion, it is also becoming a fundamental design challenge. We must carefully consider how we display these explanations and exactly who will be consuming them.</li></ul><p>Over the next few months, I will be writing more about this intersection of machine learning, explainable AI, and human-AI interaction.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b321afc2fdd1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>