{"version":"https://jsonfeed.org/version/1.1","title":"Posts - Zihe Liu","home_page_url":"https://flowingpurplecrane.com/?utm_source=json_feed","description":"Thinking about alignment of machine intelligence.","icon":"https://flowingpurplecrane.com/profile_clear_optimize_crop_hu_3069803ac5eca8ac.jpg","favicon":"https://flowingpurplecrane.com/profile_clear_optimize_crop_hu_3069803ac5eca8ac.jpg","authors":[{"name":"Zihe Liu"}],"language":"en","items":[{"id":"4f84327b-0b76-5a48-798c-918977e96512","url":"https://flowingpurplecrane.com/posts/cdpo/?utm_source=json_feed","title":"Critique DPO","summary":"I chanced upon a pretty interesting idea proposed by Peter Hayes (now at Anthropic) in 2025, to more efficiently use feedback data in the standard RLHF pipeline to speed up the whole thing. Basically, given external feedback/critique/verification of generated answers, can we incorporate this feedback in an NLL term in addition to the standard DPO loss; trained on the base model? Most previous efforts either used this feedback to train a better verifier, or used other additional NLL terms in the base model training. I spent couple of months reading around the literature, setting up the HPC infra, and running some experiments. Unfortunately experiments (at least on smaller models) resulted in negative findings - the model was extremely prone to reward hacking\u0026hellip;","date_published":"2026-03-14T15:42:57Z"},{"id":"92f4406e-f0ce-53c5-0969-6b2aa22d6948","url":"https://flowingpurplecrane.com/posts/minority/?utm_source=json_feed","title":"The Minority Guessing Game","summary":"I recently learnt a drinking game where you had 2 cards (red/black) for round, and people use these as answers to questions. The goal of the game is to locate who the minority answers came from, and with that came some interesting questions.\nGame Rules $n$ players each hold a red card and a black card. A question is posed each round (e.g., yes/no, would-you-rather, etc.). Each player secretly plays one card to reflect their answer. All played cards are collected and shuffled — the total counts of each red and black are revealed, but not who played what. This reveals a minority group of size $k$ and a majority of size $n − k$ The group is given $g$ guesses to identify members of the minority. The group\u0026rsquo;s score is $C$, the number of correct guesses. This is the only random variable in this question; everything else is given. Then I had a question: what\u0026rsquo;s a good number for $g$ so that the game is fun? 1 So not too easy $g \\approx n$ where we\u0026rsquo;ll definitely guess who the minorities are, but not too hard $g=k$ 2 that we\u0026rsquo;ll never find the minorities. 3","date_published":"2026-02-14T23:50:56Z"},{"id":"b6023d00-4da5-5ac4-a964-788b36b67068","url":"https://flowingpurplecrane.com/posts/info/?utm_source=json_feed","title":"On Information","summary":"I\u0026rsquo;ve wondered about entropy for a long time. From thermodynamics and the arrow of time, to cross-entropy loss in ML cost functions, or KL divergence in stopping intelligence from going batshit crazy in VAE/PPO, entropy keeps cropping up. Maybe the universe is playing some kinda trick on us here. Since I\u0026rsquo;m taking 3F7 Information Theory, I thought it\u0026rsquo;s probably a good time to understand what these ideas really mean.\nDisclaimer: I do not claim this work to be my own; this is merely a synthesis of intuition and math across multiple resources for myself and anyone interested. In particular, we borrow the beautiful figures and analogies from Chris Olah\u0026rsquo;s amazing post1 on Information Theory.","date_published":"2025-10-25T16:34:06Z"},{"id":"4f9ae8e9-cbde-59c8-8982-9e000424eea0","url":"https://flowingpurplecrane.com/posts/dft-fft/?utm_source=json_feed","title":"The Discrete Fourier Transform and Fast Fourier Transform","summary":"We analyze 1 the theoretical properties of both the Discrete Fourier Transform (DFT) and the optimized Fast Fourier Transform (FFT), and estimate their algorithmic complexity.\nAll code available on Github. Slides available here.\nDiscrete Fourier Transform Theory The DFT converts a finite-length time-domain signal into its frequency-domain representation. For an input signal $x[n]$ of length $N$, where $0 \\le n \\le N-1$, the DFT is defined as:\n$$ X[k] = \\sum_{n=0}^{N-1} x[n]\\, W_N^{nk}, \\quad 0 \\le k \\le N-1 \\label{eq:DFT} $$where $W_N=e^{-j\\frac{2\\pi}{N}}$ is the $N$-th principal root of unity, and $X[k]$ is component at frequency $kf_s/N$ with sampling frequency $f_s$. We can rewrite $X[k]$ as an inner product:","date_published":"2025-03-28T17:05:08Z"},{"id":"d67f3547-a8bf-5a3e-a99d-15c3146aa947","url":"https://flowingpurplecrane.com/posts/r1/?utm_source=json_feed","title":"Breaking Down DeepSeek R1","summary":"In this post, I want to explore the key RL architecture and software optimizations DeepSeek made to create Deepseek-R1. I\u0026rsquo;ll provide a brief introduction to the RL setup and explain how GRPO makes traditional algorithims much more efficient. At the end, I\u0026rsquo;ll provide a brief overview of how DeepSeek-R1 was trained. Talk given at Cambridge AI Safety Hub Members Meeting in February, slides available here.\nPreliminaries Transformers Illustration of autoregressive model of transformers, taken from the ARENA curriculum Modern transformers are autoregressive models. They predict the next token (essetially a word) given all the tokens before it:","date_published":"2025-02-17T17:05:08Z"},{"id":"c2352a09-03d1-5d05-b95b-d2fdbfdeed6f","url":"https://flowingpurplecrane.com/posts/mcts/?utm_source=json_feed","title":"Breaking Down Monte Carlo Tree Search","summary":"We explain how Monte Carlo Tree Search works and introduce its pseudocode. We borrow notes and figures from int8\u0026rsquo;s website and the MCTS Wikipedia page.\nGame Representation A game tree is a tree data structure, where every node represents a distinct state of the game. Given a state $s$, we take an action $a$, and the environment transitions to the new state $s'$ with the transition probability $p_a(s'|s)$. If the transition probablity is $1$ (such as in simple deterministic games like Tic Tac Toe), then each node in the game tree represents a state.","date_published":"2024-12-07T17:05:08Z"}]}