Setting out to ensure computer programs work as intended
When Carol Pui Yiu Mak (Croucher Scholarship 2017) joined a Hong Kong University of Science and Technology (HKUST) programming summer school, she knew little about the subject but, with time on her hands, decided to give it a try. For the then 15-year-old, it began a fascination with computer science and pointed the way to her future career and research that could expand understanding of how machine learning works.
It was, however, also frustrating, making her feel that the maths she was studying at school was trivial. “You can type everything into the computers and they can come up with the answer easily,” Mak, 25, recalled.
Feeling that high school mathematics had become boring and she was wasting her time if computers could do it better, she decided to switch to computer science. Now, undertaking doctoral research at the University of Oxford, she remains grateful for the advice of a teacher at St Mary’s Calne, in Wiltshire, the UK boarding school she attended for her final two years of high school.
The teacher convinced her to do a joint programme instead and Mak went on to undertake a four-year master’s degree in both mathematics and computer science at Oxford, graduating with first class honours in 2016. “The mathematics really helped me to understand computer science more,” Mak said.
“Computer science really borrows a lot from mathematics, a lot of ideas, and that’s more or less how I see my research right now.”
The goal is to borrow from mathematics and try to present information in a way that computers can understand, so programmers have no need to understand the mathematics behind it. “In general, the field that I am working on is semantics of computation, so we are looking at the meaning of computers, of what computers do,” she said.
Although it had seemed to her that computers could handle mathematics better than she could after she attended the HKUST summer school, “now I realise that no computers are bound by mathematics”, she said. That raises the question of why computers understand code and whether they will do what the code-writer intended.
In general, there are two ways of understanding computers and how a program will work, Mak said. One is to evaluate each line, leading to outputs. Another is to map it through mathematics, that mapping assisting in understanding how useful the program will be. “We try to understand it in both ways and try to see how these two ways coincide with each other.”
She is doing this through both solo projects and a team project with Oxford colleagues, under the supervision of Professor Luke Ong, Professor of Computer Science and Director of Graduate Studies. During the UK’s COVID-19 lockdown she has continued her research from her room in the house she shares with fellow students, liaising with her team via Zoom.
Mak said she is trying to understand the meaning of two types of programming language – probabilistic and differentiable – both with roots in mathematics. She published her work with Ong in February 2020 in arXiv, an open archive funded and maintained by Cornell University in the US, and in April 2020 she, her supervisor, and two colleagues published the results of their study of the differential properties of higher-order statistical probabilistic programs with recursion and conditioning, also through arXiv.
She explained that while a programmer writes a program, it is a compiler that changes it into a machine-understandable form. Many modern programming languages have their own compiler, she said, but others are compiled ad hoc without any understanding of the theory. Consequently, the same program may evaluate different results, depending on the compiler, yet the programmer will be unaware of this.
Her research aims to assist in ensuring a program gives the results that the programmer intended. The growth and success of machine learning, whereby systems learn and improve automatically without being specifically programmed for that learning, has given this new impetus.
Mak described machine learning as “a black box”, not fully understood, with many research teams trying to comprehend its nature and why machines can perform so well. “That is one of the reasons why I’m interested in the field as well, because we really need to understand computers and what they could do,” she said. “We’re trying to understand why it works and how it works. I would not say we are very good at it with differentiable languages, but the research in probabilistic languages is going pretty well.”
She excelled at mathematics at school. “I like especially the accuracy of mathematics, I’m not very good at humanities. I find you can have a million different ways of answering the question in humanities but from mathematics there is usually just one.”
Now, while her preference is still for pure research and mathematics, the boundaries are blurring, she acknowledged. The success of machine learning means computer scientists need to understand law and philosophy.
“It’s very interesting and interdisciplinary,” Mak said. Friends and colleagues in her university’s computer science and statistics departments are working across these disciplines and the University of Oxford is now offering a joint law-computer science undergraduate module.
“For mathematicians and researchers, it is quite easy to escape from the world and do all this pure mathematics, but for it to apply to the world it has to have some connection with humans.”
With another year at Oxford before completing her higher degree, Mak sees two potential avenues for developing her research in future. She may apply for post-doctoral studies, expanding her horizons by doing so at a different university. “I might try more the implementation side of things, to see how the compiler uses these theories to interpret programs.”
Alternatively, embarking on industry research for the first time is a possibility. “A lot of really good research is being done in industry. Google, Microsoft, Facebook, and Uber are all doing research exactly in my field.”
Carol Mak is undertaking a DPhil in Computer Science at the University of Oxford. Her studies in the semantics of computation focus on evaluating, understanding, and interpretation of programming languages using mathematics to aid programmers in better achieving the results they intend. Hong Kong-born Carol undertook her high school studies at Maryknoll Convent School, then at St Mary’s Calne, Wiltshire, in the UK. She graduated from the University of Oxford in 2016 with a Master’s in Mathematics and Computer Science (First Class Honours).
To visit Carol Mak’s Croucher profile, please click here.