Photo by Cytonn Photography on Unsplash

Machine Learning in a Non-Euclidean space

Chapter 0. A Microsoft DS and an ML Doctoral Researcher thinking together

Mastafa Foufa
3 min readJun 26, 2023

--

How it all started.

Recently I launched a series on the mathematics needed for any Machine Learning practitioner. I quickly came across Euclidean spaces and Euclidean geometry. As a teacher at EPITA Paris and a DS at Microsoft, I have built a lot of intuition based on Euclidean geometry.

Typically, in many cases, I understand we want two things similar in our human reasoning to be also similar from a Euclidean perspective, i.e. close together in say a 2-dimensional space. For example, in NLP, we typically want two words that are semantically close to each other to also be close to each other in their n-dimensional representations (embeddings).

Though, as I progressed in my personal reading, I came across non-Euclidean geometry. The authors seemed to argue that it was important to learn more about this space. I then remembered a couple of models leveraging non-Euclidean geometry, e.g. Poincaré Embeddings for Learning Hierarchical Representations. I also remembered discussing non-Euclidean Variational Autoencoders (VAE) with my good friend, Aniss Medbouhi.

Resource: Adapted from Wikipedia. The typical objective of an autoencoder is to reproduce the input x after compressing it in a latent space. Such latent space is typically Euclidean. What if we use a hyperbolic space for certain datasets to better reproduce them in the output space?

Aniss is doing a PhD at KTH Royal Institute of Technology. He is working on geometric and topological methods for representation learning, and applications to Brain-Computer Interfaces. I quickly remembered him presenting his master’s thesis focusing on computational topology including non-Euclidean geometry applied to Machine Learning.

For those of you that don’t know KTH, it is a fantastic university, the best university for engineering in Scandinavia. I have done my masters in Machine Learning there myself, as a double degree student from France. That is where I met Aniss, where he was also doing a double degree from another engineering school in France.

Back then, I was amazed by the variety of high-quality courses in Machine Learning and Deep Learning. Landing at Microsoft right after my masters, I was armed with some solid understanding of the field thanks to KTH.

Why is Aniss a great partner for this series?

  1. He has done great work in topology and has a heavy background in maths.
  2. He is doing research in hyperbolic geometry applied to Machine Learning in a top lab in Sweden: the Robotics Perception and Learning Division, in Prof. Danica Kragic’s team.
  3. He is passionate about what he does and loves using simple tools to explain complex math.
  4. He is a really cool guy!

Like many of you out there, I have a limited amount of time for learning, but I understand that, in this fast-moving space, it is key to stay sharp. So, I have chosen not to go all-in looking for multiple resources and reading them in isolation. Rather, I will approach this complex space with my friend Aniss. He is going to help me, and by the same token, help all of us, get intuition around ML in non-Euclidean spaces. I’ll do my homework, and so should you. In this series, I’ll share my learnings and my discussions with Aniss.

Follow us in this exciting journey!

How this series will look like

Chapter I. Why should you learn about non-Euclidean ML?

Chapter II. How to get an intuition about hyperbolic geometry and when to use it in your Data Science projects?

Chapter III. From Poincaré Embeddings to Hyperbolic VAEs: Exploring the Potential of Non-Euclidean Machine Learning

Chapter IV. Chat GPT in a non-Euclidean space

Connect with the contributors.

ML Doctoral Researcher at KTH Royal Institute of Technology.

Aniss is on Medium. Linkedin. https://www.linkedin.com/in/aniss-medbouhi/

Data Scientist at Microsoft and Teacher at EPITA Paris.

Linkedin. https://www.linkedin.com/in/mastafa-foufa/

--

--

Mastafa Foufa

Data Scientist @Microsoft | ex-Teacher @EPITA Paris | 8 patents in AI