About me

Senior Research Associate (EPSRC Doctoral Prize Fellow) and Software Engineer at the University of Bristol. I work in the field of programming languages, especially typed and functional programming which I did my PhD and MEng in at Bristol; but I'm a general enthusiast of program design and languages, and love to use all kinds of tech. My role is mainly as a development lead who implements new languages and software that enable exciting things; this could be more modular and safe approaches to data science, or new ways of doing program analysis and software testing.


Research

Currently, I'm looking at:

Lazy evaluation for bidirectional live programming investigating lazy bidirectional evaluation, for generating updated source code that produces a desired change to its output.
Bidirectional transformations for missing data in web-development investigating a bidirectional system for synchronising missing and shared data, applying this to a modular framework for web development where back-end "models" may be shared between multiple front-end "views".
Graph-based program slicing for data provenance and program analysis investigating graph-based slicing techniques, for calculating the fragments of programs needed to compute specific fragments of their outputs.
Monte Carlo algorithms for property-based testing investigating Monte Carlo notions of "similarity", for randomly generating program inputs that satisfy a desired property.

For my PhD, I investigated how algebraic effect handlers can be used to improve the design of probabilistic programming languages. I used these techniques to implement a type-safe, modular framework for programmable inference [λ] and for probabilistic models [λ].

Other projects I've led include exploring recursion schemes for implementing, combining, and training neural networks [λ]. I showed how neural networks can be represented as fixed-points over recursive data structures, and forward and back propagation as folds and unfolds over those structures.


Papers, etc.

  Absence-Aware Lenses: Unavailability and Unspecifiedness
   K.Matsuda, M.Nguyen, M.Wang
  In submission, 2024
  Lazy Bidirectional Evaluation
   X.Zhang, M.Nguyen
  In submission, 2024
  Conjugate Operators for Transparent, Explorable Research Outputs (preprint)
   J.Bond, C.David, M.Nguyen, D.Orchard, R.Perera
  In submission, 2024
 Effects and Effect Handlers for Probabilistic Programming (pdf)
   M.Nguyen
 PhD Abstract in Journal of Functional Programming, 2024
 PhD Thesis, 2023
  Effect Handlers for Programmable Inference (preprint, proceedings)
   M.Nguyen, R.Perera, M.Wang, S.Ramsay
   Haskell Symposium, 2023
  Towards Type-driven Data Science in Idris (abstract, repository)
   O.Kammar, K.Marek, M.Nguyen, M.Steuwer, J.Walters, R.Wright
   Languages for Inference Workshop, 2023
 Folding over Neural Networks (preprint, proceedings)
   M.Nguyen, N.Wu
   Mathematics of Program Construction, 2022
 Modular Probabilistic Models via Algebraic Effects (preprint, proceedings, repository)
   M.Nguyen, R.Perera, M.Weng, N.Wu
   International Conference on Functional Programming, 2022
 Linked visualisations via Galois dependencies (preprint, proceedings, repository)
   R.Perera, M.Nguyen, T.Petricek, M.Weng
   Principles Of Programming Languages, 2022
 Composable, Modular Probabilistic Models (extended abstract, poster)
   M.Nguyen, R.Perera, M.Weng
   International Conference on Functional Programming (SRC), 2021
 Composable, Modular Probabilistic Models (paper)
   M.Nguyen, R.Perera, M.Weng
   Implementation and Application of Functional Languages, 2021

Some Talks

 Effects and Effect Handlers for Probabilistic Programming
    PhD Defence, Sep 2023
 Effect Handlers for Programmable Inference
   Haskell Symposium, Sep 2023  (video)
   Tech Talk @ The Alan Turing Institute, May 2023
 Modular Probabilistic Models via Algebraic Effects  
   International Conference on Functional Programming, Sep 2022 (video, slides)
   Programming Languages Seminar @ University of Edinburgh, May 2022 (slides)
   Tech Talk @ The Alan Turing Institute, Jan 2023
 Folding over Neural Networks  
   Mathematics of Program Construction, Sep 2022
 Composable, Modular Probabilistic Models
   International Conference on Functional Programming (SRC), Sep 2021 (video, slides)
   Implementation and Application of Functional Languages,  Sep 2021 (video, slides)

Work & Studies

2023 - Present
Senior Research Associate (EPSRC Doctoral Prize Fellow) in Programming Languages
  hosted by Cristina David @ University of Bristol
Jun - Sep 2022
Research Intern: Dependently typed probabilistic programming for Idris2 (repositories)
  supervised by Ohad Kammar @ University of Edinburgh
2020 - 2023
PhD in Programming Languages
  supervised by Meng Wang and Roly Perera @ University of Bristol
2015 - 2019
MEng in Computer Science (first class)
  supervised by Nicolas Wu @ University of Bristol


Teaching

2019 - Present
Seminars and guest lectures to the Programming Languages Research Group and CS undergraduates @ University of Bristol.
2017 - Present
Teaching in CS: Advanced Topics in Programming Languages (4th year), Language Engineering (2nd year), and Functional Programming (1st year) @ University of Bristol.
2023
Supervisor for a 2nd year CS student in their research internship, on "Typed Functional Programming for Automatic Differentiation and Inference" @ University of Bristol.
2021
Supervisor for a 4th year CS student in their masters dissertation, on "Deep Learning Architectures As Pure Functions" @ University of Bristol.


Funding & Awards

2023 ESPRC Doctoral Prize Fellowship Award
2021 1st Place: ICFP Graduate Research Competition, ACM
2020 EPSRC Doctoral Training Partnership Studentship Award
2019 Best Machine Learning Thesis, Bloomberg Award, University of Bristol
2018 Best Third Year Group Project, Graphcore Award, University of Bristol
2017 Top Ten Achieving CS Students, Netcraft Award, University of Bristol