About me

I'm a PhD student in the Programming Languages Research Group at University of Bristol, supervised by Meng Wang and Roly Perera. My current research investigates the implementation and application of algebraic effects and probabilistic programming languages. My other interests include functional programming (in particular, Haskell), type-level programming, embedded domain-specific languages, and recursion schemes.


I'm currently exploring the abstraction of algebraic effects and effect handlers for probabilistic programming language design. At the moment, I'm working out how abstract operations and effect handlers can be used as a type-safe, modular design pattern for programmable inference. In recent work, I used this approach to develop an implementation of probabilistic models as first-class citizens.

Other projects include fleshing out a compositional approach of using recursion schemes to implement neural networks; in particular, I show how neural networks can be represented as fixed-points of recursive data structures, and forward and back propagation as folds and unfolds over these structures.

Papers, etc.

 Mar, 2023     Effects and Effect Handlers for Programmable Inference
                  M.Nguyen, R.Perera, M.Wang, S.Ramsay
 Jan, 2023     Towards type-driven data-science in Idris
                  O.Kammar, K.Marek, M.Nguyen, M.Steuwer, J.Walters, R.Wright
                        LAFI ‘23
 Sep, 2022    Folding over Neural Networks (preprint, proceedings)
                  M.Nguyen, N.Wu
                        MPC ‘22
 Sep, 2022    Modular Probabilistic Models via Algebraic Effects (preprint, proceedings, repository)
                  M.Nguyen, R.Perera, M.Weng, N.Wu
                        ICFP ‘22
 Jan, 2022    Linked visualisations via Galois dependencies (preprint, proceedings, repository)
                  R.Perera, M.Nguyen, T.Petricek, M.Weng
                        POPL ‘22
 Sep, 2021    Composable, Modular Probabilistic Models (extended abstract, poster)
                  M.Nguyen, R.Perera, M.Weng
                        ICFP ‘21 Student Research Competition
 Aug, 2021    Composable, Modular Probabilistic Models (paper)
                  M.Nguyen, R.Perera, M.Weng
                        IFL ‘21
 Jun, 2019    Modelling Neural Networks with Recursion Schemes (dissertation, poster, repository)
                  M.Nguyen, N.Wu
                        Masters Dissertation @ University of Bristol


 Sep, 2022    Folding over Neural Networks (slides)
                       MPC ‘22
 Sep, 2022    Modular Probabilistic Models via Algebraic Effects (video, slides)
                       ICFP ‘22
 May, 2022    Modular Probabilistic Models via Algebraic Effects (slides)
                       PLInG Seminar @ University of Edinburgh
 Sep, 2021    Composable, Modular Probabilistic Models (video, slides)
                       ICFP ‘21 Student Research Competition
 Sep, 2021    Composable, Modular Probabilistic Models (video, slides)
                       IFL ‘21


Jun '22 - Sep '22
Research Intern: Dependently typed probabilistic programming for Idris2 (repositories)
  with Ohad Kammar @ University of Edinburgh


2019 - 2022
I give seminars and guest lectures to the Programming Languages Research Group and CS undergraduates @ University of Bristol.
2020 - 2021
Primary supervisor for a 4th year CS student in their masters dissertation: Deep Learning Architectures As Pure Functions @ University of Bristol.
2017 - 2022
Teaching assistant for the Functional Programming, Language Engineering, and Advanced Topics in Programming Languages units @ University of Bristol.


2021 ICFP '21 ACM Student Research Competition, 1st Place
2019 Bloomberg Award - Best Machine Learning Paper, University of Bristol
2018 Graphcore Award - Best Group Project, University of Bristol
2017 Netcraft Award - Top Ten Achieving CS Students, University of Bristol