• [A Selfish and Narcissistic Post] A Waste of Phosphorus?

    In Persian there is the slang phare “burning phosphorus” that is (sometimes) used to refer to “thinking“.

    Looking at the website of the Federal Reserve Bank of St. Louis, we see that the Producer Price Index for Phosphates, which tracks the average change in the selling prices received by U.S. domestic producers for phosphate products, is going UP, and is going up FAST!


    Maybe the price going up because of the amount of phosphorus I (and my fellow Iranian colleagues) have to burn these days just to keep up with the rapidly evolving US immigration policies.

    It’s an opinion that might sound a little narcissistic, but I’m going to state it anyways: I makes no sense to put me in a position where I have to worry this much about immigration issues.

    My presence in the U.S. is unequivocally beneficial to the country. I am a Ph.D. student at an Ivy League school, conducting research in Machine Learning, which is arguably the hottest topic of the day. I hold a Master’s degree from the number one business school in the world, and my undergraduate degree was in the most selective major at the top university in my country.

    I am productive, and I am on a path that could lead me to contribute significantly—whether through an academic career or by joining the U.S. industry. Given these, why am I put in a place to have to worry this much?

  • MIT 15.401 Finance Theory I (Fall 2008)

    I have recently been watching MIT 15.401 Finance Theory I taught by Prof. Andrew Lo. The course covers the very basics of the theory of fixed income, equities, options, and futures pricing. More interestingly, the course is happening right at the height of the 2008 financial crisis and we can watch Prof. Lo’s real time commentary of the events. Really recommend to anyone interested in finance.

    P.S. The reason I watched this course was because I was reading a very old paper by Prof. Lo and Amir E. Khandani that tries to explain the reason why quantitative hedge funds suffered extreme losses in August 2007, with the rest of the market feeling almost nothing. Also a must-read.

  • The Emergence of Probability [Chapter 2]

    The following PDF is a short note of the second chapter of The Emergence of Probability by Ian Hacking.

  • The Emergence of Probability [Chapter 1]

    Recently, I have started reading Ian Hacking‘s amazing book, The Emergence of Probability, which contains a nice philosophical study of early ideas about probability, induction and statistical inference. I really like the book and decided to write a small note for each chapter and post them here. This is mainly for my own reference later.

  • John Adams and Training LLMs

    We train large language models on large corpuses of clean text. That might be good enough for many things, but I think this way of training is very limited. This idea came to my mind when I was looking for a quote from John Adams from a letter to his wife, Abigail. The original manuscript found on the Massachusetts Historical Society is

    which reads

    I must study Politicks and War that my sons may have liberty to study Painting and Poetry Mathematicks and Philosophy. My sons ought to study Mathematicks and Philosophy, Geography, natural History, Naval Architecture, navigation, Commerce and Agriculture, in order to give their Children a right to study Painting, Poetry, Musick, Architecture, Statuary, Tapestry and Porcelaine.

    This is far more revealing than the clean, polished version we usually see.

    I must study Politicks and War that my sons may have liberty to study Mathematicks and Philosophy. My sons ought to study Mathematicks and Philosophy, Geography, natural History, Naval Architecture, navigation, Commerce and Agriculture, in order to give their Children a right to study Painting, Poetry, Musick, Architecture, Statuary, Tapestry and Porcelaine.


    The edit—crossing out Painting and Poetry for Mathematicks and Philosophy is his reasoning made visible. The clean text gives us his conclusion; the messy text shows us how he got there.

    This highlights a fundamental limitation in how we train AI. Our models learn from the final draft, the published book, and the finished article. They are experts on the results of human thought, but they are completely ignorant of the messy, iterative process of revision, debate, and discovery that created it.

  • Philosophical Theories of Probability 

    In Fall 2016, as a freshman, I presented a chapter from Feynman’s Lectures on Physics to freshman physics students at Sharif University. This was part of a series of weekly meetings organized by the student scientific organization. The chapter briefly discussed various interpretations of probability. As a freshman with limited experience, I found myself quite puzzled after reading it. How could we apply the same concept of probability, used in meteorology, to phenomena like radioactive decay?

    Years later (in Winter 2020), after studying probability as a mathematical subject, I encountered Donald Gillies’s book, Philosophical Theories of Probability. This book offers a concise chronological overview of the philosophical interpretations of probability and provided some answers I had been seeking since that Feynman lecture. I believe this book is essential for anyone working with probability who is not a philosopher.

    Gillies introduces the classical, subjective, frequency, and propensity theories of probability and concludes with a chapter on the intersubjective approach, which he himself developed. He argues that different philosophical interpretations of probability are employed—or should be employed—depending on the context, such as various scientific fields.

  • The Adversarial Classroom

    Throughout my academic studies, I’ve taken a wide range of courses, both during my undergraduate studies in Iran and as a graduate student at Penn. What appeared to be a common theme among most of these classes was what I term the adversarial classroom system. Here, regardless of students’ interest in the subject matter, the primary motivation often revolves around maximizing grades. Homework completion, exam preparation, and class attendance primarily focus on achieving higher grades. Deadlines are set throughout the semester, and students are required to submit their homework before these deadlines, regardless of the time it might consume or the benefits derived from solving the questions.

    The student and the teacher are seen as adversaries. As a student, the goal is to maximize my grade while the instructor aims to prevent that from happening 🙂

    This behavior is seldom benign. In my experience, often, I found myself doing less because I knew I was already receiving a good grade. I over-optimized and found shortcuts, learning less while maintaining grades. The adversarial system is misaligned. A misaligned system pursues some objectives, but not the intended ones — at least not fully [1].

    To address this issue, I propose the following — while I admit that I am no expert in pedagogy.

    1- If the grade comprises n components, the instructor randomly chooses n numbers that sum to 100 and uses these numbers as the weight for the components. The instructor will never announce this. Students, unaware of these weights, will strive for excellence in every single component, fostering a holistic approach to learning.

    2- No deadlines will be set for homework. Homework will be released throughout the semester and submitting only a fraction of them is enough; e.g., 70% of all released questions. The students get to select the questions that they find most beneficial and submit them by the semester’s end.

    [1] Russell, Stuart J.; Norvig, Peter (2021). Artificial Intelligence: A Modern Approach (4th ed.). Pearson. pp. 5, 1003.

  • Learnability of a Finite Hypothesis Class in Learning Problems with Noisy Training-Set Labels

    In this note, the PAC-Learnability of a finite hypothesis class is proved for a learning problem in which the training set labels are flipped with a certain probability.

  • On Bounding Radamacher Complexities

    In this note, we prove various properties of Radamacher complexities. We also present bounds for Radamacher complexity of various hypothesis classes.

  • Bernstein’s Expectation

    In this note, we derive an upper bound on a random variable satisfying the Bernstein inequality.