<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ajay Mallya on Medium]]></title>
        <description><![CDATA[Stories by Ajay Mallya on Medium]]></description>
        <link>https://medium.com/@amallya0523?source=rss-ab0f45e79999------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*hA3ZcdssWnqRDtIWkgV_Pw.jpeg</url>
            <title>Stories by Ajay Mallya on Medium</title>
            <link>https://medium.com/@amallya0523?source=rss-ab0f45e79999------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 23:19:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@amallya0523/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Thinking and Truth-Seeking Through the Lens of Discrete Mathematics]]></title>
            <link>https://medium.com/@amallya0523/improved-thinking-and-truth-seeking-through-the-lens-of-discrete-mathematics-37099d58d52e?source=rss-ab0f45e79999------2</link>
            <guid isPermaLink="false">https://medium.com/p/37099d58d52e</guid>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[philosophy]]></category>
            <category><![CDATA[self-awareness]]></category>
            <category><![CDATA[self]]></category>
            <category><![CDATA[mathematics]]></category>
            <dc:creator><![CDATA[Ajay Mallya]]></dc:creator>
            <pubDate>Fri, 31 May 2024 21:42:06 GMT</pubDate>
            <atom:updated>2024-06-01T08:05:35.688Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*Vkom_cDAOass_mEX42AV9Q.jpeg" /><figcaption>Image generated by Bing Copilot</figcaption></figure><h4>Discrete Mathematics?</h4><p>Despite the title above, this article does not focus much on the formalities of discrete mathematics. Rather, I hope to communicate the philosophy that I draw from this topic.</p><p>Discrete mathematics is commonly associated with proofs, which are simply methods of validating mathematical propositions. Consider this proposition: “If a positive integer <em>x </em>is divided by 2 and has a remainder of 0, then <em>x </em>is even.” The relevant proof will confirm this statement’s validity.</p><p>The system for seeking truth in mathematical propositions has been particularly helpful for me in other aspects of life. Despite their positives, modern technologies have made it overwhelmingly easy to acquire information. It is our responsibility to evaluate what we listen to and follow, with the goal of ultimately nurturing a culture of open-mindedness.</p><h4><strong>Perceived Validity</strong></h4><p>Before going we begin, imagine a health bar from a video game. Replace the label of “XP” or “Health” with “Perceived Validity,” and imagine that the validity bar starts at 100/100 points (100%). This represents bullet-proof, albeit extremely naive, confidence in a statement or belief.</p><p>Now let’s dissect and obliterate one of my old, outdated, and invalid opinions:</p><ol><li><em>“Investment bankers are all selfish, money-hungry, and superficial.”</em></li></ol><p>There are many things wrong with this statement, although my initial impressions from my life experience encourage me to agree with it. Let’s add some support to make the statement more convincing:</p><p>2.<em> “I majored in financial economics for a year in college before deciding to pursue applied mathematics instead, and I can attest that the classic investment banking career route is cutthroat and toxic (especially in New York City).”</em></p><p>We now have an opinion backed by personal experience. Sounds like a pretty solid take; it has real-life evidence!</p><h4>Acknowledging Credibility or a Lack Thereof</h4><p>But why should my statements come with a sufficiently high level of credibility? Is there any actual evidence here other than the words coming out of my mouth (or words on your screen)? Here’s some food for thought: what if <a href="https://www.linkedin.com/in/raydalio?original_referer=https%3A%2F%2Fwww.google.com%2F">Ray Dalio</a> said the same thing? How would the perceived credibility of the statement change, if at all?</p><p>Dalio would naturally receive more credibility, and this is totally valid. He has a tremendous amount of experience in the finance world, so he is infinitely more informed about finance than me. However, does this mean that we should accept everything he says? No. Consider any other random topic. Take baboons for example; he is likely not an expert on baboons. Similarly, he’s likely not an expert on archaeology.</p><p>This brings us to a critical, yet pretty self-explanatory, first point: Credibility varies from source to source, and there is always room for error because nobody is truly omniscient, although we may specialize in certain fields. It is our responsibility to acknowledge this when absorbing information and forming opinions.</p><p>Ray Dalio aside, my original statement about investment bankers now loses some points on the validity bar because of the above point. Let’s say we have dropped to 50% perceived validity.</p><blockquote>Remark: It’s worth noting that you should not just blindly doubt everything. Living like this will turn you into a hermit. This is not a black and white science; I merely suggest that you seek to acknowledge and truly understand<em> </em>the information you absorb. This will improve your decision-making in the long run.</blockquote><h4>Accuracy vs. Precision</h4><p>Moving on. Let’s say we hear twenty other people saying the same statement that I said about investment bankers. These people are all undergraduate students at the same university and on the same college campus and in the same city. This is all we know about the students.</p><p>Now that we have heard more people expressing the same sentiment, the statement’s validity seems to improve. The perceived validity bar now increases to 75%.</p><p>But, once again, what credibility exists to support these additional perspectives? They are all just saying the same thing, but that doesn’t mean that the statement’s <em>accuracy</em> improves. Unfortunately, we humans are social animals at the core, geared to be more receptive towards common ideas that align with the majority of people. This is where norms, stereotypes, etc. come from.</p><p>For the sake of argument, let’s assume that the twenty-one students (including me) are all assumed to be sufficiently credible, regardless of their <em>true credibility</em>. Let’s raise our perceived validity to 85%. They <em>may </em>be wrong, but at the moment we are OK with assuming their statements are somewhat close to the truth because everyone else seems to be on board and aligned with the statement.</p><p>I mentioned “accuracy” above. A statement is accurate if it aligns with the truth and is repeatedly proven to be true (i.e. until it it is proven false). This can be represented by the bulls-eye on a target (the point at the very center).</p><p>Precision, on the other hand, has less to do with the center of the target. If all darts clump in one area, regardless of how close to the bulls-eye they all are, they are considered <em>precise</em>. The below visualization is helpful to understand this distinction:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bYb4TUKXcZ1VEGP8.png" /><figcaption>Source: <a href="https://www.forecast.app/blog/difference-between-accuracy-precision">https://www.forecast.app/blog/difference-between-accuracy-precision</a></figcaption></figure><p>Back to our example: our perceived validity bar (emphasis on “perceived) has increased to 85% because of complacency and quick acceptance due to a majority opinion. Subscribing to groupthink is the easiest, fastest, most natural way to form misinformed opinions or thoughts.</p><p>Let’s say that some mind-blowing, empirical evidence has emerged that totally contradicts the original statement about investment bankers. It is clear that our students’ original statement was highly precise but highly inaccurate. As a result, the perceived validity plummets like one of those drop tower rides at amusement parks. We now hover dangerously low at 5%.</p><p>Why is this drop so much larger than the previous ones? When ideas or opinions cultivated through groupthink are upheaved, their substance rapidly deteriorates.</p><p>For example, when Galileo deduced that the Earth is not the center of the universe, the resulting upheaval was immense. The scientific observations of this fact that followed tore down the prior belief and bolstered the new one. Referring to our terminology, the Earth-centric belief was <em>low accuracy-high precision</em>; the Sun-centric belief was <em>high accuracy-low precision</em>. Over time, the subsequent confirmations evolved the latter into a <em>high accuracy-high precision</em> statement. Galileo’s statement is highly accurate to this day because so far nobody has proven him wrong, and it is highly precise because the vast majority of people agree with the statement.</p><p>There are numerous other examples of this. At first, many people did not believe that Steve Jobs could get a computer to fit in the palm of a hand, yet we now all use smartphones.</p><h4>Devil’s Advocate</h4><p>Over time, the desire for truth will result in various principles that you confidently accept. But this is not the end of the road. Despite proven beliefs, it is vital that you leave room for change and reevaluate them every so often.</p><p>Just because you make it through TSA once, that does not mean that TSA will stop checking you. Similarly, you have to do this for your set of beliefs every so often. I like to think of this open-mindedness as a subconscious process that hums somewhere in the back of your head and emerges only when you consciously access it.</p><p>Being open-minded should not take a lot of energy and strain during your every day life. It is a value that you can intelligently tap into to improve yourself and evaluate your beliefs. Ultimately, evaluating your beliefs indeed has the potential to positively impact your close friends and family.</p><h4>Concluding Thoughts</h4><p>It is easy to react with repulsion when an idea totally disagrees with <em>our</em> set of beliefs and values. This is what humans all do, naturally. We also tend to selectively accept what agrees with our values (this is called confirmation bias). This is the arena in which we must improve our thinking. It is important to feel discomfort or repulsion when efforts to substantiate ideas, even ones we agree with, are forgone entirely!</p><p>You will find immense satisfaction as you better understand, and either refute or validate, your current set of beliefs. Having a greater grasp of the truth (despite not always reaching it) enables you to move forward in life with more happiness and confidence.</p><p>Even if discrete mathematics is not necessarily your cup of tea, I’m sure the underlying philosophies that I have conveyed will serve you well!</p><blockquote>Thanks for reading!</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37099d58d52e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Table O’ Contents]]></title>
            <link>https://medium.com/@amallya0523/table-o-contents-40f2de399a7a?source=rss-ab0f45e79999------2</link>
            <guid isPermaLink="false">https://medium.com/p/40f2de399a7a</guid>
            <dc:creator><![CDATA[Ajay Mallya]]></dc:creator>
            <pubDate>Sat, 04 May 2024 22:27:16 GMT</pubDate>
            <atom:updated>2026-04-09T03:05:22.184Z</atom:updated>
            <content:encoded><![CDATA[<h3>Table Of Contents</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*pTrAMNe7osE-xz2gWyjtqA.jpeg" /><figcaption>Image generated by Bing Copilot</figcaption></figure><blockquote><strong>Welcome to my table of contents. More recent articles appear higher up in their respective sections.</strong></blockquote><h4>Applied Mathematics, Computer Science, etc.</h4><ul><li><a href="https://medium.com/@amallya0523/hnsw-algorithm-efficiently-searching-vector-databases-9276a934393d">HNSW Algorithm: Efficiently Searching Vector Databases</a></li><li><a href="https://medium.com/@amallya0523/how-an-llm-understands-input-the-math-under-the-hood-114ac69f96c6">How an LLM Understands Input: The Math Under the Hood</a></li><li><a href="https://medium.com/@amallya0523/vector-embeddings-from-baby-nlp-to-mature-llms-f395b533a5e0">Vector Embeddings: From Baby NLP to Mature LLMs</a></li></ul><h4>Life Philosophy</h4><ul><li><a href="https://medium.com/@amallya0523/improved-thinking-and-truth-seeking-through-the-lens-of-discrete-mathematics-37099d58d52e">Thinking and Truth-Seeking Through the Lens of Discrete Mathematics</a></li><li><a href="https://medium.com/@amallya0523/useful-personal-philosophies-that-i-have-found-infinitely-useful-open-mindedness-8658571a7f90">Useful Personal Philosophies: Open-Mindedness</a></li><li><a href="https://medium.com/@amallya0523/useful-personal-philosophies-independent-contentedness-fefb3aa132ba">Useful Personal Philosophies: Independent Contentedness</a></li><li><a href="https://medium.com/@amallya0523/useful-personal-philosophies-deep-curiosity-2f868866c52d">Useful Personal Philosophies: Deep Curiosity</a></li></ul><h4>Wellness</h4><ul><li><a href="https://medium.com/@amallya0523/what-i-learned-from-my-social-media-break-af49c3bfebc3">What I Learned from My Social Media Break</a></li></ul><h4>Spirituality</h4><ul><li><a href="https://medium.com/@amallya0523/why-bahai-7b5b51e00187">Why Baha’i?</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=40f2de399a7a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Bahai?]]></title>
            <link>https://medium.com/@amallya0523/why-bahai-7b5b51e00187?source=rss-ab0f45e79999------2</link>
            <guid isPermaLink="false">https://medium.com/p/7b5b51e00187</guid>
            <category><![CDATA[religion-and-spirituality]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[self-development]]></category>
            <category><![CDATA[bahai-faith]]></category>
            <category><![CDATA[growth]]></category>
            <dc:creator><![CDATA[Ajay Mallya]]></dc:creator>
            <pubDate>Tue, 30 Apr 2024 21:09:20 GMT</pubDate>
            <atom:updated>2024-05-06T06:49:26.318Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*bUcWGDdgyJ0_FM3bV8GDKg.jpeg" /><figcaption>Image generated by Bing Copilot</figcaption></figure><h3>A brief preface…</h3><p>As usual, I offer a brief preface to illuminate my motivations for writing this. But first I’d like to highlight the impressive rhyming that I so cleverly included in the title above; I have quite a way with words.</p><p>Jokes aside, let’s get into this.</p><p>I once heard an acquaintance refer to himself as a “bad Catholic.” He meant that he was born into a Catholic family but did not necessarily follow the ways of the faith. For example, a “bad Catholic” might rarely go to Church or not observe a tradition such as Lent.</p><p>I hesitate using the word “bad” in this religious context because it sounds a bit crude and too negative. However, this is the simplest terminology to explain that I’ve been a “bad Hindu” for most of my life.</p><p>Hindus don’t eat beef, and they observe various festivals such as Diwali and Holi (to name a few). I eat beef. I’ve lit candles for Diwali maybe a maximum of ten times when I was little. The first time I participated in Holi was in my second year of college.</p><p>Somewhat interestingly, I went to a Catholic high school, but I never got close to becoming Catholic.</p><p>For a long time, I centered my beliefs with science and avoided thinking about supernatural beings, how humans came to existence, etc. This all seemed like knowledge that I neither needed to worry about nor seek out.</p><h3>High School</h3><p>I mentioned that I went to a Catholic high school.</p><p>The religion classes helped me a lot, and I still keep in touch with one teacher who profoundly impacted me. The values my teachers taught through the lens of Catholicism were important to me, and these values were underscored more than the religious context.</p><p>I was a fairly pragmatic high schooler, and I figured that seeking a realistic, modern approach to religion made the most sense. Thus, I sought to primarily focus on the core values taught by Catholicism (including, but certainly not limited to, the desire to serve others). Grounding religious teachings of values with reality and scientific reasoning was a perfect balance for me.</p><blockquote>…seeking a realistic, modern approach to religion made the most sense to me.</blockquote><h3>College</h3><p>In college, I did not do <em>anything </em>religion-related. Zip, zero, nada. Sure, I went to a couple of events (including that one Holi), but my motivations for attending were not religious in nature.</p><p>Occasionally, I attended some of the Indian, Hindu events for the purposes of (1) socializing with folks of similar cultural backgrounds and (2) meeting new people. Outside of these events, I did not even think about religion.</p><p>During the period from freshman year until my very recent Baha’i declaration, I still maintained the pragmatism towards religion that I had in high school.</p><p>My mindset first began to evolve at the annual Columbia club fair, when I stopped by the Baha’i table to talk to the only guy running it. I have a family friend who is like a big sister to me, and she is Baha’i. Turns out they knew each other; it’s such a small world (granted, she is a PhD student at Columbia so the odds of them meeting were somewhat decent). I knew absolutely nothing about the faith and started asking my new friend (who we will call Cooper) some questions.</p><p>Cooper explained how the faith states that the prophets of all religions are sent by the same man above to guide humankind. The Baha’i faith’s prophet is supposedly the most recent prophet; his name is Baháʼu’lláh.</p><blockquote>…the faith posits that the prophets of all religions are sent by the same man above to guide humankind.</blockquote><p>I remember the illustration Cooper showed me: there was a rainbow leading down to civilization and each color contained a major prophet (Jesus, Moses, the Buddha, etc.). This concept fascinated me and single-handedly sparked my interest, and I ended up asking more follow-up questions.</p><p>Although this interaction piqued my interest, I did not interact with the faith for a long time, until the next year, I believe. It’s curious how these things happen: I got a great (albeit brief) introduction to the faith, the ideas sat somewhere in the back of my mind for a year or so, and then I randomly decided to explore more and go to a Baha’i club meeting.</p><h4>Baha’i Club</h4><p>The Baha’i community is small, mostly because of its “modern” origins in the mid-1800s. In the Columbia Baha’i Club, there were only 3 people regularly attending meetings (at least when I was there).</p><p>At my first club meeting , one of Cooper’s <em>other </em>friends (of Catholic background) also attended, simply because he was curious about the faith. Coincidentally, he lived on my floor during my freshman year. Seeing curiosity and open-mindedness in someone else I knew was refreshing and encouraging.</p><p>The devotional opened with a silent space with prayers here and there. I didn’t know any prayers, so I recited one of my favorite poems called <a href="https://www.poetryfoundation.org/articles/68731/william-carlos-williams-the-red-wheelbarrow">“The Red Wheelbarrow” by William Carlos Williams</a>. To me, the poem communicates the beauty found in simplicity.</p><p>I learned that poems and other interesting quotes, even quotes from other religions, are respected and acceptable in the Baha’i faith. From my personal experience, I know there are other religions that would perhaps find this concept foreign or strange, at the very least.</p><p>Afterwards, my friend handed out two-page packets, stating that the topic for the discussion was “science and religion.” I was a little hesitant at first, but I learned that discussion of and commentary on this topic was explicitly encouraged by the faith. The faith’s welcoming nature towards science, rational thinking, and truth-seeking fascinated me. We ended up zooming past our end time, discussing ideas and considering the faith’s stance regarding the topic. I particularly enjoyed discussing how science and faith can support one another in the modern world.</p><h4>Youth Nights</h4><p>Having attended club meetings for around a month or so, Cooper invited me to a regularly-scheduled Baha’i youth night near NYU. Interested in meeting more people of the faith, I attended.</p><p>The first thing I noticed about youth night was that the participants came from all sorts of backgrounds (ages from 18 to maybe 28, cultures, ethnicities, etc.). I had never seen this type of diversity in a religious context before. Granted, most of the folks were Iranian, but there was a significant number of non-Iranian people. Over time, I met people from all sorts of backgrounds, including East-Asian, Indian, Caucasian, Latino, and Jewish backgrounds. This was remarkable to me.</p><p>The structure of downtown youth night was similar to that of the Columbia club’s meetings. The main differences were the size of the group and the added singing plus instruments in between prayers.</p><p>At this youth night, the topic of discussion was “spiritual capitalism.” Essentially, the discussion revolved around ways to balance spiritual life and a career that contributes to capitalism. I found that this was a highly relevant topic for developing perspective and <a href="https://medium.com/@amallya0523/useful-personal-philosophies-that-i-have-found-infinitely-useful-open-mindedness-8658571a7f90">open-mindedness</a> in both staunch anti-capitalists <em>and</em> materialistic individuals.</p><p>The next time I went to downtown youth night, we all went to a gelato place a few blocks away afterwards and had some fun, light-hearted conversations. I really appreciated how accepting the whole group was and how eager they were to learn more about my background.</p><h3>Gap Semester</h3><p>My experiences with the Baha’i community in New York City were fantastic, and I missed the downtown youth nights when I began my gap semester in the Bay Area, California.</p><p>Fortunately, the Baha’i community is small enough that people on the east coast and west coast have very few degrees of separation. Cooper and my family “big sister” connected me with friends of theirs from the Berkeley, Stanford, and Sunnyvale Baha’i communities, and I began going to Bay Area youth nights once a week.</p><p>As a result, I continued my exploration of the faith while away from Columbia. Here are six interesting things I learned about the faith:</p><h4>I.</h4><p>Rainn Wilson (Dwight Schrute from The Office) is a Baha’i!</p><h4>II.</h4><p>Baha’is have been severely persecuted and discriminated against in Iran for many years, most notably after the Iranian Revolution. After this point in Iran’s history, Baha’is were explicitly excluded from many of the country’s constitutional laws, alienating them. In the Sunnyvale group, I met a friend who came to the U.S. because the universities in Iran rejected his applications because of his faith. As a result of this discrimination, Baha’is have created a Baha’i Institute for Higher Education, but it seems that people with sufficient means and resources would rather live more freely in other countries like the U.S.</p><p>I encourage you to read the moving, true story of a Baha’i girl named Mona, and how she was executed by the Iranian government for her faith.</p><h4>III.</h4><p>The Baha’i faith is relatively modern, and the faith is extremely open-minded towards other religions and beliefs. I have found that my Baha’i peers are open to devil’s advocate questions and challenges to the faith. Any faith (or any sort of community organization, for that matter) that continually respects challenges and questions will thrive and become more accessible in the long run.</p><h4>IV.</h4><p>In the Baha’i faith, participating in politics is somewhat looked down upon, in a sense, as the belief seems to be that partisan politics is divisive and disengages from the universal goals and principles that benefit all of humanity.</p><h4>VI.</h4><p>The Baha’i faith utilizes an election system to choose leaders for local, regional, and national bodies that help run the faith. However, it seems to me that the roles are primarily logistical in nature, and this ensures that nobody seeks positions for selfish reasons. During elections, nobody advocates for themselves or seeks support; registered Baha’is simply give nine votes to other registered Baha’is who they think would be great leaders of the faith, and the only provided information has to do with the level of participation that every Baha’i offers in a given community (event attendance, for example).</p><p>This list of things I have learned is by no means exhaustive, and anyone who knows me well will amicably warn you that I may take you down a rabbit hole to discuss facets of each of these points.</p><h3>Core Value Alignment</h3><p>Now that I’ve described the trajectory of my thoughts and experiences during my exploration of the Baha’i faith, I’ll dig a little deeper and explain one of my deep-rooted philosophical considerations when evaluating whether or not the faith aligned with my core values.</p><p>Above, I posited that religions’ lifespans increase when they genuinely accept questioning. When a faith’s members productively and intellectually respond to interesting challenges, a foundational component of the faith exposes itself: this component is open-mindedness.</p><p>Now, I can only fairly say this of my experience of the U.S. Baha’i groups I have interacted with. I remind you that I have no clue how the Baha’i community incorporates this elsewhere in the world. I’m not saying that other Baha’i groups have different underlying philosophies; I merely don’t have the relevant experience to speak for other Baha’i communities across the globe.</p><p>Open-mindedness is one of the three guiding philosophical pillars/values that I try to align my actions and thoughts with. This value is particularly challenging to adhere to in the face of adversity, and, admittedly, there are instances where I have not always followed this value down to the tee. However, consistently seeking and reflecting upon open-mindedness is commendable. I digress.</p><p>Anyway, in the spirit of open-mindedness, I love diving into unexplored margins in conversations and playing devil’s advocate whenever possible (sometimes against beliefs I agree with, i.e. potentially my own). This mindset makes discussions and conversations exponentially more fruitful and meaningful for all parties.</p><p>The Baha’i communities that I have interacted with have (1) tremendously helped me cultivate my open-mindedness and (2) have always understood and accepted my occasional devil’s advocate positioning.</p><p>Thus, the Baha’i faith aligned with my core value of open-mindedness. I subsequently found that the faith aligned with another value of mine, deep curiosity, and helped me unearth and nourish more of my third core value, <a href="https://medium.com/@amallya0523/useful-personal-philosophies-independent-contentedness-fefb3aa132ba">independent contentedness</a>.</p><h3><strong>A Final Consideration</strong></h3><p>I’ve discussed my trajectory towards and alignment with the faith. Now I’ll explain a final consideration that I had prior to my declaration.</p><p>In the Baha’i faith, drinking and the use of substances is prohibited. However, I talked to a Baha’i in Berkeley, and he said that Baha’is understand that everyone is at a different point in their journey, and nobody will negatively judge someone else who drinks, especially when that someone isn’t Baha’i and is still exploring the faith (i.e. me, at the time).</p><p>I personally don’t care if others drink. I have plenty of friends who drink, and my philosophy regarding drinking is “to each their own.” It’s none of my business, and everyone’s choices are valid.</p><p>For me, however, I finally sat down and considered my motivations for drinking. I realized that I drank every so often but never had an intrinsic desire to do so.</p><p>I found that drinking was a “want” (as opposed to a “need”) in my life because of my ignorant adherence to groupthink within my social circles and its availability. I also found that drinking was more of a way for me to fit in and feel a sort of reprieve from the stresses of life.</p><p>In retrospect, this latter reason for drinking was pretty concerning to me, even though I never really drank extremely often or as often as some of my peers.</p><p>I asked myself many questions: Why was an external influence dictating how I reacted to or felt about troubles and stresses in life? What prevented me from not dealing with these stresses entirely independently? What does this say about my emotional stability and awareness? These reflections all proved to be extremely critical for my personal development in the long run.</p><p>Prior to considering my relationship with drinking, I had gotten rid of my unnecessary social media platforms and gone cold turkey, more or less, to improve my relationship with media. Away from Instagram, for example, I found that over time, social media had acted on me like a drug or perhaps even an addiction (<a href="https://medium.com/@amallya0523/what-i-learned-from-my-social-media-break-af49c3bfebc3">check out this article about my experience</a>). For most, the addiction is subconscious, and I’m glad that I woke up to realize this fact.</p><p>Just like my thoughts about drinking, I absolutely do not judge people who use social media. Some people, indeed, have healthy, controlled relationships with their social media, and social media undeniably helps people stay connected. I argue that the vast majority of these connections are superficial and frankly stupid, but this is a topic for another day. Ultimately, I drew a parallel between drinking and social media.</p><p>As I read stories about people who have gone sober, I found <a href="https://www.youtube.com/watch?v=yZcMcOthn84">a YouTube clip of Rob Lowe discussing his long-term sobriety</a>. He said that when he first started his sobriety journey, he asked himself how he would have fun at events where drinking was involved.</p><p>When I heard him say this, I realized I was wondering the same exact thing, subconsciously. Seeing him make it through so many years sober, despite inevitably attending events involving alcohol (weddings, Hollywood events, or whatever events actors attend), made me realize that I will most certainly be able to have fun without alcohol.</p><p>Thus, figuring out my relationship with drinking was the final internal battle that I sorted out before finally stating my declaration to the Baha’i faith.</p><h3>Concluding Thoughts</h3><p>I think this article is pretty comprehensive, and I believe I’ve covered all the relevant points of my journey to the Baha’i faith.</p><p>To those of you who have asked what led me to this decision, I hope this offers a sufficient explanation and is a solid supplement to whatever shortened story I may have told you in person.</p><blockquote>Thanks for reading!</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7b5b51e00187" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Useful Personal Philosophies: Deep Curiosity]]></title>
            <link>https://medium.com/@amallya0523/useful-personal-philosophies-deep-curiosity-2f868866c52d?source=rss-ab0f45e79999------2</link>
            <guid isPermaLink="false">https://medium.com/p/2f868866c52d</guid>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[personal-growth]]></category>
            <category><![CDATA[self]]></category>
            <category><![CDATA[personal-development]]></category>
            <dc:creator><![CDATA[Ajay Mallya]]></dc:creator>
            <pubDate>Mon, 15 Apr 2024 23:31:39 GMT</pubDate>
            <atom:updated>2024-04-16T01:46:34.219Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dmtfJoBagqQl1YC4eKX7LQ.png" /><figcaption>Image Generated by Bing Copilot</figcaption></figure><h3>A brief preface…</h3><p>This post is one of three that I place under the umbrella of “Useful Personal Philosophies”. I have written one small post for each personal philosophy rather than produce one massive post to make the content more digestible.</p><p>I write this post as a junior undergraduate student at Columbia University with relatively limited life experience compared to someone even a few years older and out of college. I say this right off the bat because the trifecta of personal philosophies that I present in these posts will almost certainly evolve over time, although I currently believe they are timeless and universally applicable.</p><p>Please refer to <a href="https://medium.com/@amallya0523/useful-personal-philosophies-that-i-have-found-infinitely-useful-open-mindedness-8658571a7f90">the first of these three posts</a> (about open-mindedness) for an extended version of this preface. The second post about independent contentedness is linked <a href="https://medium.com/@amallya0523/useful-personal-philosophies-independent-contentedness-fefb3aa132ba">here</a>.</p><h3>Personal Philosophy III : Deep Curiosity</h3><blockquote>Cultivating deep curiosity and (perhaps even more critically) helping others satisfy their curiosity are essential for intellectual growth.</blockquote><p>The company that I’m interning at has a system for recognizing and thanking team members for their contributions. The above sentence is an augmented part of a recognition post I wrote for a colleague, and it is perhaps the best distillation of this third philosophy.</p><p>Before I write these posts about my personal philosophies, I (of course) consider the best way to communicate them. At the time of writing, I’m not entirely sure how to frame this topic other than with respect to my other personal philosophies (open-mindedness and independent contentedness) to illustrate their interconnectedness. Perhaps a brief peek into my psychology and how I embrace this philosophy will be fruitful.</p><p>Ever since I could remember, I have been an extremely curious person. I love talking to people from all walks of life, and I love asking them whatever curious question comes to mind. I approach conversations and people with an entirely open mind, actively listening to new perspectives and seeking to understand opinions and experiences. I make a conscious effort to listen closely. I hope to have conversations that help me grow, hopefully inspire the other individual(s), and build an intellectual synergy. This can all be attributed to deep curiosity.</p><p>This personal philosophy also applies to my learning from textbooks, books, articles, the internet, podcasts, etc. When I learn about something that piques my interest, I love to go down rabbit holes (when time allows) and learn everything about a topic. For example, I’m learning a lot about computational mathematics right now. Understanding the theory and applications isn’t satisfactory for me; I want to understand the intuitions and motivations behind the original work. More importantly, I desire a granular level of understanding to help me communicate knowledge to others in an accessible and <em>enjoyable</em> way.</p><h3>Dumb Questions</h3><p>There is absolutely no such thing as a “dumb question”. In fact, given the vast number of topics in the universe, you could ask a seemingly endless number of what many would consider “dumb questions”. A “dumb question” is in the eye of the beholder; if you ask any expert in any field a question, it could most likely be categorized as a “dumb question” by them. However, to someone else with an equal lack of knowledge regarding the topic, your question may be helpful. In fact, the expert’s answer to your question will help the third party if they do not get the chance to ask the question themselves. Asking “dumb questions” helps others, more often than not, and this is why teachers encourage students to ask questions in the classroom.</p><p>Thus, I encourage you to totally abandon the concept of “dumb questions”. Those who ask dumb questions lack a fear of initiation and preliminary exploration; they harness a deeper understanding than others in the long run. I genuinely <em>respect</em> people who ask “dumb questions” because I know these people are deeply curious and prioritize their curiosity over what others’ think. From here on out, I’ll call these questions “preliminary questions” to emphasize the element of deep curiosity rather than the previous negative connotation.</p><p>A couple of weeks ago, an acquaintance asked me a preliminary question about LLMs (Large Language Models). I was surprised that he asked such a straightforward question about such a complex topic, but I intuitively explained the relevant fundamentals, patiently clarifying follow-up questions. Witnessing the growth of his understanding made me feel happy that I helped someone at least partially satisfy their deep curiosity. My conversation with him actually deepened my own curiosity and raised entirely new questions for me to bookmark for later rabbit hole diving.</p><blockquote>Those who ask “dumb questions” lack a fear of initiation and preliminary exploration; they harness a deeper understanding than others in the long run.</blockquote><p>It is conducive to your growth and maturity to put aside your ego and humbly accept the gaps in your knowledge. The whole premise of research is to identify gaps in knowledge and search for the unknown. Look at how far society has come as a result.</p><h3>Independent Contentedness and Deep Curiosity</h3><p>In the previous section, you probably saw influences of my open-mindedness philosophy here and there. There is a natural connection between open-mindedness and deep curiosity, and they might seem synonymous. I consider them as distinct entities because I find that open-mindedness is a prerequisite for deep curiosity. One might argue that deep curiosity is a prerequisite to open-mindedness, but I refrain from stating my contentions here.</p><p>The more interesting relationship exists between independent contentedness and deep curiosity. I posit that the cultivation of deep curiosity informs your independent contentedness, which we will call “happiness” for simplicity’s sake. I also posit that the cultivation of deep curiosity consists of two stages:</p><ol><li><strong>Stage I</strong> : Initially, you may not know what makes you happy. Naturally, you explore various hobbies, activities, and interests over time, filtering out things you don’t particularly like while holding close the things you enjoy. Eventually, you narrow down a small selection of interests that you truly love.</li><li><strong>Stage II : </strong>Once you find a few interests that you are passionate about (i.e. they bring you happiness, aka independent contentedness), you start again at square one. You are a relative beginner in these fields, but your happiness derived from these fields fuels your deep curiosity to become more knowledgeable about them. This sets off a chain reaction that leads you deeper and deeper into your passions.</li></ol><blockquote>Remark: In my <a href="https://medium.com/@amallya0523/useful-personal-philosophies-independent-contentedness-fefb3aa132ba">post on independent contentednes</a>s, I emphasize that true contentedness is found independently of others’ influences. Therefore, when I say that your interests bring you independent contentedness, I certainly mean that they are intrinsically fascinating to you and you are not doing them purely because of superficial reasons or external influences.</blockquote><h3>What if My Curiosity Wanes?</h3><p>This is a pertinent consideration. It is certainly possible to lose the forest for the trees. For example, if I were an investment banker who started my career appreciating economics in a broad sense but now only enjoys and focuses on the benefits of my income, I have probably lost my deep curiosity. I have likely become satiated for the wrong reasons (i.e. the wrong reasons <em>to me,</em> according to <em>my </em>values, <em>not others’ values</em>). More specifically, I have lost sight of my original passion and my deep curiosity has largely waned as a result.</p><p>Occasionally reflecting on the overall trajectory of your curiosity is important to identify whether your passions are changing. When your curiosity in an interest consistently wanes for extended periods of time, it may be time to take a break for either a short time or altogether. Fortunately, in the event that you take a significant break, your underlying curiosity will redirect to either your other interests or entirely <em>new</em> interests, and asking preliminary questions will certainly help your new interests become new passions that bring you fresh independent contentedness.</p><h3>Concluding Thoughts</h3><p>I hope this post illuminates my motivations for prioritizing deep curiosity as one of my top three personal philosophies. If you get anything from this article, absorb the following:</p><ul><li>“Dumb questions” do not exist. <em>Preliminary questions </em>are asked by the most curious individuals, and they gain more understanding than others in the long run.</li><li>Cultivating deep curiosity is a lifelong process.</li><li>Open-mindedness is a prerequisite for deep curiosity, and reflecting on your deep curiosity for interests reveals your true passions that yield the most happiness.</li></ul><blockquote>Thank you for reading this post! Please feel free to reach out and <a href="https://www.linkedin.com/in/ajay-mallya/">let me know</a> if you have any questions or ideas for future blog posts.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f868866c52d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Vector Embeddings: From Baby NLP to Mature LLMs]]></title>
            <link>https://medium.com/@amallya0523/vector-embeddings-from-baby-nlp-to-mature-llms-f395b533a5e0?source=rss-ab0f45e79999------2</link>
            <guid isPermaLink="false">https://medium.com/p/f395b533a5e0</guid>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[large-language-models]]></category>
            <category><![CDATA[computer-science]]></category>
            <dc:creator><![CDATA[Ajay Mallya]]></dc:creator>
            <pubDate>Tue, 09 Apr 2024 23:54:38 GMT</pubDate>
            <atom:updated>2024-07-15T15:46:40.339Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/270/1*XRNv7_5PuMu2uQSy8IAd0w.jpeg" /><figcaption>The growth of early NLP methods to the modern transformer model (Image generated by Bing Copilot)</figcaption></figure><h3>A brief preface…</h3><p>As usual, I offer a brief preface to illuminate some context and motivations for writing this. I’m a deeply curious undergraduate Applied Mathematics student at Columbia University who loves CS, LLMs, mathematics, and any related theoretical underpinnings.</p><p>LLMs rely on vector embeddings, and in this article we will break down vector embeddings of words, in particular, and how they are used for models to understand natural language. It is easy to throw around the term “vector embeddings” without understanding the technical details. I hope this post will help you understand embeddings’ motivations and ingenuity by offering an intuitive balance of technical and high-level detail.</p><h3>Roadmap</h3><p>Below is a roadmap of everything that I will cover in this post. Do not fret about strange terminologies if you have little CS or math background. My segues between sections will be intuitive and smoother than peanut butter at room temperature. Part II Next Level will be fairly abstract and high-level, and I’ll likely write some subsequent mathematics-heavy posts to offer the same walk-through intuition that I provide in Part I Basics.</p><h4><strong>Motivations: Why Natural Language Processing? Why vector embeddings?</strong></h4><h4><strong>I. Basics</strong></h4><p><strong>One-Hot Encoding</strong></p><p><strong>Bag of Words (BOW)</strong></p><p><strong>TF-IDF</strong></p><h4><strong>II. Next Level</strong></h4><p><strong>Continuous Bag of Words (CBOW)</strong></p><ul><li><strong>Neural Networks Motivation</strong></li><li><strong>High-Level CBOW NN Process</strong></li></ul><p><strong>Skip-Gram</strong></p><p><strong>Transformer</strong></p><h3>Motivations: Why NLP? Why vector embeddings?</h3><p>As we live our lives casually playing around with LLMs like ChatGPT, etc. it’s quite easy to forget how wild it is that computers can now understand text pretty darned well. It has not always been this way. Preliminary research in this field started back in the 1990s, and the dream for conversational capabilities in machines has been around for even longer (not to mention that this idea has been in science fiction for a <em>really </em>long time). NLP, or natural language processing, is the field that focuses on computers’ ability to understand human dialogue. The field involves statistics, probability, lots of mathematics in general, and computer science. The high-level objective for NLP experts is to improve the way that computers understand natural, human language. Not surprisingly, researchers sought to find ways to accomplish this. Let’s fast-forward and intuit that since computers deal with numbers well, we should try to use numbers and math to bridge the gap between natural language and computers.</p><h3>I. Basics</h3><blockquote>Motivating Question: How should we represent words as numbers, given a series of words in a piece of text?</blockquote><p>For now, let’s assume that our entire text is a simple sentence, “The color of nature’s sky is blue.” I know this sentence sounds weird, but just bear with me; it helps me make my points later on. In reality, we might have vast quantities of text to deal with. How can we represent this sentence in a computer model-readable format?</p><p>At first, we try to represent each word with a simple integer. So the=0, color=1, …, blue=5. This looks good! Now we have every word labeled so the computer can deal with this representation of the text.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*ZGqJQkJqNDV2EkJx3hBE-Q.png" /></figure><p>However, consider what happens when we compare the words via basic mathematical operations. Why does “color”+”nature”=”sky” (because 1+3=4), and why is “of” squared equivalent to “sky” (because 2 squared = 4)? What does this even mean? Do these accurately represent the words (i.e. their grammatical essence, positioning, and relative importance)? This quickly becomes a problem when we use <em>vast</em> sequences of text because the value of the last word will be quite large, and the computer will likely make the false interpretation that this word is the most important.</p><blockquote>Motivating Question: How can we represent (encode) words to avoid the problem above?</blockquote><p>What are other ways that computers understand numbers? 0s and 1s, of course! Our sentence is 7 words long, so let’s create 7 different vectors of all zeroes. For each word, we’ll change one of the zero values to a one to represent where the word is in the sequence. Below are examples of two of the seven binary vectors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/982/1*08Ndx9XynPNiDOHH0sJ4Lw.png" /></figure><p>Thus, we now have a very rudimentary way to represent words’ positions without insinuating odd, inaccurate relationships between them.</p><h3>Bag of Words (BOW)</h3><blockquote>Motivating Question: One-hot encoding provides positional information. How can we start to include information about words’ importance?</blockquote><p>Now that we have locked in some simple positional information, we start wondering how to include relationships between words. Before we go ahead, let’s add two more sentences so our <em>document</em> (our text example):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/986/1*sTBkBeuWN4WWmQtVUzyoZg.png" /></figure><p>When a human reads this, it is clear that color is a pretty significant idea. Not coincidentally, “color” appears more often than any other word (except the filler words “the,” “of,” and “is”); in other words, it has a higher frequency than the other words. Thus, maybe we should try to include this “frequency of each word” in our representation to gain some baseline information about word importance. Dog-ear this in your head for a second.</p><blockquote>Remark: As we’ll see, the words with the highest frequencies are actually <em>not </em>the ones we want to emphasize. Think of filler words!</blockquote><p>We have another problem with our original binary (0s and 1s) representation for each word! When we get vast documents with multitudes of tokens, the length (dimension) of each vector <em>and</em><strong> </strong>the number of vectors increase. This is a huge problem (literally) because as we approach larger and larger document sizes, we will need more and more computational resources and time for any complex computations. We need to avoid this so that we can efficiently handle documents of any size. This problem is also known as the <strong>curse of dimensionality</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0-7H4fDnnkkj3-FodbslZQ.png" /></figure><blockquote>Motivating Question: How can we include word frequency information while avoiding the curse of dimensionality?</blockquote><p>We come back to our frequency of words idea from above. Let’s create one vector that includes the frequencies of each word in the sequence. So from our three-sentence document, our vector will have frequency information for each distinct token. Again, we see that “color,” “the,” “is,” and “of” appear the most frequently in our document, and this sets us down the road to find ways to represent the relevant importance of words in our document. For now, let’s simply create a vector that has the all the frequencies of each token (i.e. the <strong>TF, or term frequency</strong>, of each token).</p><blockquote>Remark: You may wonder what to do with repetitive terms. We will treat each word/token as its own entity, regardless of redundancy with other identical tokens. So both the first and second “color” tokens within our document will have TF = 1/7 = ~0.143 = ~14.3%</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iUgJt9nSwCxCHY5OIpKymw.png" /></figure><p>There are variations of BOW such as Bag-of-Phrases and Bag-of-Ngrams. Instead of considering distinct words, these methods might identify frequencies of slightly larger sizes. In our example document, for instance, the Bag-of-Phrases or Bag-of-Ngrams methods might find the frequency of “color of the”. They use the same underlying concepts.</p><h3>TF-IDF (Term Frequency-Inverse Document Frequency)</h3><blockquote>Motivating Question: BOW counts frequencies of words in documents but doesn’t consider significance or relationships between words. Can we do better than BOW?</blockquote><p>Let’s add two more documents in addition to our example document from earlier. They cover similar topics but they differentiate from each other in particular ways. This <em>collection of documents</em> is called a <strong>corpus</strong>. Consider the following <em>three </em>documents that discuss color, but talk about color in different contexts:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/502/1*W9pgWg_DS3QyeFmLgAUDcg.png" /><figcaption>Doc 1, Doc 2, Doc 3 in order from top to bottom</figcaption></figure><p>Previously, we identified that the frequency of “color” was useful information in a document. We’d like to continue to use the <strong>term frequency (TF) </strong>of each word in each document. As seen before, Doc 1&#39;s first “color” token at position i = 1 has TF = 3/21 = 1/7 = ~0.143 = 14.3% (as shown in the last BOW illustration above).</p><blockquote>Motivating Question: With multiple documents, how do we (1) identify the most important words within each document, and (2) differentiate documents from each other?</blockquote><p>Our second motivating question suggests that we find a way to differentiate documents from each other. Note that our documents do indeed cover three different general topics: nature, food, and desk items. I did this intentionally for demonstration purposes. Distinguishing the documents based on these different topics although all three discuss color would be wonderful so we can extract more important information.</p><p>Previously, we noted that filler words such as “the” or “of” are most common in text. In any given text, filler words probably take up a sizable percentage of the total words. Therefore, we want higher frequency words that are also common across all our documents to have less <em>weight</em> because they surely won’t help distinguish our documents. So it then follows that rarer words (hypothetically, words like “nature,” “foods,” or “accessories” in our simple example) should be given more weight.</p><p>First, we want to find how rare a particular term is. The first way to do this that comes to mind is to create a document frequency for a given term similar to our TF (i.e. we want to find what fraction of our documents contain the particular term). For now, don’t worry about what IDF actually stands for and let it stand for this document frequency (it stands for inverse document frequency, but hold your horses). Let’s try the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*hUSpKBBEayHYUTzKx34Twg.png" /></figure><p>But this doesn’t doesn’t work for our purposes because for the common filler words that are more common, the numerator is greater because, naturally, more documents will have filler words. This means that our IDF value will be higher for filler words; this is the exact opposite of what we want. How can we change this formula so the IDF value <em>decreases</em> as the number of documents containing a term increases? Let’s try to flip the formula (this is where “inverse” comes from):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bW5T7R9zHYsqlJe6CmGUnA.png" /></figure><p>Awesome. As before, the total # of docs is constant; as we increase the number of docs containing a term, the IDF value gets <em>smaller</em>. Thus, rarer words get larger IDF values. Perfect.</p><p>We have one last consideration for the IDF value. For a large corpus, IDF values can get extremely large or extremely small. Without going too much into the mathematical intuition, applying a logarithm to our entire fraction scales our IDF values down, making them more interpretable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qBiGRbUN6cl4ROwOENb5rQ.png" /></figure><p>Finally, we have a TF value that represents local document frequency, and an IDF value that shows the global importance of a term across the entire set of documents (corpus). How can we combine these to yield a useful metric? The simplest way to do this is to multiply them!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PVNekfYkuw8UU0GzkMt1Bg.png" /></figure><p>Consider a token has a high TF value in a particular document and a high IDF value (i.e. it often shows up elsewhere in the corpus’ other documents). Now consider a token that has the same TF in a particular document and<em> </em>a very low IDF. The latter token is probably a filler word and not useful to derive any sort of meaning. Thus, the TF-IDF value of the former word will be higher and yield more importance.</p><p>The way we represent all tokens’ TF-IDF value is through a <strong>TF-IDF matrix </strong>where rows represent documents and columns represent words in the vocabulary (see below image).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bJD2DWDbMUs1RWMBEf_BjQ.png" /></figure><h3>II. Next Level</h3><h3>Continuous Bag-Of-Words (CBOW)</h3><blockquote>Motivating Question: TF-IDF utilizes a frequency-based approach to find the most important words. How can we capture syntactic and semantic meaning of a token based on surrounding context?</blockquote><p>The primary goal of CBOW is to predict a target word based on its surrounding context. Consider this sentence: “Jason Statham is an _______.” Ideally, the model ought to accurately guess “actor” here. CBOW uses a<strong> neural network (NN) </strong>architecture to help us with this prediction. Thus, the next couple of subsections will offer the necessary NN basics that power CBOW. I will try to keep the explanations pretty high level and save an intuitive deep dive of the underlying mathematics for another blog.</p><h4><strong>Neural Networks Motivation</strong></h4><p>Consider the way you read “Jason Statham is an _____.” You may automatically fill in the blank with “amazingly ripped dude” or “actor”. Perhaps you just think of “man” because you’ve never watched Fast and Furious. Regardless, we know that a word like “octopus” is absolutely incorrect because over time and experience, our minds have been trained to make solid predictions in this sort of context. From experience, we know that Jason Statham is not, in fact, an octopus, although admittedly that would be pretty intriguing. Neural networks attempt to incrementally develop this experience to make human-like guesses.</p><h4><strong>High-Level CBOW NN Process</strong></h4><p>Let’s assume that we have a vast quantity of text about Jason Statham because we’re tremendous fans of his. This will have all of the relevant words, the <strong>vocabulary</strong>, and context about the actor. The NN will predict which word <em>in the vocabulary</em> will most likely succeed “Jason Statham is an.”</p><p>The NN’s input is a set of context words (“Jason Statham is an”) within a set context window. We’ll use the aforementioned four words as context. Although this is our context, we still search for the most relevant subsequent word from the entire vocabulary.</p><p>Although I won’t discuss the architecture in excruciating mathematical detail (which is actually quite awesome), the general steps are as follows:</p><ol><li>Input: the context within the given context window.</li><li>Each word in the context window can be represented by a one-hot encoded vector (from the first section above!). We multiply each context word’s vector by an <strong>embedding matrix, E</strong>. The initial values in the E matrix are arbitrary and will be gradually adjusted over time during training to improve accuracy of our next-word prediction. This context vector-embedding matrix multiplication yields a context embedding (a vector) for each context word.</li><li>Let’s now <em>average all of these context embeddings </em>to get <strong>one context embedding vector</strong>. This vector will represent all of the context’s semantic meaning into one neat format.</li><li>Through some more linear algebra that I refrain from diving too deep into, we multiply the <strong>context embedding vector C</strong> (with <strong>dimension d)</strong> by a <strong>weight matrix</strong> <strong>W </strong>with <strong>dimensions d x V</strong> (V is the size of the vocabulary) and add a <strong>bias vector, b</strong>. As a result, we get raw scores for each token in the vocabulary. The output here is a long vector of raw scores for each token in the vocabulary.</li><li>Now we apply the <strong>softmax function</strong> over all of these raw score values and end up with a <strong>probability distribution (a probability vector, p)</strong> of all the tokens. Each element of this probability vector tells us the probability of each token appearing after the context. In our example, the value with the highest probability should be “actor” so we get “Jason Statham is an actor.”</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1008/1*flNGuS2C49tMmN0pg3CCtA.png" /></figure><p>Now, when training the CBOW model, it <em>does</em> know the correct answer. The most important thing to understand here is that as the model generates flawed answers over and over again, it gradually adjusts the E and W matrices until it gets correct answers and learns which E and W parameters produce the optimal guesses for subsequent tokens.</p><p>At a high level, a <strong>loss function </strong>and an additional concept called stochastic gradient descent drive this learning. Again, later I’ll link another post about these topics here. This is just a high-level understanding with not a lot of mathematical accuracy; it’s okay for now. Consider this: every time you complete the Jason Statham sentence with nonsensical, incorrect words like “octopus” or “racecar” or “megalodon,” part of your lunch gets taken away. But you <em>want</em> your lunch. To minimize your losses, you change your thinking and reasoning skills to improve your guessing strategy, and you ultimately get better at guessing the word. Eventually, you minimize your lunch losses and make great guesses like “actor.” The NN is trained properly when it can continually make great guesses like this for not just this Jason Statham sentence but also for any other sentence about Jason Statham because our vocabulary and documents cover <em>everything </em>Jason Statham-related.</p><h3>Skip-Gram</h3><blockquote>Motivating Question: The CBOW NN method does a pretty solid job of evaluating context. However, by averaging context vectors, CBOW treats all the context words within a context window equally? How can we improve our method’s accuracy get better representations of semantic relationships?</blockquote><p>In CBOW, we search for a target word and evaluate all the context words with equal attention because of the averaging of context embeddings into one holistic context embedding. Ideally, we should give more focus to each combination of our target token and each context token.</p><p>Fortunately, skip-gram does this! Instead of searching for a target word (which will ultimately be one of the words of our whole vocabulary), skip-gram <strong>starts at a target word and learns to predict the context words. </strong>Analyzing such vast quantities of target-context pairs enables the model to predict words based on contextual use.</p><p>This is critical because there are many words that can mean different things in different contexts; this is called polysemy. For example, “rock” could refer to either a rock in nature or a genre of music. Skip-gram improves upon CBOW and can deal with this issue.</p><h3>Transformer</h3><p>This is essentially the final boss of NLP (for now). Instead of writing about it here, I redirect you to <a href="https://medium.com/@amallya0523/how-an-llm-understands-input-the-math-under-the-hood-114ac69f96c6">my blog about how the transformer architecture understands input</a>.</p><p>The transformer is a beautiful feat of NLP that effectively incorporates all the learnings of the above methods. Simply put, it learns about all the relationships between every word in your input and does this in different ways through different lenses, simultaneously (in parallel). This is called <strong>multi-head attention</strong>. Each head focuses on a different aspect of the input (grammar, syntax, parts of speech, etc.) and they all collectively contribute to an elegant numerical representation of the input, from which the LLM can predict the appropriate response. The primary difference between the transformer model and skip-gram is that skip-gram focuses on a smaller context window, whereas the transformer model can capture long-range dependencies.</p><h3>Concluding Thoughts</h3><p>I hope Part I helped you understand the motivations behind some of the initial NLP developments/ideas and uncovered the utility of vector embeddings. I also hope Part II piqued your interest regarding the underlying mathematics of more advanced NLP methods.</p><p>More to come soon. Thanks for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f395b533a5e0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Useful Personal Philosophies: Independent Contentedness]]></title>
            <link>https://medium.com/@amallya0523/useful-personal-philosophies-independent-contentedness-fefb3aa132ba?source=rss-ab0f45e79999------2</link>
            <guid isPermaLink="false">https://medium.com/p/fefb3aa132ba</guid>
            <category><![CDATA[relationships]]></category>
            <category><![CDATA[growth]]></category>
            <category><![CDATA[self-development]]></category>
            <category><![CDATA[life]]></category>
            <category><![CDATA[self-improvement]]></category>
            <dc:creator><![CDATA[Ajay Mallya]]></dc:creator>
            <pubDate>Wed, 03 Apr 2024 23:31:57 GMT</pubDate>
            <atom:updated>2024-04-08T18:59:15.118Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*3d6z2PMPgZwYuRYT1CyBbQ.jpeg" /><figcaption>Image generated by Bing Copilot</figcaption></figure><h3>A brief preface…</h3><p>This blog is one of three that I place under the umbrella of “Useful Personal Philosophies”. I will write one small post for each personal philosophy rather than produce one massive post. Consequently, the content becomes more digestible, and I will publish blogs more frequently. I will also copy this section to the three other posts for uniformity.</p><p>I write this post as a junior undergraduate student with relatively limited life experience compared to someone even a few years older and out of college. I say this right off the bat because the personal life philosophies that I present here in these three posts will almost certainly evolve over time, although I currently believe they are timeless and universally applicable. I also want to clarify that I do not claim to have come up with any ideas entirely independently. In addition to my own experiences that have informed my thoughts, I acknowledge that I have been influenced by numerous books, articles, people, etc. Thus, these three posts condense the three most useful philosophies that I have distilled for myself over time and want to share with anyone seeking more stability in their life.</p><blockquote>Please refer to <a href="https://medium.com/@amallya0523/useful-personal-philosophies-that-i-have-found-infinitely-useful-open-mindedness-8658571a7f90">the first of these three articles</a> for an extended version of this preface. There, in addition to some personal context, I define the terms “personal philosophies,”“values,” and “principles,” which come up here.</blockquote><h3>Personal Philosophy II : Independent Contentedness</h3><p>I begin with my personal definition of <strong>independent contentedness</strong>, followed by a recognition of my personal challenges that prevented me from developing a sense of independent contentedness for a long time.</p><blockquote><strong>Independent contentedness </strong>is a general, self-generated feeling of satisfaction or happiness with oneself that is present with or without social circles (i.e. regardless of external influences).</blockquote><p>Until maybe six months ago, I absolutely did <em>not </em>have a sense of independent contentedness. Although I was doing things that I loved, I did not properly understand my place or long-term purpose in the world. I was also confused about my relationships with others in college. Retrospectively, the vast majority of these relationships were superficial and should have demanded less effort and time to maintain.</p><p>Here we come up with two important considerations: (1) developing contentedness internally and (2) developing contentedness externally through relationships. The former has to do with determining your vocation, passions, and values. The latter may sound contradictory, and reasonably so. What does <em>independent</em> contentedness have to do with <em>other people</em>? A crucial part of finding personal happiness involves applying (1) to relationships and taking note of where the relationships positively complement your personal happiness. I’ll break down both of these below.</p><h3>Internal Considerations: Values, Passions, Vocations</h3><p>Consider a tall redwood tree; deep, strong roots enable the redwood to withstand storms or floods. Similarly, having a strong foundation is critical for your the development of your <strong>passions</strong> and the finding of your <strong>vocation</strong>. The building blocks of your foundation are your <strong>values</strong> or personal philosophies. For example, open-mindedness, independent contentedness, and deep curiosity are three of my personal philosophies/values. They are broadly applicable to all parts of my life; imperatively, they offer a foundation from which I can cultivate my passions and discover my vocation.</p><p>Passions and vocations are similar yet different. A vocation is like a car getting you from point A to point B, whereas passions fuel said car; you need both. Passions can be either very concrete or more abstract. In fact, they often zoom out over time into more general passions. Let me clarify with a couple of examples.</p><p>In high school, I had a passion for running cross country; although I still absolutely love running, I now understand that this extracurricular was a zoomed in version of my passion for teamwork and collaboration. I also had a passion for violin, and I most definitely still do. However, I now understand that my violin was a zoomed in representation of my passion for seeking excellence in the things that I love. Lastly, my reading and writing interests are zoomed in representations of my passions for teaching and clear communication. Notice that all of these passions have relationships to, and are therefore built up from, my core values.</p><p>It has become clear to me that regardless of activities’ or interests’ evolutions, our underlying passions are more or less constant and reveal themselves more and more over time. Now how do these passions inform our vocation(s)?</p><blockquote>Remark: I write “vocation(s)” above because having multiple vocations is possible. For instance, one could have a vocation to become a great parent and also have a vocation to become a professor. Intriguingly, parenting and professorship both involve passions for teaching (although perhaps at varying degrees); thus, we also observe that passions can potentially apply to multiple vocations simultaneously. Anyway, going forward, we’ll consider a singular vocation for simplicity’s sake.</blockquote><p>As our passions unearth themselves, our vocation becomes clear. From what I’ve read, there is a lot of emphasis placed on how to find one’s vocation, but I posit that explicitly focusing on this search is inefficient. It is more fruitful to work from the ground up from values and passions; your vocation will ultimately follow and eventually make sense. Vocation becomes more subconscious as your passions zoom out, anyway. In fact, I conjecture that once your passions zoom out enough, they blend together and form a neatly packaged vocation.</p><p>So what happens when you start to dislike a passion? This is certainly possible, and people completely one-eighty sometimes. Ideally, your values remain constant and only your passions change. At this point, you simply start from square one and either (1) reflect and subsequently reignite your passion or (2) discover a new passion. Pursing these either of these two options requires some more thought and another post, so I’ll hold off on deep-diving here. The most important thing to do when your passions veer off course is <em>reflect. </em>A friend once told me they don’t believe in introspection, and I was flabbergasted. How can you improve or evaluate your values, passions, or vocation without introspection? How can you improve your independent contentedness or happiness without even <em>thinking </em>about it? Reflect every once in a while; it’s healthy.</p><p>I’ve discussed some of the primary internal considerations when evaluating the state of your independent contentedness. There’s a lot more to unpack here, but it is equally pertinent to discuss external considerations. Relationships with others adds a whole new variable that puts your values, passions, and vocation through a trial by fire; they will be both challenged and supported.</p><h3>External Considerations: Relationships and Value Alignment</h3><p>As mentioned at the onset, understanding your level of independent contentedness also hinges on a reflection of relationships with others. Let’s hypothetically say that you are only allowed to communicate with your current set of friends once a month. Here are some questions for reflection:</p><ul><li>Would this change infringe upon how happy you are, and why?</li><li>Which relationships would remain stable, regardless? Which would not?</li><li>Why would certain relationships, regardless of significantly reduced interaction, not cut down your personal happiness?</li></ul><p>I now briefly detour through my personal experience prior to six months ago. Around particular individuals or groups of people in college, I was happy, but this happiness was minimally sufficient and pretty conditional. This is natural for any human; we are a social species. Social paradigms, herd thinking, social approval, etc. all play a role in the way we function and feel every day; they are survival mechanisms at the core. But for me, my sense of independent contentedness was undermined by these factors and because the people I surrounded myself with did not exactly match my personal philosophies/values. I must emphasize<strong> </strong>that I by no means wish to put down anyone else’s values or claim to have superior ones; rather, there were various value mismatches.</p><p>Earlier, I wrote that “A crucial part of finding personal happiness involves applying [your values, passions, and vocation]…to relationships and taking note of where they align or not.” In the previous paragraph, I mentioned that value mismatches with others undermined my independent contentedness. Parents always say that your friends determine who you are, and that is pretty darn accurate. Under the surface, value alignment or misalignment with others impacts who you are, and the quantities of each play tremendous roles in determining the scale of your contentedness.</p><p>To discover where your values misalign with others’ (thus simultaneously finding values that <em>do </em>align), it makes sense to figure out which values are most important to you. I’ll call this value prioritization. The objective is to invest more energy in people with more alignment with your high-priority values; this way, you don’t compromise on your independent contentedness rooted in your values.</p><p>This begs the question, “what if your values are generally unacceptable by society?” If your values are immoral by chance, you have some serious evaluation to do. In general, the first step when lining up your values with others’ for comparison is to first evaluate your own. Your values develop over time, and it is important to reevaluate their integrity every so often. In terms of my previous car analogy, you need a tune-up every so often.</p><p>Here is an analogy used by Rev. James Martin in his book, “The Jesuit Guide to (Almost) Everything”). He actually uses the analogy for finding vocation, but I will use it for evaluating values. Think of a jar full of muddy water . When you shake the jar, the debris and silt rises and makes the water cloudy, but over time it all settles down, and you can once again clearly see most of the jar’s contents. Similarly, it is important to shake up your jar of values every so often and revisit them to gain further insights regarding their substance. It is possible to add or remove items from your set of values as you see fit, but you also don’t necessarily need to change them. Revising and updating values occurs once your values have settled and have undergone your independent evaluation. For the time being, let’s assume you have your values sorted out.</p><p>In relationships with others, there will almost always be at least a little value misalignment. Let’s say you have 10 core values, and one does not align with one of a close friend. Depending on the situation, this may not be significant enough for you to ease back on the relationship; one or two minor values can be sacrificed for the sake of a good friendship. Ultimately, it’s up to you to figure out which of your values you would like to prioritize. For example, if I were vegan (I’m not), I would not distance myself from a friend simply because they are an omnivore. Personal philosophies regarding eating simply aren’t a high priority for me. For some other devout vegan, maybe what their friends eat is super important to them; to each their own. I respect the value prioritization.</p><p>By prioritizing your values, you can make relationship decisions more efficiently and decisively; this will make you happier in the long run. Eventually, you will end up with a smaller set of high value people (i.e. high-value relative to your personal values) who you appreciate and who understand you.</p><blockquote>Remark: values are not the same as passions or interests or political beliefs or anything like that. Absolutely not. I will not be friends with a serial killer who plays violin just because I play violin. We share passions but not values.</blockquote><p>Ultimately, over iterations of evaluating and reevaluating your relationships using your prioritization of values, your network of people with similar personal philosophies will stabilize. You will ultimately develop a strong, albeit smaller, network of high-value people. Going out of your way to maintain relationships with people who don’t share your values is foolish and not conducive to your growth or independent contentedness. I learned this from experience, and this took me a while to understand.</p><p>For example, I’m an early riser who loves my sleep, so partying until 4am in NYC is not an activity that I particularly enjoy. Thus, these days you will rarely catch me with a group that does this somewhat regularly. My idea of fun includes spending time outdoors hiking or running, going to museums, reading, maybe a drink every blue moon, etc. Again, I must emphasize that I do not think that a love for partying is an inherently bad value. Every person’s values and ideas of fun are absolutely acceptable (unless they are fundamentally immoral, of course). I simply use the difference between lifestyles as an example of value misalignment that dictates the circles that I am compatible with at this moment in time.</p><p>Currently, I can count the number of “close friends” who I absolutely trust and whose values optimally align with me on one hand (or maybe with six or seven fingers; I’m still figuring it out). That’s probably a good thing because I know I’m not spreading myself too thin. There are two curious things that I’ve noticed about these friends. Let’s call them “value-aligned friends.”</p><ol><li><strong>Value-aligned friends will help you be consistent with your values.</strong> They will never do anything or ask anything of you that will derail you from your values. Intuitively, if you share most of the same values, they have an intrinsic, personal understanding of the unattractive stakes involved if they were to derail you.</li><li><strong>Value-aligned friends are consistent.</strong> They are not random variables that keep you guessing, and they will always explain themselves. Consistency is highly valuable and often hard to find. Personally, I’ve observed that my value-aligned friends are the types of friends that I hardly keep in touch with regularly, but we always maintain the relationships, regardless. This is because we are value-aligned, therefore consistent, and don’t necessitate constant updates. This works for me because I’m a busy college student.</li><li><strong>Value-aligned friends play devil’s advocate without hesitation. </strong>When you deviate from your principles or normal behavior, they will play devil’s advocate, reasonably debate your decisions with you, and help you develop new insights. In fact, conversations and debates with value-aligned friends helps to align your shared values even more! Just like how you learn more from failures than successes, having thoughtful discussions with value-aligned friends will offer much more fruitful points for growth than any interesting conversation with a value-misaligned individual.</li></ol><h3>Concluding Thoughts</h3><p>I’ve gone over both internal considerations and external considerations regarding developing independent contentedness. Realizing these two different but intricately related facets of independent contentedness have been critical for my development and have helped me grow and also build my confidence. I hope that this post offers some useful insight that may guide you as you search for your independent contentedness.</p><p>If you get anything out of this article, understand the following:</p><ul><li>Use an open mind when evaluating your personal philosophies/values every so often.</li><li>Stay calm as you notice your passions morph over time. This is natural and you will better understand your vocation and the grand scheme of things when you look back from the near future.</li><li>Prioritize your values and figure out which are most important to you.</li><li>Cultivate meaningful relationships with value-aligned people.</li></ul><blockquote>Thank you for reading this post! Please feel free to reach out and <a href="https://www.linkedin.com/in/ajay-mallya/">let me know</a> if you have any questions or any ideas for future blog topics.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fefb3aa132ba" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HNSW Algorithm: Efficiently Searching Vector Databases]]></title>
            <link>https://medium.com/@amallya0523/hnsw-algorithm-efficiently-searching-vector-databases-9276a934393d?source=rss-ab0f45e79999------2</link>
            <guid isPermaLink="false">https://medium.com/p/9276a934393d</guid>
            <category><![CDATA[vector]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[large-language-models]]></category>
            <category><![CDATA[vector-database]]></category>
            <dc:creator><![CDATA[Ajay Mallya]]></dc:creator>
            <pubDate>Tue, 02 Apr 2024 23:20:58 GMT</pubDate>
            <atom:updated>2024-04-03T00:12:33.478Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*ruXpu7ZPk8o_vmMaE-7u6w.jpeg" /><figcaption>Image Generated by Bing Copilot</figcaption></figure><h3>A brief preface…</h3><p>As with all other posts of mine, I begin with a brief preface to illuminate my motivations for writing this. I’m a deeply curious undergraduate applied mathematics student who loves CS, LLMs, math, and any related theoretical underpinnings. This article discusses the motivations and build of the Navigable Hierarchical Small Worlds (HNSW) algorithm that enables lightning fast searches of vector databases. In writing this blog, I primarily referred to<a href="https://arxiv.org/abs/1603.09320"> this leading and foundational HNSW paper</a> in the field, but I’ll try to refrain from using too much jargon. I hope this offers a sufficient treatment of the HNSW algorithm for anyone. The next few short sections will review some pertinent basics before we get to the intuitive breakdown of the HNSW algorithm, so bear with me. It will be worth the review, especially if you are more non-technical and seek a balanced blend of both detail and conceptual understanding.</p><blockquote>Everything in this article will be simplified so it is more digestible to any curious minds, and later on I’ll create some very deep technical blogs because that’s when things get <em>really </em>interesting. Anyway, hopefully this provides a fruitful introduction to the algorithm.</blockquote><h3>Vector Databases</h3><p>The first type of database to be aware of is the <strong>relational database</strong>. Think of this as rows and columns storing data. For example, in a simple relational database, rows could represent different dogs, and each column for any given row could represent the characteristics of each dog (e.g. name, color, etc.). This set of rows and columns forms <em>one</em> <em>table </em>in a relational database, and there can be multiple tables.</p><p><strong>Vector databases</strong> store unstructured data in vectors, enabling them to easily contain images, videos, etc. I’ll write a post about how vector embeddings are created in the first place at a later time. Relational databases are useful for more precise data querying (e.g. business or transactional data), whereas vector databases are useful for accurate, fast querying when searching through unstructured data. Thus, vector databases are critical for AI applications that deal with unstructured data.</p><h3>Nearest Neighbor Overview</h3><p>At a very high level, nearest neighbor (NN) methods dictate that, given a search query for a particular data point, we look for the value stored in a vector database that is most similar to our query. This is how recommendation systems and search engines quickly find similar images to your search engine query. Let’s say that I have a vector database full of celebrity images. If I search for Michael Jackson, various pictures of Michael Jackson will be returned to me because those are most similar to my query. I have chosen to leave out more specific dependencies such as embedding models, etc. for simplicity’s sake. One searching method is to inefficiently traverse the entire database for an exact match, comparing every data point to our query value until we find an exact match. Another more efficient method is to search for values that are more similar with a faster process (such as HNSW) and find the most similar value(s) (Approximate Nearest Neighbors, aka ANN). The latter does not require a screening of every value.</p><h3><strong>Graphs and Proximity Graphs</strong></h3><p>In computer science, graphs are a useful way to represent connections and relationships between datapoints. These are different from run-of-the-mill 2D and 3D graphs. For example, a graph could represent your family tree and portray how everyone is related. Graphs have vertices and edges. In this family tree example, the vertices could represent family members (e.g. mother, son) and the edges could represent their relationships to one another (e.g. “mother of,” “son of”).</p><p>A <strong>proximity graph </strong>connects vertices based on proximity (distance apart). As we’ll see, the HNSW algorithm builds a graph and provides a neat way to traverse the graph to search for the most similar results for a given query.</p><h3><strong>Hierarchical Navigable Small World: High Level</strong></h3><p>Before diving in, let me present an analogy that I’ve heard a couple of colleagues use. Let’s say your location on Google Maps is zoomed in on Los Angeles, CA. To find New York, NY on the map, you can either stay zoomed in and scroll many times to get all the way to New York, <em>or</em> you can zoom out first, make a quick swipe across the country, and zoom in on New York. The former is inefficient as it requires more steps, whereas the latter is much faster. The latter is representative of HNSW, and I touched on this in the above “Nearest Neighbor Overview” section. With this intuition settled, let’s dive right into the algorithm.</p><h3>HNSW: Inserting Vertices/Vectors</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/1*-TGmge2zt_2lGEQbZ7ECkw.png" /></figure><p>We start with a database of vectors. Each vector is a vertex of the HNSW graph, illustrated with a circle (see above), and vertices exist on layers, illustrated with planes. There are different levels of layers in the constructed HNSW graph (hence the term, “hierarchical”) in which the vectors are inserted, with each layer illustrated as a plane (see below image).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/622/1*F2bZCT7HUf53bESUJqfEmg.png" /></figure><p>Let’s first explore how the vector is inserted. Here are some parameters that are significant in the following explanation:</p><ul><li><strong>L</strong> is the total number of layers we have. The top layer has value ℓ=L-1. So for 3 layers in a graph, the top layer is ℓ=2. The below layers will be ℓ=1 and ℓ=0.</li><li><strong>mL</strong> is a value that dictates the odds of a vector being inserted at higher levels. The greater the mL value, the greater odds of a vector being inserted in higher levels. Conversely, the closer mL is to 0, the greater the odds of the vector being inserted at layer 0 (i.e. ℓ=0).</li></ul><p>So if a vector gets ℓ=2 as its randomly chosen layer of insertion, it is added to this layer and the below two layers as well. Similarly, if a vector insertion gets ℓ=1, it is added to this layer and the one layer below. The last option here is for a vector to simply be inserted into the bottom layer, ℓ=0.</p><p>To make sure our graph has more vectors in the bottom layers than in the top layers, according to our mL definition above, we can adjust mL to be closer to 0. Eventually, we add all of our vectors to the graph, and over time we notice that there are more vectors in the bottom layers of the graph than in the top layers (see below). In the below visual, you will notice that the insertion of lower level vertices occurs much more often than the higher level vertices, resulting in significantly more lower level vertices by the end of the entire insertion process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/673/1*4YAC3TCpTmc5D51BfyamAg.png" /></figure><p>An important insight that assisted my initial understanding of HNSW is the following: <em>all </em>vectors exist in the bottom layer. A smaller percentage of all vectors exist in the next layer up, and an even smaller percentage exist in the highest layer.</p><blockquote>Remark: See the original paper, linked at the onset of this post, to investigate how the optimal mL value of 1/ln(M), where M represents the number of NNs to return, influences the random selection of the maximum insertion layer for a given vector insertion. This involves some interesting probability concepts. I may add a related section here later on, but for now I exclude this for simplicity’s sake.</blockquote><h3>HNSW: Graph Construction</h3><p>Now we get to adding connections (edges) between all of our inserted vectors (vertices) in our proximity graph. Here are two more relevant parameters for creating edges between nodes:</p><ul><li><strong>M</strong> dictates the number of connections a vertex can have with nearest neighbors. In figure 1 of the below visual, the connections satisfy the preset M=3 because in any of the layers, our inserted vertex (in blue) only ever maxes out at 3 <em>outgoing connections </em>to other vertices. You see that in the top layer, it only has one outgoing connection, and that’s totally fine because it’s less than our maximum.</li><li><strong>Mₘₐₓ </strong>dictates the number of <em>maximum connections that a vertex can have in a given layer </em>when subsequent vectors are inserted throughout the insertion process. In figure 2 of the below visual, the connections satisfy the preset Mₘₐₓ=5 because when we add a new vertex (in green) to the bottom layer, our previous blue vertex only connects to the green vertex once, for a total of 4 connections for our blue vertex. Since our Mₘₐₓ=5, we can add more vectors in the bottom layer and if they are close enough, there can still be one more allowable connection to our blue vertex.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/687/1*nVtDRGVoAqXfscToXA3w3w.png" /></figure><p>Through the above steps, we add connections (i.e. edges) to all of our vectors.</p><h3>HNSW: Search</h3><p>Say we have a vector that we’re looking for. In the below visualization I drew it as a gold circle. The HNSW algorithm’s objective is to find a value (i.e. a vertex) as close to the target as possible. Here is a list of steps that follows the trajectory illustrated below:</p><ol><li>We begin at a pre-defined entry point in the top layer. In this top layer, we can see which of the vertices is closest to our target and move to that one. This is the first step of the “zooming in” in action. Instead of searching in the wrong section of our data, we save time and immediately move to the more relevant section. Very elegant step here.</li><li>Since this is the nearest neighbor in the top layer, we now drop to the next layer to find potential vertices that are closer to our target than our current vertex.</li><li>Indeed, we find a vertex that is closer, so this is now the nearest neighbor to our target.</li><li>Finally, we drop down to the base layer and see that this vertex is the nearest neighbor in the bottom layer as well.</li></ol><p>Thus, we have found our target vertex/vector!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*o6x9o6bOr3Bzt0CxKLB3rQ.png" /></figure><h3>Concluding Thoughts</h3><p>This is one of my favorite graph traversal algorithms thus far, and I‘ll certainly add more detailed mathematics later on, depending on the questions I receive and other interactions with this post. I hope this was a sufficiently intuitive, high level explanation of the Hierarchical Navigable Small Worlds algorithm (what a mouthful). More importantly, hopefully this offers some insight into how high-performance vector databases dealing with AI-related vector embedding data manage to efficiently pull queries in mere milliseconds from collections of potentially millions or billions of vectors.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9276a934393d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How an LLM Understands Input: The Math Under the Hood]]></title>
            <link>https://medium.com/@amallya0523/how-an-llm-understands-input-the-math-under-the-hood-114ac69f96c6?source=rss-ab0f45e79999------2</link>
            <guid isPermaLink="false">https://medium.com/p/114ac69f96c6</guid>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Ajay Mallya]]></dc:creator>
            <pubDate>Sat, 30 Mar 2024 01:15:10 GMT</pubDate>
            <atom:updated>2024-04-02T18:18:17.100Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*J3JXmih7j_6426WW431XxQ.jpeg" /><figcaption>Image generated by Bing Copilot</figcaption></figure><h3>A brief preface…</h3><p>I started drafting technical blogs to develop my understanding of computer science and other topics (think Feynman technique), and I noticed that there isn’t an abundance of intuitive articles about the applied mathematics behind complex topics such as LLMs. Personally, I love reading about the inner workings of any technology that I regularly interact with. With respect to LLMs and AI, I hope to understand their internal structure at a significantly granular level so I can use them without feeling a creeping sense of complacency. Anyone interested in AI and LLMs (Large Language Models) knows of the ground-breaking paper, <a href="https://arxiv.org/abs/1706.03762">“Attention is All You Need</a>.” In case you are unfamiliar, the transformer model dictated in this white paper is what has propelled the LLM world forward (feed-forward? haha). Anyway, I have gone through “Attention is All You Need,” and I hope this blog offers an intuitive mathematical exploration and treatment of the transformer model for anyone new to the field. As for some of the linear algebra involved, it’s almost all just multiplication and addition in rows and columns; a quick web search will tell you how to do things like <a href="https://www.mathsisfun.com/algebra/matrix-multiplying.html">matrix multiplication</a>.</p><blockquote>Remark: Although this bugs me as a applied mathematics major, I’ve decided to sacrifice some accuracy here and there for the sake of making this more understandable for more people.</blockquote><h3>Analogy</h3><p>When a baby learns to speak, they absorb vocabulary, syntax, and how different words or concepts are related to one another from surrounding people. An LLM is a baby learning to speak. The more content this baby is exposed to, the more it learns and understands. However, if I ask this baby what my social security number is, fortunately it won’t know the answer. This LLM baby only understands basic syntax and whatever information it hears from its parents (whoever trains the LLM).</p><p>The transformer architecture allows LLMs to learn vocabulary, syntax, relationships between words, etc. to provide human-like responses to your questions. For example, and this is probably at the expense of some accuracy, if we trained an LLM on everything related to Game of Thrones, it would excel at answering questions about the show but not much else.</p><p>Thus, the transformer helps the LLM learn everything first (training), and it can subsequently deal with user input and generate the most probable outputs (inference). To make this more user-friendly, I’ll focus on inferencing, from user input to LLM output. I hope to write another article about training to explain a few ambiguities that come up here. I will also also add a section about the decoder but first publish this with just the encoder portion.</p><h3>Roadmap</h3><p>Now that we have sufficient high level context regarding this blog’s intentions, here’s a succinct roadmap:</p><ol><li>Transformer Model: Bird’s-Eye View</li><li>Encoder: Under the Hood</li><li>Feed Forward Neural Networks (FFNN), etc.</li><li>Concluding Thoughts</li></ol><h3>Transformers Model: Bird’s-Eye View</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/743/1*jvCf_KxQbegKuiG_r0gcnA.png" /><figcaption>Birds-eye view of the transformer model’s process</figcaption></figure><h3><strong>Encoder: Under the Hood</strong></h3><p><strong>Guiding Question:</strong> <strong>How does the encoder understand and translate the user’s input into something the decoder can use to generate a response?</strong></p><p>When we converse with each other, we understand grammar, syntax, and vocabulary. Similarly, the encoder determines these relationships between words and sends them to the decoder.</p><p><strong>STEP 1 : POSITIONAL ENCODING</strong></p><p>The encoder cares about word order. From here on out, let’s use the following sentence as an example of an input into our transformer model: <strong>“What color is the sky?”</strong></p><p>Each word of a sentence is called a <strong>token</strong>, and each token is represented by a <strong>vector embedding, E, </strong>a numerical representation of the word<strong>. </strong>To those of you not familiar with linear algebra, no worries! Think of a vector as a column of numbers; in the figure below, I chose random numbers to illustrate. Here’s a useful analogy: a token is to a grocery item, as a vector is to the item’s serial number.</p><p>The <strong>dimension, d, </strong>of a vector simply represents its length, and all vectors in this scenario will have the same length. The subscript <strong>i </strong>simply refers to where the value stands in the input sequence.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vA-P1JShT-lr-DOg7_6Uiw.png" /></figure><p><strong>d </strong>is defined at the onset and is chosen for the model. For example, this value could be <strong>d = 512. </strong>The value <strong>i </strong>represents the token’s position in the sentence. The word “color” in our original sentence is at position <strong>i=2. </strong>The k value is intriguing because <strong>it <em>ranges </em>from 1 to d</strong>; if d = 512, then k ranges from 1 to 512. Before you proceed, make sure you understand what values <strong>i, d, </strong>and <strong>k</strong> can take on. The next figure has an example of the range of k values.</p><p>Now, to indicate the positioning of each word (which we will call “tokens” from now on) with a vector representation of each word that <em>includes positional information</em>, the encoder adds a <strong>positional encoding </strong>value, <strong>PE</strong>, to each token’s vector. The PE value for each token is determined by a function that I exclude here. All you need to know is that we use the <strong>i, d, </strong>and<strong> k</strong> values to calculate this PE value. <strong>d</strong> is constant, <strong>i </strong>changes depending on the token we’re currently looking at, and for every word, we iterate through all <strong>k</strong> <strong>= 1 to d</strong>. After every iteration, we produce a value that is added into our PE vector until we have reached d = 512. Once we get the PE vector embedding for “color,” we move to i=3 (the next token), and repeat the same process for k=1 to 512 to find this next token’s associated PE. We do this for all of the words/tokens in the input sequence (see below visual)</p><p>Adding E and PE <em>for each token </em>yields an<strong> X</strong>ₚ<strong>ₒ</strong>ₛ<strong> </strong>vector that neatly incorporates the positional information about each word in the input sentence (see below visual). Once I write a blog about training, I hope to write <em>another</em> blog about the deeper mathematical intuition behind this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XZIys2Y6jukK1eAEAwRHLA.png" /></figure><p><strong>STEP 2 : MULTI-HEAD ATTENTION</strong></p><p>When you hear sentences, you first quickly understand the positioning of words, and then instantaneously focus on the sentence as a whole to understand it. Similarly, the transformer model uses <strong>Multi-Head Attention </strong>to focus on multiple parts of the input sequence simultaneously (in parallel). The transformer model uses multiple heads, and each head focuses on a different aspect of the sentence, like how you might note a friend’s grammar, diction, and tone.</p><p>Previously, we came up with a neat <strong>X</strong>ₚ<strong>ₒ</strong>ₛ vector embedding for each token in the input sequence. <em>Each head </em>uses three sets of learned parameters (<strong>weight matrices, Wq, Wₖ, Wᵥ</strong>) to transform the input sequence into three different sets of vectors. We will keep things simple and focus on one of the heads.</p><blockquote><em>Remark: There is currently no way to format Wq’s “q” as a subscript; my apologies.</em></blockquote><p>To get the three different sets of vectors, Q, K, and V, we multiply each <strong>X</strong>ₚ<strong>ₒ</strong>ₛ by Wq, Wₖ, and W<strong>ᵥ</strong>. This is matrix-vector multiplication, so Q, K, and V are vectors with the same dimensions as <strong>X</strong>ₚ<strong>ₒ</strong>ₛ.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ov6Bk4a43OOzr7h_OirgGw.png" /></figure><ul><li><strong>Q vectors</strong> represent <strong>queries</strong> that define what to look for in the input sequence.</li><li><strong>K vectors</strong> represent <strong>keys </strong>that define the relationship between each query and every token in the input sequence.</li><li><strong>V vectors </strong>represent values that provide information about each token’s content.</li></ul><p>Here’s a useful analogy: Imagine you are going to a library to get a book about medieval history. You go to the librarian and ask them a question (Q), they look around for the most similar book (K) to your question, and then bring it back to you. You use the information inside the book (V) to learn its contents.</p><p>For the head to develop an understanding of tokens’ relative importance to each other, it calculates <strong>attention scores </strong>for each token. Once again, let’s use the “color” token of the input sequence. As we saw above, the “color” token has <strong>one Xₚₒₛ</strong>, <strong>one Q, one K, and one V</strong> <strong>vector</strong> (again, the other tokens in the sequence also have these four vectors). For a head to determine which of the other tokens is most relevant to the “color” token, it compares our current token’s Q vector with every other token’s K vector (using a dot product). It then applies a scaling factor (the square root of our <strong>d </strong>value) to all of these Q•K values.</p><p>So now each token from our sentence has four scaled attention scores. The penultimate step here is to apply a <strong>softmax function</strong> to each token’s attention scores to get <strong>attention weights </strong><em>for each token</em><strong>. </strong>The softmax function ensures that the token’s attention weights add up to one and represents a normalized distribution of each other token’s relative importance to our current token. Here is a rough example. After applying the softmax function to the “color” token’s attention scores, we can interpret the attention weights as follows: let’s say “sky” is somehow 50% similar to “color,” and the other tokens collectively make up the remaining 50%. Thus, “sky” is the most similar to “color,” at least from our point of view from the “color” token. Again, this is a very rough example for high level conceptualization. We then move on to the next token and do the same thing to gain similar insight.</p><p>Finally, for each token, we multiply the attention weights by the corresponding V vectors and sum all of them up to get one <strong>Attention-Weighted Sum </strong>for each token (below).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cnriu7dHEqqCfzouSdjv_g.png" /></figure><p>Big Idea: The attention-weighted sums capture the model’s attention towards different parts of the input sequence. Remember that this is just for <em>one head</em> that focuses on a certain aspect of the input sequence. Quite remarkable, right?</p><blockquote>Remark: For those familiar with matrices, consider a matrix Q that contains all Q vectors and a matrix K that contains all K vectors. We can take the dot product of Q and K^T (K transpose), apply the scaling to all the values, and finally use the softmax function to create an <strong>attention weight matrix. </strong>We finally sum the attention weights times V as described above to get each token’s attention-weighted sum.</blockquote><p><strong>STEP 3 : FEED FORWARD NEURAL NETWORK (FFNN), etc.</strong></p><p>I won’t go into technical detail about FFNNs here because I want to get to the decoder, but here is the general gist. The attention score is the output of the encoder, and this serves as input for the FFNN, which exists to learn more granular patterns and dependencies (both local and global) about the input sequence. The output of the FFNN and other processing is a set of more refined representations of the tokens from the input sequence. I’ll probably link another blog about this stage between the encoder and the decoder. After this step, the output is sent directly to the decoder to generate a relevant output to return to the user.</p><h3>Concluding Thoughts</h3><p>Let’s quickly sum up the entire encoder process that powers LLMs to understand input and ultimately generate output.</p><ul><li><strong>Positional Encoding</strong> creates positional information about tokens’ positioning in the input sequence.</li><li><strong>Multi-Head Attention</strong> captures detailed information about the relationships between tokens. It does this in multiple ways at once (multiple heads) from multiple angles to learn as much about the relationships as possible.</li><li><strong>FFNN, etc. </strong>refines the representation of the input before passing it to the decoder, which then assists in producing our output. As mentioned above, I’ll write an additional article describing the decoder and link it here.</li></ul><p>I hope this article provides an intuitive mathematical foundation regarding the LLMs and transformer model that most of us now use regularly. It’s amazing that this is only half of the process used in the transformer model, and our example sentence/input sequence is only five tokens/words.</p><p>How many words did you include in your last ChatGPT prompt? Now consider the above process with respect to your large prompt and the lightning fast speed at which ChatGPT responds. Absolutely amazing.</p><blockquote>Thanks for reading! Please feel free to ask questions or provide comments regarding the way I explained anything, as I always seek to improve the way I teach and develop my own understanding.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=114ac69f96c6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Useful Personal Philosophies : Open Mindedness]]></title>
            <link>https://medium.com/@amallya0523/useful-personal-philosophies-that-i-have-found-infinitely-useful-open-mindedness-8658571a7f90?source=rss-ab0f45e79999------2</link>
            <guid isPermaLink="false">https://medium.com/p/8658571a7f90</guid>
            <category><![CDATA[thinking]]></category>
            <category><![CDATA[communication]]></category>
            <category><![CDATA[life]]></category>
            <category><![CDATA[personal-development]]></category>
            <dc:creator><![CDATA[Ajay Mallya]]></dc:creator>
            <pubDate>Mon, 25 Mar 2024 19:14:31 GMT</pubDate>
            <atom:updated>2024-04-03T14:30:17.845Z</atom:updated>
            <content:encoded><![CDATA[<h3>Useful Personal Philosophies : Open Mindedness</h3><figure><img alt="Image created by Bing Copilot/Designer" src="https://cdn-images-1.medium.com/max/540/1*pNfUb0JepdS35uUI9W4ThA.jpeg" /><figcaption>Image created with Bing Copilot/Designer</figcaption></figure><h3>A brief preface…</h3><p>This blog is one of three that I place under the umbrella of “Useful Personal Philosophies”. I will write one small post for each personal philosophy rather than produce one massive post. Consequently, the content becomes more digestible, and I will publish blogs more frequently. I will also copy this section to the three other posts for uniformity.</p><p>I write this first Medium blog post as a junior undergraduate student with relatively limited life experience compared to someone even a few years older and out of college. I say this right off the bat because the personal life philosophies that I present here in these three posts will almost certainly evolve over time, although I do believe that they are timeless and universally applicable. I also want to clarify that I do not claim to have come up with any ideas entirely independently. In addition to my own experiences that informed my thoughts, I have been influenced by numerous books, articles, people, etc. Thus, these three posts condense the three most useful philosophies that I have distilled for myself over time and want to share.</p><p>Before we continue, I think it is prudent to clarify what I mean by “personal philosophies”. To me, a personal philosophy is set of principles or values that guides the individual through life, benefitting not only themselves with respect to personal goals, but also others. You’ll find various definitions by a diverse selection of sources.</p><p>Throughout this post, I may use synonymous terms (i.e. at least what I deem to be synonymous terms) such as “values”. A key distinction to be aware of is that a <strong>value</strong> is personal and subjective to the individual, whereas a <strong>principle</strong> is concrete and fact-based. I don’t claim to have a perfect map of the world and all the governing forces of the universe, so until I have irrefutable proof that the personal philosophies that I present are absolutely correct, I will designate them as “values” or “personal philosophies” from here on out.</p><p>I realize that the accuracy of the above header, “A brief preface,” may have gone kaput, so by all means let’s move on.</p><blockquote>To me, a personal philosophy is a principle or value that guides the individual through life, benefitting not only themselves with respect to personal goals, but also others.</blockquote><h3>Personal Philosophy I : Keeping an open mind</h3><p>Honestly, I would absolutely love to slam down a bunch of quotes that would clearly elucidate the point of keeping an open mind. However, I will refrain from potentially overwhelming you with ten million quotes; instead, see <a href="https://www.goodreads.com/quotes/tag/open-mindedness">this link</a> for some solid ones that I found on Goodreads.</p><p>Keeping an open mind is both extremely obvious and particularly difficult to cultivate. I suppose all social organisms have evolved to stay together for the sake of survival. Humans tend to stick to common ideas that are shared within a given community. For instance, it is generally accepted across the board that murder is bad. It is also generally accepted that helping others in need, whatever that degree might be, is a positive. These make sense, and I for one am glad that these are the case!</p><p>Although I certainly do not claim that I am perfect and follow all of my personal philosophies one hundred percent of the time, I can confidently state that I strive to keep an open mind at least ninety five percent of the time. To me, that is a commendable goal to reach. Even while writing the above paragraph, I wondered about the tiny probability that there exists some random community somewhere in the world that believes that murder has an upside. Thus, I worded the sentence a little more carefully, using “generally,” to improve my statement’s accuracy. Feeling comfortable with this mode of thinking takes practice, a calm acceptance of not knowing things, and a whole new level of consideration for seeking truth. <a href="https://www.linkedin.com/in/raydalio/">Ray Dalio</a>, the founder of Bridgewater Associates, details this incredibly beautifully in his book, “Principles” (quoted below). I read this particular chapter of his book regularly because it is so eloquent and serves as a great reminder for me.</p><blockquote>“Radical open-mindedness is motivated by the genuine worry that you might not be seeing your choices optimally. It is the ability to effectively explore different points of view and different possibilities without letting your ego or your blind spots get in your way. It requires you to replace your attachment to always being right with the joy of learning what’s true.”</blockquote><blockquote>- Ray Dalio, “Principles”</blockquote><p>So to maintain an open mind, you must accept the odds of being wrong. More importantly, it is critical be <em>happily curious </em>about potential errors in your thinking and misinformation in your map of the world.</p><p>Personally, prioritizing and cultivating this mindset has brought me both intellectual stimulation and a sort of mental freedom. I certainly think more independently and consciously than I did just a couple of years ago when I started college.</p><p>If everyone was radically open-minded, would the world not be a better place with more cooperative people? I believe that many of the problems with extreme political polarization, for example, occur due to (1) extreme ideas resonating only within echo chambers and (2) a lack of open-mindedness from both ends of the political spectrum. I’m no political science major, and I only intuit this, so I leave this as food for thought.</p><p>The last thing I’d like to say about this personal philosophy is that you really lose nothing by embracing it. My challenge for you is simple: find one belief that you hold dearly and play devil’s advocate; be extremely open-minded. Additionally, never start playing devil’s advocate by assuming that you will just come full circle and find that your original belief is true, anyway. That’s stupid and unproductive; you are not stupid and unproductive.</p><p>One of three things will happen:</p><ol><li>You find that your beliefs still hold true and do not necessarily need to change.</li><li>You find that your beliefs are either partially or entirely wrong, and you ought to adjust them accordingly.</li><li>Regardless of the outcome, you might simply want to learn more about what you believe or don’t believe and maybe reevaluate things.</li></ol><p>All of these outcomes are optimal! You lose nothing by embracing an open mind. Stay tuned for my next “Useful Personal Philosophies” post.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8658571a7f90" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>