[{"id":"eurydice","title":"Eurydice and the porridge pot [Poem]","description":"Stuck between a rock and a sticky place.","date":"2025-12-28T00:00:00.000Z","tags":["poem"],"authors":["sarah"],"url":"/blog/eurydice","content":"## Eurydice and the porridge pot I pinch my nose and start\\ my wading through the amber murk\\ the porridge pot hides honeyed traps\\ blueberry buoys, oats and cream\\ a barely dormant geyser luring prey a half-dipped spoon\\ it tethers me to flurried steam above\\ though slippery on its silver edge\\ I wrap my limbs around its flowered etchings\\ clinging, sliding, slowly scaling sweet allure, a hidden folly\\ well-meaned fingers, cleanly licked\\ casting giant shadows on my view they lift the spoon\\ and I come too"},{"id":"parablegpt","title":"ParableGPT, Spinozism, and meaning","description":"How implementing a RAG reconnected me with my spirituality.","date":"2025-12-24T00:00:00.000Z","tags":["personal","philosophy","religion","meaning"],"authors":["sarah"],"url":"/blog/parablegpt","content":"import PostImage from '@/components/PostImage.astro' import parable from './parable.png' The repository for ParableGPT can be found [here](https://github.com/hyuncat/parable-gpt). ## My origins ### Set on a Catholic course of meaning I grew up Roman Catholic. My grandparents on my dad's side were devout; praying for me and my dad every day. They raised me when I was an infant, and their piety rubbed off on both me and my parents. - I attended mass every Sunday - I had godparents - I checked off all the sacraments I could (Baptism, Eucharist, Confirmation, Reconciliation) - I went to Sunday school Moreover, I was zealous. I would pray at least ten times a day: right when I wake up, in the car, during silent reading, before meals, on the couch, in the shower, before bed. I paged through the old testament as nightly reading. I even dreamed that I received a parchment from God telling me that I was destined to become an evangelist in His name. But I grew disenchanted with the church; getting unsatisfying answers to the following questions: - Why can't women become pastors? - Why are my friends going to Hell? Gradually, I stopped praying and attending mass. And during the height of the COVID pandemic, the overlap between religious Christians and anti-mask + anti-vaccine Americans pushed me over the edge—I proclaimed myself agnostic. ## Revisiting religion ### A class on origins and meaning Since the pandemic, I hadn't seriously revisited my relationship with religion. This semester, I took a course called *Origins and Meaning*, taught by the celebrity physicist Brian Greene. The course centered around unraveling the origins of the universe and humanity's strategies of constructing meaning in an otherwise meaningless world, through the lens of a few handpicked, scientifically-oriented philosophers. In his first lecture, he set expectations for the rest of the course by shattering the conventional notion of free will as meaningless under particle physics, and the human problem of finding meaning under deterministic finitude. ### A brief overview of my philosophical journey so far Thanks to my nerdy friends, Brian Greene was not the first smart-aleck to enlighten me of the [illusion of free will](/blog/poetic-naturalism/). I had already figured out my answer of [coping in the face of that moral paradox](/blog/object-permanence/), in the shape of an ill-informed version of poetic naturalism. In the summer, I watched Christopher Nolan's *Interstellar*, felt invigorated by its message of faith, and was inspired to flow out my life from axioms: - I landed on one: \"Live truthfully\" I then quickly realized this axiomatic, bottom-up approach was insufficient at guiding my daily decisions as I devolved into epicureanism (See: [dating apps](/blog/hinge/), [alcoholism](/blog/alcoholism/)). I began approaching life through an [inverse kinematic lens](/blog/catsitting/)—broadly setting goals weighted by Maslow's hierarchy of needs, and reverse engineering my decisions based off a current best guess which also accounts for unknown stimuli. ## Tolstoy, in context ### Logical nihilism It was under this philosophical context in which I read Tolstoy's *Confession* for our Origins and Meaning course. He painted a logically nihilistic picture of the world and our human reactions to it, and I empathized with his struggle to rationalize meaning beyond our \"temporary, random conglomeration of particles\" (Tolstoy 41), >\"You are a little lump of something randomly stuck together. The lump decomposes. The decomposition of this lump is known as your life.\" (Tolstoy 42) ### Reactions to meaninglessness: A state of flux Within a meaningless world, Tolstoy writes that people of his educated, material class broadly have four means of escaping their situation: 1. Ignorance 2. Epicureanism 3. Strength (suicide) 4. Weakness (living in despair) And I thought back to my current state of flux; always oscillating between (2) gorging myself on food and alcohol and (4) despairing as I jump from one deadline to another. (Alongside the constant, unknowable threat of (1).) ### On faith (As seen in Interstellar) I was excited to see Tolstoy call back to the concept of faith; in the same form as when I'd seen it last in *Interstellar*. And that this was the very concept which rejuvenated his will to live: > \"Faith is the force of life... If (a man) fails to see and understand the illusory nature of the finite, then he believes in the finite. If man understands the illusory nature of the finite, then he must believe in the infinite. Without faith it is impossible to live.\" (Tolstoy 61) When I told my friends the message I took away from *Interstellar* was \"faith,\" they frowned at me; saying that faith to them is necessarily entangled with institutions of religion that are antithetical to what *Interstellar* is about. But Tolstoy's definition, of faith as a force of life, guiding one through life, of being the oars enabling us to keep rowing against questions we can't yet answer—this was what I meant. ### Institutional qualms Moreover, Tolstoy took the same qualms as I had in response to religion: Why must believers of other creeds be necessarily living in a lie, such that they deserve to die? That he still chose faith in spite of this, and chose to denounce parts of the institutional machinery of religion while still remaining faithful—was inspiring. ### The moral stage Moreover, Tolstoy learned to bear the cognitive dissonances of the Bible's mythical stories, of 500 year old men, alchemy, and reincarnation by extracting their moral wisdom: \"Taking exception to the miracles and viewing them as fables that expressed an idea, these readings revealed to me the meaning of life.\" (Tolstoy 83) Instead he landed upon a set of virtues I'd forsaken in my flux between ego and hedonism: - \"[W]e must renounce the sensual pleasures of life; we must labor, suffer, and be kind and humble.\" (Tolstoy 78) Perhaps it is this context which would best set the stage for my final project for this course, ParableGPT. ## ParableGPT, in context Admittedly, ParableGPT was incepted before I'd read Tolstoy. The idea was simple: to train a locally-hosted large language model (LLM) to spit out parables in the style of various religions using retrieval-augmented generation (RAG). Rather, the idea for ParableGPT came from wanting to poke fun at the untouchable sanctity of holy literature; a snapshot of my own spiritual views at the time, concerning the unceremonious nature of cognition and human language as sophisticated probability maximizing machines. ### The large language model Underlying ParableGPT is an LLM, a computational neural network, with 'neurons' (each storing a single number) arranged in layers, such that: - **Input layer:** Sensory data - **Intermediate layers:** Feeds through one or more intermediary layers - The numeric value of any given neuron is some linear combination of the neuron values in the layer preceding it. - **Output layer:** Is mapped to the final output of the network The most powerful, present-day LLMs tweak the neural network structure by optimizing it for the sequential nature of language through the transformer architecture. [This IBM article](https://www.ibm.com/think/topics/transformer-model) explains those better than I can. ### As an analogue for the human brain Neural networks are a particularly powerful tool because they mirror how our brain's neurons are organized as well. Our brains operate through a network of approximately 86 billion neurons. Each neuron in the net is connected to as many as several thousands of other neurons through junctions called synapses. By sending electrochemical signals to its connected neighbors, the interconnected web of neuronic signals eventually map certain combinations to the biological processes governing what we experience as thoughts, feelings, and actions. To put it more concretely, the following analogues can be drawn between large language models and our human brain: - Neural net architecture - Our brain, pretrained through DNA instruction encoding generations of evolution - Fine-tuning on new datasets - What we individuals learn through our experiences - RAG - Asking someone a question in an open-note exam So in my artificial world, it was as if I had found a capable-enough brain, fine-tuned on listening to instructions, to generate parables while giving them a wide library of sacred scriptures to aid their writing with. ## Implementation There's a lot of theory that I'm skipping over, because implementing a neural network is thankfully much simpler than designing one from scratch. For ParableGPT, I used Meta's `Llama3.1-8B-Instruct` model, named aptly because it has 8 billion training weights across all its different layers, and is fine-tuned to listen to instructions. A greater discussion of my implementation details can be found in [this Jupyter notebook](https://github.com/hyuncat/parable-gpt/blob/main/usage.ipynb) which walks through the entire process. ## Results For a small, open-source model run entirely on my computer, ParableGPT performed much better than I expected. The following is an output asking it to generate a parable in a Taoist style about the concept of \"The Way.\" ### Considerations Admittedly, the responses maintained a distinctive \"GPT\" writing quality (many stories begin \"once upon a time, in a small town nestled between two great mountains\" or \"rivers\" or such.) Still, the stories were cohesive (unlike my non-RAG'ed attempts) and the moral teachings remained apt. I imagine if I had shelled out the money on GPT 5.2 API tokens, or had been more clear in my stylistic instructions, I would have gotten even higher quality responses. ## Reflections ### Morals across religions Across the different parables generated, I was able to get a sense of the different values specific to each religion. #### Christianity - Love God, your neighbor, and even your enemies - Show mercy to the needy - Give up worldly desires - Repent for your sins - Keep your vows - Fear God #### Buddhism Avoid suffering by maintaining the following: - No killing - No stealing - No sexual misconduct - No wrong speech - No intoxicants Moreover, desire is the root of suffering. And live life in accordance with the noble eightfold path - Right speech - Right action - Right livelihood With the goal of nirvana—liberation from suffering and the cycle of rebirth #### Islam - Uphold justice - Strive for excellence - Be humble - Forgive others - Give to the needy - Respect parents and elders - Fear God #### Taoism - \"Tao\" (harmony) - the balance between yin and yang, of accepting imperfections as enhancing the beauty of the whole - Live simply - Live modestly - Wu Wei - Effortless action in harmony with the world And to strive to live in accordance to the three treasures: - Compassion - Frugality - Humility ### Common themes The common themes behind the moral teachings were - Respect God - Forgive others - Uphold justice - Don't strive for the material - Strive for balance Taken at face value, these seem like decent-enough, prosocial ways to conduct your life. This mirrors how Pascal Boyer in \"Religion Explained,\" explains that religions make moral rules more intelligible through stories and myths. And that while the concepts may differ between religious traditions, the questions they try to answer are broadly the same: 1. What happens after death? 2. How should we cope with suffering? 3. How should we live? These morals take the form of different characters across religions, but share the same *template*—a term Boyer uses to describe devices with empty fields for concept-dependent attributes allowing minds to reach similar representations of concepts (Boyer 45), including religious ideas. Using this definition, ParableGPT and my interaction with this course has illuminated religion's societal function as a template for meaning. In this sense, religion - Bridges the finite with the infinite - how to live our lives now that we are part of something greater - Gives us values to deal with life's suffering - Gives us prosocial values which help us form communities ### Artificial intelligence and free will Earlier in the semester, we read Dan Dennet's thought experiment in *Where am I*. - Dan, staring into his brain being kept alive in a vat, connected to his body via radio signals, questioning if he is his brain, or his body. It was an unnerving read, exposing the inherent fragility in how our notion of consciousness breaks down; relying on memories, both physical and metaphysical, to be strung onto an easily toppled clothesline of narrative continuity. With the growing ubiquity of artificial intelligence, and the looming threat of human-level [AGI](https://en.wikipedia.org/wiki/Artificial_general_intelligence), the question of artificial consciousness grows ever near. When cleverly integrated with a Turing machine, LLMs already \"think\" in the same way that human brains do. The newest AI models from OpenAI and Google DeepMind come equipped with reasoning facilities score gold medals in the International Mathematical Olympiad. When defined as the ability to reason and generate new content from the synthesis of disparate connections, LLMs have been 'thinking' for a while. In particular, once large foundation models find suitable robotic homes to interact with and learn from their environment, human-specific cognition will be a hard line to draw. My answer at where the line falls draws back to Dan's ideas: Consciousness relies on the gap between physical and metaphysical to be not only sufficiently closed, but adeptly interwoven. It's at that point, that I feel artificial intelligence will drop the final hammer in the discussion over free will, as a walking counterexample: A quasi-deterministic program, exhibiting similar displays of \"free will,\" but being completely designed by non-divine hands. ## Closing notes ### A dear lunch While working on this project, I in parallel had a fateful lunch with my dear mentor and NYU professor, Dennis Shasha last Monday. We talked about meaning in research, on helping people, his marital strategy of aikido, and his general philosophy of Spinozism and Stoicism. ### On Stoicism The principles of Stoicism, I'd been following myself for a while. Dennis summed up what he likes about that philosophy in three points: - Don't worry about what you can't control - Improve yourself every day - Death is nothing to fear ### Spinozism Spinozism, I had never heard of. It was a framework which placed distrust in religious institutions, and drew a crucial equality: God and the universe are the same. He had embedded his views on Spinozism in a new puzzle book he was writing. > “My view is pretty much the same as the 17th century philosopher Spinoza’s: God and the universe are the same,” Ecco replied. “The universe is neither moral nor immoral. There is no deity guaranteeing that good things will happen to good people. To live together in a society we need laws and enforcement. A society can encourage the Golden Rule to bring harmony to situations beyond the reach of law enforcement, but that is a choice people must make.” - Dennis Shasha It was the connection I was looking for, neatly bridging my present physics-guided understanding of the universe with the framework of religious morality and meaning I'd learned in childhood. ### Revisiting religion Under this new framework, the stories I'd read growing up began making sense. God-fearing piety, when applied to Nature, becomes a general reverence for the world, its inhabitants, and supports the desire to understand more of its mysteries. I revisited the fundamental questions of religion under Spinozism: 1. What happens after death? 2. How should we cope with suffering? 3. How should we live? Now, I could take my Catholic upbringing, or a lot more religions now for that matter, replace \"God\" with \"Universe\", discard any romantic answers to the first question and feel justified in its answers to the other two. Rather, my answer to the first question, and to Tolstoy's existential impetus for faith, rests on my now-certain belief in a [Scheffer-like collective afterlife](https://www.amazon.com/Death-Afterlife-Berkeley-Tanner-Lectures/dp/019046917X)—in which, being a part of the Universe is the greatest 'collective' available. That my actions will be forever memorialized through the ripples of their cause-effect chains, propagated by the ever-increasing arrows of time and entropy. And that my remains will fertilize the soil, feeding the blooms atop it. ## Works cited Boyer, Pascal. *Religion Explained: The Evolutionary Origins of Religious Thought.* Basic Books, 2001. Dennett, Daniel C. “Where Am I?” *Brainstorms: Philosophical Essays on Mind and Psychology*, MIT Press, 1978, pp. 310–323. IBM. “What Is a Transformer Model?” *IBM Think*, www.ibm.com/think/topics/transformer-model. Accessed 24 Dec. 2025. Scheffler, Samuel. *Death and the Afterlife*. Oxford UP, 2013. Tolstoy, Leo. *A Confession*. Translated by David Patterson, W. W. Norton, 1983."},{"id":"meditation","title":"A meditation [Poem]","description":"The outcome of some reflection.","date":"2025-12-09T00:00:00.000Z","tags":["poem"],"authors":["sarah"],"url":"/blog/meditation","content":"## A meditation Dipping my toes into a cool pond\\ encircled by firs,\\ the murmurs of forest life,\\ and an array of stars clattering about the chill shakes my spine awake\\ as I ease my body into its cobalt still. I close my eyes. Inside the water,\\ thoughts rise and bubble,\\ washing over myself.\\ Sometimes their suds turn\\ into mermaid fins, and seashells.\\ Outside the water,\\ more thoughts\\ racously bouncing\\ tracing along the rim of the pond\\ bristling against dim blades of grass. Sighing, I lift myself up\\ and sit atop the sill of the pond.\\ The cold air breathes lukewarm onto my wet skin. A cricket perches itself on my thigh\\ an ugly thing, it ruins the mood."},{"id":"gap-year","title":"On burnout","description":"A frank conversation with my mentor, and why I decided not to go to grad school.","date":"2025-11-25T00:00:00.000Z","tags":["personal","research","retrospective"],"authors":["sarah"],"url":"/blog/gap-year","content":"### Hesitancy It was November 13th, and I was staring down the big, scary \"December 1st\" deadline on the MIT EECS program website. I'd just recovered from planning MakeCU, and I hadn't asked a single one of my professors for a letter of recommendation. Why was it so hard to send the email? - I kept telling myself I had to do more work on the research project before daring to ask them for a letter. - But with leading MakeCU and the Robotics Club in general, on top of my normal schoolwork deadlines... I felt at a standstill with my responsibilities, and desperately wanted a break from life. ### Locking in with Dan I text Dan McKeen, a recent doctoral defendee and resident super-senior of the Gang Lab, asking if he was still in the office. If I could do work with him. He said sure, and I paused my Balatro game, threw a jacket on top my PJs, and crawled over to the 3rd floor of Mudd. I sat down next to his office cubicle, and Dan asks, double checking that I've \"surely asked professors for letters of recommendation by now, right?\" I buried my face into my hands and avoid eye contact. He tells me \"Sarah. There's two weeks left until your first deadline. Lock in.\" We spend the rest of the night sending out all three emails to my professors. I make accounts for the application portals at each of the schools I'm thinking of applying to, and start drafting outlines for my personal statement and research statement of intent. I left that 2 hour work session having made more progress on my PhD. applications than I had made in the entire semester preceding it. I slept that night, feeling uneasy still. ### RE: Letter of recommendation I wake up the next morning to three emails. 1. Dr. Gang agrees, asking me to send a writeup detailing what I've done for the Gang Lab. 2. Professor Tony Dear notes that it's a little late, but that we could try to make it work. 3. My NYU professor and super-mentor, Dennis Shasha, shoots me a brutally honest response. > Dear Sarah, > > In principle, I'm happy to write a letter for you. However, I would have been *so* much happier if this project were done as we planned to have it done for this summer, because then my letter could attest to its usefulness for people and the paper we would have published. > > Also, to me, you look to be a little burned out as a student. I would really want you to wait a year not being a student. There is life outside, even if you are in a lab helping with research. > > Nevertheless, if you feel strongly that you want to do this, then I will write a letter. What I need from you is a word document written in the third person (e.g. Sarah did X) with > > when Sarah started > > Sarah's main accomplishments in our work together > > Warmly,\\ > Dennis After reading his email, in some way, I felt relieved. Because I knew I had been blowing off my research deadlines to Dennis for the entire summer and fall semester, be it through preparing for MakeCU or otherwise. It was his sentiment of disappointment which I was dreading; now that I'd heard it, my gut could stop catastrophizing over it. I told him I was open to the idea of waiting a year, but that I would appreciate guidance on how to move forward—asking if we could talk more on this the next time we met. He warmly agreed, offering we meet at 4pm the same day. I sent over screenshots of our emails to Dan, and asked him if he had time before the meeting to chat. He said sure. ### A lunch with Dan Over a green chipotle chicken wrap, we talk in the cafe inside the Philosophy Building. Dan tells me that a gap year is not a bad idea, \"smart even.\" and explains that he's never been convinced I actually wanted to go to grad school, given that I started preparing an application I should have started three months ago, three days ago. I tell him that research is the end goal for me. That I love the creative process of long-form problem solving, and how it ultimately ties into my goals of doing industry ML / robotics research at a company. And that research and robotics (and math, in hindsight) have been the only things during my time at Columbia which have felt \"real.\" He says fine, but that my GPA's on the edge for the schools I'm wanting to apply to, and that I simply don't have enough time to put together a compelling application this year. And that my letter writers don't either. I leave the conversation with my head hung low, silent and resigned. ### Dennis's advice 4pm arrives sooner than I'm able to catch my breath. I log onto Zoom to see Dennis's familiar, smiling face. \"Sarah, sweetie. How are you?\" I explain to him my situation and motivation for applying to grad school—the same reasons I told Dan over lunch. Dennis tells me that the first time he met me, he saw I was full of vigor and enthusiasm. In contrast, he says that these days, I just look tired. He explains that he felt the same in his senior year of undergrad. He was sick of school and took three years off to work at IBM, with the intention of never coming back. However, during his time there, he developed a clearer understanding of the world, and grew a burning hunger to go back to school. I ask him, \"what's the harm in applying this cycle?\" He tells me that my application will be much stronger next year—with our project wrapped up, he will be able to write a much more compelling letter of recommendation. Moreover, he explains that admissions committees will be more wary to accept someone who has already applied and been rejected. With that, I resigned myself to his wisdom. I tell him that I'll take his advice. Slapping my face into shape, I say: \"Time to find a job.\""},{"id":"makecu","title":"The MakeCU retrospective","description":"Lessons on leadership and community from organizing a hardware hackathon.","date":"2025-11-12T00:00:00.000Z","tags":["robotics","personal","leadership","retrospective"],"authors":["sarah"],"url":"/blog/makecu","content":"import PostImage from '@/components/PostImage.astro' import meandjo from './meandjo.jpg' ## Seedlings of MakeCU MakeCU planning started in June, shortly after I got back from ICRA. It was me and a squad of ~8 other people meeting over Zoom every week to talk about what work we've done, or have to get done, and by when. ### Preliminary lessons on leadership A lesson I learned early on was the art of starting and ending meetings: In research and violin, I'm the one answering to my PI / instructor. But here, people answered to me to lead the meetings. After too many meetings with awkward \"okay... see you next week?\" I realized the trick was to end with a statement—intonation down. Through running these meetings, I ran into some more, damning problems: - Work not assigned never got done. - As a corollary, people rarely volunteer themselves. - Zoom meetings can turn impersonal quickly - cameras, mics, and agency off. - People don't make decisions for themselves and only wait for me to \"assign tasks\" to them I wanted to gravitate away from me lecturing people the entire time, and steer the conversation toward being more productive and collaborative, and friendly. In an ideal world, we would all be friends working together on something we cared about. ## HackCon ### The hackathon ceiling As an MLH-affiliated event, I ended up finding my way into their annual hackathon organizer conference in Copake, New York. Though a little corny, it was quite illuminating to see how high the ceiling for hackathons could be. At other schools... - Teams are getting 150k+ in sponsorships - They're sifting through 10k applicants - One team crafted personality quizzes out of their application forms and hid CTFs in their websites (Hack the North). They also had an \"engineering subteam\" of 15 people, all dedicated to data analytics, website development, etc. ### Hackathons, and the MLH machine I also grew more invested in the hackathon as a concept—of being the glue between an engineering undergraduate degree and an engineering job in industry. MLH's role in the whole operation was fascinating in its own right. They essentially act as an umbrella organization connecting sponsors to hackathons and skimming part of the fat off the top. - They were an organization of community builders, each invested in organizing hackathons. - It was a space which was \"love-and-kindness\"-pilled in a way that I never expected myself to inhabit at the same time. ## Locking back in After that weekend, I came back and shared the spoils of knowledge with everyone else on the MakeCU team. ### Functionalizing people through responsibility I also returned with a renewed mind on delegation: if I reconnect people's roles to a certain \"responsibility,\" (eg, being \"responsible\" for the website displaying accurate information) and asking them to make decisions to get them toward that goal in a more self-guided manner. ### Components of the team Distilling everything I learned about organizing a successful hackathon is way beyond the scope and time constraints of this blog post. But the essential components were as follows - Money - Sponsorship - Finance - Events - Workshops - Food - Prizes - Logistics - Venue - Safety - Orders - Engineering - Website - Hardware - Marketing - Social Media - Merch ### Memorable moments For crafting a comprehensive **hardware list**, I latched onto some friends who I knew were more hardware-literate than I was. James, Isaac, and I met up over a series of lunches to plot out the list of components to order, and how we should effectively distribute it. **Sponsor acquisition** was fun—emailing and talking to sponsors taught me how to distill the hackathon deal down into what we want (money to organize the event) vs. what they get (advertising, recruitment, philanthropy), and how to convey that information in a compelling way. Also noteworthy was the frustrating amount we brushed up against **Columbia's administrative machinery**. Every purchase needed a meeting to have it placed. Merch could only be ordered through specific vendors out of \"fair labor concerns.\" Prizes could *only* be ordered from the Columbia University Bookstore—to ward off money laundering, nominally. ### Sprint to the finish The week leading up to it was a sprint to the end. T-shirts ended up arriving a couple days before Nov 8th, and I raced to design certificates, nametags, and overseeing that all the merch got printed as they should. Joseph (the goat) handled the hacker communication. The night before, Joseph, Isaac, Matt, and I stayed from 6:00pm to 2:00am getting every small task ready for the hackathon: Opening / closing ceremony slides, judging forms, day-of emails to hackers, check-in forms, cutting nametags. ## The Day Of ### A 24hr exam: Non-stop focus If the week before was a sprint, the Day Of felt like a marathon of intense focus and multitasking. My job was to: - Greet and entertain sponsors - Write thank-you cards (which was done hastily, during the morning-of Nov 9th, in the CS lounge) - Lead the opening and closing ceremonies - Update the closing ceremony to reflect the winners - Corral both hackers and organizers to do things - Make sure food arrived and was served when it was supposed to - Setup and teardown - (At some point, I had a 7ft guy from the business school help yell at people to go places 😂) Joseph was genuinely my other half throughout the event. Hell, it was probably a 80:20 him:me cognitive load split on the day-of. (Facilitated by him just being insane.) ### An air of ambition, hope, and Redbull The final project expo was really heartwarming. The calibre of projects this year was much greater than of last year. The unofficial theme was \"trash,\" and we saw five different variants of \"smart trash can that sorts waste / finds waste disposal.\" The closing ceremony was filled with dozing heads, empty Redbull cans, and latent anticipation. The fact that MakeCU could convince participants to pull an all-nighter to finish their project filled me with a strange but proud feeling. We announced the winners: a team named Ding Dong, who had built a smart doorbell which would unlock the door from the outside if your face was a verified user on the guest registry. At the end, Celeste brought in flowers for me and Joseph. ## Afterword ### The victory dinner It was only after the closing ceremony, after saying goodbye to the final sponsor, that I felt like I could finally relax. The team stayed back to clean-up the hardware, and after people slowly dropped out, the remaining four stragglers all went for dinner at Sala Thai. Afterwards, I went home and slept. ### Pride and sweat-laden takeaways I was non-verbal for half of the next day out of shell-shock. Honestly, I still haven't mentally recovered. But, I've started feeling genuinely proud of myself. Organizing MakeCU will forever stay with me for the lessons it taught me on leadership, organizations, and the ways in which working with other people can break down. The combined effort of us 10 led to an event which touched 100+ attendees and left a rippling impact on the Columbia community. It was challenging, grueling, but irrevocably rewarding. ### Links The final list of projects can be found [here](https://makecu25.devpost.com/project-gallery). Columbia Engineering also wrote an article on us, called [\"The 24-Hour Sprint from Prototype to Pitch\"](https://www.engineering.columbia.edu/about/news/24-hour-sprint-prototype-pitch). PS. We met to film a couple of marketing reels over the summer. Here's some of my favorites from then. - [Me falling](https://www.instagram.com/reel/DNN_reCMlzQ/?utm_source=ig_web_copy_link&igsh=MzRlODBiNWFlZA==) - [Us getting participants by whatever means necessary](https://www.instagram.com/reel/DNgCmhgMB-3/?utm_source=ig_web_copy_link&igsh=MzRlODBiNWFlZA==) - [James loves \"MakeCU\"](https://www.instagram.com/reel/DPB8iB-DCsD/?utm_source=ig_web_copy_link&igsh=MzRlODBiNWFlZA==)"},{"id":"thoughts","title":"Dopamine farming amidst my responsibilities","description":"Being torn between research, music, robotics, and coursework, and seeking refuge in Balatro.","date":"2025-11-02T00:00:00.000Z","tags":["research","personal","retrospective","robotics"],"authors":["sarah"],"url":"/blog/thoughts","content":"## The problem of fragmentation ### Premise: Chronically overworked, and sick of it! After overworking myself sophomore and junior year, this semester I tried finally listening to my friends' advice and cut down on my time commitments. Taking easier classes and cutting down on projects, my responsibilities for the semester became: - Columbia Robotics Club - The club - MakeCU - CCBR project - Research - Gang Lab - Binding library - Dennis - TuneBuddy - PhD. applications - Violin - Columbia University Orchestra - Columbia Music Performance Program - Barrio Tango Orchestra - Coursework - (nothing hard) ### The continuation of my self-inflicted problems ...which didn't end up being a lighter workload at all. The problem was x-fold: 1. Mode-switching between research projects is hard enough—to remember everything in a codebase takes at least 30m of warm-up (maybe 15m if well documented) 2. Whenever I have a violin lesson, or a chamber coaching, or an orchestra rehearsal, it always derails the entire day—I end up getting the repertoire stuck in my head, my thoughts filled with thinking about what I did right and wrong and how I can improve 3. Coursework is a constant 4. Leading the robotics club means I have to always be on call: to members on my team, sponsors, Columbia administration, ... 1. MakeCU requires constant attention, and is time-sensitive 2. I have to acquire funding for CCBR, lead meetings, and coordinate meetings with Caltech and Rutgers 5. Decision-making is a highly self-guided process for both research and robotics... I have decision fatigue. Fragmented across so many responsibilities, I feel really overwhelmed. ### Byung-Chul Han's \"serenity of an animal\" I think back to a book I read last semester, called \"The Burnout Society\" by Byung-Chul Han. There is a line where he describes the modern problem: - What used to be \"you should\" is now \"you can\". We become \"entrepreneurs of ourselves\", overworking ourselves into self-enforced subjugation - \"In this society of compulsion, everyone carries a work camp inside... One exploits onself.\" (p. 19) - Yet, we are \"equipped with an ego just short of bursting...\" if we didn't, \"one would at least have the serenity of an animal.\" (p. 18) This neurotic desire to achieve, and the idea that the modern human is so overworked and stripped of thought that he becomes effectively a mechanistic animal without the serenity of one—has stuck with me. ### Desire for escapism and repetition In my music humanities course, we were learning about modern music—and I thought back to Philip Glass and his repetitive, hypertonal works. In that vein, I made a playlist called [\"hold me\"](https://open.spotify.com/playlist/4qJQO0BpXewYwZUXodFcau?si=162c320d65044aa0), trying to comfort myself with his music. I just wanted someone to tell me what to do, to be held by my mom again, and have her soothe my worries with the cheatcodes to figuring out my life. ## The solution... ### Escapism and distraction: Dopamine farming Last week, I was sick with the flu. To pass the time, I decided on a whim to download Balatro. I ended up playing Balatro for 12 hours straight that day. It was refreshing, challenging, and addicting. Learning about the different joker abilities, various poker hand odds, money management—it was a whole new world to explore. Most importantly, it was wholly detached from the existential threat of phd applications, research deadlines, and MakeCU. In this world, lie round after round of bite-sized problems i could realistically solve—and the delivery of dopamine when I answered correctly. But it was a fake world, with fake problems. I was distracting myself from my deadlines, from reaching out to MakeCU sponsors, from finishing my research projects, hell, from even asking my professors for letters of recommendation. Moreover, it was eating into my already overly limited time. ### The real solution: A time-sensitive approach Of course, the real solution is to face my problems head on. And to this end, I have two time horizons to segment the solution methodologies by: (1) In the short term, I should... - Improve my time management skills - block out time - set realistic time estimates and mini-deadlines to incentivize progress - and construct an environment which is conducive to working. - set routines to initiate deep work and reducing the activation energy to starting - remove deleterious apps (like Instagram...) - ask friends to hold me accountable to the mini-deadlines I set (2) In the long term, the solution is simple. - Limit the amount of projects I take on at once, - and set realistic weekly time commitment estimates (including commitments to personal + social time) and stick to them. ### Implementation notes Unfortunately, these solutions are much easier said than done. (for instance, shortly after recovering from the flu, I distracted myself further by going on a trip to Boston for a weekend.) I want to get better at keeping the promises I make to myself and others... which means fulfilling my responsibilities to my research PI's, to my orchestra members, to my friends, and to my family for paying my college tuition. So hopefully I figure this time management thing out pretty soon."},{"id":"binding-library","title":"A graph theory algorithm for designing DNA strands","description":"This problem's at least a LeetCode hard.","date":"2025-10-20T00:00:00.000Z","tags":["research","cs","algorithms"],"authors":["sarah"],"url":"/blog/binding-library","content":"import PostImage from '@/components/PostImage.astro' import img1 from './img1.jpg' import img2 from './img2.jpg' import img3 from './img3.jpg' import img4 from './img4.jpg' import img5 from './img5.jpg' import img9 from './img9.png' import img10 from './img10.png' This semester, I was tasked with finishing up the binding library project for Dan Redeker, and packaging it into a user-friendly interface. This blog post aims to explain what exactly this project is, in the hopes of also conveying why I find it cool. ## The setting: DNA origami Some necessary prerequisite information about the Gang Lab: We are a material science research group, focused on a technique called \"DNA origami.\" The name comes from how we fold DNA into different shapes to form the basis of our nanomaterials. ### The DNA origami voxel Our lab works a lot with octahedral and tetrahedral dna origami wireframes, which we can \"load\" with arbitrary nanoparticles like gold. {/* */} ### Self assembles into a lattice Dr. Gang's work was influential in setting the foundations for the technique of using nanoparticle-loaded DNA origami as building blocks to create larger, tiling lattice structures. {/* */} ### With more DNA! Notably, this self assembly is enabled through the use of single stranded DNA sticking out at the vertices of the octahedra. These are used to connect different building blocks together, and only at certain sides, such that the desired nanoparticle structure is achieved through self assembly. {/* */} These single stranded sequences, also called \"sticky ends\" or \"bonds\", are often abstracted away with using a single color to represent strands of differing base pair content—strands which in theory should not bind together. ## The problem ### Structural binding errors However, if too many of the base pairs overlap, there's a chance that a voxel can bind in the wrong orientation, leading to the propagation of structural binding errors. {/* */} ### The problem statement Dan Redeker's Binding Library project aims to address this problem of cross-contamination: given a DNA sequence length of N base pairs, what is the maximum 'library' of different sequences we can draw colors from, such that no two sequences will bind to any other sequence in the library other than to its rightful complement? ## Dan's solution The solution was surprisingly elegant. ### Define orthogonal First, a definition: Two sequences are **\"orthogonal\"** to each other if they contain no matching subsequence of over 4 base pairs. ### The method 1. Compute all possible DNA sequences of length 8 2. e sort it two sets: A (color) and A' (complementary) sequence spaces 3. Compute all pairwise orthogonality between $A \\times A$ and $A \\times A'$ and store the two in a matrix. 1. This becomes a 'graph', where the values are booleans (1, 0) representing whether two sequences are orthogonal (1) or not (0). 4. Compute a third matrix containing the OR of the AA and AA' matrices. 1. This accounts for the fact that a sequence C which is orthogonal to A will correspond to a sequence C' which is orthogonal to A'. 5. Now apply a minimally connected graph algorithm. #### Rk: Graph theory definitions The following images are from Dan's beautiful presentation on the project. Notes: - In this case, each \"node\" in the graph is a DNA sequence. - Moreover, two nodes have an \"edge\" between them if they are orthogonal. ### The minimally connected graph algorithm Finally, the graph algorithm goes as follows: While there exist nodes (vertices) in the graph... - Find the node with the lowest degree - Remove that node from the graph and place it into our library. - Remove the neighbors which used to be connected to that node from the graph as well. - Repeat until there are no nodes left. The result is a library of \"different-enough\" DNA sequences (bonds) which we can use to connect our DNA origami lattices together."},{"id":"jellyfish","title":"Jellyfish [Poem]","description":"A kind of T.S. Eliot x ZQ \"Space Story\" mashup","date":"2025-08-29T00:00:00.000Z","tags":["poem"],"authors":["sarah"],"url":"/blog/jellyfish","content":"## Jellyfish Crystal blue, beautiful entrails\\ tangling themselves into the\\ fibers of my muscles\\ a bloom of jellyfish swimming through my over-trodden veins.\\ It's a cool sensation—their syrupy liqueur\\ shooting through the toothpicks in my spine. I don't get it. I've been skewered,\\ and sprawled out like a taxidermied pig,\\ pins stuck through every\\ centimeter of jelly. Dissection?\\ Or a minstrel show? Wandering eyes come and go\\ gawking at me. Pity, disgust,\\ heat-seeking needles prodding at my insides\\ trying to straighten out something\\ that I didn't want straightening in the first place."},{"id":"catsitting","title":"On catsitting, motivation, and responsibility","description":"How being responsible for feeding a cat made me come face-to-face with my void of intrinsic motivation.","date":"2025-08-17T00:00:00.000Z","tags":["research","personal","retrospective"],"authors":["sarah"],"url":"/blog/catsitting","content":"import PostImage from '@/components/PostImage.astro' import maslow from './maslow.png' Last week, Juyoun ([\"soul sister,\"](https://cs.nyu.edu/~shasha/) lawyer, and director of the Barrio Tango Orchestra) asked me if I was interested in catsitting for her while she catsits for her friend in the Hamptons. I said yes without hesitation. I love cats! And this would be a great experiment on whether I would be able to handle getting my own cat after leaving the dorms as well. I popped a Zyrtec and rode the train down to her apartment. ### A breakdown of responsibilities When I got there Juyoun hugged me and gave me the rundown of what Pimple (her cat) needs to survive. - Feed 2-3x per day - She eats two kinds of soups - mixtures of kibble/boiled chicken breast and water. (Because she refuses to drink enough water if we don't trick her into doing so) - Change the water in her bowls regardless (just in case!) - And change the litter whenever she uses it by scooping it into toilet It seemed simple enough! I said goodbye to Juyoun and geared up for the week ahead. ### A hesitant relationship Pimple started off being extremely standoffish of me. Whenever I'd try to walk over to her, she'd sniff my hand and then strut away from me without even letting me pet her. She refused to leave her little enclave by the door. I could tell she was waiting for Juyoun :,) I told her, \"Pimpleeee. Today I'm getting lunch with a friend. I'm so excited! Sorry to leave but I'll be back soon!\" And she'd give me this unamused glare which screamed \"bitch shut up.\" ### Increasing affection (and discomfort) By the third day, Pimple was starting to finally warm up to me. I think it was because I had fed and changed her litter enough times, that she started to trust my company more, nuzzling her head against my calves and marking her scent on me. Unfortunately, the accumulating discomforts of living in someone else's apartment started grating away at me. - The entire apartment had a terrible fruit fly infestation, and I couldn't step into the kitchen without getting swarmed by the beady-eyed buggers. - The air in the apartment was thickened by a mixture of sticky NYC summer humidity and cat hair—and my allergies would cycle on/off in sync with the medication's life cycle. - I had a plastic trash bag hanging from the bathroom doorknob, and the used tissue mound in there steadily increased alongside my pervasive feeling of nastiness. I felt like a pet betta fish, shell shocked after their owner changes the water in their tank. I missed my clean, air-conditioned dorm room. Still, I was on the net, happy to have the company of this small diva—Pimple. At some point, she was sitting on the entryway chair, so I seized the opportunity to plop down next to her, computer in one arm, a cat-curious hand in the other. Sniffing my hand, Pimple let me pet her! She stayed serenely plumb on the couch as I started preparing for my meeting the following morning. ## A fractured mind I couldn't focus though; my mind was filled with the thoughts from the week preceding me. ### Sociologistical nightmares After spending the entire week hanging out with people 12/7, I felt super fractured. I had hung out with people across 4 different facets of my life - Music friends - Robotics friends - Gang lab friends - Hinge \"friends\" While having in my head swirling thoughts on the oppressive and stupid systems we live in. ### Research feels pointless What was I doing with my time? - If I seriously wanted to take actions toward change, I should be spending my time working on political/social problems. Not in DNA origami, music, or bioinformatics. - If I'm going to be running away, why not do something more fun like hanging out with my friends, instead of whacking away at my codebase? But then again, I wasn't always this fractured. Last summer, I was able to work for ten hours at a time. What changed? ### Research, in context I mean, I started doing research so I could ultimately - secure a meaningful and well paying job - and fund my consumption And I stayed in my labs because - I liked learning about - music, self assembly, biology - from a computational lens - honing the meta skill of long-term problem solving and project management - it felt satisfying to create something - and I liked my friends in the lab ### Escapism vs. the void of intrinsic motivation But also, I was deeply depressed last summer. And research was honestly a way to escape my suffocating thoughts of self loathing. - After starting prozac and making more friends last October, the running-away impetus went away and instead, I came face-to-face with my void of intrinsic motivation. ## A refactored life! ### Axioms for life Over the summer, I tried to create my intrinsic motivation by refactoring my life via first principles. It was after [I had just watched Interstellar](https://letterboxd.com/hyuncat/film/interstellar/), and I had decided on my preliminary set of principles. - *\"Live truthfully\"* $\\leftarrow$ My fundamental axiom - **Thm 1:** \"I don't wanna die\" (live) - **Thm 2:** \"Rage against the dying of the light\" (try) And tried reconciling the above with the agentic framework of me as a eating, socializing, and reproducing biological machine with the following desires: - eat good food - make good friends - find a good partner ### Is truth solipsist or universal? But based on these biological needs, why not just cut to the chase? So instead of doing research out of escapism, inertia, or this possibility of a better future, why not - spend all my time hanging out with friends and Hinge matches - find a rich [huzz](https://www.urbandictionary.com/define.php?term=Huzz) and become a stay-at-home mom - or hook myself up to an ecstasy machine? I could just live a solipsist life, thinking only about satisfying my basic needs and not worrying about trying to align myself with some \"higher truth.\" ### Maslow's hierarchy of needs: The balance? At some point, I recalled learning about Maslow's hierarchy of needs, all the way back from my high school AP psychology class. I was talking to Ryan and Will (CCBR) about this on Saturday, and how I think Maslow's hierarchy could be part of my solution! That the balance between base and higher order desires comes from satisfying a weighted combination of all of them at any given slice of time. Hearing this, Ryan asked me, \"Do you just have a void of self actualization?\" I thought again to whether I should live according to my desires or \"virtuously\" with respect to some self-actualization goals, and realized I still couldn't place any driving virtue in my motivations. ## Reinforcement learning for humans ### Model-free vs. model-based learning On Sunday, Ryan and I went to the Bryant Park library to get caught up on the RL literature for the CCBR project. There, I learned that for state-of-the-art robotics policy training, that there exist two broad learning paradigms 1. Model-based learning 2. Model-free (policy) learning The former either starts out with or tries to learn a model of the world. It works well for simpler environments which can be fully described (eg, a chess game), or can also be learned on-the-go (which is hard, and requires lots of data + compute). Model-free learning just tries to find the best actions an agent can take to maximize their reward function. #### We don't know enough about the world For our quadruped, we were going to use a model-free approach (PPO/SAC) to train its walking policy. And putting it this way, made it click that we don't really know enough about the world to try this model-based approach (of searching for universal truth). So, maybe spending time fine-tuning my reward function would be a better use of my time? ### An inverse kinematics approach I shared my thoughts with Ryan, and he remarked that the solution could also make use of an inverse kinematics approach: - where you start with a high-level goal, - in the context of certain low-level assumptions of the world, - and you retrace the agent's mid-level actions needed to get to the goal updating both assumptions and actions each step of the way. ## On responsibility ### Oh, Pimple... Pimple nuzzled her head against my hand, and I snapped out of my head for a second. She was guiding me to the spots she wanted to be scratched, showing me her belly. She trusted me? I felt like an awful cat mom up to this point. I was away for a lot of yesterday hanging out with a friend, meanwhile poor Pimple was relying on me for food, for water, to clean her litter, for affection. ### Responsibility follows trust And I thought to how Dennis, Dr. Hur, Dr. Gang, CURC, CCBR, how they were relying on me to get my work done in a similar fashion as well. They took me on with the expectation of me getting certain work done—and just like I had a responsibility to take care of Pimple, I had a responsibility to them to fulfill for placing their trust in me. So given this goal, I tried to reverse engineer why I should do work for them beyond this trust. ## Art: My self actualization Well, I remembered how much my love for art ties together everything I do, whether it be in drawing, making/listening to music, eating good (artistic) food, and in spending meaningful time with friends. And I realized art itself is a system which interfaces with our biology! ### Base (5 senses) art That the basic components of art tie back to our five senses: - auditory (music) - visual - drawings - architecture/design - taste - food - drink - touch - sex, affection - smell - perfumes, candles ### \"Higher order\" art And that these baser forms of art come together to create \"higher order\" art: - writing, speaking - combining other aspects of the senses to depict an experience - relationships - to create something more beautiful in the union of the time spent together ### Why do I create art? I create art because it - feels good to be understood - feels good to leave a part of me into the world and that's probably my form of self actualization. ## Research, and the problem solving tool So in the context of art as my self actualization goal, research and problem solving becomes the tool - for which I can understand and break down systems - by finding patterns (through both similarity and dissimilarity) ### Problem-mentality I asked myself, why do people solve problems? Well, that it feels good: - To no longer face the problem - To feel needed by people who the solution helps - To get closer to the truth of the world ### The tangible motivation problem So, I framed my research motivation problem as a set of tangible problems - I don't know what I'm going to do next year - People are waiting on me to finish these projects - I feel stupid and guilty for letting other people down - I want to eventually make enough money to afford the kind of art I want to experience With the following solution: finishing my current projects. - With the mid-level appreciation of problem solving as a tool for richer art (in consumption and creation) - and the artistic appreciation of the people I would help with my research as a grassroots step in the right direction So that I can start and choose my next one to be more aligned with my better understanding of the world, with the knowledge that I better not entangle myself in more than 3 major projects at once."},{"id":"cruelty","title":"Systems of cruelty: The ants and the starlings","description":"MKUltra, global ant wars, and how starlings may shed light on a way to cope.","date":"2025-08-01T00:00:00.000Z","tags":["personal","philosophy","cynicism"],"authors":["sarah"],"url":"/blog/cruelty","content":"import PostImage from '@/components/PostImage.astro' import YouTube from '@/components/YouTube.astro' import neighbor_diagram from './neighbor_diagram.jpg' import pigeon from './pigeon.png' import starling from './starling.png' Yesterday I was at CAVA with Sean, a recent Columbia grad from Singapore. He's a huge troll, often starting fights both online and offline about politics—wearing Lockheed Martin merch at one of our school's Israel-Palestine protests, cooking up ragebait in r/Columbia, and dropping in random references to MKUltra into our conversations. I'd always found history boring, but through getting to know him I became curious why someone as smart as him would like the subject. So after picking up our CAVA bowls and sitting down in the Chipotle next door, I asked him to explain to me the story behind MKUltra. ## MKUltra: The CIA's human experimentation stint He detailed how [MKUltra](https://en.wikipedia.org/wiki/MKUltra) was a large-scale human mind control experiment where the CIA developing a truth serum for use in interrogations. The CIA had [absorbed a bunch of Nazi scientists](https://en.wikipedia.org/wiki/Operation_Paperclip) who were trying to do the same thing back in WWII, then rounded up a bunch of prisoners and heroin addicts (people who \"wouldn't be missed\") and started injecting them with LSD to observe the side effects. It was carried out across 80+ institutions (colleges, hospitals, prisons, pharmaceutical companies) over 20+ years, and even occasionally under the knowledge of the institutions' administrators. They ended on a 2 phase method, where they 1. Inject the participant with LSD and guide them into seeing a bunch of psychological horrors 2. Tell them it'll stop if they tell the truth ### On (potential) whistleblowers: Frank Olson One scientist involved in MKUltra, named Frank Olson, was given LSD without his consent or knowledge. Shortly after, he quit the CIA out of moral concerns, including - the CIA developing assassination weapons - CIA using biological warfare in covert operations (and in populated areas) - collabs with former nazi scientists under operation paperclip - LSD mind control research Upon release, Olson is assigned a CIA doctor to monitor him. And a few days later he falls to death from a NYC hotel room while his doctor is allegedly asleep in another bed. \"Suicide.\" The Olson family continues to insist it was a murder, and tried suing the US federal government—but the case was dismissed. ### Governmental mistrust Combined with the current buzz around the Epstein case, this made me despair. - That the very government I entrusted with certain civil powers in exchange for protection could choose to inject its own citizens with heroin and LSD for the sake of developing torture methods. - And I was disgusted at the sticky ways in which the government protects its allies—in this case, with a potential whistleblower dying of suicide days upon release, while under federal supervision. ## Cynicism: A common sentiment Moreover, talking with some other friends made me realize how much of these kinds of horrors continue to be perpetuated to this day. - Dan McKeen - He caught me up-to-speed on the history of Iran - that its current political unrest came about largely due to staged coups ala the United States and the UK. - Dan Redeker - He mentioned in passing how the very iPhones we use are built upon the exploitation of child labor for cobalt mining. - He saw a video of ICE trick a mother into coming out by getting the daughter to tell her to come out, and how it was demoralizing and depressing to see such a tragedy unfold in front of him. - Liyu Chen - She vented to me about her health tech startup, and how she has to deny coverage to someone with a terminal condition out of the terms of their contract. - She was heartbroken at a young age after realizing her clothes were produced in a sweatshop. All four of these people—Sean, the Dans, Liyu—all mirrored the sentiment that we need to \"lie\" to ourselves in order to stay sane. I admire all four of them, so I wondered if their convergent cynicism emerged because they were so smart in the first place. - That because they're used to being able to solve problems, they feel more cynical and even more hurt when they see the world suffers much bigger problems than they alone can handle. - And their capacity for understanding gives them an even deeper view of the consequences of the problem That it feels that much more futile to take actions beyond distraction and irony. ## The problem: Globalization and our sluggish biology After thinking about it more, I came upon a possible explanation for why such tragedies are being perpetuated. ### Impersonalization under global capitalism Honestly, I think the problem is with our inadequate and slow response to globalism. I heard from a friend that humans evolved to live in communities of 300, but not 8 billion. And I think it's our biological limitation brushing up against our global capitalist economy with 8 billion community members, and the impersonalization of such a system, which is leading to our troubles. - Our minds have an easier time rationalizing the exploitation of children we've never seen or will interact with, rather than of our neighbors daughters. ### The ant wars I saw a video [something like this](https://www.reddit.com/r/Damnthatsinteresting/comments/vbtzfz/i_recorded_what_appears_to_be_an_epic_battle/), where two colonies of ants were clashing against each other on a sidewalk. It made me wonder, if even ants resort to these kinds of wars, then are we biologically/evolutionarily destined to fight over our finite resources as well? Is there any point in fighting against this? I sent the video to a friend, Jeff, who recommended I check out the Kurzgesagt YouTube series on ant wars. After watching [this video](https://www.youtube.com/watch?v=cqECNYmM23A) on the Argentine ant's mega-colony wars, I gained a kind of sick clarity on the matter. ### Ant wars: Evolutionary tribal warfare Within their colonies, Argentine ants are very cooperative and well-organized. On occasion, worker ants and queens will leave and start their own colonies—eventually adapting to different environments via mutations and becoming such distant cousins that they will no longer recognize their original colony, and fight \"vicious wars.\" ### Ant wars: On eugenics However, after an accident where a few Argentine queens were transported into Madeira and New Orleans, the resulting colonies had very low genetic diversity—now, ants that left the colony were no longer distant cousins. The result, was a 'master race' of Argentine ants which would cooperate on an inter-colony basis. So then is the issue that we humans started out fine but now we've mutated too far from our roots and we haven't yet found a way to peacefully deal with that in a global context? ## How should I keep living? All that to say, how should I continue living in this cruel context? Where the systems I live in embody so much violence and exploitation to keep running? ### Self assembly: Flocking behavior in starlings Jeff was telling me about how awful pigeons are at building nests {/* */} when the topic of a smarter bird came up—the starling. He was telling me how when he visited Rome, he saw a flock (called a \"murmuration!\") of starlings create these [massive organized flight patterns](https://www.youtube.com/watch?v=XqRR7H9sjI4) in the air. {/* */} #### The starling's rules for life These emergent structures come about not out of some centralized queen bird telling them what to do—but out of each starling following a [set of three rules](https://animals.howstuffworks.com/birds/starling-murmurations.htm): 1. Fly close to your neighbor 2. But not too close to run into them 3. And be in a similar orientation to them with respect to their 7 nearest neighbors—which is enough to account for scenarios like the red guy below. My suspicion is that this allows for local flex, in situations when starlings are close enough to their second shell of neighbors but not their first. That even just this small set of rules can interact and form large scale change as long as enough people are aligned. ### Dennis's words of wisdom I emailed my life-mentor and PI, Dennis Shasha, on how one should cope with the cruelty embedded into the world's systems. And he shared a similar sentiment: >Dear Sarah, > >These times will pass. Music brings joy. Better music brings more joy. >You are contributing to that. > >When we do our research, we will be true to ourselves and the people we help. That is also an example for all. > >To better traverse these crazy times together, we must do so hand in hand, promoting truth, intelligence, and the golden rule. > >Do you think this works? > >Warmly, >Dennis"},{"id":"alcoholism","title":"Elevated alcoholism","description":"Engaging in socially acceptable indulgences while trying to avoid overdoing it.","date":"2025-07-25T00:00:00.000Z","tags":["personal","philosophy"],"authors":["sarah"],"url":"/blog/alcoholism","content":"import PostImage from '@/components/PostImage.astro' import dizzy from './dizzy.png' import jo_beli from './jo_beli.png' import wine_night from './wine_night.png' import wine from './wine.png' **Disclaimer:** I was 21 years old at the time of drinking anything This summer, our lab started with a promise to host a series of wine nights. Katerina and Lucas (Gang Lab adjacent) had both gotten sommelier training in the past year through Columbia's bartending class. Our office has a culture of appreciating alcohol in general, through the nerdy lens of people eccentric enough to conduct and enjoy research. And though I'd missed the first one, French wine night was coming up! Katerina tasked us each with finding a French wine, and preparing a short oral presentation on the flavor profile and the history of the region. I was determined to find a great wine and learn all about what makes alcohol \"good\" or \"bad.\" It was about time I stopped embarrassing myself by settling for Svedka shots. ## Everything about the Panicaut Rouge! I walked into International Wine and Spirits across the street from my dorm, with nothing but my ID and a phone opened to r/Wine. After deliberating for 25 minutes, I settled on this one—it was a red wine from the Plan de Dieu region in the Cotes du Rhone Villages AOC, from a village denoted especially for its exceptional quality (or so goes the title). It should have a moderately rich, dark fruit flavor (think: cherry, blackberry) with a slightly savory and spiced finish. ### Grape composition The wine was composed of - 60% grenache - well suited to hot, sunny, dry conditions - adaptable and vigorous - ripe fruit flavor, full body, high alcohol content - notes of herbs and spice - 40% mourvedre - also thrives in warm sunny conditions - produces deeply colored, full-bodied, tannic wines ### Growing conditions I looked into the growing conditions of the grapes which went into this wine: - The vines were grown on soil of limestone origin, covered with alluvium - Grown in a warm mediterranean climate, with a long, hot, and dry summer - There is a violent mistral north wind, but the grapes are quite resilient! So the wind ultimately helps prevent the vineyards from becoming damp or humid, so we don't have to treat the vines as much for fungal disease. And ideally, all of the backstory should lead into this wine tasting pretty good. ## Wine night At wine night itself, I have a pretty good time. {/* */} We're tasting like 12 different wines, red and white all in succession, so I'm noticing all the subtle differences I'd never realized were present before. ### White wines The white wines on average were more dry / acidic. There were some interesting notes! - Some which tasted oily / buttery - others like apple - and even one that had [notes of lychee](https://www.gustavelorentz.com/wp-content/uploads/2023/02/2016_Gewurztraminer-Altenberg-de-Bergheim_GB.pdf) (this one was great) ### Red wines The red wines had more body, on the whole. They were richer and a lot of people preferred them (on average) to the whites. They definitely had a juicier, berry flavor profile to them. BTW: Among the reds from that night, mine was the favorite. 😎 ### \"Elevated alcoholism\" It was interesting because alcohol often brings this connotation of unseemliness, yet the French wine night felt like a much more \"elevated\" way of going about getting wasted. Our deeper analyses of the wine's flavor complexity and history was a fun way of bridging our nerdiness with our desire to come together, with the simpler pleasures of alcohol—lowering our social inhibition, and helping us connect with each other. ## Jazz clubs and lizard brains I was working at the office late into one night, when Elad asks if Raghav and I would like to join him in coming to a jazz club with him. Neither of us have gone to a jazz club before, so we enthusiastically agree to the idea on the spot! So us and a couple of others buy tickets to see \"Darcy's Secret Society\" at Dizzy's Club for that Friday. ### Cheese boards, appreciating flavors The experience on the whole is nice! We get a cheese board and it was quite tasty. I'd never appreciated the pairing of sour/salty and sweet flavors in the same way that the soft cheese and honey brought. And the textural contrast of the toasted baguette and the butter-like cheese spread on top gave it a pleasant mouthfeel. Part of \"learning more about the world\" for me, entails being able to enjoy the complexity in food, in other daily aspects of my life, beyond my research. But it's astounding how easy it is to not think with these things, whereas with research thinking is a prerequisite. So it's cool to come back into tasting food and alcohol with the kind of structured, problem solving, systems-based approach which research usually entails. ### Sophisticated lizard instincts One of the songs at this concert stood out to me. It was titled \"Lizard Brain,\" and it expressed different base desires—for food, power, sex—with a complex cacophany of dissonant chords and layered textures. At some point, they were just playing moaning sounds with their saxophones. It all came to a climactic crash and the piece ended with the audience stunned. To me, it was moving to see that despite having all this complexity on top, of rich cheeses and delicious chord pairings, that we're still beholden to these lizard instincts. #### ....have the potential to be taken too far I've had my own tumultuous relationship with my desires. I used to struggle with binge-eating in the past, and in general find it difficult to moderate myself from indulging in [too much of a good thing](/blog/hinge). My dad used to drink a lot, drinking 5-6 beers a day. For many families, alcohol brings violence and abuse alongside itself. #### And interplay with social media In general, these desires are so deeply intertwined with sin—a problem which has taken many forms over the years. At a Gang lab group lunch, we matched up the seven deadly sins to different social media platforms: 1. Pride = LinkedIn 2. Greed = Amazon 3. Wrath = Twitter 4. Envy = Instagram 5. Lust = OnlyFans 6. Gluttony = Beli 7. Sloth = TikTok Though we were laughing as we made it, the comparison rings true when seeing how social media platforms legitimately fuel their own [desire-driven capitalist ecosystems](/blog/mkbd) by preying on our insecurities and desires. ### \"Not taking it seriously\" I started using Beli recently, which is a social media platform for ranking different restaurants. It's been honestly nice to have a centralized list of all the different restaurants I've been to in NYC, as a kind of food diary. A friend of mine in the robotics club told me that he uses Beli as well, but that he doesn't take it seriously. Regardless, I think the answer I'm [running into again](/blog/hinge) is—I should find the balance between giving into these desires and overdoing it."},{"id":"hinge","title":"Dating apps, discipline, and Sisyphus","description":"The interesting people I met on my Hinge-binge, the consequences of my actions, and my reflections on them.","date":"2025-07-18T00:00:00.000Z","tags":["personal","love","philosophy","stupid"],"authors":["sarah"],"url":"/blog/hinge","content":"## Returning to dating apps ### A binge-like approach to life I tend to go through life in binges. Binging one TV show, book, project, friendship, hobby, type of food, and then moving onto the next one. (I've been eating the same Ban Ban Shop grain bowl for lunch for the past month and a half.) So when I decided to get back on dating apps again, I approached it with a similar... all consuming style. Pushing off work deadlines and crapping through my meetings with shallow promises for the future, I spent the past week swiping through 400+ men. ### A renewed version of myself I first spent an hour perfecting my own profile, scrolling through the 19,440 photos in my camera roll for the most flattering clips which showed off my personality, contained funny stories, or could be conversation starters in any kind of way. After updating my profile, I bit the bullet and pressed unpause. Likes started rolling in, across people of all different strata of life. After a semester of redefining myself from the ground up, I felt a renewed clarity in my own tastes—I was looking for smart and interesting people, first and foremost. People to have fun conversations with. ### A library of interesting people Early on, I matched someone who looked like a huge nerd (my type!). We talked about his Lego Death Star, my current obsession with mechanical keyboards, and on the hierarchy of energy drinks. I spent the rest of the week talking to person after person, getting to know what makes them tick. - One that was insanely smart, got into Harvard Law School, and was 2nd in the world at Clash of Clans at one point—while also being a nicotine addict and a chronic class skipper. - One person whose laptop exploded in their backpack when they were a kid. - Another that was doing an investment banking internship, lamenting on its soulless-ness. He loved birdwatching, and had changed all of his contact photos to different Pokemon. - Another that was astonished at how many mutual connections we had on Instagram (we had three.) - A guy named \"Chalant.\" - And a CS+BME who was addicted to his Google Calendar. ### Math and inebriation I went on date after date, drinking with friends, going clubbing? in the meanwhile talking about how humans are topologically 7-holed doughnuts, and arguing over why my [Theorems are like libraries](/blog/thm-libraries) poem was sh!t because computer science has no fundamental axioms which are Turing-complete. (Though I think this guy missed the point of the poem.) ### And the consequences of my actions But I was spending ALL of my time on this all-encompassing side quest. I started getting stress dreams about failing my high school AP tests. Every meeting felt like an extended apology. ## Crashing out to Raghav ### Loneliness and betrayal I crashed out last night to Raghavendra. How I suspect my current inability to focus on non-dating endeavors is because I was so emotionally starved for the past 3 years—that I overcompensated and gave into every random thought or cute guy that came across my phone. But that in doing so, I felt like I was betraying the people who I promised I would deliver good work to. That while it's healthy to experience these things in moderation, that I was overindulging at the expense of my responsibilities. ### Self restraint: A human problem I thought back to when I read Augustine's Confessions in my freshman year literature class. And felt a little less alone when I realized that people were writing about the struggle against one's base desires in the pursuit of enlightenment back in 400 AD as well. ### The Hinge-Sisyphus Feeling exasperated, I jokingly explained to him how I felt like Sisyphus, pushing up Hinge matches up the mountain of my iMessages. Rag remarked that it's about enjoying the journey! Of pushing up our boulders, trying to diffuse my self-judgement. And I elaborated that my issue is more so that my life has many mountains, each with their own worker-Sisyphi climbing them; that we have a limited bank of energy to spend amongst them all. And that right now, I'm spending too much of my energy into the Hinge-Sisyphus. ### A system of discipline? The conclusion of this long winded and emotionless saga of events, was that I need to find a system of discipline which works for me. One which is aware of the power of working inertia, of our human energy constraints, and is aligned with my life goals. So I paused Hinge. Maybe I'll come back to it once I've figured my life out."},{"id":"mkbd","title":"On mechanical keyboards and consumerism","description":"A series of terrible purchases, and the angry reflections which sprouted in their wake.","date":"2025-06-23T00:00:00.000Z","tags":["media","personal","stupid"],"authors":["sarah"],"url":"/blog/mkbd","content":"import PostImage from '@/components/PostImage.astro' import ballOfDuty from './ball_of_duty.png' import code118 from './code118.png' import mitiru66 from './mitiru66.jpg' import evangelion from './evangelion.jpg' import bare from './bare.jpg' As part of my \"learning more about the world and robotics\" era, I went on a shopping spree trying to redefine myself. ### Imitating my CS idols It started after our first CCBR east coast meeting. Ryan had brought his mechanical keyboard to CAD with, and had let me clack around on his keyboard. It felt *so* satisfying to type on. So—my admiration for his 160 WPM, and for his intelligence in general, led me to latch onto the idea that I could approach a fraction of his cracked-ness if I just bought the right peripherals. ## My first mechanical keyboard! So after 4 hours of reddit research and listening to keyboard ASMR videos, I convinced my mom to buy me the [Rainy75](https://www.wobkey.com/products/rainy75) mechanical keyboard. - I was sold by the \"it sounds like raindrops\" claim, which mixes both my audiophile nature and my dripping melancholy. ### The (abridged) anatomy of a mechanical keyboard It tied into my goal of wanting to learn more about hardware and robotics, and I parsed together that mechanical keyboards are really not that complicated. They're just a PCB (printed circuit board) - connecting **keys** (switches + keycaps) to a controller - switches are the thing which send electric signals to the controller when you press down on the key - keycaps are the cover atop the switches, giving the board its aesthetic flair - housed in a **board** and people 'mod' their keyboards by adding foam/tape between the board and the pcb to achieve certain sounds. ### The quest for the perfect keyboard #### Keycaps It didn't stop there though, and I spent the next two weeks spending 2-3hrs/day scrolling through AliExpress, Drop, KBDfans, (...) searching for the perfect keycaps and switches to express my personality. For keycaps, I eventually settled on this set of [Evangelion caps](https://drop.com/buy/drop-fu11-meta1-gmk-mecha-00-keycap-set?defaultSelectionIds=988595). - I was in my \"I like tastefully bold colors\" era - it was a cool design that hearkened back to my adolescent love for anime - and the themes of depression and loneliness in Evangelion resonated with me on a surface level (I never actually finished the show) #### Switches But... now the only problem was that the Rainy75 came pre-packaged with linear switches, which sounded beautiful! But I kept making mistakes, accidentally pressing keys. For context, the three main types of mechanical keyboard switches are: - Linear - Constant up/down motion - \"Thockier\" sounds - Tactile - You feel a bump sensation at the bottom - \"Clackier\" sounds - Clicky - The switch snaps back into place - \"Clicky\" sounds (Here is a [helpful video](https://www.youtube.com/watch?v=KsLXGHQekpg) for comparison) After doing another day of research, I decided tactiles would be the best tradeoff between sound and practicality, and I ordered a set of [Gateron Quinns](https://www.amazon.com/Gateron-Switches-Tactile-Mechanical-Keyboard/dp/B0DCHZL4PQ). Classified as tactile switches, they - allegedly had the thocky sound of linear switches - while retaining the satisfying bottom out of tactiles. Justifying it as a \"productivity investment\" and a promise to stop doomscrolling AliExpress, I bit the bullet and dropped $280 on these two sets of plastic. {/* */} {/* */} All in all, the finished keyboard looked pretty nice. ## Doomscrolling continues ### A smart tech echo chamber Unfortunately, my doomscrolling did not end there. I had redownloaded Instagram after a year of being off it, in the name of doing \"research\" for my hackathon's reels marketing campaign. But I inevitably got sidetracked into different facets of the Instagram explore page, and I got sucked into the cool-but-unnecessary gadget side of the app. I saw cute and creative pencil sharpeners from a Japanese creator called [mitiru66](https://www.instagram.com/mitiru66/). And watched an [Asian guy](https://www.instagram.com/kydyuzhini/) rate whether viral products were worth the hype or not. Above: \"Ball of duty\" ### The smart wallet After spending hours each day watching these kinds of videos, I ended up getting inundated with advertisements for this [smart wallet](https://code-wallets.com/products/code-118-wallet-magsafe?variant=48831994790119&view=engraving). It caught my eye for many reasons: - It was functional, could stick to the back of my phone, and popped my cards out with a slick trigger on the bottom - It was sleek and represented my principle of simplicity / minimalism - Plus it has a topographic design! Which reminded me of my time working on [Walkwise](https://github.com/hyuncat/pre-walkwise) and on my love of math. So after a week of deliberating, I went to my parents again, begging them to buy it for me. And to buy not only one, but two (with their buy-one-get-one 70% off + free shipping deal). ## Post-purchase clarity ### Hook, line, and sinker I felt like such a sucker afterward. After looking down on people who buy useless shit for so long, I had fallen prey to the same trap. I was targeted, - hook (my \"identity\") - line (Instagram) - and sinker (last minute BOGO deals). ### Manufactured needs I'm not a different person as a result of either my mechanical keyboard nor my smart wallet. Hell, I mostly bought them to quell my poking desire to own them, and to stop wasting time searching for alternatives. But these were artificial needs, especially curated by the all-encroaching algorithm—trained on maximizing screen time and stupid purchases. - I already had my MacBook keyboard - And I already had a magnetic card holder for god's sake. I bought TWO of these things. And I realized it stems from the greater issue that the ad-revenue-based incentives of Instagram are simply not aligned with our own. Instagram creates its own hierarchical social ecosystem based on likes and followers—pushing certain creators, messages, and products to the top based on how much advertising space they pay for. And ultimately, this social media machine sustains itself by artificially manufacturing certain emotions out of us, and exploiting them to better sell us certain products. ### And the consequences of my actions I was spending so much time on Instagram, AliExpress, and Amazon—searching for the perfect set of peripherals—that I was falling behind in my research work. But I did receive many compliments on both my keyboard and my wallet...so who's to say."},{"id":"analysis-of-orgs","title":"An analysis of organizations","description":"The anatomy of an organization, and the interplay between ambition and community.","date":"2025-06-17T00:00:00.000Z","tags":["robotics","personal","leadership"],"authors":["sarah"],"url":"/blog/analysis-of-orgs","content":"## CCBR: A project that bloomed from ICRA After ICRA, Donny reached out to our group chat proposing a project idea over the summer: building a modular, open source humanoid robot. ### The CCBR team Five of us from different schools - Donny, Ryan - Caltech - Me - Columbia - Alex - Berkeley - Will - Rutgers came together under the (supposed-to-be) temporary name [CCBR](https://ccbr-humanoid.github.io/wiki/), and started building a robot, with the goal of making it walk by the end of summer. ### In comparison to CURC? I'm still leading the Columbia Robotics Club (CURC). So, I wanted to reflect on what I've learned about the anatomy of organizations (both internally and externally) in general, and also compare the differences between the two organizations—with the hope that the path forward combines aspects from both. ## The anatomy of an organization ### The workings of a team CURC's leadership team consists of the following broad categories: - the lead - the internal team - finance - organization - logistics - the external team - marketing / design - business - events with both internal and external working together in tandem with the lead(s) to achieve certain goals in the context of other robotics clubs and the tech industry as a whole. ### Competition and cooperation in context #### The strata of organizations The various tiers at which we can analyze the incentives and behaviors of the organization are 1. personal 2. intra-organization (the team) 3. intra-industry (other robotics clubs) 4. inter-industry (companies) And based on the dis/alignment of people's goals within each strata, we can see competition and cooperation existing within each tier—a complex web of relationships based on functional roles but undercut with the competitive edge of living in a world with finite resources. #### 1. Personal goals People may have different goals - ambition / power-driven motives - stability chasing motives - relationship / community motives - ... as well as different skills - organizational - financial - interpersonal - ... And these personal goals interface with the various levels of organization to guide competitive and cooperative behaviors. #### 2. Intra-organization goals Within the organization, - ambition/power hungry people want to become president - stability chasers may crave roles with defined responsibilities and timelines - community-driven people may enjoy planning social events But we all align within the broader context of sharing intra/inter-industry goals. #### 3. Intra-industry goals Between different robotics clubs, we see a competitive ecosystem emerge, with robotics/engineering clubs being stacked against each other based on - competition performance - social media presence - job placement - prestige of affiliated school But with CCBR, I also found inter-club collaboration through the shared personal principles of - personal learning - ambition #### 4. Inter-industry goals And robotics clubs come together as well as out of the \"inter-industry\" motives of - strengthening the greater robotics community - advancing the state-of-the-art in humanoid robotics ### The interplay between functionality and humanity Robotics clubs play a functional role interfacing with the world as a whole by being a pipeline of talent into certain engineering careers - big tech, auto companies, defense contractors, etc. But we all share a love of building robots and the desire to build better robots. This summer, we invited Bob Tian, the CEO of Robify to Columbia to discuss a potential CURC/CCBR collaboration. He was super kind, and seemed genuinely happy to talk to us about the robots he made. We ate lunch together at Dun Huang after, and Dr. Tian remarked that he's from the Sichuan region himself—that it reminds him of home. ## CURC vs CCBR: On growth Through my time with both CCBR and CURC, a new question arose: How much weight we should place on growth versus on technical or intrinsic development? ### CURC vs CCBR: Differences in ambition CURC, to this point, infamously prided ourselves on being \"chill,\" prioritizing community and acceptance over competition performance and social media ambitions. We subsisted off the money Columbia gave us, not worrying about external sponsorships. In contrast, CCBR was far more growth oriented. There was a large emphasis in packaging our developmental journey to the outside world—through LinkedIn posts, a website, and even setting goals based on what would help us \"go viral.\" ### A comparison of problems Prestige and achievement go hand-in-hand, and in attracting \"chiller\" but less ambitious people, the incentives for rapid growth and media presence are replaced with sustainable yet less impactful achievement in the broader playing field. #### The problems with being too chill At CURC, we were more lenient with delays and kinder in our communication. Still, Columbia is a very prestige-minded place—so this relaxed vibe attracted people who were either: 1. prestige-minded and had other larger commitments 2. technical, \"anti-LinkedIn\" folk who just loved building robots I like the idea of not investing into appearances without substance—but I was starting to feel restless on our slow growth and lackluster competition performance. #### The problems with being too ambitious My friends at CCBR were much more ambitious and growth minded, which came with a set of more demanding and unforgiving expectations. - meeting for 6hrs every sat/sun to work on CAD/learning RL/the tech stack - writing LinkedIn posts and detailed GitHub README's - handwinding our own motors - being on call for late night meetings People were less forgiving here, getting annoyed if others wouldn't complete their work on time—sometimes dipping into cruelty. ### Striking the balance: A personal choice So how do you strike the balance? I think it's difficult to cannibalize an organization into becoming something which is not fundamentally aligned with the people in it. So the answer I came upon is that we look to ourselves, and what kind of pace we prefer in our daily lifestyle, and find friends / existing groups which align with your goals on a personal level."},{"id":"icra","title":"The ICRA retrospective","description":"What attending a robotics conference taught me about startups and relationship currency.","date":"2025-05-27T00:00:00.000Z","tags":["robotics","AI","startups"],"authors":["sarah"],"url":"/blog/icra","content":"## The ICRA retrospective It had been 3 weeks since we'd last caught up—Raghav and I independently ended up at two different conferences happening at the same time. - He was at a conference called \"[Mathematics of the Origin of Life and Self-Organized Complexity](https://events.uchicago.edu/event/241997-mathematics-of-the-origin-of-life-and)\" in Chicago through the Gang Lab - I was at the [International Conference on Robotics & Automation](https://2025.ieee-icra.org/) in Atlanta - through the Columbia Robotics Club (CURC) We had both returned to NYC not too long ago, so we met up at [Dun Huang](https://www.yelp.com/biz/dun-huang-upper-west-new-york-6) for our promised conference debrief. ## The state of robotics I told him that I feel more up-to-date on the current state of robotics and AI (at least on a high level). ### Robotics as artificial life Raghav told me about the cool people and intricate ways in which people were recreating life on the molecular stage. I excitedly shared that I saw a lot of biology inspired robots as well! - Moth-bots which path corrected using rubber-banded antennae to sense obstacles - Aquatic robots with fish-like mechanical structure allowing them to swim with ease ![How can dead fish swim upstream? - Quora](https://qph.cf2.quoracdn.net/main-qimg-bbce1636b22519a9ee6321ce3861d94d) Cynthia Sung from UPenn shared this GIF of a fish swimming upstream as the inspiration for her robots. This fish is dead, by the way. I also realized through the various talks on incorporating foundation models into robotics, that these large-data driven artificial intelligence models are super analogous to life as well. - Foundation models are like the DNA which humans share amongst one another. - Fine-tuning is like the lived experiences (which create outsized impacts) All of this excited me. The field itself felt almost like man's attempt to recreate (artificial) life. ### \"Robots will replace our jobs\": Good or bad? A large theme at the conference was also in that AI is not even close to reaching its societal potential. I saw applications of robotics and AI to cities and infrastrucuture: - intelligent traffic lights, AI-powered carpooling services - autonomous robotics for packing logistics, bionic suits for container unloading And that there exist many more ways in which human manual labor can be freed up and automated to become more efficient. But there are the people who fear robots replacing our jobs will be a net negative, that it will exacerbate the increasing wealth gap and leave more people homeless than before. Some of my friends have shunned me / other tech-minded people for \"chasing too much growth\" when it's not necessary. That we should be focusing on addressing poverty, inequality, and other social issues instead. #### AI is a sharper knife Personally, I don't think we should discourage technological advancement. I see technology and AI as being able to add net positive to society, provided they are accompanied with a fair way of distributing the net wealth added. Just like a sharper knife requires more care to wield, I think having more net wealth in the world would just require more need-aware socioeconomic systems to prevent harming ourselves in the process. But that in the presence of this care, the added sharpness can allow you to do so much more than before. ## Becoming startup-pilled I met some really cool people at ICRA too. ### A chance encounter with Caltech It was 11am, and my team and I had actually just landed in the ATL airport when we overheard another group of undergrad-looking kids talking about their robotic hand and the upcoming ICRA conference. They ended up being Caltech students! We exchanged contacts, bonding over the struggles of being robotics clubs that got decimated by COVID, and spent the rest of the week hanging out. - Going on a GT nuclear robotics lab tour - Watching them get crushed by a Chinese team that `git pull`'ed the winning competition code from last year - Getting KBBQ and watching our friend get assaulted by the grease smoke ### Everyone else is startup-pilled... Over the week, I learned that a lot of them were interested in founding their own startup. - Donny was the president of the Caltech Robotics Club, and he told me about his dream of wanting to \"bring manufacturing into America.\" - Alex was a Berkeley student who took a year off from school to do robotics research at Harvard. He told me that he was \"planning to drop out of school\" next semester to work on a project. - ... And I overheard them making plans to hang out at YC startup school. Rag goes, \"Why didn't you go to that?\"\\ To which I shrugged, saying I didn't even know it was happening. ### I'm sold! After seeing these smart people all interested in startups, and after having hosted [YC @ Columbia](https://events.ycombinator.com/yc-columbia) last year as well, I was sold on the premise. - I like making things and solving problems - The potential for growth excites me - The day-to-day aligns with my busy + ambitious temperament - My leadership/organizational experience at CURC is helping me prepare and find cool people to one day work with So for all these reasons, I decided then that I wanted to found my own startup. ## What now? After deciding this at the conference, I made a more concerted effort in analyzing what skills these people were honing in preparation for their startup ambitions. ### On relationship currency And honestly, what stood out to me most in these new people is how much they valued creating and maintaining their relationships. We attended a post-ICRA mixer hosted by OpenMind, where Alex knew one of the organizers. I noticed Alex made a very concerted attempt to chat him up, congratulating him on the turnout, asking friendly questions on what it was like organizing the event, setting up expectations of a continued relationship into the future. Looking back, I realized I wasn't making nearly as much conscious effort to maintain my own relationships. That if I wanted to create societal-level change, it wouldn't happen alone. #### The utility of CURC And it reaffirmed that CURC is an avenue through which I can hone these skills! - **Building and maintaining relationships** - Within the club, with other clubs, with companies - **Leadership** - Having the birds eye view on all the operations of the above - **Marketing** - The club existing in a context, finding the best parts of the club and tailoring it to the role it plays outside of it ### On solving real-world problems Hand-in-hand with building out my social network, was the equally important task of to find an interesting problem to solve... which required learning what problems even exist out there. Luckily, the conference was exposing me to different facets of the world: - manufacturing - construction - logistics - urban planning - healthcare - ... —all containing ample problems, ripe for solving. Doing some research, I tried skeleton out an understanding of the world... but I quickly got overwhelmed. I realized this journey, of understanding the world, would take more time than a glance through the Wikipedia page on the [taxonomy of industries](https://en.wikipedia.org/wiki/Outline_of_industry). I sighed in exasperation to Raghav. I lamented how frustrated I feel with not knowing anything. Hell, I didn't even know what an \"actuator\" was until this conference. Rag consoled me that no one knows anything, but that the fun is in trying.\\ That we're all trying to figure out the world together! ...so began my summer."},{"id":"procrastination","title":"On procrastination, and why \"I deserve it\"","description":"Groundbreaking revelations deserve breaks? Reflections on coding in C++, Python, ASM, and on my time in bioinformatics.","date":"2025-05-20T00:00:00.000Z","tags":["personal","research","cs"],"authors":["sarah"],"url":"/blog/procrastination","content":"## A groundbreaking revelation Today, I realized the convoluted and \"novel\" data structure I'd been trying to implement over the past few weeks was really just an adjacency list the entire time. For context, I've been writing an agglomerative hierarchical clustering algorithm from scratch using C++ for my [bioinformatics research](https://github.com/hyuncat/RichCluster). Integral to my algorithm was a vestigial data structure from the original source code, which I realized today was an adjacency list in disguise. Even though the connection is trivial in hindsight, it connected the clustering problem to graph theory and my running view of the world as being a giant layered network graph, in a way which blew my mind. ### Groundbreaking revelations deserve breaks?... After this revelation, I told myself \"I deserve a break.\" To which I caught myself—I've only been working for 10 minutes. The hell you mean I deserve a break already? Perhaps it was my brain wanting a cognitive 'reward' of the same order of magnitude as the neural connection which was just made. Or maybe I'm just burnt out. ## Reflections on C++, Python, and ASM ### C++: Bring-your-own lemma Although I do appreciate how well organized and thorough of a language C++ is, I think I've been spoiled by Python for too long. Now, coding in C++ feels like I'm trying to write a proof, while having to reprove every auxiliary theorem and lemma along the way. ### ASM: Proof-by-boolean-logic Though I suppose it could be worse. Coding in Assembly would be like writing a proof using only boolean logic. 💀 ## The computer scientist vs. bioinformaticist My brief deluge into bioinformatics has helped me come up with a joke I'd like to share. Holding skill equal, \\ if you give a computer scientist and a bioinformaticist the same problem\\ the bioinformaticist will give you an answer in 2 days;\\ the computer scientist will find a 365x more performant solution\\ but in 2 years."},{"id":"object-permanence.md","title":"The mystery of the night sky","description":"Moments of object permanence, powerlessness, and love.","date":"2025-04-22T00:00:00.000Z","tags":["personal"],"authors":["sarah"],"url":"/blog/object-permanence.md","content":"### A monthly malaise At the start of each month, I get these annoying bouts of malaise, perhaps due to the personal reflections which the start of each month incites, where I get really melancholic. ### On object permanence Way back in January, I told Raghav that I struggled with this concept of object permanence over winter break. It describes how I forget how much my friends care for me when they're away, similar to the child that cries when their parents cover their eyes before the peek-a-boo. How I can feel so lonely after spending just a day without them. ## A chance party ### For dutiful bartending exam preparation I was in the thick of one of these monthly malaises, and on my way to the library, when I fortuitously ran into Lucas and Dan McKeen walking by. They were on their way to buy groceries for Lucas's party, which he was throwing in preparation for his bartending exam. I didn't check the office Slack, so I didn't realize this was even going on. Though I had a late PSET to finish, I decided on a whim to join them. It was a fun party; there were cocktails, cheese, and crackers; I DJ'ed the jazz music to recreate the exam vibe; Dan Redeker and I made fun of our friend Will for setting timers instead of alarms. I also talked to Raghav for the first time in two weeks—he'd been ignoring my messages, to which he apologized, saying he was going through a nihilist penguin moment. ## A conversation with Raghav Raghav and I left the party together, walking back to our respective houses. It was raining hard that night, and we talked about what we'd been going through in our lives. ### Friendship, the struggle for object permanence I told him about how I had been struggling with a friendship which I had been putting an outsized and unreciprocated amount of effort into, grappling with the feelings of sadness which accompanied it. He shared his own struggles, bringing up how he too had recently been thinking about the object permanence idea I mentioned, all that time ago. He remarked jokingly that \"the teacher has become the student.\" ### Powerlessness, despair I kept thinking about why I was still struggling with object permanence even after all this time. Through our conversation, I realized it was because of how insecure I was in my powerlessness. - Because there exist relationships where despite believing due to XYZ factors my effort is or should be reciprocated, it isn't. - Because there exist relationships where I can put in infinite effort, yet due to circumstances beyond my control, they don't pan out as I hope. I realized that this powerlessness—my inability to guarantee the longevity of my relationships—is what made me despair. That I can never fully enjoy what I have in fear of always losing it. ### A poem on how much you are loved In response, Raghav recited a poem back to me: One on how it's tragic that people don't realize how much they are loved. That you don't know if your smile walking down the street made it possible for someone else to walk the next few blocks; or how people at the office miss you when you're gone. I questioned whether the poem is always truly applicable, because what if someone really isn't loved by people like that. But he clarified he likes the poem because he feels that way about the world; because he knows and loves so many cool people, and how he often forgets to tell them how cool they are. Including me. How even yesterday, he was working in the Butler Library main room, hoping I would be there. ### Memories of love His words warmed my heart. I thought about all of my memories of Raghav, Dan, and the rest of the lab. - How Raghav bought me bandaids because he threw a snowball a little too hard, accidentally scratching my face. - How Dan bought me $40 worth of food while I was sick, told me he spent only ten, then blocked me on Venmo after sending me back 30 of what I paid him. - Even that stupid Shake Shack coloring page. Recalling these, I realized maybe the antidote to my malaise were these small moments of love: A collection of memories to draw from when I'm feeling lonely, to remind me of how happy I am to be able to spend time with these people. ## The mystery of the night sky I thought about that conversation with Raghav for a long time, and I texted him my conclusions, which I'd like to leave here as well. “I decided that just like how releasing ourselves from the burden of perfection allows us to forgive ourselves and live more freely, the world is too complicated to have such simple cause and effect chains. That maybe if we stop expecting our schemas of meaning or morality to perfectly explain the world, then we can be happy in the slow process of unraveling its mystery. And today I thought of the night sky you showed me how to appreciate. How it’s vast beyond our comprehension yet so beautifully spattered with stars. I think I can view life as something like that.”"},{"id":"moses-painting","title":"How MOSES paints with symmetries","description":"A greedy algorithm for creating self-assembling materials applying the group theoretic notion of symmetry onto lattices.","date":"2025-04-15T00:00:00.000Z","tags":["cs","algorithm","research"],"authors":["sarah"],"url":"/blog/moses-painting","content":"import PostImage from '@/components/PostImage.astro' import img1 from './img1.jpeg' import img2 from './img2.jpeg' import img4 from './img4.jpeg' import img5 from './img5.jpeg' import img6 from './img6.jpeg' import img7 from './img7.jpeg' import img8 from './img8.jpeg' import img9 from './img9.jpeg' import img10 from './img10.jpeg' import img11 from './img11.jpeg' import img12 from './img12.jpeg' import img14 from './img14.jpeg' import img15 from './img15.jpeg' ## Gang lab: Self assembling materials The Gang lab is a materials science lab focused on the fascinating problem of self assembling materials. Our fundamental building block is the DNA origami - octahedral wireframes (voxels), loaded with nanoparticle cargo, which self assemble via the unique strands of DNA connecting them together (bonds). Millions of these babies come together in an annealing machine, enabling us to form these organized, customizable crystal structures. My role has been to work on the formalization + continuation of MOSES (Mapping Of Structurally Encoded aSsemblies): An algorithm for deducing a coloring scheme for these bonds which reduces the number of unique origami while still retaining the essential particle structure of the lattice. We bookended this project this semester, culminating in our paper being published to ACS nano and even being featured on the front cover! Now, my project is extend the MOSES algorithm to more complicated / non-octahedral designs. To that end, I wanted to boil down the essential guts of the current algorithm — so in this blog post, I want to continue from where I left off last time; explaining the intuition behind the algorithm behind how exactly MOSES designs these DNA origami building blocks. ## Our self assembly problem ### Lattice: The pattern Stepping back into 2D again, imagine you wanted to assemble the following beautiful lattice pattern: Which tiles out like this for infinity. ### Voxels: The building blocks But, this pattern needs to self assemble. Moreover, all we have control over is the design of each voxel - namely, in the specificity (abstracted as 'color') of the bonds attached to a given voxel in the $\\pm x, \\pm y$ directions. - Recall: green+ only binds with green-, red+ only binds with red-, etc. - Let's define an **origami** to be the combination of both a voxel + its four bonds So, how would we 'color' the vertices of each voxel in the lattice so that we create our desired pattern? ### A bad coloring job For example, this coloring from my previous post would NOT give us the structure we wanted. ## The MOSES algorithm ### The idea The idea underpinning the MOSES algorithm is to reduce the number of colors based on the **symmetries** between different voxels in the lattice. Where two voxels $v_{1}, v_{2}$ are defined to be 'symmetric' if there exists a rotation which can transform their surroundings so that they look the same ## The problem: revisited ### The lattice setup We can model the symmetries of our lattice as a group $G$ acting on a set, our lattice $\\mathcal{S}$. Where the group $G$ is the set of rotations which take the $\\mathbb{Z}^2$ lattice to itself (which are the same as the group of rotations on a square): $$ G = \\{0 ^{\\circ}, 90 ^{\\circ}, 180 ^{\\circ}, 270 ^{\\circ}\\} $$ And the set is the infinite tiling lattice: $$ \\mathcal{S}= \\left\\{ (x, y) | x,y \\in \\mathbb{Z} \\right\\} $$ And returning to our goal pattern: We can model the different particle locations as a function $C:\\mathcal{S}\\to \\mathbb{N}$ atop the lattice which maps points to 'colors', where $1$ is the blue particle, $0$ is the empty. Say we choose the following function. $$ C(x, y)= \\begin{cases} 1, \\quad x \\% 3 = 0 \\\\ 0, \\quad \\text{else} \\end{cases} $$ ### The minimum design To simplify things, lets reduce this to a smaller subset which could be copy-pasted infinitely to form our desired structure. Let's call it our minimum design. Now, since all we care about is designing a unique set of voxels — within here, what voxels can we reuse? ## Symmetry through voxel surroundings Revisting the idea of symmetry, we deviate a little from the standard definition of lattice symmetry and consider the point symmetry of any given point (voxel) in $\\mathcal{S}$ compared to the other voxels. The idea is, that if the lattice looks the same around some $v_{i}$ as it does around $v_{j}$, then we can say $v_{i} \\equiv v_{j}$. ### Reducing the $O(\\infty)$ endeavor However, making all comparisons of a $\\mathbb{Z}^2$ lattice would take infinite time. But it suffices to take each voxel in this design as the center of its own 'unit cell', encapsulating all the information of the global lattice. Calling these the 'voxel surroundings', we can enumerate the different symmetries of each voxel with respect to each other without having to compute the transformations on the entire lattice. Since we know what the environment of each voxel should be, we compute the symmetry between $v_{1}, v_{2}$ via the following method: 1. Tile out the surroundings centered around $v_{1}$ 2. Rotate $v_{1}$'s surroundings with the rotation $r$ to check 3. Overlay $v_{1}$ surroundings on top of $v_{2}$'s surroundings and see if they are the same If two voxels have some symmetry $r$ between them, then what this means for self assembly is that if $v_{1}$ rotates via $r$, then it would also be able to safely slot into $v_{2}$'s position in the lattice. ### Example: Symmetry($v_{1}, v_{4}$) For example, $v_{1}$ and $v_{4}$ in our design have $180 ^{\\circ}$ symmetry, as illustrated by the following: ### Formalizing voxel symmetry: Groups, actions, and orbits Formally, we can define a function $F:\\mathcal{S}\\to\\mathcal{S}$ taking the voxel's coordinates in the original infinite lattice to its voxel surroundings. It would translate the voxel $\\vec{x}$ to be in the center of a new square of its surroundings, big enough to encapsulate all the information of the original lattice under all rotations: $$ \\begin{align} F(\\vec{x}) = \\{ (x,y) \\in \\mathcal{S} | x \\in [-m, m], y \\in [-m, m] \\} \\end{align} $$ Where $m$ is the maximum length of the minimum design - in our case, $3$. Moreover, we can compare the colorings of $F$ by defining following action: $$ G \\circlearrowright F(\\mathcal{S}), \\quad \\text{with }g \\cdot F(s) = F(g^{-1} \\cdot s) $$ This way, we can define the symmetry groups of specific voxels within the lattice via the **orbits** of this action, where voxels are all prescribed to certain equivalence classes based on whether they can transform into each other with some rotation. For our example, we get the following equivalence classes: $$ \\begin{align} [v_{1}] &= \\{ v_{1}, v_{4} \\} \\\\ [v_{2}] &= \\{ v_{2}, v_{3}, v_{5}, v_{6} \\} \\end{align} $$ Awesome, so how does this inform our final coloring? ## Coloring with equivalences We have the notion that voxels in $[v_{1}]$ can look the same, and voxels in $[v_{2}]$ can look the same, so long as they are rotated with respect to the transformation which put them in the equivalence class in the first place. ### Our first color We know for sure that $v_{1}$ and $v_{2}$ have to be different, and that there should be a unique color connecting those two. So let's paint a red bond connecting $v_{1}$ and $v_{2}$. Again note that $r+$ and $r-$ are different, but complementary strands of DNA. Now, we know that $v_{1}$ has a $180 ^{\\circ}$ self-symmetry with itself. Likewise, it has translational and $180 ^{\\circ}$ symmetry with $v_{4}$. So we **map** those colors onto the rest of the equivalence class, with the understanding that we could technically swap out the locations of any , rotate it with its symmetry, and the surrounding lattice will remain unaffected. And if they are painted that color, their partner must have the color of the opposite complementarity on its connecting vertex. so we paint those too. We end up with a partially-colored lattice. ### Our second color: A 'complementary' bond in some cases, this structural painting + equivalence class mapping is enough to paint the entire lattice. But in our example, we are not done painting. We have to add in another color because if we reused red, we would end up with the scenario illustrated in the \"A bad coloring job\" section. So we need to add in another color, say green, connecting $v_{1}$ and $v_{4}$ together. But now, $v_{1}$ and $v_{4}$ are no longer interchangeable in the system - they are completely different building blocks. Again, we try to use the self-symmetries to reuse this green color as much as we can. However, one of the binding rules determined by our experimentalists was that we cannot allow for \"palindromes\", where we have a color and its complement on the same voxel. Hence, we cannot just apply the same kind of translational mapping that we did with the red bond. Instead, we map the voxel to itself with its $180 ^{\\circ}$ self symmetry as such. Now we have 3 distinct voxel types, in the wake of having broken $[v_{1}]$ into two new sub-classes, forced into existence by the double sided nature of DNA. $$ \\begin{align} [v_{1}] &= \\{ v_{1}, v_{4} \\} \\\\ \\implies [v_{1}]^+ = &\\{ v_{1} \\}, \\quad [v_{1}]^-= \\{ v_{4} \\} \\end{align} $$ ### Our third color We can paint our third color in a similar fashion Again breaking the equivalence class further: $$ \\begin{align} [v_{2}] &= \\{ v_{2}, v_{3}, v_{5}, v_{6} \\} \\\\ \\implies [v_{2}]^+ = &\\{ v_{2}, v_{5}, v_{6} \\}, \\quad [v_{2}]^-= \\{ v_{3} \\} \\end{align} $$ **Note:** We don't technically know yet which sub-equivalence class $v_{5},v_{6}$ belong in, but we can assume they are in the parent one until forced out of it. For this reason we also hold off on mapping the orange onto them until we know for sure which sub-class they belong to. ### Our fourth color Unfortunately, since $v_{2}$ does not have $90 ^{\\circ}$ or $270 ^{\\circ}$ self-symmetry, we must draw a fourth color from our palette to connect them. Again, we have a breaking of the equivalence classes happening. But maybe, we can reuse the $[v_{2}]^-$ to avoid adding in a *third* subclass? Hence, we get: $$ [v_{2}]^+ = \\{ v_{2}, v_{6} \\}, \\quad [v_{2}]^-= \\{ v_{3}, v_{5} \\} $$ Since we have $v_{3}\\in [v_{2}]^-$ as well with the orange color information, let's reuse that for $v_{5}$ as well, alongside updating $v_{3}$ with the yellow information. ![[img13 1.jpeg|300]] ### The last color Now, we only need one more color to finish this! And indeed, we end up with 4 unique origami: $$ \\begin{align} [v_{1}]^+ &= \\{ v_{1} \\}\\\\ [v_{1}]^- &= \\{ v_{2} \\}\\\\ [v_{2}]^+ &= \\{ v_{2}, v_{6} \\}\\\\ [v_{2}]^- &= \\{ v_{3}, v_{5} \\} \\end{align} $$ Which create a minimum set of building blocks which can self assemble into our desired infinite tiling structure!"},{"id":"thm-libraries","title":"Theorems are like libraries","description":"A poem on modularity in CS and math.","date":"2025-03-25T00:00:00.000Z","tags":["math","cs","poem","stupid"],"authors":["sarah"],"url":"/blog/thm-libraries","content":"### Theorems are like libraries Theorems are like libraries,\\ propositions are its functions,\\ lemmas are the private methods,\\ and algorithms are huge proofs."},{"id":"vectors-vertical","title":"Why are vectors vertical?","description":"Unraveling the not-so-secret not-so-conspiracy behind writing vectors vertically.","date":"2025-03-24T00:00:00.000Z","tags":["math","personal"],"authors":["sarah"],"url":"/blog/vectors-vertical","content":"My math professors in college would often intimidate us into writing vectors as vertical, transposing them when convenient, without explaining why. This always confused me, but I realized that rather than being some Big-V conspiracy, they never explained it because there was a very obvious reason why. ### An illuminating example For example, take some transformation (ie, a matrix) $\\mathbf{A}$ and a vector $\\vec{x}$ on which it acts on. Note that we format this function $\\mathbf{A}$ as the `hstack` (horizontal-stack) of its vertical basis vectors in the transformed space. For now, suppose this is a good idea. Then we can write $$ \\mathbf{A} \\vec{x} = \\begin{bmatrix} u_1 & v_1 & w_1 \\\\ u_2 & v_2 & w_2 \\\\ u_3 & v_3 & w_3 \\end{bmatrix} \\begin{bmatrix} x \\\\ y \\\\ z \\end{bmatrix} $$ to denote our equation. ### Why are basis vectors of a matrix vertical? Now the reason why we chose to format $\\mathbf{A}$'s basis vectors along its columns becomes clear. Now when we multiply it out, we get - the $x$'s always multiplying with the $u_i$ components, - $y$'s always multiplying with $v_i$ components, - and $z$'s always multiplying with $w_i$ component. So the purpose of aligning the matrix along the columns $$\\begin{bmatrix}\\vec u & \\vec v & \\vec w \\end{bmatrix} \\quad \\text{ and not like } \\quad \\begin{bmatrix} \\vec u \\\\ \\vec v \\\\ \\vec w \\end{bmatrix}$$ is so that the equation $\\textbf{A} \\vec x$ is written in an order analogous to $f(x)$ from vanilla function notation. **Remark:** We could order the matrix along the rows if we started using row vectors as well. Then the order would be $\\vec x \\textbf{A}$. But this looks a little weirder, right?"},{"id":"groups","title":"Thaddeus's introduction to groups","description":"The group, its properties, and some \"funny\" proofs.","date":"2025-03-22T00:00:00.000Z","tags":["math","abstract-algebra"],"authors":["sarah"],"url":"/blog/groups","content":"I'm currently taking an abstract algebra course, taught by the brilliant but quirky Michael Thaddeus. On the first day of class, he told us that this would be a course primarily about groups, but that they would be like \"the protagonist of a novel who doesn't appear until the fifth chapter.\" I.e., that we had a lot of foundational material to cover—on sets, functions, number theory—before we were well-equipped to talk about groups. We had our first lecture on groups a few weeks ago. To help with my own review, and so that I can capture some of Thaddeus's quips, this is a brief writeup on the fundamentals of what a group is. ## Groups To start, how do we define a group? ### Def I: The group A **group** is a set $G$ equipped with a *binary operation* (2 args, 1 val) $M:G\\times G \\to G$, denoted $M(g,h)=:g\\cdot h$ Satisfying the following properties: (1) Associative $$ \\begin{align} & \\forall g,h,k \\in G, \\\\ & g \\cdot (h \\cdot k) = (g \\cdot h) \\cdot k \\end{align} $$ (2) Identity exists $$ \\begin{align} &\\exists e \\in G \\text{ st. } \\forall g \\in G, \\\\ &e \\cdot g = g \\cdot e = g \\end{align} $$ (3) All inverses exist $$ \\begin{align} & \\forall g \\in G, \\exists h \\in G \\text{ st. } \\\\ & g \\cdot h = h \\cdot g = e \\end{align} $$ ### Def II: The abelian group **Abelian groups** on the other hand are commutative with respect to their operation! Eg, $\\forall g,h \\in G$, $$ g \\cdot h = h \\cdot g $$ #### Non-abelian groups are lowkey rare In fact, a lot of the most straightforward groups are abelian, like the integers with addition, and the rationals with multiplication. - $(\\mathbb{Z}, +)$ - $\\mathbb{Q}^X := (\\mathbb{Q}\\setminus \\{0\\}, \\cdot)$ We learned these were commutative back when we were first taught addition and multiplication in the first place. In contrast, a non-abelian example would be like the matrices under matrix multiplication. - $(M_{n\\times n}, \\cdot)$ ### Thm: Product groups A **product group** is the cartesian product of two groups, which by theorem, is also a group. If $G,H$ are both groups, then so is $G \\times H$ equipped with the operation $$ (g_{1},h_{1}) \\cdot (g_{2}, h_{2}) = (g_{1}\\cdot g_{2}, h_{1} \\cdot h_{2}) $$ (Which smelled like the underpinnings of vector spaces) ## Properties of groups Now that we've defined the group, we can prove a very basic set of properties about them. ### Prop I: Cancellation We can 'cancel' group elements similar to normal cancellation in arithmetic. $$ \\begin{align} & gk=hk \\quad \\text{ or } \\quad kg=kh \\\\ \\implies & g=h \\quad \\text{ ('canceling' the k)} \\end{align} $$ ### Prop II: Uniqueness of identity As a wise man (Michael Thaddeus) once said, \"Just like a man cannot serve two masters, a group cannot have 2 identity elements.\" Ie, if $f \\in G$ is also an identity element, then $f=e$. #### A funny proof Our professor said that the proof of the above property was \"funny\". $$ f = ef = e $$ Since $f$ is an identity, anything times $f$ should be itself. Ditto for $e$, so multiply them together and we get $f=ef=e$. ### Prop III: Uniqueness of inverses Each element in a group has a unique inverse. $$ \\begin{align} & \\forall g \\in G, \\text{ if }h_{1} \\text{ and } h_{2} \\text{ are both inverses of }g, \\\\ & \\implies h_{1}=h_{2} \\end{align} $$ #### Another funny proof: This was the second in his list of funny proofs for the day. $$ h_{1} = h_{1}e = h_{1}(gh_{2}) = (h_{1}g)h_{2}=eh_{2}=h_{2} $$ After which, he told us to \"go home if you don't get the joke. Go home and meditate.\""},{"id":"yin","title":"A comprehensive look into the YIN algorithm","description":"How can we determine the pitch of a possibly complicated 2D audio signal at any time?","date":"2025-03-22T00:00:00.000Z","tags":["algorithms","audio-processing","music"],"authors":["sarah"],"url":"/blog/yin","content":"import PostImage from '@/components/PostImage.astro' import img1 from './img1.png' import img2 from './img2.png' import img3 from './img3.png' import img4 from './img4.png' import img5 from './img5.png' import img6 from './img6.png' For my Numerical Methods course last semester, we had to create a final project on a computational project of some interest to us. We were given the entire last two months of class to work on this project, but me being as brilliant as I am decided on my topic + started working on it 3 days before the submission deadline. Given my time constraints, I decided to write about an algorithm I was already intimately familiar with through my research with Dennis - the YIN algorithm for pitch detection. I was proud of how it came out, so I wanted to post it here as well. Here is the project, ripped straight from `yin.ipynb` with minor edits. You can view the project on [GitHub](https://github.com/hyuncat/YIN-algorithm) as well. ## Abstract The ability to detect pitch in complex audio signals is a fundamental problem in signal processing, with applications ranging from music analysis to speech recognition. While human perception intuitively identifies pitch even in harmonically rich or noisy signals, translating this process into computational algorithms remains a challenge. This project explores the **YIN algorithm**, a widely cited pitch detection method, which combines autocorrelation with cumulative mean normalization to accurately extract periodicity from audio waveforms. To test the algorithm's performance, a synthetic audio signal with realistic harmonic overtones was generated to closely mimic the complexity of musical instrument sounds. I extended the autocorrelation function to use FFT for faster computation. The implementation successfully estimated the fundamental frequency with high precision, producing a result of $440$ Hz for a signal with an expected pitch of $440$ Hz. This outcome demonstrates the effectiveness of the YIN algorithm in detecting pitch from non-trivial waveforms. Through this project, I strengthened my understanding of the mathematical/computational foundations of autocorrelation-based pitch detection. ## Introduction ### A very abridged physics of sound When we listen to pitched sound, the 'pitch' of what we are hearing is often described in terms of frequency. This is because the way our ears perceive sound is through hearing the intensity (amplitude) and frequency at which the sound (a pressure wave) is hitting our eardrums. The simplest example is a pure sine wave, which we can easily manipulate the frequency of to produce different pitches. However, these pure waves often sound 'harsh' and obviously synthetic. This is because in real life, and for most musical instruments, the actual generated wave is quite complex and consists of multiple waves interacting con/de-structively with each other to smoothen out the sound. And audio waves with no distinct noticable periodicity are often perceived not as pitched, but as 'noise'. This is again due to the lack of some distinct patterning frequency which our ears can attune to. ### Pitch detection algorithms The goal of pitch detection algorithms is to parse together the often complex frequency waveforms to find the repeating unit of pitch which corresponds to the 'pitch'. Since humans have an innate subjective sense of pitch and for parsing out these complex waves in our own ears, we want the algorithm to also determine the pitch and recreate the processes happening in our brains, computationally. My following project hopes to explore one of the most ubiquitously cited pitch detection algorithms - the YIN algorithm, and how it navigates the challenges of extracting periodicity from complex audio signals. ### Equations The specifics of each computational method used are included in markdown in the Implementation section. However for reference, I am using the following equations: (1) Autocorrelation - The basis for time-based signal processing $$r_t(\\tau) = \\sum^{t+W-\\tau}_{j=t+1}x_j x_{j+\\tau}$$ (2) Wiener-Khinchin theorem - Faster autocorrelation with FFT $$r_t(\\tau) = \\mathcal{F}^{-1}(x) \\left ( \\left | \\mathcal{F}(x) \\right |^2 \\right )$$ (3) Difference function - Variant of autocorrelation $$d_t(\\tau) = \\sum^{t+W}_{j=t+1} (x_j - x_{j+T})^2$$ (4) Cumulative Mean-Normalized Difference Function (CMNDF) - Variant of difference function, for peak-picking $$ d_t'(\\tau) = \\begin{cases} 1, & \\text{if } \\tau = 0, \\\\ \\frac{d_t(\\tau)}{\\left[\\frac{1}{\\tau} \\sum\\limits_{j=1}^{\\tau} d_t(j)\\right]}, & \\text{otherwise}. \\end{cases} $$ (5) Parabolic interpolation - To refine final pitch estimates $$f(x) = Ax^2 + Bx + C$$ Equations 1, 3, 4 are from the YIN paper [1]. I explain my rationale for why each of these equations is significant to the final pitch detection algorithm more in-depth in the Implementation section. ### Create synthetic audio Here, you can either load in your audio file of choice (place in the same directory), or run it with the testing synthetic audio. Since the algorithm is intended for use on musical instruments, it is useful to consider those waveforms which display the same harmonic overtone qualities as certain actual musical signals. For example, stringed instruments have a harmonic series where the fundamental frequency is present in the waveform but in increasingly higher frequency multiples of the base frequency, and at lower amplitudes. This sometimes causes issues in pitch detection, as we will see later, but the YIN algorithm was designed with musical pitch detection in mind and has a couple measures baked in to help mitigate the influence of signal messiness. ```python # alternative! load in your desired audio with librosa # signal, SAMPLE_RATE = librosa.load('violin.mp3', sr=None) # basic parameters SAMPLE_RATE = 44100 # sampling rate FRAME_SIZE = 4096 # synthetic audio generation def create_signal(f0: float, duration: float): \"\"\" Create a synthetic audio signal given a desired fundamental frequency and a duration. Simulates (poorly) the harmonic overtone series found in stringed instruments. Args: f0: The fundamental frequency to generate duration: How long the pitch should last \"\"\" f0 = 440.0 # fundamental frequency (A4) duration = 2.0 # sec t = np.linspace(0, duration, int(SAMPLE_RATE * duration), endpoint=False) # create harmonic series harmonics = [1, 2, 3, 4, 5, 6, 7] amplitudes = [1.0, 0.8, 0.6, 0.45, 0.2, 0.1, 0.05] # each harmonic with decaying amplitude signal = np.zeros_like(t) for harmonic, amplitude in zip(harmonics, amplitudes): signal += amplitude * np.sin(2 * np.pi * harmonic * f0 * t) # add some noise noise = 0.02 * np.random.randn(len(t)) # Small random noise signal += noise # envelope parameters (sec) attack_time = 0.1 decay_time = 0.3 release_time = 0.5 sustain_level = 0.7 attack = np.linspace(0, 1, int(SAMPLE_RATE * attack_time)) decay = np.linspace(1, sustain_level, int(SAMPLE_RATE * decay_time)) sustain = np.ones(int(SAMPLE_RATE * (duration - attack_time - decay_time - release_time))) * sustain_level release = np.linspace(sustain_level, 0, int(SAMPLE_RATE * release_time)) # concatenate the envelope parts envelope = np.concatenate([attack, decay, sustain, release]) # adjust envelope length to match signal length if len(envelope) len(signal): envelope = envelope[: len(signal)] # Trim if too long # apply the envelope signal *= envelope signal /= np.max(np.abs(signal)) # normalize return signal ``` ```python signal = create_signal(440, 2) start_idx = FRAME_SIZE end_idx = start_idx + FRAME_SIZE audio_frame = signal[start_idx:end_idx] # Plot the signal plt.figure(figsize=(9, 3)) plt.plot(audio_frame) plt.title(\"Simulated 440.0 Hz (A4) Audio\") plt.xlabel(\"Samples\") plt.ylabel(\"Amplitude\") plt.grid() plt.show() ipd.Audio(signal, rate=SAMPLE_RATE) ``` # Pitch Detection: Autocorrelation **Autocorrelation**-based methods represent one of the most popular categories of pitch detection algorithms, and is also the method which underlies the YIN algorithm. It tries to analyze the audio signal within the *time domain* by detecting how similar the signal is to a shifted version to itself. ### Problem statement We have some audio signal $x$, represented as a numpy array of samples, where each sample contains a quantized representation of the pressure of the physical audio wave at the given time of 'sampling'. **Basic idea:** We want to estimate the fundamental frequency $F_0$ for a given frame of audio data by comparing how different the original signal is to a signal shifted over by some lag. The specific lag which minimizes this difference, we call the fundamental period, which is equivalent to $1 / F_0$. ## Autocorrelation We define the autocorrelation function $r_t(\\tau)$ as a function of some $\\tau$, which is a duration (in samples) of how much to x-shift each point in the curve by. The goal of this function is to identify those periods under which the function most resembles itself. The function multiplies each new pair of x's together (where $x_j$ represents the audio signal value at the $j$ th sample), so higher values represent a value of $\\tau$ under which the curve looks more like itself. $$r_t(\\tau) = \\sum^{t+W}_{j=t+1}x_j x_{j+\\tau}$$ Equation from the YIN paper [1] In the code, we use a slightly modified definition from the YIN paper [1] which defines a second slightly different definition which allows the integration window size to shrink with increasing values of $\\tau$. $$r_t(\\tau) = \\sum^{t+W-\\tau}_{j=t+1}x_j x_{j+\\tau}$$ This makes it so that larger $\\tau$ values are weighted slightly less, under the assumption that the true fundamental frequency is closer to the origin point. ### FFT-enabled autocorrelation with Wiener-Khinchin The **Wiener-Khinchin theorem** enables us to compute the autocorrelation much faster. We can rewrite the audio signal 'array' $x$ as a function $x(t)$ where $t$ is the index of the sample in the array. Then we can rewrite the autocorrelation function as an integral on this function $x(t)$ as such: $$r_t(\\tau) = \\int^{\\infty}_{\\infty} \\bar{x}(\\tau)x(t+\\tau) d\\tau$$ where $\\bar{x}(\\tau)$ is the complex conjugate of $x$. A short proof of the theorem can be found at [[2](https://mathworld.wolfram.com/Wiener-KhinchinTheorem.html)], but the result that we are using for this autocorrelation implementation is the ability to compute the autocorrelation not by iterating through all possible samples for all possible frames and multiplying each sample pointwise, but rather it allows us to use the fast fourier transform which runs in $O(N \\log n)$ time per frame, whereas the other method would be $O(N^2)$ per frame. It suffices to compute: $$r_t(\\tau) = \\mathcal{F}^{-1}(x) \\left ( \\left | \\mathcal{F}(x) \\right |^2 \\right )$$ where $\\mathcal{F}(x)$ is the fourier transform of the audio signal. Note that $\\mathcal{F}(x)^2$ is also how we define the power spectrum of the signal, which shows how much each individual frequency component is contributing to the audio waveform. ```python # define autocorrelation function def autocorrelation_fft(audio_frame: np.ndarray, tau_max: int) -> tuple[np.ndarray, np.ndarray, np.ndarray]: \"\"\" Fast autocorrelation function using Wiener-Khinchin theorem, which computes autocorrelation as the inverse FFT of the signal's power spectrum. Args: audio_frame: The current frame of audio samples in Yin algorithm tau_max: Check for all time lags up to this value for in autocorrelatioin Returns: autocorrelation: The similarity curve power_spec: The power spectrum of the frame amplitudes: Amplitudes of the frame \"\"\" w = audio_frame.size tau_max = min(tau_max, w) # ensure tau_max is within the window size # Zero-pad the audio signal array by the minimum power of 2 which # is larger than the window size + tau_max. # (circular instead of linear convolution, avoids errors) min_fft_size = w + tau_max # (pad by >tau_max for frame end) p2 = (min_fft_size // 32).bit_length() fft_sizes = (16, 18, 20, 24, 25, 27, 30, 32) size_pad = min(size * (2 ** p2) for size in fft_sizes if size * 2 ** p2 >= min_fft_size) # -- Wiener-Khinchin Autocorrelation -- # take FFT to decompose signal into its frequency components fft_frame = np.fft.rfft(audio_frame, size_pad) power_spectrum = fft_frame * fft_frame.conjugate() autocorrelation = np.fft.irfft(power_spectrum)[:tau_max] amplitudes = np.abs(fft_frame) # only return valid overlapping values up to window_size-tau_max # (type II autocorrelation from jasa 2002) return autocorrelation[:w-tau_max], power_spectrum, amplitudes ``` ### Autocorrelation acts frame-by-frame The autocorrelation function acts on the audio signal, and is often applied on a frame-by-frame basis. We define a frame as some window of samples, small enough so that the pitch remains relatively constant within this window, but large enough to capture the true fundamental period of the audio. Hence we say that we apply autocorrelation over a small window of samples where inside, the pitch does not change much. Then we can iterate through all frames in the audio signal in order to see how the pitch evolves over time. In this notebook, I will show how the algorithm can act upon a single frame, but it can be, and often is, easily extended to compute the pitch across multiple frames on longer segments of audio as well. ```python # define a minimum frequency to avoid picking up on noise MIN_VIOLIN_FREQ = 196.0 # let's just use this becuase i like the violin tau_max = int(SAMPLE_RATE/MIN_VIOLIN_FREQ) print(f\"Computing pitches with tau_max {tau_max}\") # call autocorrelation function autocorr, power_spec, amplitudes = autocorrelation_fft(audio_frame, tau_max) # plot the curves 🏔️ 🏔️ fig, axs = plt.subplots(4, 1, figsize=(12, 8)) axs[0].plot(audio_frame) axs[0].set_title('Audio frame') axs[0].set_xlabel('Samples') axs[0].set_ylabel('Amplitude') axs[1].plot(autocorr) axs[1].set_title('Autocorrelation') axs[1].set_xlabel('$\\\\tau$ Lag (Samples)') axs[1].set_ylabel('Autocorrelation') axs[2].plot(power_spec) axs[2].set_title('Power Spectrum') axs[2].set_xlabel('Frequency (Hz)') axs[2].set_ylabel('Power') axs[3].plot(amplitudes) axs[3].set_title('Amplitudes') axs[3].set_xlabel('Frequency (Hz)') axs[3].set_ylabel('Amplitude') fig.tight_layout() plt.show() ipd.Audio(audio_frame, rate=SAMPLE_RATE) ``` ## YIN's CMNDF YIN's unique contribution to autocorrelation-based pitch detection methods is its **cumulative mean-normalized difference function** (CMNDF). We will first define the raw difference function, then see how YIN modifies it, then see how we use the curve to detect periodicity in the audio signal. ### Background: The difference function If we assume that the signal is periodic with some period $T$, we can construct an equality which we can solve to form a 'difference function' which is able to be minimized to find the period (or 'lag' in autocorrelation terms) under which the signal most closely resembles itself. We can model a periodic signal $x$ with period $T$ to be by definition invariant when we shift it by that period: $$x_t - x_{t+T} = 0 \\quad \\forall t$$ Which can be rewritten to still equal $0$ after squaring the result and summing the result over a window of different $t$ values. We use this fact to construct the following definition of the difference function $d_t(\\tau)$, and search for values of $\\tau$ which minimize this difference. $$d_t(\\tau) = \\sum^{t+W}_{j=t+1} (x_j - x_{j+T})^2$$ Expanding, the RHS and substituting our definition of the autocorrelation function $r_t(\\tau)$, we get the following equation for constructing the difference function: $$ \\begin{align*} d_t(\\tau)&= \\sum^{t+W}_{j=t+1} x_j x_j - x_j x_{j+\\tau} - 2x_j x_{j+\\tau} \\\\ &=r_t(0)+r_{t+\\tau}(0)-2r_t(\\tau) \\end{align*} $$ ```python def difference_function(audio_frame: np.ndarray, tau_max: int): \"\"\" Compute the raw difference function for the YIN algorithm without assuming constant energy. Args: audio_frame: The current frame of audio samples. tau_max: The maximum lag to compute up to. Returns: diff_fct: The difference function values for lags 0 to tau_max. power_spec: The power spectrum of the audio frame. amplitudes: Amplitudes of the frame. \"\"\" x = np.array(audio_frame, dtype=np.float64) # Ensure float64 precision w = x.size tau_max = min(tau_max, w) # Ensure tau_max is within the window size # compute fast autocorrelation using FFT autocorr, power_spec, amplitudes = autocorrelation_fft(x, tau_max) # compute the energy (r_t(0) and r_{t+\\tau}(0)) for each lag r_0 = np.sum(x**2) energy = np.full(autocorr.shape, r_0) diff_fct = energy[0] + energy - 2 * autocorr diff_fct[0] = 0 return diff_fct, power_spec, amplitudes diff_fct, power_spec, amplitudes = difference_function(audio_frame, tau_max) fig = plt.figure(figsize=(6,2)) axs = fig.add_subplot(1, 1, 1) axs.plot(diff_fct) axs.set_title(\"Difference function\") axs.set_xlabel(\"Lag (samples)\") axs.set_ylabel(\"$d_t(\\\\tau)$\") plt.show() ``` # Trough-picking Recall that the fundamental period ($1/f_0$) corresponds to the point in which this difference function is minimized. Thus we would want to pick out some minima ('troughs') within the above curve. But how do we choose which trough to call the fundamental period? ## Step 1: Cumulative mean normalization The solution to this problem has multiple parts, but the first step is to modify the autocorrelation curve itself to bias against choosing lags near the beginning, and normalizing the range of the function. The way the original YIN algorithm does this is through **cumulative mean normalization**. This is where we finally construct the CMNDF, which is given by the following equation (and as equation 8 in [1]): $$ d_t'(\\tau) = \\begin{cases} 1, & \\text{if } \\tau = 0, \\\\ \\frac{d_t(\\tau)}{\\left[\\frac{1}{\\tau} \\sum\\limits_{j=1}^{\\tau} d_t(j)\\right]}, & \\text{otherwise}. \\end{cases} $$ The idea is to normalize each $d_t(\\tau)$, $\\forall \\tau \\in [0, \\tau _{\\text{max}}]$ by the 'cumulative mean' of all $d_t(\\tau)$ values up until that point, and artificially set the zero lag value to have a difference of $1$. ```python def cmndf(audio_frame: np.ndarray, tau_max: int): \"\"\" Cumulative Mean Normalized Difference Function (CMNDF). The idea is to normalize each d_t(tau) value for all lags based on the mean of the cumulative sum of all differences leading up to that point. YIN solution to not picking the zero-lag peak. Args: audio_frame: The current frame of audio samples in Yin algorithm tau_max: Check for all time lags up to this value for in autocorr Returns: cmndf: Array of values where index=tau and value=CMNDF(tau) power_spec: The power spectrum of the audio frame amplitudes: Amplitudes of the frame \"\"\" x = np.array(audio_frame, np.float64) w = x.size # window size tau_max = min(tau_max, w) # ensure tau_max is within the window size # compute difference function diff_fct, power_spec, amplitudes = difference_function(x, tau_max) # compute the CMNDF (jasa, 2002) cmndf = np.zeros(tau_max) cmndf[0] = 1 total_diff = 0.0 for tau in range(1, tau_max): total_diff += diff_fct[tau] avg_diff = total_diff / tau cmndf[tau] = diff_fct[tau] / avg_diff return cmndf, power_spec, amplitudes ``` Since the first lag $d_t(\\tau=0)$ always $=1$, this biases the beginning lags which would otherwise have a very small difference until the number of $\\tau$ samples can make up for the 1. This also avoids picking a strong local minimum near the beginning as an incorrect fundamental period. We can observe this by looking at the following graphs as well, of before / after cumulative mean normalization. Though because our example is still pretty pure, the troughs near the beginning are actually smaller after cumulative mean normalization than before. While the CMNDF is still useful in normalizing everything down to a comparable scale, this is an annoying quirk to note about the YIN algorithm. (Many people online have gripes about the CMNDF as well) ```python cmndf_frame, power_spec, amplitudes = cmndf(audio_frame, tau_max) fig, axs = plt.subplots(2, 1, figsize=(6,4)) axs[0].plot(diff_fct) axs[0].set_title(\"Difference Function\") axs[0].set_xlabel(\"Lag (samples)\") axs[0].set_ylabel(\"$d_t(\\\\tau)$\") axs[1].plot(cmndf_frame) axs[1].set_title(\"CMNDF\") axs[1].set_xlabel(\"Lag (samples)\") axs[1].set_ylabel(\"$d_t^\\\\prime(\\\\tau)$\") plt.tight_layout() plt.show() ``` {/* */} ### Computing trough locations We can pick out the relative minima of the curve now and see what we get for the fundamental period estimates. We can easily do this using SciPy's `argrelmin` function. We recall that each local minima point represents those lags with which the signal somewhat resembles itself. Hence, each one can be called a probable estimate for the fundamental period under which the audio signal seems to repeat itself. Again, the goal of pitch detection is to detect the fundamental frequency of the current audio wave, so we can take 1 / the x-value (lag, in samples) of any of these local minima to get our valid pitch estimates for the audio. ```python diff_trough_indices = scipy.signal.argrelmin(diff_fct, order=1)[0] cmndf_trough_indices = scipy.signal.argrelmin(cmndf_frame, order=1)[0] fig, axs = plt.subplots(2, 1, figsize=(6,4)) # plot the troughs from the difference function axs[0].plot(diff_fct) axs[0].set_title(\"Difference Function\") axs[0].plot(diff_trough_indices, diff_fct[diff_trough_indices], 'ro') axs[0].set_xlabel(\"Lag (samples)\") axs[0].set_ylabel(\"$d_t(\\\\tau)$\") # print pitch_estimates1 = [SAMPLE_RATE/x for x in diff_trough_indices] print(f\"Freq estimates (Hz) from diff_fct: {[f'{p:.2f}' for p in pitch_estimates1]}\") # plot the cmndf troughs axs[1].plot(cmndf_frame) axs[1].set_title(\"CMNDF\") axs[1].plot(cmndf_trough_indices, cmndf_frame[cmndf_trough_indices], 'ro') axs[1].set_xlabel(\"Lag (samples)\") axs[1].set_ylabel(\"$d_t^\\\\prime(\\\\tau)$\") # print pitch_estimates2 = [SAMPLE_RATE/x for x in cmndf_trough_indices] print(f\"Freq estimates (Hz) from CMNDF: {[f'{p:.2f}' for p in pitch_estimates2]}\") plt.tight_layout() plt.show() ``` ```shell Freq estimates (Hz) from diff_fct: ['882.00', '441.00', '294.00', '220.50'] Freq estimates (Hz) from CMNDF: ['801.82', '441.00', '352.80', '290.13', '220.50'] ``` ### Pitches! Multiple... So for our audio, we have a couple pitch estimates, some of which resemble the true fundamental frequency (440Hz) and one of its harmonic multiples (880Hz). ```shell Freq (Hz) from diff_fct: ['882.00', '441.00', '294.00', '220.50'] Freq (Hz) from CMNDF: ['801.82', '441.00', '352.80', '290.13', '220.50'] ``` But a couple of problems: 1. We get some incorrect guesses as the waveform repeats itself. $294.00$ and $220.50 $represent the frequencies at which the $880$ and $440$ frequency waves come again. 2. We want to choose the actual fundamental frequency $F_0=440$ and not $880$. 3. The CMNDF's frequencies are slightly biased, and differ from the raw difference function. ### Inspecting the lags To qualitatively assess which peaks seem more accurate, we can plot the effect of actually shifting the signals over by the lags and inspecting the difference. ```python x_vals = np.arange(len(audio_frame)) shifted_x_vals1 = [x_vals + diff_trough_indices[i] for i in range(0, len(diff_trough_indices)-1)] shifted_x_vals2 = [x_vals + cmndf_trough_indices[i] for i in range(0, len(cmndf_trough_indices)-1)] fig, axs = plt.subplots(2, 1, figsize=(9,4)) axs[0].plot(x_vals, audio_frame, 'b-', label=\"Original\") axs[1].plot(x_vals, audio_frame, 'b-', label=\"Original\") for i, x_vals1 in enumerate(shifted_x_vals1): shift = diff_trough_indices[i] freq = SAMPLE_RATE / shift axs[0].plot(x_vals1, audio_frame, '--', label=f\"Shift={shift} ({freq:.2f} Hz)\") for i, x_vals2 in enumerate(shifted_x_vals2): shift = cmndf_trough_indices[i] freq = SAMPLE_RATE / shift axs[1].plot(x_vals2, audio_frame, '--', label=f\"Shift={shift} ({freq:.2f} Hz)\") axs[0].set_title(\"Audio signal: Shifted by raw difference periods\") axs[0].set_xlabel(\"Samples\") axs[0].set_ylabel(\"Amplitude\") axs[0].set_xlim(0, 900) axs[1].set_title(\"Audio signal: Shifted by CMNDF periods\") axs[1].set_xlabel(\"Samples\") axs[1].set_ylabel(\"Amplitude\") axs[1].set_xlim(0, 900) axs[0].legend(loc='upper right', fontsize='small') axs[1].legend(loc='upper right', fontsize='small') plt.tight_layout() plt.show() ``` ### Evaluation: Inspecting the lags From the shifts, it seems like the raw difference function gives us the x-values which are more accurate to the actual sinusoidal behavior of the signal. This aligns with how we know the wave should contain 440 and 880 frequency components, instead of 800 frequency components. This likely comes as an artefact from the $d_t^\\prime(\\tau=0)=1$ bias in the CMNDF which can lead to unexpected local minima that are less reflective of the true signal shape. (Another gripe with the CMNDF). Cheveigne and Kawahara, perhaps as a function of ego, push through and keep using the CMNDF anyways but instead deal with this by only using the CMNDF for absolute thresholding (the next step) and use the raw difference function's x-values for everything else. ## Step 2: Absolute thresholding Now that we have our pitch estimates, how do we choose which pitch actually corresponds to the true fundamental frequency of the signal? We have an intuition that if the difference function is smaller at the given lag, then it is more likely to be the true fundamental frequency as more of the wave patterns will align than with those at subharmonic multiples. **Absolute thresholding** tries to account for the problem of accidentally picking octave errors, which we saw as the minima of the difference function which occur at period multipels of the fundamental. We essentially go through all the possible pitch estmates in successive order from the smallest to the greatest 'lag', and then we choose the first one that is below a given difference threshold. If no estimates are below the threshold, we take the global minima as the pitch. This is where we finally use our CMNDF's y-values to choose a particular pitch. ```python def absolute_threshold(cmndf_frame: np.ndarray, local_minima: list[int], threshold: float=0.1): \"\"\" Apply the absolute thresholding step by searching for the first trough below a certain 'absolute threshold' Args: cmndf_frame: Output from applying CMNDF over a frame of audio samples local_minima: Indices of local minima of the raw diff_fct threshold: Take the first trough below this value of d'(tau) Returns: if possible, the first tau st. d'(tau) tuple[float, float]: \"\"\" Perform parabolic interpolation around a minimum point using Numba for optimization. Done on diff_fct to avoid + bias for small lags from CMNDF. Args: diff_fct: A 1D array of y-values (e.g., diff_fct values). trough_index: The index of the minimum point in diff_frame. Returns: A tuple with the interpolated x & y coordinates of the minimum. \"\"\" x = trough_index # don't interpolate at boundaries - need at least 3 points if x = len(diff_fct) - 1: return float(x), diff_fct[x] y_1 = diff_fct[x - 1] y_2 = diff_fct[x] y_3 = diff_fct[x + 1] denominator = 2 * (y_1 - 2 * y_2 + y_3) if denominator == 0: return float(x), y_2 x_interpolated = x + (y_1 - y_3) / denominator y_interpolated = y_2 - ((y_1 - y_3)**2) / (4 * denominator) return x_interpolated, y_interpolated ``` ## Evaluate: The final pitch ### Interpolation: Effect The paper says the process of interpolating had little effect on gross error rates over the database (0.77% vs 0.78%) but that when tested on synthetic stimuli, that it reduced fine errors at all $F_0$ and avoided gross errors at high $F_0$. ### Our result: Success! We see that for our synthetic signal, that interpolation slightly improved our accuracy! We successfully recovered the original pitch, within some degree of certainty. ```python # interpolate + test the final pitch interpolated_fundamental_period, _ = parabolic_interpolation(diff_fct, fundamental_period) final_pitch = SAMPLE_RATE / interpolated_fundamental_period EXPECTED_PITCH = 440.0 # hz np.testing.assert_almost_equal(final_pitch, EXPECTED_PITCH, decimal=1) print(f\"Test passed! Final pitch estimate is {final_pitch:.2f} Hz (expected ~440 Hz)\") ``` ```shell Test passed! Final pitch estimate is 440.06 Hz (expected ~440 Hz) ``` ### Step 4: \"Best local estimate\" (omitted) There is a final step in the YIN algorithm, which is to find the 'best local estimate' by rerunning the algorithm on different window sizes of successively smaller values around a point if we are at an inflection point in the pitch curve where the pitch is changing within the frame. However for the sake of time (because this project is long enough as is) and since we see how the fundamental idea of the algorithm works on a single frame, I will omit this step. But the details are in the paper (step 6) if you are interested to see how they deal with inflection points. ## Overall: Success! The project successfully detected the pitch of a synthetic audio signal with realistic harmonic overtone complexity, such that it mirror show actual musical signals look. The final pitch estimate of $440.06$ Hz is within 1 degree of precision compared to the expected value of $440$ Hz, which is within an undetectable level of tolerance to the human ear! The numerical results are trustworthy because I verified each step of the implementation. The autocorrelation results, differnce function, and interpolation all come together to enable the final pitch estimate to come together - without any of these components, the final pitch would not be as accurate or even within the same ballpark as what we got - so I am fairly confident that the method itself is okay. Every stage / validation of the process is documented more in-depth in the Implementation section. ### Reflection Working on this project reinforced how signal processing is such a deep and complex topic. Even though I use a tuner app every day, I didn't expect the math behind getting a simple pitch would be so complicated. Reading through the YIN paper was honestly humbling and a lesson in extreme patience. ### Next steps I have a couple ideas for next steps for further learning: 1. Scaling the YIN algorithm across an entire audio file, or noisier signals 2. Improving the CMNDF step - While YIN's CMNDF solution avoids picking small lags, the approach is pretty convoluted and we still use the difference function for the ground truth fundamental periods. I wonder if there is a simpler solution. 3. Exploring alternate machine learning / CNN-based methods for pitch detection as well, and seeing how they compare to the more traditional approach. 4. Unpacking the math behind the FFT and the Wiener-Khinchin theorem, instead of black-boxing it as I did for this project. 5. Exploring polyphonic pitch detection algorithms. 6. Finally, some music visualization / smart-home music visualization projects would be cool. Maybe with a Raspberry Pi? Thank you for reading through my long project. ### References [1] A. de Cheveigné and H. Kawahara, \"YIN, a fundamental frequency estimator for speech and music,\" J. Acoust. Soc. Am., vol. 111, no. 4, pp. 1917–1930, Apr. 2002, doi: 10.1121/1.1458024. [2] E. W. Weisstein, “Wiener-Khinchin Theorem,” MathWorld--A Wolfram Web Resource. Accessed: Apr. 12, 2024. [Online]. Available: [https://mathworld.wolfram.com/Wiener-KhinchinTheorem.html](https://mathworld.wolfram.com/Wiener-KhinchinTheorem.html)"},{"id":"poetic-naturalism","title":"How my pursuit of truth led me to poetic naturalism","description":"Does free will exist? Poetic naturalism's response, and what that means for me.","date":"2025-03-10T00:00:00.000Z","tags":["personal"],"authors":["sarah"],"url":"/blog/poetic-naturalism","content":"### Does free will exist? One day, Raghav asked me if I believed free will was real. I thought for a bit, but before I could even respond—like a 5th grader smiling to himself after telling a kindergartener at recess that Santa isn't real—Raghav cut my thoughts off. ### \"NO\" says particle physics: A naturalist perspective He told me that from a particle physics perspective, everything is technically deterministic. And given a world with perfect information, we would be able to theoretically predict, with some probability distributions, everything that happens in the future. Our particular combination of genetics and environment continues to irreversibly destine us to certain fates. So one's life choices, such as the major one decided on studying in college, or even the blue shirt I chose to wear that day—were not really \"choices\" but rather a part of a predetermined sequence of extremely chaotic yet predictable events. A series of events which started from the big bang, to the evolution of life, of human life, to my parents, to my upbringing, to someone who chooses to wear blue when it rains. ### The utility of free will: A poetry of choice Raghav went on to explain that although free will may not exist in the particle physics domain, that it is still a useful abstraction in the sociological domain, to describe humans as motivated actors in explaining emergent phenomena. such as the percentage of people who are able to beat alcohol addiction through one method over another. ### Raghavendra's poetic naturalism agenda All of this blabber, was in service of his agenda of converting me to his life philosophy of poetic naturalism: that there is one true 'natural' world but there are multiple ways of looking at it. ## Particle physics and Lovecraftian horror ### Me as a collection of colliding particles The naturalist, particle physics perspective unnerved me for the next few days. I thought about how this entity which is 'me', is really just a collection of particles colliding around in organized ways. And how all of my behaviors and habits, my proclivities for procrastination, my grades - how they may have all been irreversibly determined since my birth. That they are not the product of any cosmic notion of \"free will\", but rather just the natural course of my molecules doing their thing. Thinking about it seriously, the thought made me despair. If nothing we do has any bearing on our future, why do we keep trying if the first place? ### The brain as a probability maximizing machine Perhaps influenced by the Machine Learning course I'm taking right now, the conclusion I came to is that my brain is just a probability-maximizing machine. That it's doing what it thinks is best for the given moment based on a certain set of... Constraints: - Energy level - Environment - Principles, ideals And heuristics: - Career goals - Social goals - Personal goals ### My atoms are my friends That my current collection of atoms may be predisposed or 'fated' to certain career paths or clothing choices thanks to my particular combination of genetics and upbringing. But still, that my atoms have my best interest in mind. For example, based on my particular goals I'm not going to purposely do something like sprinkle cinnamon into my MacBook speakers unless I truly believe it will be in the service of some goals. This assuaged my dread a little in that even if I don't have \"free will\" over my atoms, that they are at least aligned with the interests of whatever my \"free will\" would have wanted to tell them anyways. ### On naturalism and forgiveness When I made this connection, it was honestly a kind of relieving. That though I am prone to many mistakes and shortcomings, that my atoms were still trying their best. And that I am always choosing what I believe is the best choice of action at any given moment, given my personal constraints and heuristics, and information. ## The night sky and the pursuit of truth A couple days after this conversation on poetic naturalism, Raghav and I were walking back home after a long night in the lab office. He was sticking his neck out to the sky, so I looked up too, asking what he was looking at—wondering if there was an airplane flying by or something. ### Constellations, stories He said he wasn't looking at anything like that; just that he just likes space. The sky was clear, and we could make out a few faint points, alongside a super huge star-looking thing which I was convinced was the north star. Raghav disagreed, saying it was Jupiter. To prove it, he opened this app, Stellarium, and pointed his phone at the sky. Through stellarium's lens, it brightened all the faint dots, connecting them into constellations (while also proving that the big \"star\" was indeed, Jupiter). It was a sight I never realized was above us the entire time. This vastness of space, and the poetry of the constellations and stories we create on top of it. ### Manifolds and the vastness of space I thought back to my manifolds class: We were applying linear algebra / calculus on the structure of higher dimensional surfaces (manifolds), eventually working our way up to proving something profound about the topology of a black hole. I looked back up at the sky and thought about how I had once asked my dad why he chose to become a math professor. At the time, my dad answered it was because he wanted to study the structure of space and time. While I laughed at him then, I think that day I finally understood what he meant."},{"id":"ganglab-daily","title":"A day in the life at Gang lab","description":"On office life, McKeenisms, penguins, and coloring books.","date":"2025-02-18T00:00:00.000Z","tags":["personal","research"],"authors":["sarah"],"url":"/blog/ganglab-daily","content":"import PostImage from '@/components/PostImage.astro' import img1 from './img1.png' import img2 from './img2.png' import img3 from './img3.png' import YouTube from '@/components/YouTube.astro' ## Foreword I'm grateful to the Work Exemption Program for enabing me to continue working with the Gang Lab for my Spring 2025 semester at Columbia. As a part of my reflection project, I will be writing a series of blog posts detailing my career, research, and personal life lessons I've learned during my time here. The other blog posts are here: - [How my pursuit of truth led me to poetic naturalism](/blog/poetic-naturalism) - [How MOSES paints with symmetries](/blog/moses-painting) - [Object permanence, powerlessness, and the mystery of the night sky](/blog/object-permanence) ## A day in the life at Gang lab The Gang lab ChemE offices are housed in the third floor of Mudd in the Engineering Terrace. It's a cozy, fluorescently lit space with office cubicles—the kind of place where people stay home if they want to get actual work done. ### Appropriating Ghanim's desk I started working the lab offices a week before classes started this semester. I plopped down at the desk of our lab's resident traveller, Ghanim, who is all the way in the United Arab Emirates for the foreseeable future. In my time here, I've settled into a kind of daily rhythm of Gang Lab. ### Schedule-agnostic mornings Something I love about research is that your daily work is, for the most part, a schedule-agnostic job. With the exception of a few morning people, the lab day usually starts around 12:00pm. People drop off their stuff, start their experiments, then chill out for a bit before the mass exodus to lab group lunch ~1:00pm. ## Group lunch I squeezed myself into the little crew of people who eat lunch together. These guys are like a quarter-generation older than me, so their conversation topics range from lab politics, to real world politics, to 'being a boomer'. In order to capture the character of these lunches, I want to introduce two especially colorful such characters: Dan McKeen and Elad Arad. ### Dan McKeen Dan McKeen is the resident martyr of this crew, equipped with a stock of \"McKeenisms\" (his self-coined term) which he draws from to react to people. Some McKeenisms include: - \"Blatantly disrespectful\" - \"Nominally, ....\" - \"That's messed up\" - \"It's cheeewwwsday innit\" - \"What the flip bro\" Dan tells people that whenever two disjoint groups of his friends collide, they are able to find common ground in bullying him. (I find it not particularly difficult to see why.) ### Elad Arad Elad Arad is his FOIL. They stand at seemingly opposite ends of the spectrum, in politics and personality, yet they always seem to find themselves together: sitting at lunch together, conducting experiments at Brookhaven together, picking up pizza for group parties together together. ### Dan and Elad collide: Dan's mother One day, Elad, Dan and I were walking back from grabbing lunch when the topic of Dan's mother came up. I can't recall why in hindsight, but we started joking around about how we're very close with her. Dan asked to prove it, saying that we probably don't even know her name - to which I came up with \"Amanda\" on the spot. Her name was not Amanda of course, but I was moved by how much Elad really took to this joke. Though I only realized the extent to which he did when two weeks after this conversation, Elad asked Dan \"How's Amanda?\" (To which Dan groaned.) ## Lab conversations I end up chit-chatting a lot with the people inside our office as well. ### Raghavendra Nimiwal Among them, I sit right behind Raghavendra Nimiwal, a ChemE PhD. candidate in both Kyle Bishop and Sanat Kumar's lab. He's an avid science geek and crypto trader, with Chris McCandless fantasies of living off the land in a farm in the mountains when he graduates. We initially bonded over Obsidian, a note-taking application, and how we organize our folders. Eventually our conversations wandered into the philosophical, as I shared the various life lessons I learned over winter break, from my month of isolation in the North Dakotan tundra. I shared [this video](https://www.youtube.com/watch?v=mnTU_hJoByA) with the lab, and we collectively agreed that Raghav is the human reincarnation of this penguin. ## Dinner at Shake Shack One day after a long night of research, Dan, Elad, Raghav and I went to Shake Shack for dinner. We picked up a kid's menu, which came equipped with a coloring page of various fruits, and four crayons. To pass the time, I started coloring the french fries yellow. Unfortunately, Dan started coloring the strawberry blue. At which point Elad joined in and started coloring the watermelon rind red. I tried maintaining a level of realism by coloring the burger bun yellow, but my aspirations were quickly shot down as Dan scribbled in the patty blue. {/* */} It was not a great coloring job. Yet in that moment, it was just four adults coloring a children's coloring page horribly — free from pretense, deadlines, and funding cuts. We laughed about it as we were walking back to the lab, and we hung up the page on our lab door."},{"id":"silent-hill","title":"A life lesson I learned from a violent video game","description":"On Silent Hill 2, grief, and moving on. Spoilers for the game.","date":"2025-01-12T00:00:00.000Z","tags":["personal"],"authors":["sarah"],"url":"/blog/silent-hill","content":"I watched a [documentary](https://www.youtube.com/watch?v=Xa1i06kVIVQ) this morning on Silent Hill 2, a Crime and Punishment-esque video game about a man who killed his own terminally ill wife out of what he believes was love, and finds himself in a town fighting off manifestations of his inner neuroses in coming to terms with his murder. The story and its multiple endings explore the themes of grief and how people cope with guilt through either giving up, staying stuck in the past (making excuses / delusions), or moving on. That moving on is hard because it means facing those parts of us that we are scared or ashamed of. And that people are never the same after trauma, but you have no choice but to choose one of the options. Growing up, I didn't have the stomach to consume horror media in general, much less a video game placing me viscerally in the shoes of a character whacking off butchers with bloodied pyramidal heads. These days, I've come around to appreciate their unique ability to confront taboo subjects and give us the courage to confront our own demons. These kinds of stories make me feel less alone."},{"id":"irl-monitor-algorithm","title":"An algorithm for my monitor problem","description":"How I got dinner with my two friends who hate each other and some help carrying a monitor back to my dorm.","date":"2024-10-15T00:00:00.000Z","tags":["algorithms","cs","personal"],"authors":["sarah"],"url":"/blog/irl-monitor-algorithm","content":"import PostImage from '@/components/PostImage.astro' import monitor from './monitor.png' ## The monitor problem I ordered a new monitor for my dorm last week, and it arrived yesterday! But it's 16 inches large, and I'm quite lazy to retrieve it from the mail center - so this morning, I hatched a plan to get some help bringing it back to my dorm. ### Sally and David I have two best friends, let's call them Sally and David. I love both of them, but they hate each other. Sally bullies David whenever she sees him, but they tolerate each other for my sake and we sometimes hang out as a trio. David and I have our Discrete Math class together today, and we usually get dinner together afterwards. Ideally, I would slip the question of coming to the mail center at dinner / on the way back to my dorm, and then David would be annoyed but agree to help carry it back. But I love Sally and miss hanging out with her, so I want to get dinner with her as well - more so than I want to hang out with David. But if I ask them both to dinner, I'm afraid to get into a situation where neither want to eat with me, and I have to carry the monitor back to the dorm myself. ### An algorithmic solution ```python def dinner_and_monitor(): dinner_with = [\"David\"] david_is_helping = ask_david(\"can you help me pick up mail after discrete?\") if ask_sally(\"how about dinner?\"): if ask_sally(\"can david come too?\"): dinner_with.append(\"Sally\") else: if david_is_helping: if flip_coin(): tell_sally(\"let's get dinner next time\") else: # after he's done helping with the monitor tell_david(\"let's get dinner next time\") dinner_with.append(\"Sally\") dinner_with.remove(\"David\") else: tell_david(\"let's get dinner next time\") dinner_with.append(\"Sally\") dinner_with.remove(\"David\") return dinner_with, david_is_helping ``` Note: The morning of, what I wrote out was much scrappier than what you see above—but the guts remain the same. The algorithm is as follows: First, I ask David if he can help me pick up my monitor from the mail center after our Discrete Math class. Then, I ask Sally if she's free for dinner in general. If. she says no, my decision is uncomplicated and I defer to getting dinner with David. If she agrees, I ask if David can join us. If yes, then life is good. If no, then if David agreed to help me carry my mail, I would flip a coin to see who to get dinner with between the two of them. If David said no to helping, I would defer to getting dinner with only Sally. ## Conclusion? Well, it ended up working in my favor. Sally said yes to dinner, and so did David. David said he was going to Discrete, and also agreed to helping bring my monitor back after class. So I asked if Sally was okay with David joining us, and she said sure. Kind of anticlimactic, but I'm happy. I got to eat dinner with my friends, and got help setting up my monitor. 😎"},{"id":"moses","title":"The DNA origami problem: Self-assembling nanoblocks","description":"Given a desired superlattice structure, how can you design its constituent blocks to self-assemble into it?","date":"2024-10-06T00:00:00.000Z","tags":["research","algorithms","cs","math"],"authors":["sarah"],"url":"/blog/moses","content":"import PostImage from '@/components/PostImage.astro' import img1 from './img1.jpeg' import img2 from './img2.jpeg' import img3 from './img3.jpeg' import img4 from './img4.jpg' import img5 from './img5.jpeg' import img6 from './img6.jpeg' import img7 from './img7.jpeg' import img8 from './img8.jpeg' ## Ganglab - Fall 2024 This past summer, I started working with the Gang Lab at Columbia University as a chemical engineering research assistant. I received a generous grant through both the CCE and WEP programs which allowed me to stay in New York over the summer. So, I began conducting research with Jason Kahn, a former post-doctoral fellow at the Gang Lab and now full-time staff scientist at Brookhaven. ## My project: MOSES, the coloring algorithm Despite the Gang Lab being foremost a chemical engineering research lab, I joined as a programmer - with the task of rewriting Jason's 2000 line Jupyter notebook containing the previous iteration of a \"DNA origami coloring algorithm.\" Given my CS background (and lack thereof of any materials science one), I'll introduce the problem in broad strokes. ## The building blocks of DNA origami The term **DNA origami** refers to name for the basic building block of our system. It is a structure consisting of a voxel and a set of bonds. ### Voxel The \"**voxel**\" (which borrows its name from the computer graphics voxel) is a vessel that can store either a choice of particle inside, or no particle at all. It is like the 'vertex' in a graph. {/* */} ### Bonds It is attached to 6 **bonds** on the +/- x, y, z vertices* of the voxel, which connects the voxel to other voxels. - Note*: The voxel is actually an abstraction for an octahedral DNA wireframe, which contains 6 distinct vertices for the bonds to stick out from. This is also why it is called DNA origami. Each bond has an associated color - and each color has its complementary color, which we denote with + / -. A voxel with a bond can only connect to another bond if they have colors of opposing complementarity... These are like colored 'edges' in a graph coloring problem, where a color must connect to its complementary color. Bonds connect to each other with the following **binding rules**: 1. A bond can only connect to another bond with its opposing complementarity 2. No palindromes: A color and its complement cannot exist on the same voxel ### Structures: Lattices The structures we ultimately build with these origami building blocks, are these superlattice particle structures. In 3D space, the origami come together almost like a Minecraft build. It being a superlattice structure means that essentially, we have a minimum unique design which is copy-pasted infinitely around itself. ## The problem: Bond coloring To simplify things for a bit, let's step back to a 2D picture of what's going on. Say we want to create the following 2D pattern which will tile out to infinity. We know we want the particles to form this checkerboard structure. The question is, how do we design the colors of each bond, so that when we stick these origami into a machine and shake them around, that the complementary bonds come together and enable the origami **self-assemble** into our desired tiling lattice structure? ### Naive solution We could assume a naive solution is to paint each bond in the minimal design a different color. This ensures there's no mistakes and each particle will end up where it needs to go. {/* */} However, the more colors it takes to create a certain design, the less likely it is to form. Hence, we have the **criteria**: - less colors = better - more colors = worse which forms the main motivation and constraint for our algorithm. Keeping in mind the *binding rules*, how can we start to simplify the number of colors needed to ensure this design will still form as it should? ### Minimal solution It turns out, for this system we only need one color (+ its complement!) {/* */} For simple designs like this, we can often reason out a minimal number of colors by hand. However, as we want to create more complicated 3D designs, it becomes much harder to do the computations by hand. Hence, our lab over time, slowly developed this algorithm which does it computationally. Over the summer, I rewrote the entire codebase and created a GUI to visualize the voxels + bonds in the lattice structures. ## Looking ahead: Fall 2024 There is still some work that needs to be done with debugging the coloring portion - we are looking to publish the algorithm as a paper soon, so making sure everything works as expected is of the top priority. Next steps, we want to extend the codebase to algorithmically compute the ideal binding order (binding temperature) for each bond in the lattice."}]