<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="static/style.xsl"?><OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd"><responseDate>2026-11-22T18:05:24Z</responseDate><request verb="GetRecord" identifier="oai:uwspace.uwaterloo.ca:10012/22855" metadataPrefix="dim">https://dspacemainprd01.lib.uwaterloo.ca/server/oai/request</request><GetRecord><record><header><identifier>oai:uwspace.uwaterloo.ca:10012/22855</identifier><datestamp>2026-01-22T08:02:16Z</datestamp><setSpec>com_10012_9924</setSpec><setSpec>com_10012_1</setSpec><setSpec>col_10012_9930</setSpec><setSpec>col_10012_6</setSpec></header><metadata><dim:dim xmlns:dim="http://www.dspace.org/xmlns/dspace/dim" xmlns:doc="http://www.lyncode.com/xoai" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.dspace.org/xmlns/dspace/dim http://www.dspace.org/schema/dim.xsd">
   <dim:field mdschema="dc" element="contributor" qualifier="author">Hebert, Liam</dim:field>
   <dim:field mdschema="dc" element="date" qualifier="accessioned">2026-01-20T15:26:49Z</dim:field>
   <dim:field mdschema="dc" element="date" qualifier="available">2026-01-20T15:26:49Z</dim:field>
   <dim:field mdschema="dc" element="date" qualifier="issued">2026-01-20</dim:field>
   <dim:field mdschema="dc" element="date" qualifier="submitted">2026-01-14</dim:field>
   <dim:field mdschema="dc" element="identifier" qualifier="uri">https://hdl.handle.net/10012/22855</dim:field>
   <dim:field mdschema="dc" element="description" qualifier="abstract" lang="en">Context is crucial for understanding the world and making informed decisions. While existing transformer architectures excel at contextualizing information locally, such as other words in a sentence, they fail to factor in broader, macro-level contexts. We identify available yet underutilized macro contexts in three use cases: online discussions, federated learning, and recommender systems. For each, we motivate the need to leverage existing macro context and propose context-aware solutions based on the transformer architecture.

In online discussion boards, the rich conversational and multimodal macro context in which a comment is made is often overlooked. This is especially pertinent in hate speech detection. Classical solutions that examine individual comments in isolation fail to account for this context, leading to ambiguity and misinterpretation. For instance, the comment ``Ew, that’s gross!&amp;apos;&amp;apos; has a different interpretation depending on whether it’s in response to food or sensitive issues like LGBTQ rights. Furthermore, images that accompany text can also provide crucial context. We propose mDT, a novel deep learning model architecture based on graph transformer networks, which incorporates this valuable context when evaluating the hatefulness of individual comments. Our experimental results demonstrate a 7\% F1 improvement over existing baselines that do not utilize this context, and a 21\% F1 improvement over previous graph-based methods.

Second, we tackle the context-agnostic paradigm of federated learning. The prevalent Federated Averaging (FedAvg) method statically averages model weights, failing to account for the crucial macro-level context of heterogeneous-agent environments, leading to a suboptimal, one-size-fits-all model. For example, autonomous driving agents exploring rural roads acquire different knowledge than those in urban settings, and this environmental context is lost in the process. We propose FedFormer, a novel federation strategy that leverages transformer attention to enable each agent to weigh and selectively incorporate insights from its peers in a context-dependent manner. In turn, FedFormer enables a more effective, efficient federation that respects and adapts to environmental diversity while preserving privacy. Our experiments across environments in MetaWorld, a set of heterogeneous robotic manipulation tasks, demonstrate improvements of 1.48x to 3.41x over FedAvg.

Finally, in recommender systems, the user’s intent can provide critical personalization context. Simple approaches rely on collaborative filtering, which only models implicit (micro-level) user preferences by extrapolating from historical data. Our solution, Flare, proposes a contextual recommender system that empowers users to steer recommendations via explicit natural language queries (e.g., ``Staplers&amp;apos;&amp;apos;, ``Webcams&amp;apos;&amp;apos;). Flare’s architecture fuses collaborative filtering signals with semantic representations of both the user’s explicit query and item descriptions, bridging the gap between long-term preferences and the context of the user&amp;apos;s immediate goals. Our experiments using the Amazon Product Reviews datasets show a 1.7x and 2.53x increase in recall@1 and recall@10, respectively, compared to approaches that do not factor in user intent.</dim:field>
   <dim:field mdschema="dc" element="language" qualifier="iso">en</dim:field>
   <dim:field mdschema="dc" element="publisher" lang="en">University of Waterloo</dim:field>
   <dim:field mdschema="dc" element="relation" qualifier="uri">https://github.com/liamhebert/MDT-2</dim:field>
   <dim:field mdschema="dc" element="relation" qualifier="uri">https://github.com/liamhebert/FedFormer</dim:field>
   <dim:field mdschema="dc" element="relation" qualifier="uri">https://github.com/liamhebert/MultiModalDiscussionTransformer</dim:field>
   <dim:field mdschema="dc" element="relation" qualifier="uri">https://github.com/liamhebert/CommunityHateFormer</dim:field>
   <dim:field mdschema="dc" element="subject" lang="en">Natural language processing</dim:field>
   <dim:field mdschema="dc" element="subject" lang="en">Recommender systems</dim:field>
   <dim:field mdschema="dc" element="subject" lang="en">Federated learning</dim:field>
   <dim:field mdschema="dc" element="subject" lang="en">Grounding</dim:field>
   <dim:field mdschema="dc" element="subject" lang="en">Multi-modal deep learning</dim:field>
   <dim:field mdschema="dc" element="subject" lang="en">Graph neural networks</dim:field>
   <dim:field mdschema="dc" element="subject" lang="en">Transformer models</dim:field>
   <dim:field mdschema="dc" element="subject" lang="en">Machine learning</dim:field>
   <dim:field mdschema="dc" element="title">Contextual AI: Integrating Macro-Context with Transformer Architectures for Social Media Analysis, Federated Learning, and Recommender Systems</dim:field>
   <dim:field mdschema="dc" element="type">Doctoral Thesis</dim:field>
   <dim:field mdschema="dc" element="pending">false</dim:field>
   <dim:field mdschema="uws-etd" element="degree" qualifier="department">David R. Cheriton School of Computer Science</dim:field>
   <dim:field mdschema="uws-etd" element="degree" qualifier="discipline">Computer Science</dim:field>
   <dim:field mdschema="uws-etd" element="degree" qualifier="grantor" lang="en">University of Waterloo</dim:field>
   <dim:field mdschema="uws-etd" element="degree">Doctor of Philosophy</dim:field>
   <dim:field mdschema="uws-etd" element="embargo" qualifier="terms">0</dim:field>
   <dim:field mdschema="uws" element="comment" qualifier="hidden">All four of these links are to codebases. Within the github links, there are links to datasets where applicable. Part III of my thesis has proprietary code and will not be open sourced.</dim:field>
   <dim:field mdschema="uws" element="contributor" qualifier="advisor">Cohen, Robin</dim:field>
   <dim:field mdschema="uws" element="contributor" qualifier="advisor">Golab, Lukasz</dim:field>
   <dim:field mdschema="uws" element="contributor" qualifier="affiliation1">Faculty of Mathematics</dim:field>
   <dim:field mdschema="uws" element="published" qualifier="city" lang="en">Waterloo</dim:field>
   <dim:field mdschema="uws" element="published" qualifier="country" lang="en">Canada</dim:field>
   <dim:field mdschema="uws" element="published" qualifier="province" lang="en">Ontario</dim:field>
   <dim:field mdschema="uws" element="typeOfResource" lang="en">Text</dim:field>
   <dim:field mdschema="uws" element="peerReviewStatus" lang="en">Unreviewed</dim:field>
   <dim:field mdschema="uws" element="scholarLevel" lang="en">Graduate</dim:field>
   <dim:field mdschema="others" element="access-status">open.access</dim:field>
</dim:dim>
</metadata></record></GetRecord></OAI-PMH>