UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

Structured representations for inspectable AI : knowledge graphs and latent trees Thoma, Ethan

Abstract

This thesis investigates whether forcing models through structured representations improves performance while providing inspectable intermediate states, through two case studies: knowledge graphs for bug triage and tree-structured reasoning for mathematical problem solving. GitHub issues are converted to typed knowledge graphs by extracting relations from the issue using REBEL-LARGE for relation extraction, and using BERT embeddings to represent entities in the graph. A human assessment of the quality of the resulting graphs has shown that 48% have limited detail; specifically, they do not capture implicit developer consensus, or the content of multi-turn arguments. While there is an apparent gap in this regard, we find that using features based on the graph structure to train classifiers results in a higher macro F1 score (0.4762 vs. 0.3564) than when training using only the text-based baseline. The structured format of the knowledge graph allows maintainers to review what drives their triage decisions, however, it remains unclear if this will result in better human comprehension. Dynamic Compute Tree Modeling (DCTM) injects 32 parallel latent nodes at layer six of GPT-2, learning tree structure through Gumbel-annealed parent prediction. Operation-conditioned adapters prove essential, achieving a 20.7% validation loss over the baseline on mixed reasoning tasks. Mid-layer injection works best, consistent with findings that middle layers contain abstract task-agnostic representations. Systematic generalization experiments show 12-20 point improvements on out-of-distribution tests, though 32-node capacity constrains performance on complex problems. Analysis of learned structures reveals moderate operation alignment (55-65%), with trees providing coarse-grained inspection points through structural consistency metrics. These findings indicate that even imperfect structured representations can outperform unstructured approaches in certain contexts. Graphs with 48% coverage gaps improved classification by 33.6%, and tree structures with partial operation alignment maintained advantages on out-of-distribution tests. This work establishes design principles for structured interventions, including mid-layer composition, sparsity priors, and task-appropriate representation choice, offering pathways toward AI systems that expose their intermediate computations for human inspection.

Item Media

Item Citations and Data

Rights

Attribution-NonCommercial-NoDerivatives 4.0 International