Neural Stochastic Contraction Metrics at UTIAS
Research internship on learning-based control theory for nonlinear stochastic systemsThis past summer (of 2025), I had the pleasure of working under MSc Kevin Chen at the University of Toronto Institute of Aerospace Studies (UTIAS) through the Aerial Robotics Club.
I took a keen interest in his thesis project regarding the stability analysis of a quadrotor with a slung payload, as his approach to creating a CCM fused my understanding of PID, EKFs and neural networks with the concept of contraction metrics
Formally, a contraction metric is a Riemannian metric that guarantees that all system trajectories converge exponentially to each other. This is useful for stabilizing nonlinear systems (like quadrotors), as it is a global property that can be checked pointwise.
Kevins thesis looked at extending CCMs to stochastic non-linear systems, and was looking at a supervised learning approach to generating contraction metrics based off of convex-optimized data of existing x and M(x) data. The process of generating such data; however, was quite taxing and involved a large amount of computing power, and much trial and error. Thus, the work I did was looking at the unguided appraoch of trying to satisfy the stochastic contraction condition (a matrix inequality) through a neural network, and seeing if it was possible to generate a contraction metric in this way.
Using PyTorch, I coded an automatic differentiation to compute the necessary Jacobians to check the contraction condition for a pendulum anchored on a car to test the networks ability to work with non-linear systems. I trained the network on a stochastic pendulum system, and was able to get some promising results regarding the satisfaction of the contraction condition, as well as some interesting visualizations of the contraction metric varying over the state space.
Overall, this was a very rewarding experience, and I learned a lot about both control theory and machine learning.
Currently, I am extending this work to an inverted pendulum system to test more than optimization but validity (as an inverted pendulum is not inherently stable), and will be looking to code a CCM-based controller for the system using the contraction metric generated by the neural network.
Here are some photos I took whilst at UTIAS!