{"id":{"repo_id":"wilfrid-laurier","oai_identifier":"oai:scholars.wlu.ca:etd-4063"},"canonical_url":"https://search.ndltd.org/etd/wilfrid-laurier/oai:scholars.wlu.ca:etd-4063","repository":{"repo_id":"wilfrid-laurier","name":"Wilfrid Laurier University","base_url":"https://scholars.wlu.ca/do/oai/"},"display":{"title":"Robust and Interpretable Medical Image Segmentation via Retrieval and Mechanistic Analysis","abstract":"Medical image segmentation is a critical component of clinical decision-making, yet deep learning based segmentation models face persistent challenges. These models typically require large volumes of densely annotated data, exhibit strong sensitivity to domain shifts across scanners and patient populations, and lack explicit anatomical priors. Furthermore, despite continual architectural advances beyond fully convolutional networks, most segmentation models remain opaque, where they lack the granularity required for component-level analysis. As a result, when segmentation models fail, it is difficult to identify which internal representations are responsible, limiting developers’ ability to diagnose errors, improve robustness, or establish trust in clinical settings. Existing explainable AI techniques, many of which were designed for image classification, offer limited fidelity for dense pixel-wise prediction tasks and often fail to capture the internal mechanisms driving segmentation decisions. This thesis addresses these challenges through two complementary frameworks that target both the learning dynamics and the interpretability of medical image segmentation models. In the first part, we propose Joint Retrieval-Augmented Segmentation (J-RAS), a retrieval-guided framework that reduces dependence on large annotated datasets and improves robustness under domain shift. Unlike prior retrieval-based approaches that treat retrieval as a static, passive module, J-RAS jointly optimizes a retrieval model and a segmentation model through an alternating contrastive and supervised learning procedure. This mutual adaptation transforms retrieval into an active collaborator that learns to emphasize segmentation-relevant anatomical cues. We demonstrate that J-RAS is architecture-agnostic and achieves strong cross-dataset generalization, enabling retrieval from one dataset while performing segmentation on another without retraining. In the second part, we focus explicitly on the interpretability of segmentation models, motivated by the lack of component-level transparency in existing architectures. Rather than treating segmentation networks as black boxes, we propose a mechanistic interpretability framework that factorizes internal activations into interpretable latent. We train four independent SegFormer models, each specialized to a distinct data distribution of healthy brains, adult glioma, pediatric glioma, and Sub-Saharan African glioma and decompose their intermediate representations using Sparse Autoencoders (SAEs). This decomposition yields sparse, disentangled latent features corresponding to recurring anatomical and pathological activation patterns, enabling direct inspection and manipulation of individual components. To bridge raw latent activations with human understanding, we introduce an automated interpretation pipeline that converts SAE features into human-readable anatomical descriptions through activations projection, and geometry-based spatial metrics. To study representation transfer and alignment across datasets, we match latent features using the Hungarian algorithm, identifying shared and dataset-specific latents. Through controlled feature steering and swapping experiments, we establish causal links between internal representations and segmentation performance. Crucially, this enables direct failure diagnosis: when segmentation errors occur, we can identify which internal latent components are under-activated or misaligned. We observe a relationship between the amplification of selected sparse features and Dice score on failure cases, with targeted interventions rescuing up to 88% of failures. These results demonstrate that segmentation failures are not merely opaque errors, but can be traced to specific internal representational deficits and corrected through principled, component-level intervention. Together, this thesis demonstrates that addressing the limitations of medical image segmentation requires not only improved data-efficient learning strategies, but also interpretable and transparent models that support component-level analysis, failure diagnosis, and principled intervention.","abstract_html":"Medical image segmentation is a critical component of clinical decision-making, yet deep learning based segmentation models face persistent challenges. These models typically require large volumes of densely annotated data, exhibit strong sensitivity to domain shifts across scanners and patient populations, and lack explicit anatomical priors. Furthermore, despite continual architectural advances beyond fully convolutional networks, most segmentation models remain opaque, where they lack the granularity required for component-level analysis. As a result, when segmentation models fail, it is difficult to identify which internal representations are responsible, limiting developers’ ability to diagnose errors, improve robustness, or establish trust in clinical settings. Existing explainable AI techniques, many of which were designed for image classification, offer limited fidelity for dense pixel-wise prediction tasks and often fail to capture the internal mechanisms driving segmentation decisions. This thesis addresses these challenges through two complementary frameworks that target both the learning dynamics and the interpretability of medical image segmentation models. In the first part, we propose Joint Retrieval-Augmented Segmentation (J-RAS), a retrieval-guided framework that reduces dependence on large annotated datasets and improves robustness under domain shift. Unlike prior retrieval-based approaches that treat retrieval as a static, passive module, J-RAS jointly optimizes a retrieval model and a segmentation model through an alternating contrastive and supervised learning procedure. This mutual adaptation transforms retrieval into an active collaborator that learns to emphasize segmentation-relevant anatomical cues. We demonstrate that J-RAS is architecture-agnostic and achieves strong cross-dataset generalization, enabling retrieval from one dataset while performing segmentation on another without retraining. In the second part, we focus explicitly on the interpretability of segmentation models, motivated by the lack of component-level transparency in existing architectures. Rather than treating segmentation networks as black boxes, we propose a mechanistic interpretability framework that factorizes internal activations into interpretable latent. We train four independent SegFormer models, each specialized to a distinct data distribution of healthy brains, adult glioma, pediatric glioma, and Sub-Saharan African glioma and decompose their intermediate representations using Sparse Autoencoders (SAEs). This decomposition yields sparse, disentangled latent features corresponding to recurring anatomical and pathological activation patterns, enabling direct inspection and manipulation of individual components. To bridge raw latent activations with human understanding, we introduce an automated interpretation pipeline that converts SAE features into human-readable anatomical descriptions through activations projection, and geometry-based spatial metrics. To study representation transfer and alignment across datasets, we match latent features using the Hungarian algorithm, identifying shared and dataset-specific latents. Through controlled feature steering and swapping experiments, we establish causal links between internal representations and segmentation performance. Crucially, this enables direct failure diagnosis: when segmentation errors occur, we can identify which internal latent components are under-activated or misaligned. We observe a relationship between the amplification of selected sparse features and Dice score on failure cases, with targeted interventions rescuing up to 88% of failures. These results demonstrate that segmentation failures are not merely opaque errors, but can be traced to specific internal representational deficits and corrected through principled, component-level intervention. Together, this thesis demonstrates that addressing the limitations of medical image segmentation requires not only improved data-efficient learning strategies, but also interpretable and transparent models that support component-level analysis, failure diagnosis, and principled intervention.","abstract_has_math":false,"creators":["Ahmed, Salma"],"institution":"Wilfrid Laurier University","degree_name":"Master of Applied Computing","degree_level":null,"degree_discipline":"Physics and Computer Science","degree_department":null,"school":null,"contributors":["Emad Amin Mohammed","Azam Asilian Bidgoli"],"advisors":[],"committee_chairs":[],"committee_members":[],"year":2026,"date_issued":"2026-01-01T08:00:00Z","date_published":"2026-01-01T08:00:00Z","updated_at":"2026-11-18T22:09:03Z","subjects":["Medical Image Segmentation","Retrieval-Augmented Learning","Explainable Artificial Intelligence","Biomedical Informatics","Health Information Technology"],"languages":["en"],"rights":["2 Publicly accessible"],"rights_urls":[],"identifier_entries":[],"person_identifier_entries":[]},"links":{"outbound_url":"https://scholars.wlu.ca/etd/2900","outbound_label":"Repository record","outbound_source":"dc:identifier","record_url":"https://scholars.wlu.ca/etd/2900","record_label":"Repository record","record_kind":"record","record_source":"dc:identifier","download_url":"https://scholars.wlu.ca/context/etd/article/4063/viewcontent/Salma_Ahmed_thesis.pdf","download_label":"Download PDF","download_source":"dc:identifier","access_status":null,"embargo_until":null,"access_note":null},"source_record":{"url":"https://scholars.wlu.ca/do/oai/?verb=GetRecord&metadataPrefix=oai_etdms&identifier=oai%3Ascholars.wlu.ca%3Aetd-4063","prefix":"oai_etdms"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:contributor","label":"Contributor","values":["Emad Amin Mohammed","Azam Asilian Bidgoli"]},{"key":"dc:contributor.role","label":"Dc Contributor Role","values":["supervisor","co-supervisor"]},{"key":"dc:creator","label":"Author","values":["Ahmed, Salma"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date","label":"Dc Date","values":["2026-01-01T08:00:00Z"]},{"key":"dc:date.available","label":"Dc Date Available","values":["2026-04-17T07:00:00Z"]},{"key":"dc:publisher","label":"Institution","values":["Wilfrid Laurier University"]},{"key":"dc:type","label":"Dc Type","values":["Thesis"]},{"key":"thesis:degree_discipline","label":"Discipline","values":["Physics and Computer Science"]},{"key":"thesis:degree_name","label":"Degree Name","values":["Master of Applied Computing"]},{"key":"thesis:institution_name","label":"Thesis Institution Name","values":["Wilfrid Laurier University"]}]},{"id":"subjects_keywords","label":"Subjects and Keywords","entries":[{"key":"dc:subject","label":"Dc Subject","values":["Medical Image Segmentation","Retrieval-Augmented Learning","Explainable Artificial Intelligence","Biomedical Informatics","Health Information Technology"]}]},{"id":"language_rights","label":"Language and Rights","entries":[{"key":"dc:language","label":"Dc Language","values":["en"]},{"key":"dc:rights","label":"Dc Rights","values":["2 Publicly accessible"]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier","label":"Identifier","values":["https://scholars.wlu.ca/etd/2900","https://scholars.wlu.ca/context/etd/article/4063/viewcontent/Salma_Ahmed_thesis.pdf"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description","label":"Description","values":["Medical image segmentation is a critical component of clinical decision-making, yet deep learning based segmentation models face persistent challenges. These models typically require large volumes of densely annotated data, exhibit strong sensitivity to domain shifts across scanners and patient populations, and lack explicit anatomical priors. Furthermore, despite continual architectural advances beyond fully convolutional networks, most segmentation models remain opaque, where they lack the granularity required for component-level analysis. As a result, when segmentation models fail, it is difficult to identify which internal representations are responsible, limiting developers’ ability to diagnose errors, improve robustness, or establish trust in clinical settings. Existing explainable AI techniques, many of which were designed for image classification, offer limited fidelity for dense pixel-wise prediction tasks and often fail to capture the internal mechanisms driving segmentation decisions. This thesis addresses these challenges through two complementary frameworks that target both the learning dynamics and the interpretability of medical image segmentation models. In the first part, we propose Joint Retrieval-Augmented Segmentation (J-RAS), a retrieval-guided framework that reduces dependence on large annotated datasets and improves robustness under domain shift. Unlike prior retrieval-based approaches that treat retrieval as a static, passive module, J-RAS jointly optimizes a retrieval model and a segmentation model through an alternating contrastive and supervised learning procedure. This mutual adaptation transforms retrieval into an active collaborator that learns to emphasize segmentation-relevant anatomical cues. We demonstrate that J-RAS is architecture-agnostic and achieves strong cross-dataset generalization, enabling retrieval from one dataset while performing segmentation on another without retraining. In the second part, we focus explicitly on the interpretability of segmentation models, motivated by the lack of component-level transparency in existing architectures. Rather than treating segmentation networks as black boxes, we propose a mechanistic interpretability framework that factorizes internal activations into interpretable latent. We train four independent SegFormer models, each specialized to a distinct data distribution of healthy brains, adult glioma, pediatric glioma, and Sub-Saharan African glioma and decompose their intermediate representations using Sparse Autoencoders (SAEs). This decomposition yields sparse, disentangled latent features corresponding to recurring anatomical and pathological activation patterns, enabling direct inspection and manipulation of individual components. To bridge raw latent activations with human understanding, we introduce an automated interpretation pipeline that converts SAE features into human-readable anatomical descriptions through activations projection, and geometry-based spatial metrics. To study representation transfer and alignment across datasets, we match latent features using the Hungarian algorithm, identifying shared and dataset-specific latents. Through controlled feature steering and swapping experiments, we establish causal links between internal representations and segmentation performance. Crucially, this enables direct failure diagnosis: when segmentation errors occur, we can identify which internal latent components are under-activated or misaligned. We observe a relationship between the amplification of selected sparse features and Dice score on failure cases, with targeted interventions rescuing up to 88% of failures. These results demonstrate that segmentation failures are not merely opaque errors, but can be traced to specific internal representational deficits and corrected through principled, component-level intervention. Together, this thesis demonstrates that addressing the limitations of medical image segmentation requires not only improved data-efficient learning strategies, but also interpretable and transparent models that support component-level analysis, failure diagnosis, and principled intervention."]},{"key":"dc:format","label":"Dc Format","values":["application/pdf"]},{"key":"dc:title","label":"Title","values":["Robust and Interpretable Medical Image Segmentation via Retrieval and Mechanistic Analysis"]}]}],"canonical_facts":{"dc:contributor":["Emad Amin Mohammed","Azam Asilian Bidgoli"],"dc:contributor.role":["supervisor","co-supervisor"],"dc:creator":["Ahmed, Salma"],"dc:date":["2026-01-01T08:00:00Z"],"dc:date.available":["2026-04-17T07:00:00Z"],"dc:description":["Medical image segmentation is a critical component of clinical decision-making, yet deep learning based segmentation models face persistent challenges. These models typically require large volumes of densely annotated data, exhibit strong sensitivity to domain shifts across scanners and patient populations, and lack explicit anatomical priors. Furthermore, despite continual architectural advances beyond fully convolutional networks, most segmentation models remain opaque, where they lack the granularity required for component-level analysis. As a result, when segmentation models fail, it is difficult to identify which internal representations are responsible, limiting developers’ ability to diagnose errors, improve robustness, or establish trust in clinical settings. Existing explainable AI techniques, many of which were designed for image classification, offer limited fidelity for dense pixel-wise prediction tasks and often fail to capture the internal mechanisms driving segmentation decisions. This thesis addresses these challenges through two complementary frameworks that target both the learning dynamics and the interpretability of medical image segmentation models. In the first part, we propose Joint Retrieval-Augmented Segmentation (J-RAS), a retrieval-guided framework that reduces dependence on large annotated datasets and improves robustness under domain shift. Unlike prior retrieval-based approaches that treat retrieval as a static, passive module, J-RAS jointly optimizes a retrieval model and a segmentation model through an alternating contrastive and supervised learning procedure. This mutual adaptation transforms retrieval into an active collaborator that learns to emphasize segmentation-relevant anatomical cues. We demonstrate that J-RAS is architecture-agnostic and achieves strong cross-dataset generalization, enabling retrieval from one dataset while performing segmentation on another without retraining. In the second part, we focus explicitly on the interpretability of segmentation models, motivated by the lack of component-level transparency in existing architectures. Rather than treating segmentation networks as black boxes, we propose a mechanistic interpretability framework that factorizes internal activations into interpretable latent. We train four independent SegFormer models, each specialized to a distinct data distribution of healthy brains, adult glioma, pediatric glioma, and Sub-Saharan African glioma and decompose their intermediate representations using Sparse Autoencoders (SAEs). This decomposition yields sparse, disentangled latent features corresponding to recurring anatomical and pathological activation patterns, enabling direct inspection and manipulation of individual components. To bridge raw latent activations with human understanding, we introduce an automated interpretation pipeline that converts SAE features into human-readable anatomical descriptions through activations projection, and geometry-based spatial metrics. To study representation transfer and alignment across datasets, we match latent features using the Hungarian algorithm, identifying shared and dataset-specific latents. Through controlled feature steering and swapping experiments, we establish causal links between internal representations and segmentation performance. Crucially, this enables direct failure diagnosis: when segmentation errors occur, we can identify which internal latent components are under-activated or misaligned. We observe a relationship between the amplification of selected sparse features and Dice score on failure cases, with targeted interventions rescuing up to 88% of failures. These results demonstrate that segmentation failures are not merely opaque errors, but can be traced to specific internal representational deficits and corrected through principled, component-level intervention. Together, this thesis demonstrates that addressing the limitations of medical image segmentation requires not only improved data-efficient learning strategies, but also interpretable and transparent models that support component-level analysis, failure diagnosis, and principled intervention."],"dc:format":["application/pdf"],"dc:identifier":["https://scholars.wlu.ca/etd/2900","https://scholars.wlu.ca/context/etd/article/4063/viewcontent/Salma_Ahmed_thesis.pdf"],"dc:language":["en"],"dc:publisher":["Wilfrid Laurier University"],"dc:rights":["2 Publicly accessible"],"dc:subject":["Medical Image Segmentation","Retrieval-Augmented Learning","Explainable Artificial Intelligence","Biomedical Informatics","Health Information Technology"],"dc:title":["Robust and Interpretable Medical Image Segmentation via Retrieval and Mechanistic Analysis"],"dc:type":["Thesis"],"thesis:degree_discipline":["Physics and Computer Science"],"thesis:degree_name":["Master of Applied Computing"],"thesis:institution_name":["Wilfrid Laurier University"]},"updated_at":"2026-11-18T22:09:03Z"}