UWSpace

UWSpace is the University of Waterloo’s institutional repository for the free, secure, and long-term home of research produced by faculty, students, and staff.

Depositing Theses/Dissertations or Research to UWSpace

Are you a Graduate Student depositing your thesis to UWSpace? See our Thesis Deposit Help and UWSpace Thesis FAQ pages to learn more.

Are you a Faculty or Staff member depositing research to UWSpace? See our Waterloo Research Deposit Help and Self-Archiving pages to learn more.

Photo by Waterloo staff

Recent Submissions

  • Item type: Item ,
    Parallel Efficient Secure DBSCAN Approximation
    (University of Waterloo, 2026-07-07) Shehata, Mohannad
    Machine learning has permeated every part of our data lives. With the prevalence of machine learning comes an insatiable need for data, including sensitive personal data. As a result, the need arose to develop techniques for machine learning tasks that preserve individual privacy while providing high utility by learning from private data somehow. An important class of machine learning tasks is clustering, which can potentially be used to study diseases by identifying clusters of patients. As patient information is private, private clustering algorithms would help us infer patterns among patients while protecting their data. DBSCAN is a clustering algorithm that is widely used to detect clusters of arbitrary shape among the data points. Existing private implementations of DBSCAN either exhibit significant leakage, are highly sequential, or are asymptotically inefficient both in runtime and communication cost. In this thesis, we present an efficient approximation of DBSCAN that takes O(log²n) parallel time and O(nlog²n) total work, breaking the quadratic barrier in Secure Multiparty implementations of DBSCAN algorithms and reducing the communication rounds asymptotically from O(n²) to O(log²n).
  • Item type: Item ,
    The role of environmental gradients in the shift of wood traits from seedlings to adult trees
    (University of Waterloo, 2026-07-07) Hickey, Hanna
    Tree development, or ontogeny, involves concurrent changes in plant size and environmental conditions, both of which can influence wood structure and function. Disentangling the relative roles of intrinsic (height) and extrinsic (environment) drivers of wood trait variation remains a major challenge. This is important because wood underpins hydraulic efficiency, hydraulic safety, and mechanical support—functions critical for whole-tree performance. In this study, I sampled twigs at a fixed distance from the apex from sugar maple (Acer saccharum) and yellow birch (Betula alleghaniensis) to quantify how wood traits, light availability, and water availability change across seedling, sapling, and adult developmental stages. Across both species, wood structure shifted toward greater hydraulic safety with ontogeny, demonstrated through decreased vessel diameter (Dh), increased vessel number (VN), and increased vessel reinforcement ((t/b)²) in adult trees. Despite shifts towards greater hydraulic safety, hydraulic efficiency (Ks) was maintained across developmental stages, indicating that increases in VN and lumen fraction (F) compensated for reductions in efficiency typically associated with smaller Dh. Wood trait covariation was structured by a hydraulic efficiency–safety trade-off, however traits such as F varied more independently, enabling compensations such that this trade-off did not constrain tissue-level hydraulic function. Contrary to expectations, I did not detect differences in water availability across developmental stages. Although light availability increased from seedlings to adults, it did not explain changes in wood traits with ontogeny. Instead, tree height emerged as the dominant driver of trait values, reflecting increasing hydraulic constraints associated with longer water transport distance. The shift toward smaller Dh and maintained Ks in adult apices contrasts with expectations of increasing transport efficiency in taller trees but is consistent with selection for resistance to freeze–thaw embolism in temperate environments.
  • Item type: Item ,
    UniMaia: Steering Chess Policies with Language for Human-like Play
    (University of Waterloo, 2026-07-07) Siu, Sherman
    Recent advances in large language models have enabled natural language to serve as a flexible interface for controlling complex systems, but often require large-scale multimodal training or sacrifice domain-specific inductive biases. In structured decision-making domains such as chess, specialized models achieve strong performance but lack high-level semantic controllability, while prompt-conditioned approaches are more flexible but typically exhibit weaker domain grounding. In this thesis, we study prompt-conditioned policy modulation for chess by adapting a pretrained neural policy network using natural language prompts. We propose UniMaia, a framework that combines a frozen Lc0-based chess policy network with a LoRA-adapted text encoder and a ControlNet-style conditioning mechanism. This design enables semantic conditioning over gameplay, providing a more expressive alternative to discrete metadata for modeling human play while preserving the underlying representations of the base model. We further introduce UniMaia-Aux, an extension that incorporates auxiliary temporal conditioning and behavioral prediction objectives. To support this work, we construct a large-scale, metadata-augmented version of the Lichess dataset, introduce a semi-automated pipeline for generating natural language prompt templates, and propose evaluation benchmarks spanning both prompt-conditioned and metadata-conditioned settings. Empirically, UniMaia achieves competitive or superior performance relative to prior work across multiple benchmarks. It attains the highest top-move accuracy on prompt-conditioned benchmarks while remaining competitive with metadata-conditioned models on human move prediction tasks. Prompt-conditioned models perform strongly in frequency-dominated regimes, such as common openings and highly active player behavior, whereas metadata-conditioned models generally achieve stronger expected accuracy. UniMaia bridges these approaches by combining strong domain-specific inductive biases with flexible prompt-based control. UniMaia-Aux further demonstrates that auxiliary temporal conditioning can improve expected accuracy and behavioral modeling across several evaluation settings, although this introduces trade-offs between top-move accuracy and dependence on temporally structured information. Overall, this work demonstrates that prompt-conditioned control of domain-specific policy networks is feasible without end-to-end multimodal training. At the same time, the results highlight ongoing challenges related to prompt sensitivity, policy calibration, robustness, and the trade-offs between controllability and predictive performance in prompt-conditioned decision-making systems.
  • Item type: Item ,
    Trade-offs in Generic Programming: A Cross-Language Performance Study
    (University of Waterloo, 2026-07-03) Pang, Daniel
    Generic programming enables abstraction and code reuse, but its impact on performance can vary significantly depending on language design and implementation strategy. Although modern programming languages differ substantially in compilation model, runtime system, and type system design, many share a common foundation of parametric abstraction and constrained generic programming, allowing scientific algorithms to be expressed in a largely portable manner across platforms. This work investigates the trade-offs between generic and specialized implementations across multiple programming languages, with a focus on how generic realization strategies interact with runtime representation and compiler behaviour to determine performance characteristics. To evaluate these trade-offs, several arithmetic-intensive algorithms, including numerical and symbolic kernels, as well as a symbolic Gröbner basis computation, were implemented in both generic and specialized forms across a selected set of languages. These implementations were benchmarked to measure performance differences while also considering factors such as binary size and development experience. The results show that the cost of generic programming is not inherent to abstraction itself, but instead depends on how generic abstractions are realized and optimized by the language and compiler. Languages employing compile-time specialization through monomorphization, such as C++ and Rust, often approached the performance of specialized implementations in the evaluated workloads, while approaches relying on boxed representations or runtime polymorphism often exhibited measurable overhead associated with dynamic dispatch, allocation, and additional levels of indirection. Runtime specialization approaches occupy an intermediate position, trading predictable compilation behaviour for adaptive optimization. Overall, this work demonstrates that the relationship between abstraction and performance is shaped by language design, compiler strategy, and application context. These findings provide insight into both the shared foundations and differing realization strategies of modern generic systems, offering guidance for practitioners and language designers evaluating generics in performance-critical computing environments.
  • Item type: Item ,
    The Effect of Turfgrass-to-Meadow Restoration on Carbon Storage and Sequestration in an Urban Environment
    (University of Waterloo, 2026-07-02) Epp, Hayden
    Since 2013, Toronto and Region Conservation Authority has been restoring a 16 km hydro corridor in Scarborough, Ontario, actively removing turfgrass and replacing it with meadow. The primary intention of this project, known as The Meadoway, is to improve biodiversity and habitat connectivity in the city, but there is the potential for other co-benefits such as enhanced carbon storage and sequestration. We made use of the section-by-section restoration timeline in a space-for-time substitution to evaluate changes with time since restoration in three categories: unrestored turfgrass, recently restored meadow (restored in 2020-2024), and older restored meadow (restored in 2013-2016). First, we measured CO2 and CH4 fluxes biweekly to make estimates of daily net ecosystem exchange, gross primary production, and ecosystem respiration. We found that, cumulatively, both recent (−12.5 ± 19.1 mol m⁻² season⁻¹) and old meadow (−12.3 ± 6.44 mol m⁻² season⁻¹) acted as carbon sinks while unrestored turfgrass (+14.1 ± 17.0 mol m⁻² season⁻¹) acted as a net carbon source over the course of our sampling season. Next, we conducted a 366-day plant litter transplant experiment to investigate whether decomposition rates differ due to litter quality, site conditions, or a combination of both. We found that meadow litter decomposes 33.6% more slowly than turfgrass litter regardless of site, but all litter decomposed 34.7% more at recent meadow sites compared to turfgrass sites. We measured biomass production over the growing season by clipping aboveground biomass and using a modified soil ingrowth core method belowground. We found 272% greater aboveground biomass standing stock, and 213% higher belowground plant production in old meadow compared to turfgrass in 2025. Finally, we measured belowground carbon stocks, using a loss-on-ignition method to measure soil organic matter, soil carbonate content, and root organic matter. We found largely similar belowground carbon stocks in restored meadow as in turfgrass, with the important exception that the old meadow category had 22.4% lower surface soil organic matter compared to turfgrass. We lack baseline data on pre-restoration soil organic matter and suspect this is attributable to antecedent differences between the sections. In total, we provide convincing evidence that urban turfgrass-to-meadow restoration provides valuable climate mitigation co-benefits and could be considered a nature-based solution to climate change.