First and foremost, I would like to express my sincere gratitude to my supervisor Prof. Dan Olteanu for his guidance, invaluable advice, and the many hours we spent discussing the project. His support was a crucial factor of the success of this thesis, and I could not have asked for a better supervisor.A big, heartfelt thank you goes out to my colleagues at relationalAI, in particular Hung Ngo, Mahmoud Abo Khamis, and Long Nguyen, for their contributions to much of the work presented in this thesis. The thesis would not have been possible without their support. I also thank Molham Aref for providing me with the opportunity to spend one summer at relationalAI in Berkeley.I appreciate all the support and companionship my colleagues from the Oxford FDB group both in the lab and outside. Their presence has made the past years significantly more enjoyable.On a more personal note, I owe eternal gratitude to my family, in particular my parents and my brother, for their continuous support and encouragement. I would not have been able to pursue this DPhil without their support.Lastly and most importantly, thank you Julia, for your support, love, and patience. I look forward to a lifetime of adventures with you.