<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="/feed.xml" rel="self" type="application/atom+xml" /><link href="/" rel="alternate" type="text/html" /><updated>2026-04-03T03:54:14+00:00</updated><id>/feed.xml</id><title type="html">Digithead’s Lab Notebook</title><subtitle>Blathering about software engineering, programming languages, machine learning, data science, bioinformatics, health-tech, and other techno-babble-icious flapdoodle.</subtitle><author><name>J. Christopher Bare</name></author><entry><title type="html">Music 2025</title><link href="/2026-01-12/music-2025.html" rel="alternate" type="text/html" title="Music 2025" /><published>2026-01-12T00:00:00+00:00</published><updated>2026-01-12T00:00:00+00:00</updated><id>/2026-01-12/music-2025</id><content type="html" xml:base="/2026-01-12/music-2025.html"><![CDATA[<figure style="float: right; height: 55%; width: 55%; margin-left: 1em;">
  <img src="/images/music/scholarly-gentleman-in-space.png" alt="Me listening to tunes in my study" />
  <figcaption style="font-size: small; font-style: italic;">Me enjoying some tunes at the lab</figcaption>
</figure>

<p>The years are short but the days are long. Another year has come and gone at the waning end of a golden age. But still, there’s music.</p>

<p>Ready to queue up the <a href="https://music.apple.com/us/playlist/2025-playlist/pl.u-JPAZEo9FWl6GeE">2025 playlist</a> and read some super deep thoughts on music from the year just gone?</p>

<h2 id="wellington-jazz">Wellington Jazz</h2>

<p>Wellington has had a rough couple of years with the New Zealand government in an austerity phase. Maybe it’s like the cartoon character running in the air off the edge of a cliff, but the Welly music scene is going strong. Someone at the <a href="https://www.wgtn.ac.nz/nzsm">New Zealand School of Music</a> is doing something right, judging by the quality of musicians with associations of one kind or another with that institution.</p>

<p>This year, when I wasn’t busy at the lab, I got out to witness talented Wellington musicians creating something. Most Sundays, you can start out at the <a href="https://www.undercurrent.nz/">Undercurrent Bookshop</a> in the afternoon then head over to the <a href="https://rogueandvagabond.co.nz/">Rogue and Vagabond</a> for another gig.</p>

<figure style="float: right; margin-left: 2em; margin-top: 1em; margin-bottom: 1em; height: 50%; width: 50%; ">
  <a href="https://www.last.fm/user/cbare/library/albums?from=2025-01-01&amp;rangetype=year" target="_blank" rel="noopener noreferrer">
    <img src="/images/music/music-2025-counts.png" alt="Tracks listened in 2025" />
  </a>
  <figcaption style="font-size: small; font-style: italic;">This chart could probably act as a pretty good proxy for my mood during the months of 2025. As a public service announcement, November sucks in this part of the world. </figcaption>
</figure>

<figure style="float: left; width: 40%; margin-top: 2em; margin-left: 2em; margin-bottom: 2em; ">
  <img src="/images/music/undercurrent.jpg" alt="Undercurrent Bookshop" />
</figure>

<h3 id="wellington-jazz-festival">Wellington Jazz Festival</h3>

<figure style="float: left; width: 40%; margin-top: 1em; margin-right: 2em; margin-bottom: 1em; ">
  <img src="/images/music/wellington-jazz-festival-2025.jpg" alt="Wellington Jazz Festival Banners" />
</figure>

<p>The <a href="https://www.jazzfestival.nz/">Wellington Jazz Festival</a> had a strong year in 2025. The headliners were impressive, for a small town near <em>el culo del mundo</em>, but the local talent really shined. I went to shows at the Rogue, upstairs at Bedlam &amp; Squalor, the Library, Undercurrent, Meow Nui and even the rooftop terrace of a law firm. But there was so much on that you couldn’t possibly see everything.</p>

<p>Next year’s <a href="https://www.jazzfestival.nz/">Jazz Fest will be October 14-18</a>. In the meantime, keep up with what’s on in Welly with their handy <a href="https://www.instagram.com/welljazzfest/">Gig Guides</a>.</p>

<p>So much great music is lost into the air, never to be captured again, or so said Eric Dolphy. We should count ourselves lucky when some of the good stuff gets recorded. A cabal of Wellington Jazzers put out albums in 2025. It’s nice to see a group of musicians that play on each other’s albums, go to each other’s shows and clearly push each other further into inspired sonic territory.</p>

<h3 id="callum-allardice---elementa">Callum Allardice - Elementa</h3>

<figure style="float: right; margin-left: 2em; margin-top: 1em; margin-bottom: 2em; height: 33%; width: 33%; ">
  <img src="/images/music/elementa.jpg" alt="Elementa" />
</figure>

<p>Released: January 24, 2025</p>

<ul>
  <li><a href="https://callumallardice.bandcamp.com/album/elementa">Callum Allardice</a> - composer, guitar</li>
  <li>Luke Sweeting - piano</li>
  <li>Tom Botting - bass</li>
  <li>Hikurangi Schaverien-Kaa - drums</li>
</ul>

<p>Composer and guitar player <a href="https://callumallardice.bandcamp.com/album/elementa">Callum Allardice</a> released a quartet album in 2025 full of good stuff. That follows the 2024 release of big-band album <a href="https://callumallardice.bandcamp.com/album/cinematic-light-orchestra">Cinematic Light Orchestra</a> completed during a <a href="https://www.wgtn.ac.nz/fhss/about/news/2022-composer-in-residence-shines-bright-with-debut-album-release">composition residency at Victoria University of Wellington</a>.</p>

<p>Callum played in several combinations during Jazz Fest that featured some strong but as-yet unreleased material, at least as far as my Googling skills can dig up. Song titles I managed to catch included <em>The Curse</em>, <em>The Right Hand of the Blessed</em> and <em>The Left Hand of the Damned</em>. I hope to hear recordings of these tunes someday soon. Sounds to me like they should be a suite - <em>The Cursed, the Blessed and the Damned</em> - but what do I know?</p>

<p>Allardice and Sweeting also played as part of <a href="https://antipodesband.com/">Antipodes</a>, along with Jake Baxendale (sax), Tom Botting (bass) and Tim Geldens (drums). <em>Good Winter</em> was released back in 2018 with slightly different personnel. This group played Jazz Fest, then did a New Zealand mini-tour that ended up back in Welly sounding tight after a few weeks playing together. We can hope some of that material is sitting on a hard drive somewhere waiting to be released.</p>

<h3 id="louisa-williamson---groundwork">Louisa Williamson - Groundwork</h3>

<figure style="float: right; margin-left: 2em; margin-top: 1em; margin-bottom: 2em; height: 33%; width: 33%; ">
  <img src="/images/music/louisa-williamson-groundwork.jpg" alt="Louisa Williamson - Groundwork" />
</figure>

<p>Released: April 17, 2025</p>

<p><a href="https://www.louisawilliamson.com/">Louisa Williamson</a> is a sax and flute player, band leader, and composer of jazzy, soulful and funkified music. This year’s <a href="https://louisawilliamson.bandcamp.com/album/groundwork">Groundwork</a> follows the excellent <a href="https://louisawilliamson.bandcamp.com/album/what-dreams-may-come">What Dreams May Come</a>, an ambient suite for jazz orchestra taking inspiration from Brian Eno and Maria Schneider.</p>

<ul>
  <li>Louisa Williamson - saxophone/flute/vocals</li>
  <li>Kaito Walley - trombone (In Tune, Lake Glass, Lou Lou)</li>
  <li>Callum Allardice - guitar</li>
  <li>Daniel Hayles - piano</li>
  <li>Johnny Lawrence - bass</li>
  <li>Cory Champion - drums, percussion</li>
  <li>Maarire Brunning-Kouka - vocals (In Tune)</li>
</ul>

<h3 id="clear-path-ensemble---black-sand">Clear Path Ensemble - Black Sand</h3>

<figure style="float: right; margin-left: 2em; margin-top: 1em; margin-bottom: 2em; height: 33%; width: 33%; ">
  <img src="/images/music/clear-path-ensemble-black-sand-vinyl.jpg" alt="Clear Path Ensemble - Black Sand" />
</figure>

<p>Released: May 15, 2025</p>

<p>The official blurb on this one is unbeatable: “Inspired by the deep listening ambient and jazz record bars of Japan, Black Sand continues with Clear Path Ensemble’s jazz-funk fusion sound while folding new elements of minimalism, ambient, techno and library music into a restrained, yet highly exploratory sound world.”</p>

<ul>
  <li>Cory Champion - drums, percussion, vibraphone, guitar, electric bass, rhodes, synthesizers</li>
  <li>Johnny Lawrence - double bass, electric bass</li>
  <li>Daniel Hayles - piano, rhodes, clavinet</li>
  <li>James Illingworth - synthesizer</li>
  <li>Louisa Williamson - flute</li>
  <li>Mike Isaacs - bass clarinet</li>
</ul>

<p>When this crew announced they were playing at the Begonia House, I was skeptical about having a show in a greenhouse in the Botanic Garden. Turns out, it’s a super cool venue and it was a great show. Even the plants were grooving.</p>

<p><img src="/images/music/clear-path-ensemble-begonia-house.jpeg" alt="Clear Path Ensemble at Begonia House" /></p>

<h3 id="daniel-hayles---on-the-grid">Daniel Hayles - On the Grid</h3>

<figure style="float: right; margin-left: 2em; margin-top: 1em; margin-bottom: 2em; height: 33%; width: 33%; ">
  <img src="/images/music/daniel-hayles-on-the-grid.jpg" alt="Daniel Hayles - On the Grid" />
</figure>

<p>Released: October 20, 2025</p>

<p>Whether it’s solo piano or 17-piece big-band, I always leave a <a href="https://www.danielhayles.com/about">Daniel Hayles</a> gig with homework. He’s great at turning up great material and making it sound amazing in sometimes radically different formats. Digging up the original when you get home is part of the adventure.</p>

<p>Daniel led a fantastic performance of the <em>Other Futures Big Band</em> doing a thing they describe as “turntablism sensibility on a symphonic scale” at Meow Nui. The super-diverse set list featured works by Steely Dan, Notorious B.I.G., Madlib, Mark de Clive-Lowe, South African pianist/composer Nduduzo Makhathini and NZ pianist/composer <a href="https://www.jonathancrayford.com/">Jonathan Crayford</a>.</p>

<p><img src="/images/music/wellington-jazzfest-other-futures.png" alt="Other Futures Big Band" /></p>

<ul>
  <li>Sylvester Green - Trumpet</li>
  <li>Tyaan Singh - Alto Saxophone</li>
  <li>Louisa Williamson - Tenor Saxophone and Flute</li>
  <li>Chris Buckland - Tenor Saxophone</li>
  <li>Matthew Allison - Trombone</li>
  <li>Daniel Hayles - Piano</li>
  <li>Seth Boy - Bass</li>
  <li>Abe Baillie - Drums</li>
  <li>Mana Waiariki - Violin</li>
  <li>Eden Annesley - Violin</li>
  <li>Abby Wheeler - Viola</li>
  <li>Lavinnia Rae - Cello</li>
</ul>

<h2 id="the-outside-world">The Outside World</h2>

<p>Out in the wider world, things are a mess. A world order is collapsing. But still, good music is being made.</p>

<h3 id="gogo-penguin---necessary-fictions">Gogo Penguin - Necessary Fictions</h3>

<figure style="float: right; margin-left: 2em; margin-bottom: 2em; width: 33%;">
  <img src="/images/music/gogo-penguin-necessary-fictions.jpg" alt="Gogo Penguin" />
</figure>

<p>Released: June 20, 2025</p>

<p><em>Necessary Fictions</em> is the seventh studio release from <a href="https://gogopenguin.co.uk/">GoGo Penguin</a>, not counting an album of remixes, a couple of live albums and a slew of singles and EPs. GoGo Penguin’s sound exists on the border between jazz and electronic music, with their latest shifting further towards electronica.</p>

<p>The 2023 release from this crew, <em>Everything is Going to Be OK</em> carries a message to counter the pervasive feeling of doom.</p>

<h3 id="aaron-parks---by-all-means">Aaron Parks - By All Means</h3>

<figure style="float: right; margin-left: 2em; margin-bottom: 2em; width: 33%;">
  <img src="/images/music/aaron-parks-by-all-means.jpg" alt="Aaron Parks - By All Means" />
</figure>

<p>Released: November 7, 2025</p>

<p>Seattle native pianist Aaron Parks’ <em>By All Means</em> on the Blue Note label is just good straight-ahead jazz. Nothing wrong with that. Parks is a prolific sideman, for instance, playing on guitarist Tom Ollendorff’s tasteful <em>Where in the World</em>.</p>

<ul>
  <li>Aaron Parks - piano</li>
  <li>Ben Solomon - tenor saxophone</li>
  <li>Ben Street - bass</li>
  <li>Billy Hart - drums</li>
</ul>

<h3 id="raven-gnosis">Raven Gnosis</h3>

<figure style="float: right; margin-left: 2em; margin-bottom: 2em; width: 33%;">
  <img src="/images/music/raven-gnosis.jpg" alt="Raven - Gnosis" />
</figure>

<p>Released: February 14, 2025</p>

<p>Not to be confused with the 1980s metal band, San Francisco–based electronic musician Raven brews up a batch of synth pads washed over jazzy chord progressions, equal parts introspective and meditative.</p>

<h3 id="other-good-stuff">Other good stuff</h3>

<ul>
  <li>Artemis - Arboresque</li>
  <li>Shai Maestro - Solo: Miniatures &amp; Tales</li>
  <li>Julia Hülsmann - Under the Surface</li>
  <li><a href="https://www.tomollendorff.com/">Tom Ollendorff</a> - Where in the World</li>
  <li>lvdf EP</li>
  <li>Tourismo - Torque (2023)</li>
  <li>Lucy Clifford - Between Spaces Of Knowing (2024)</li>
  <li>Antipodes - Good Winter (2018)</li>
</ul>

<h4 id="nzso">NZSO</h4>

<p>The <a href="https://www.nzso.co.nz/">New Zealand Symphony</a> is a world class orchestra with a <a href="https://www.stuff.co.nz/entertainment/music/90078705/nzso-at-70-ten-things-you-need-to-know-about-our-symphony-orchestra">colorful 79 years of history</a>. I saw two performances in 2025.</p>

<p>The first I picked based on the presence of <em>Firebird</em> on the program, which was perfomed with fire and sweetness. I was really impressed by special guest pianist Javier Perianes, and a piece by Manuel de Falla called <em>Nights in the Gardens of Spain</em>.</p>

<p><strong>Conductor:</strong> Joana Carneiro
<strong>Piano:</strong> Javier Perianes</p>

<ul>
  <li>J Ritchie Papanui Road Concert Overture</li>
  <li>de Falla Nights in the Gardens of Spain</li>
  <li>Ravel Piano Concerto in G Major</li>
  <li>Stravinsky Suite from The Firebird (1945 version)</li>
</ul>

<p>In the second show, André de Ridder conducted three pieces that share the theme of enchantment - Modest Mussorgsky’s <em>Night on Bald Mountain</em>, Paul Dukas’ <em>The Sorcerer’s Apprentice</em> and Igor Stravinsky’s <em>Petrushka</em>.</p>

<h2 id="3-shades-of-blue">3 Shades of Blue</h2>

<p><em>Kind of Blue</em> is one of the great works of American culture, a high water mark. For those interested in the history and the personalities behind the music, <a href="https://jameskaplan.net/3-shades-of-blue/">James Kaplan’s <em>3 Shades of Blue</em></a> is a great read centered around the making of that album. If you’re on Apple Music, check out the <a href="https://music.apple.com/us/playlist/3-shades-of-blue/pl.u-aZb0kg5uVRGo8y">3 Shades of Blue playlist</a>.</p>

<h2 id="end-of-a-golden-age">End of a Golden Age</h2>

<p>So much in the world is moving backwards, degraded by retrograde authoritarianism and tribalism. It’s healthy to intentionally appreciate what humans at our best can achieve, deeply flawed creatures that we are. Wrecking things is easy. Making good things is hard. But creating will always be cooler.</p>

<p><a href="/2025-01-26/music-2024.html">Music 2024</a></p>]]></content><author><name>J. Christopher Bare</name></author><category term="Music" /><category term="music" /><summary type="html"><![CDATA[Me enjoying some tunes at the lab]]></summary></entry><entry><title type="html">Books 2025</title><link href="/2026-01-11/books-2025.html" rel="alternate" type="text/html" title="Books 2025" /><published>2026-01-11T00:00:00+00:00</published><updated>2026-01-11T00:00:00+00:00</updated><id>/2026-01-11/books-2025</id><content type="html" xml:base="/2026-01-11/books-2025.html"><![CDATA[<p><img src="../images/books/reader.jpeg" alt="Old guy reading" /></p>

<ul>
  <li>Babel - R.F. Kuang</li>
  <li><a href="/2025-01-31/orbital.html">Orbital</a> - Samantha Harvey</li>
  <li>Erasure - Percival Everett</li>
  <li>3 Shades of Blue - James Kaplan</li>
  <li>Solaris - Stanislaw Lem</li>
  <li>I’m Starting to Worry About This Black Box of Doom - Jason Pargin</li>
  <li>Tomorrow &amp; Tomorrow &amp; Tomorrow - Gabrielle Zevin</li>
  <li>Player Piano - Kurt Vonnegut</li>
  <li>Hum - Helen Phillips</li>
  <li>Polostan - Neal Stephenson</li>
  <li>Playground - Richard Powers</li>
  <li>In Ascension - Martin MacInnes</li>
</ul>

<p>The standouts, for me, were <em>Orbital</em>, <em>Hum</em>, and <em>Playground</em>.</p>

<p>See also, <a href="/2025-01-04/books-2024.html">Books 2024</a> and <a href="https://www.goodreads.com/user/show/22238686-christopher-bare">GoodReads</a></p>

<h2 id="本を読む">本を読む</h2>
<p>Honwoyomu - “read a book”</p>]]></content><author><name>J. Christopher Bare</name></author><category term="Books" /><summary type="html"><![CDATA[]]></summary></entry><entry><title type="html">Learning Visual Context by Comparison</title><link href="/2025-12-14/learning-visual-context-by-comparison.html" rel="alternate" type="text/html" title="Learning Visual Context by Comparison" /><published>2025-12-14T00:00:00+00:00</published><updated>2025-12-14T00:00:00+00:00</updated><id>/2025-12-14/learning-visual-context-by-comparison</id><content type="html" xml:base="/2025-12-14/learning-visual-context-by-comparison.html"><![CDATA[<h2 id="tldr">TL;DR</h2>

<p>The paper <a href="https://arxiv.org/abs/2007.07506">Learning Visual Context by Comparison</a> describes the “attend-and-compare” module, a light-weight attention mechanism that can be added on to ResNet-style computer vision models. It was published by folks from <a href="https://www.lunit.io/en/">Lunit</a> on arXiv in July 2020 and was a <a href="https://link.springer.com/chapter/10.1007/978-3-030-58558-7_34">conference paper at ECCV 2020</a>.</p>

<p><img src="../images/ai/paper-learning-visual-context-by-comparison.png" alt="Learning Visual Context by Comparison paper, 2020" /></p>

<p>Since Lunit is now the parent company of my present employer, I thought it would be nice to find out something about their cool ideas. First, let’s meet the authors.</p>

<h2 id="authors">Authors</h2>

<ul>
  <li><a href="https://mckim.dev/">Minchul Kim</a> (김민철) - (Lunit: 2018-2021), now at Google.</li>
  <li><a href="https://sites.google.com/view/jongchanpark">Jongchan Park</a> (박종찬) - (Staff Research Scientist at Lunit: 2018–current), organized <a href="https://sites.google.com/lunit.io/iccv25-mmfmc">Multi-Modal Foundation Models for Cancer Detection and Prevention</a>.</li>
  <li><a href="https://seilna.github.io/">Seil Na</a> (나세일) - (Research Scientist, Lunit 2019-current)</li>
  <li><a href="https://scholar.google.com/citations?user=ACimkrMAAAAJ&amp;hl=en">Chang Min Park</a> (박창민) - Radiology, Seoul National University Hospital</li>
  <li><a href="https://dgyoo.github.io/">Donggeun Yoo</a> (유동근) - (Co-founder &amp; Chief of Research at Lunit)</li>
</ul>

<p>Several founders and early Lunitians were lab-mates in a <a href="https://ee.kaist.ac.kr/en/professor/kweon-in-so-2/">group run by In So Kweon at Korea Advanced Institute of Science and Technology</a> (KAIST) in Daejeon, South Korea. KAIST is a public research university founded in 1971, known as the “MIT of South Korea”. This paper builds on <a href="https://arxiv.org/abs/1807.06521">CBAM: Convolutional Block Attention Module</a> (2018) from that lab.</p>

<figure style="height: 55%; width: 55%; margin-left: 8em; margin-top: 2em;">
    <img src="/images/ai/in-so-kweon.png" alt="In So Kweon" class="img-responsive" />
    <figcaption style="font-size: small; font-style: italic;">Professor In So Kweon (권인소) at KAIST Korea Advanced Institute of Science and Technology</figcaption>
</figure>

<h2 id="context">Context</h2>

<p>This paper came during a wave of exploration of variants of CNN architectures, especially variants incorporating an attention mechanism.</p>

<h3 id="timeline-of-computer-vision">Timeline of Computer vision</h3>

<figure style="margin-left: 1em; margin-top: 2em;">
    <img src="../images/ai/timeline-of-computer-vision.png" alt="timeline of computer vision" class="img-responsive" />
    <figcaption style="font-size: small; font-style: italic;">AI slop timeline of computer vision, 1989-2020</figcaption>
</figure>

<ul>
  <li>Backpropagation Applied to Handwritten Zip Code Recognition, Y. LeCun et al, 1989</li>
  <li>AlexNet, ImageNet Classification with Deep Convolutional Neural Networks, Alex Krizhevsky, Ilya Sutskever, Geoffrey E. Hinton, 2012</li>
  <li>Neural Machine Translation by Jointly Learning to Align and Translate, September 2014</li>
  <li>ResNet, December 2015</li>
  <li>YOLO (You Only Look Once), June 2015</li>
  <li>Attention Is All You Need, June 2017</li>
  <li>Vision transformers, October 2020</li>
</ul>

<h3 id="convolutional-neural-networks">Convolutional Neural Networks</h3>

<p>As background, recall that convolutional networks learn feature maps whose complexity increases with depth in the network.</p>

<p><img src="../images/ai/cnn-layers-and-features.png" alt="convolutional neural networks" /></p>

<h2 id="attend-and-compare-method">Attend-and-compare method</h2>

<h3 id="inspiration">Inspiration</h3>

<p>“We paid attention to how radiology residents are trained, which led to the following question: why don’t we model the way radiologists read X-rays? When radiologists read chest X-rays, they compare zones, paying close attention to any asymmetry between left and right lungs, or any changes between semantically related regions, that are likely to be due to diseases.”</p>

<p><img src="../images/ai/acm-chest-x-ray.png" alt="Chest x-ray" /></p>

<p>“In this paper, we present a novel module, called Attend-and-Compare Module (ACM), that extracts features of an object of interest and a corresponding context to explicitly compare them by subtraction, mimicking the way radiologists read X-rays.”</p>

<p><img src="../images/ai/attend-and-compare-module.png" alt="attent and compare module" /></p>

<p>ACM derives a comparison signal from two attention-pooled prototypes, \(K-Q\). The squeeze-and-excitation gate (P) then reweights the channels of (X+(K-Q)).</p>

<h3 id="computing-the-acm-block">Computing the ACM block</h3>

<p>The ACM block computes K by projecting the feature map \(X\) with \(W_K\), which is a 1×1 convolution producing a single-channel score map. Then softmax over spatial locations \((i,j)\) to produce a \(C \times 1 \times 1\) vector. Q is computed similarly.</p>

\[X \in \mathbb{R}^{C \times H \times W}\]

<p>This is equation (2) of the paper:</p>

\[K = \sum_{i,j \in H,W}
    \frac{
        \exp(W_K X_{i,j})
    }{
        \sum_{h,w} \exp(W_K X_{h,w})
    }
    X_{i,j}\]

<p>I think \(K\) and \(Q\) are little easier to read like this:</p>

\[K = \sum_{i,j}
    \operatorname{softmax}_{(i,j)\in H\times W}\!\big(W_K X\big)_{i,j}\,
    X_{i,j}\]

\[Q = \sum_{i,j}
    \operatorname{softmax}_{(i,j)\in H\times W}\!\big(W_Q X\big)_{i,j}\,
    X_{i,j}\]

\[K, Q \in \mathbb{R}^{C \times 1 \times 1}\]

<p>Subtracting \(K-Q\) highlights contrasting features. It might learn to compare left vs right lung, although specific comparisons are learned and not baked into the algorithm. The algorithm doesn’t enforce anatomical pairing (left-right symmetry) unless the data and training encourage it. To get the result of the ACM we add that difference between \(K\) and \(Q\) back to the feature map \(X\) and multiply by \(P\).</p>

\[F_{acm}(X) = P(X + (K-Q))\]

<p>…where \(P\) is a squeeze-and-excitation block whose job it is to highlight features that are helpful for solving the task at hand.</p>

\[P = \sigma \circ \text{conv}^{1\times1}_{2} \circ \text{ReLU} \circ \text{conv}^{1\times1}_{1}(\mu)\]

<h3 id="cnns-with-attention">CNNs with Attention</h3>

<p>The late twenty-teens was a time of exploration of architectures combining attention and convolutions. A nice review paper that covers these kinds of methods is <a href="https://arxiv.org/abs/2204.07756">Visual attention methods in deep learning: An in-depth survey Hassanin, 2022</a> from which we get this figure:</p>

<p><img src="../images/ai/cnn-variants-2024.png" alt="alt text" /></p>

<p>In the figure, (a) is the squeeze-and-excitation (SE) block. Convolutional Block Attention Module (CBAM), (b), is a channel-and-spatial attention module for learning to attend to informative regions. CBAM is prior work from the same lab at KAIST. In contrast to ACM’s spatial attention pooling, CBAM learns an explicit spatial gating mask \(M_s\in\mathbb{R}^{1\times H\times W}\) that is applied to the feature map.</p>

<h3 id="comparison-with-transformer-style-self-attention">Comparison with transformer-style self-attention</h3>

<p>In transformers, K and Q are projections of individual tokens or image patches in vision transformers and they are used to compute pairwise attention. In ACM, K and Q are globally-pooled summaries of two contrasting regions which are subtracted to explicitly model comparison. This signal is then injected back to the feature map with the effect of highlighting difference.</p>

\[Q = XW_Q,\quad K = XW_K,\quad V = XW_V\]

\[\text{Attention}(Q, K, V)
= \text{softmax}\!\left(\frac{QK^\top}{\sqrt{d}}\right)V\]

<p><img src="../images/ai/transformer-attention-block.png" alt="transformer" /></p>

<p>Transformer-style attention is quadratic \(N \times N\) in the number of input tokens, providing pairwise mixing of information. By pooling over the spatial dimensions, ACM is lighter with more like linear scaling. \(K\) and \(Q\) are two global attention poolings whose difference is beneficial to recognition tasks. By splitting channels into groups and learning separate attention maps for each group, ACM gains something in the same spirit as multiheaded attention.</p>

<h2 id="is-it-still-worth-knowing">Is it still worth knowing?</h2>

<p>The attend-and-compare paper is from 2020 and sits in the “CNN plus attention” niche of the era before vision transformers. It’s a plug-in module for convolutional backbones that (a) learns where to look, and (b) adds channel reweighting. ACM makes explicit the inductive bias that comparison is important by encoding a difference signal and injecting it back into the feature map. ACM fits well with medical imaging tasks where compare-and-contrast is naturally informative.</p>

<p>The focus of research has largely moved on to vision transformers and more recently to multimodal foundation models.  Modern deep learning practice improves performance by training or pretraining more general models on larger datasets. Architecture tweaks matter less than scale. Pragmatically, though, modern CNNs remain competitive with transformers especially where training data is scarce or expensive.</p>

<h2 id="more">More</h2>

<ul>
  <li><a href="https://arxiv.org/abs/2007.07506">Learning Visual Context by Comparison</a></li>
  <li><a href="https://www.youtube.com/playlist?list=PLoROMvodv4rOmsNzYBMe0gJY2XS8AQg16">Stanford CS231N Deep Learning for Computer Vision - 2025</a></li>
</ul>]]></content><author><name>J. Christopher Bare</name></author><category term="AI, Machine Learning, Deep Learning" /><summary type="html"><![CDATA[TL;DR]]></summary></entry><entry><title type="html">Advanced LLM Agents MOOC</title><link href="/2025-05-31/llm-agents-mooc-spring-2025.html" rel="alternate" type="text/html" title="Advanced LLM Agents MOOC" /><published>2025-05-31T00:00:00+00:00</published><updated>2025-05-31T00:00:00+00:00</updated><id>/2025-05-31/llm-agents-mooc-spring-2025</id><content type="html" xml:base="/2025-05-31/llm-agents-mooc-spring-2025.html"><![CDATA[<p><img src="../images/UC-Berkeley-campanile.png" alt="Berkeley Campanile" /> <em>Image by <a href="https://www.flickr.com/photos/john_n_berk_pics_xyz/51096342158/">jngai58</a></em></p>

<p>Notes on <a href="https://llmagents-learning.org/sp25">Advanced Large Language Model Agents, Spring 2025</a>, an online class that picks up where <a href="https://llmagents-learning.org/f24">Large Language Model Agents MOOC, Fall 2024</a> left off. In the Berkeley catalog, it’s <a href="https://rdi.berkeley.edu/adv-llm-agents/sp25">CS294/194-280</a>.</p>

<h2 id="advanced-llm-agents-mooc">Advanced LLM Agents MOOC</h2>

<p>The <em>Advanced LLM Agents</em> course surveys twelve topics in current research focusing on reasoning, tool use, post-training and inference-time techniques, with applications spanning coding, mathematics, web interaction, and scientific discovery. Going beyond text completion, these models operate in workflows - planning, exploring, and evaluating iteratively.</p>

<p>Training has evolved towards staged recipes. Curated reasoning traces on tasks with verifiable outputs — code and math — serve as grounded reward signals for reinforcement learning, augmenting human feedback.</p>

<p>At inference time, models are augmented with retrieval, memory systems, and tool integration. Reasoning strategies such as chain-of-thought prompting and tree-based search allow models to decompose problems, explore solution spaces and self-correct.</p>

<p>Finally, the course underscores the convergence of LLMs with formal reasoning and scientific discovery. Systems like lean, a mathematical programming language and theorem prover, provide rigor with while LLMs supply intuition and abstraction - a powerful combination.</p>

<p>Yet, as model capabilities increase, so does the potential for exploitation. The final lecture promotes security principles for safely deploying increasingly powerful agentic agents.</p>

<h3 id="instructors">Instructors</h3>

<ul>
  <li><a href="https://dawnsong.io/">Dawn Song</a>, Professor, UC Berkeley</li>
  <li><a href="https://jungyhuk.github.io/">Xinyun Chen</a>, Research Scientist, Google DeepMind</li>
  <li><a href="/2024-12-10/llm-agents-mooc.html">Kaiyu Yang</a>, Research Scientist, Meta FAIR</li>
</ul>

<h3 id="topics">Topics</h3>

<ul>
  <li>Inference-time techniques for reasoning</li>
  <li>Post-training methods for reasoning</li>
  <li>Search and planning</li>
  <li>Agentic workflow, tool use, and functional calling</li>
  <li>LLMs for code generation and verification</li>
  <li>LLMs for mathematics: data curation, continual pretraining, and finetuning</li>
  <li>LLM agents for theorem proving and autoformalization</li>
</ul>

<h3 id="reading">Reading</h3>

<ul>
  <li>OpenAI blog <a href="https://openai.com/index/learning-to-reason-with-llms/">Learning to reason with LLMs</a></li>
  <li><a href="http://incompleteideas.net/IncIdeas/BitterLesson.html">The Bitter Lesson</a> by Rich Sutton</li>
</ul>

<h3 id="class-resources">Class Resources</h3>

<ul>
  <li><a href="https://discord.com/channels/1280234300012494859">LLM Agents Discord</a></li>
</ul>

<h2 id="lecture-1-inference-time-techniques-for-llm-reasoning">Lecture 1: <em>Inference-Time Techniques for LLM Reasoning</em></h2>

<p><a href="https://jungyhuk.github.io/">Xinyun Chen</a>
Google DeepMind</p>

<p><img src="../images/llm-agents/llm-agents.jpg" alt="Large language model agents" /></p>

<p>Solving real world tasks typically involves a trial-and-error process. Leveraging external tools and retrieving from external knowledge expand LLM’s capabilities. Agentic workflows facilitate complex tasks.</p>

<ul>
  <li>Task decomposition</li>
  <li>allocation of subtasks to specialized modules</li>
  <li>division of labor for collaboration</li>
</ul>

<h3 id="lets-think-step-by-step">“Let’s think step by step”</h3>

<p>In chain-of-thought prompting, we allow the model to adapt the amount of computation to the difficulty of the problem. For complex questions, the model can use more reasoning steps. Models can be trained or instructed to use reasoning strategies like decomposition, planning, analogies, etc.</p>

<p>Models can automate prompt design and optimize prompts. They can generate exemplars gaining the benefits of few-shot reasoning without human effort to write examples.</p>

<ul>
  <li><a href="https://arxiv.org/abs/2211.01910">Large Language Models Are Human-Level Prompt Engineers</a></li>
  <li><a href="https://arxiv.org/abs/2309.03409">Large Language Models As Optimizers</a></li>
  <li><a href="https://arxiv.org/abs/2310.01714">Large Language Models As Analogical Reasoners</a></li>
</ul>

<h3 id="explore-multiple-branches">Explore multiple branches</h3>

<p>We should not limit the LLM to only one solution per problem. Exploring multiple branches allows the LLM to recover from mistakes, generate multiple candidate solutions, or multiple next steps.</p>

<h4 id="self-consistency">Self-consistency</h4>

<p>Self-consistency is a simple and general principle in which we ask the model for several responses and select the response with the most consistent final answer. Consistency is highly correlated with accuracy.</p>

<ul>
  <li><a href="https://arxiv.org/abs/2203.11171">Self-Consistency Improves Chain of Thought Reasoning in Language Models</a></li>
</ul>

<h4 id="sample-and-rank">Sample-and-rank</h4>

<p>Rather than counting, we can instead select the response with the highest log probability. This performs less well than self-consistency, unless the model has been specifically fine-tuned for this purpose.</p>

<p>She showed a nice example of clustering LLM output in the context of code generation.</p>

<p><img src="../images/llm-agents/llm-code-generation.jpg" alt="LLM Code Generations" /></p>

<h4 id="tree-of-thought">Tree of thought</h4>

<p>Using the LLM to compare or rank candidate solution, or prioritize exploration of more promising partial solutions enables us to:</p>

<ul>
  <li>increase token budget for a single solution</li>
  <li>increase width to explore the solution space</li>
  <li>increase depth to refine the final solution over many steps</li>
</ul>

<h2 id="lecture-2-learning-to-self-improve--reason-with-llms">Lecture 2: <em>Learning to Self-Improve &amp; Reason with LLMs</em></h2>

<p>Jason Weston, Meta &amp; NYU</p>

<p>Goal: An AI that “trains” itself as much as possible</p>

<ul>
  <li>Creates new tasks to train on (challenges itself)</li>
  <li>Evaluates whether it gets them right (“self-rewarding”)</li>
  <li>Updates itself based on what it understood</li>
</ul>

<p><img src="../images/llm-agents/rlhf-vs-dpo.jpg" alt="RLHF vs DPO" /></p>

<p>Research question: can this help it become superhuman? Can an LLM improve itself by assigning rewards to its own outputs and optimizing?</p>

<h3 id="self-rewarding-lms">Self-rewarding LMs</h3>

<h4 id="observations">Observations:</h4>

<ul>
  <li>LLMs can improve if given good judgements on response quality</li>
  <li>LLMs can provide good judgements</li>
</ul>

<h4 id="train-a-self-rewarding-language-model-that">Train a self-rewarding language model that:</h4>

<ul>
  <li>Has instruction following capability</li>
  <li>Has evaluation capability, i.e., given a user instruction, one or more responses, can judge the quality of responses, aka LLM-as-judge</li>
</ul>

<p>…then this model can go through an iterative process of data creation/curation training on new data. And, get better at both instruction following and
evaluation in each cycle.</p>

<p><img src="../images/llm-agents/self-rewarding-language-models.jpg" alt="Self-rewarding language models" /></p>

<h2 id="lecture-3-on-reasoning-memory-and-planning-of-language-agents">Lecture 3: On Reasoning, Memory, and Planning of Language Agents</h2>

<p>Yu Su, Ohio State University</p>

<p><img src="../images/llm-agents/yu-su-language-agents-framework.jpg" alt="Language agent framework" /></p>

<h3 id="memory">Memory</h3>

<p>Memory is central to human learning. We recognize patterns and associations relevant to the current context. <a href="https://arxiv.org/abs/2405.14831">HippoRAG</a> uses a learned associative concept map as an index for non-parametric (in context) learning. Large embedding models perform at least as well.</p>

<h3 id="reasoning">Reasoning</h3>

<p>Can LLMs learn compositional and comparative reasoning?</p>

<p>Examples:</p>

<ul>
  <li>Barack’s wife is Michelle. Michelle was born in 1964. When was Barack’s wife born?</li>
  <li>Trump is 78. Biden is 82. Who is younger?</li>
</ul>

<p><a href="https://arxiv.org/abs/2405.15071">Grokked transformers are implicit reasoners</a>: extended training far beyond overfitting enables reasoning without prompting or fine-tuning.</p>

<h3 id="planning">Planning</h3>

<p>Simplified definition: Given a goal G, decide a sequence of actions (a_0, a_1, …, a_n) that will lead to a state that passes the goal test g(•).</p>

<p>General trends in planning settings for language agents</p>

<ul>
  <li>Increasing expressiveness in goal specification, e.g., in natural language as opposed to formal language</li>
  <li>Substantially expanded or open-ended action space</li>
  <li>Increasing difficulty in automated goal test</li>
</ul>

<p>Language Agents tutorial: https://language-agent-tutorial.github.io/</p>

<h2 id="lecture-4-open-training-recipes-for-reasoning-in-language-models">Lecture 4: Open Training Recipes for Reasoning in Language Models</h2>

<p><a href="https://homes.cs.washington.edu/~hannaneh/">Hanna Hajishirzi</a>, University of Washington, Allen AI Institute Ai2</p>

<p>It’s critical for research that there be open frontier models with training process that is transparent and reproducible. Ai2 has produced produced open pretrained LLMs: OLMo, OLMo2, OLMoE and an open post-training process called Tulu. HH’s talk is on open recipes for training LLMs and reasoning models.</p>

<h3 id="overview-of-open-recipe-for-training-llms-and-reasoning-models">Overview of open recipe for training LLMs and reasoning models</h3>

<p><img src="../images/llm-agents/tulu-post-training-recipe.png" alt="Open training recipe" /></p>

<h3 id="data-curation">Data curation</h3>

<p>Training sets for proprietary models are kept secret, not least due to use of copyrighted material. Open models require a training set free of legal conflicts.</p>

<p><img src="../images/llm-agents/tulu-datasets-graphic.jpg" alt="Datasets graphics" /></p>

<p><img src="../images/llm-agents/tulu-datasets.jpg" alt="Datasets table" /></p>

<h3 id="open-post-training-recipe">Open post training recipe</h3>

<p>Post training consists of three strategies - instruction fine-tuning, preference tuning (RLHF or RLAIF), and reinforcement learning with verifiable feedback (RLVF).</p>

<p><img src="../images/llm-agents/tulu-post-training-process.jpg" alt="Open post-training recipe" /></p>

<h3 id="preference-tuning">Preference tuning</h3>

<p>Preference tuning takes a base model oriented to document completion and improves its ability to follow instructions, hold a conversation, and perform reasoning tasks.</p>

<h4 id="proximal-policy-optimization">Proximal policy optimization</h4>

<p>Proximal Policy Optimization (PPO; Schulman et al., 2017) first trains a reward model and then uses RL to optimize the policy to maximize those rewards.</p>

\[\max_{\pi_{\theta}} \mathbb{E}_{x \sim \mathcal{D}, y \sim \pi_{\theta}(y \mid x)} \left[ r_{\phi}(x, y) \right] 
- \beta \mathbb{D}_{\text{KL}} \left[ \pi_{\theta}(y \mid x) \,||\, \pi_{\text{ref}}(y \mid x) \right]\]

<h4 id="direct-policy-optimization">Direct policy optimization</h4>

<p>Direct Preference Optimization (DPO; Rafailov et al., 2024) directly optimizes the policy on the preference dataset; no explicit reward model.</p>

\[\mathcal{L}_{\text{DPO}}(\pi_{\theta}; \pi_{\text{ref}}) = 
- \mathbb{E}_{(x, y_w, y_l) \sim \mathcal{D}} 
\left[ \log \sigma \left( \beta \log \frac{\pi_{\theta}(y_w \mid x)}{\pi_{\text{ref}}(y_w \mid x)} 
- \beta \log \frac{\pi_{\theta}(y_l \mid x)}{\pi_{\text{ref}}(y_l \mid x)} \right) \right]\]

<h4 id="simpo">SimPO</h4>

<p>SimPO (Meng et al., 2024) does not use a reference model.</p>

\[\mathcal{L}_{\text{SimPO}}(\pi_{\theta}) = 
- \mathbb{E}_{(x, y_w, y_l) \sim \mathcal{D}} 
\left[ \log \sigma \left( \frac{\beta}{|y_w|} \log \pi_{\theta}(y_w \mid x) 
- \frac{\beta}{|y_l|} \log \pi_{\theta}(y_l \mid x) - \gamma \right) \right]\]

<h4 id="grpo">GRPO</h4>

<p>Group relative policy optimization (GRPO) was introduced in the DeepSeek R1 paper. For each question 𝑞, GRPO samples a group of outputs {𝑜1, 𝑜2, …, 𝑜𝐺} from the old policy \(\pi_{\theta_{\text{old}}}\) and then optimizes the policy model \(\pi_{\theta}\) by maximizing the following objective:</p>

\[\mathcal{J}_{GRPO}(\theta) = \mathbb{E} \left[ \frac{1}{G} \sum_{i=1}^{G} 
\min \left( \frac{\pi_{\theta}(o_i \mid q)}{\pi_{\theta_{\text{old}}}(o_i \mid q)} A_i, 
\text{clip} \left( \frac{\pi_{\theta}(o_i \mid q)}{\pi_{\theta_{\text{old}}}(o_i \mid q)}, 1 - \epsilon, 1 + \epsilon \right) A_i \right) 
\right] - \beta \mathbb{D}_{\text{KL}} \left( \pi_{\theta} \| \pi_{\text{ref}} \right)\]

\[A_i = \left( \frac{r_i - \bar{r}}{\sigma_r} \right)\]

<p>Or, as a loss to be more comparable to the other preference tuning losses:</p>

\[\mathcal{L}_{GRPO}(\theta) = - \mathbb{E} \left[ \frac{1}{G} \sum_{i=1}^{G} \hat{A_i} \right] + \beta \mathbb{D}_{\text{KL}} \left( \pi_{\theta} \| \pi_{\text{ref}} \right)\]

<p>…where \(\hat{A_i}\) is the <em>clipped policy advantage</em> of the <em>ith</em> output in the group.</p>

<p>Each output is assigned a reward \(r_i\), and the rewards are normalized by subtracting the mean and dividing by the standard deviation. This  group-based reward normalization is more efficient by eliminating the need for a separate value function, and appears effective in practice.</p>

<p>I’m still working on understanding GRPO, so don’t take this as gospel.</p>

<h3 id="mid-training">Mid-training</h3>

<p>Given the observation that post-training yields larger improvements on more capable base models, how do we go about trying to improve reasoning capabilities of base models? A mid-training stage can be inserted at the end of pre-training that trains on next-token prediction on curated high-quality data including human curated reasoning traces, and math and coding with a verifiably correct answer.</p>

<h2 id="lecture-5-coding-agents-and-ai-for-vulnerability-detection">Lecture 5: Coding Agents and AI for Vulnerability Detection</h2>

<p><a href="https://homepages.inf.ed.ac.uk/csutton/">Charles Sutton</a>, Google DeepMind</p>

<h3 id="evaluating-coding-agents">Evaluating coding agents</h3>

<p><a href="https://www.swebench.com/">SWE-bench</a> is a dataset that tests systems’ ability to solve GitHub issues automatically. The dataset collects 2,294 Issue-Pull Request pairs from 12 popular Python repositories. Evaluation is performed by unit test verification using post-PR behavior as the reference solution.</p>

<p><a href="https://swe-agent.com/latest/">SWE-agent</a> lets your language model of choice (e.g. GPT-4o or Claude Sonnet 3.5) autonomously use tools to fix issues in real GitHub repositories, crack cybersecurity challenges, etc.</p>

<h3 id="the-react-loop">The ReACT loop</h3>

<p>Repeat until timeout, error, or success</p>
<ul>
  <li>LLM generates text given current trajectory</li>
  <li>Run tools from LLM output</li>
  <li>Append tool output to trajectory</li>
</ul>

<p><a href="https://arxiv.org/abs/2501.07531v1">Passerine</a> Google’s coding agent for bug fixes.</p>

<h3 id="ai-for-computer-security">AI For computer security</h3>

<p>LLMs playing capture the flag. Agentic techniques seem particularly natural fit. Lists datasets and a few challenge competitions.</p>

<h2 id="lecture-6-web-agents">Lecture 6: Web Agents</h2>

<p>Ruslan Salakhutdinov, CMU/Meta</p>

<p>Rus spoke on multimodal autotonomous AI agents for performing tasks on the web. The agents were trained and evaluated in mock environments, with mock shopping, search, etc.</p>

<p>Tree search benefits accuracy in these contexts, but is slow and suffers from hard-to-undo actions. Synthetic data can also help - use Llama to generate and verify synthetic agentic tasks.</p>

<h3 id="common-vs-rare-cases">Common vs rare cases</h3>

<p>A general principle, maybe: Training techniques that work well for common cases where there are lots of labeled examples to train on differ from techniques that work well in rare cases.</p>

<p>Examples:</p>

<ul>
  <li>Synthetic data can cover whole problem space evenly. Human-curated real world data covers limited parts of the problem space.</li>
  <li>CBOW vs skip-grams in word2vec: skip-grams seem to be helpful for rare words.</li>
</ul>

<h3 id="multistep-tasks">Multistep tasks</h3>

<p>AI Agents are brittle to multistep tasks due to compounding errors. If they go wrong, they have difficulty recovering. Work needed on self-correction and recovery.</p>

<h3 id="common-failure-modes">Common failure modes</h3>

<ul>
  <li>long horizon reasoning and planning</li>
  <li>getting stuck looping or oscillating</li>
  <li>correctly performing tasks then undoing them</li>
  <li>stopping exploration or execution too early</li>
</ul>

<h3 id="attacks">Attacks</h3>

<p>An attack on web agent is to hide instructions in HTML comments, figure captions, etc.</p>

<h3 id="reinforcement-learning-framing">Reinforcement learning framing</h3>

<p>POMDP - Partially observable Markov decision process.</p>

\[\mathcal{E} = {\mathcal{S}, \mathcal{A}, \mathcal{O}, \mathcal{T}}\]

\[\mathcal{S}: state\]

\[\mathcal{A}: actions\]

\[\mathcal{O}: observations\]

\[\mathcal{T}: Transition function\]

\[\mathcal{T}: \mathcal{S} \times \mathcal{A} \rightarrow \mathcal{S}'\]

<h2 id="lecture-7-multimodal-agents">Lecture 7: Multimodal Agents</h2>

<p>Caiming Xiong, Salesforce AI Research</p>

<p>Another talk on multimodal agents for doing computer-based tasks. <strong>OSWorld</strong> is a virtual machine environment in which agents can perform tasks like coding, data analysis, making slides, manipulating images, and editing documents. Tasks come with evaluation scripts, a process they call execution-based evaluation.</p>

<h3 id="data-challenges-for-agent-training">Data Challenges for Agent Training</h3>

<ul>
  <li>Agent models require expensive human annotation to collect agent trajectory data.</li>
  <li>This contrasts with LLMs, which leverage existing text corpora.</li>
  <li>Human annotation is time-consuming, costly, and limits scalability.</li>
  <li>The cost and complexity of human annotation make it difficult to collect diverse and large-scale agent trajectory data.</li>
</ul>

<p>Why not let models synthesize? What they did is agent trajectory synthesis via guiding
replay with web tutorials.</p>

<p>CoTA: Chains-of-Thought-and-Action</p>

<h2 id="lecture-8-alphaproof---when-rl-meets-formal-maths">Lecture 8: AlphaProof - When RL meets Formal Maths</h2>

<p>Thomas HUBERT, Google DeepMind</p>

<p>Mathematics is a root node of intelligence. Being good at math requires:</p>

<ul>
  <li>Reasoning &amp; Planning</li>
  <li>Generalisation &amp; Abstraction</li>
  <li>Knowledge &amp; Creativity</li>
  <li>Open ended &amp; Unbounded complexity</li>
  <li>Even an eye for beauty</li>
</ul>

<p>Formalisation in Mathematics provides:</p>

<ul>
  <li>Rigor and clarity</li>
  <li>Efficiency and Communication</li>
  <li>Abstraction and Generalisation</li>
  <li>Unification</li>
  <li>Created new fields</li>
</ul>

<h3 id="lean">Lean</h3>

<p>Lean is a programming language, theorem prover, and interactive proof assistant. It is a digital programmable formalism for mathematics that aims to be general and unified.</p>

<h3 id="reinforcement-learning">Reinforcement learning</h3>

<p>Following in the footsteps of AlphaGo and AlphaFold, they hope to RL their way to superhuman math ability.</p>

<p>“If an agent can learn to master an environment tabula rasa, then you demonstrably have a system that is discovering and learning new knowledge by itself.”</p>

<p>He gives the following recipe for making a system superhuman:</p>

<ul>
  <li>Scaled up trial and error</li>
  <li>Grounded feedback signal</li>
  <li>Search</li>
  <li>Curriculum</li>
</ul>

<p>Lean gives us an environment in which to scale up trial and error with a grounded feedback signal - perfect proof verification.</p>

<p>Given a had problem, they generate many variants of the problem, some of which will be easier to solve. They use “test-time RL” to iterate from easier variants of the problem towards the original hard problem. Not sure I got this part.</p>

<p>The slides have a couple of very cool demos, which he skipped over. Maybe I can find those online somewhere.</p>

<h2 id="lecture-9-language-models-for-autoformalization-and-theorem-proving">Lecture 9: Language models for autoformalization and theorem proving</h2>

<p>Kaiyu Yang, Meta FAIR</p>

<p>LLMs are frequently evaluated on math and coding tasks because they are important examples of reasoning and are relatively easy to evaluate. Math and code are deeply connected. See: <a href="https://epoch.ai/frontiermath">Epoch AI’s FrontierMath</a> benchmark.</p>

<h3 id="training-llms-for-math">Training LLMs for math</h3>

<p><img src="../images/llm-agents/training-math-llms.jpg" alt="SFT for math models" />
<em><a href="https://huggingface.co/blog/winning-aimo-progress-prize">How NuminaMath Won the 1st AIMO Progress Prize</a>, Fleureau et al, 2024</em></p>

<ul>
  <li>Supervised Finetuning on mathematical date - math overflow pages or papers from arXiv.</li>
  <li>SFT on problems with step-by-step solutions.</li>
  <li>SFT on problems with tool-integrated solutions.</li>
  <li>RL on problems with verifiable solutions but no intermediate steps.</li>
</ul>

<p>See paper: <a href="https://arxiv.org/abs/2412.16075v1">Formal Mathematical Reasoning: A New Frontier in AI</a></p>

<h3 id="lean-dojo">Lean Dojo</h3>

<p>Kaiyu Yang was first author on <a href="https://arxiv.org/abs/2306.15626">LeanDojo: Theorem Proving with Retrieval-Augmented Language Models</a> (2023), in which they use vector similarity retrieval from a library of lemmas.</p>

<p><img src="../images/llm-agents/proof-search.jpg" alt="Proof search" /></p>

<h3 id="autoformalization">Autoformalization</h3>

<p>Bridging between informal and formal mathematical expressions. See: <a href="https://deepmind.google/discover/blog/alphageometry-an-olympiad-level-ai-system-for-geometry/">AlphaGeometry: An Olympiad-level AI system for geometry</a> and <a href="https://huggingface.co/blog/winning-aimo-progress-prize">Autoformalizing Euclidean Geometry</a> in which they translate 48 problems from Book 1 of Euclid’s Elements into Lean.</p>

<p>Challenges in autoformalization:</p>

<ul>
  <li>Human written proofs are full of holes - reasoning gaps</li>
  <li>Evaluation is difficult</li>
</ul>

<p>These are doable within limited domains, but how do you generalize across domains?</p>

<h2 id="lecture-10-bridging-informal-and-formal-mathematical-reasoning">Lecture 10: Bridging Informal and Formal Mathematical Reasoning</h2>

<p>Sean Welleck, CMU</p>

<p>Sean introduces Lean-STaR which is an RL system to train LMs to produce mathematical proofs by interleaving informal thoughts and steps in the proof, sampling lots of coninuations of the proof, and getting reward signal from Lean’s proof verification.</p>

<p><img src="../images/llm-agents/automated-theorem-proving.jpg" alt="Automated Theorem Prover workflow" /></p>

<p>Two approaches:</p>

<ul>
  <li>Draft-sketch-prove</li>
  <li>LeanHammer</li>
</ul>

<p>A hammer theorem prover is a tool that uses external automated theorem provers (ATPs) to help find proofs within a larger proof assistant system.</p>

<p>Related:</p>

<ul>
  <li><a href="https://terrytao.wordpress.com/2023/11/18/formalizing-the-proof-of-pfr-in-lean4-using-blueprint-a-short-tour/">Formalizing the proof of PFR in Lean4 using Blueprint</a> by Terence Tao</li>
  <li><a href="https://github.com/cmu-l3">CMU Learning Language and Logic lab on github</a></li>
</ul>

<h2 id="lecture-11-abstraction-and-discovery-with-large-language-model-agents">Lecture 11: Abstraction and Discovery with Large Language Model Agents</h2>

<p>Swarat Chaudhuri, UT Austin</p>

<h3 id="mathematical-discovery-with-llm-agents">Mathematical Discovery with LLM Agents</h3>

<h4 id="challenges-with-nns-for-proof-generation">Challenges with NNs for proof generation</h4>

<p><strong>Data scarcity</strong></p>
<ul>
  <li>Need traces or reward functions that enable rigorous mathematical reasoning</li>
  <li>This is difficult beyond high-school or competition settings.</li>
</ul>

<p><strong>Lack of verifiability</strong></p>
<ul>
  <li>Natural-language reasoning is hard to verify</li>
  <li>In applications like system verification, edge cases are especially critical.</li>
</ul>

<h4 id="in-context-learning-for-theorem-proving">In-context learning for theorem proving</h4>

<p><img src="../images/llm-agents/copra.jpg" alt="Copra - In-context learning for theorem proving" /></p>

<ul>
  <li>LLMs and in-context learning are powerful tools for mathematical reasoning.
    <ul>
      <li>RAG over lemmas.</li>
      <li>Feedback from theorem prover, Coq or Lean.</li>
    </ul>
  </li>
  <li>Similar techniques work for program verification.</li>
</ul>

<h3 id="ai-for-scientific-discovery">AI for Scientific Discovery</h3>

<p><img src="../images/llm-agents/scientific-progress.jpg" alt="Scientific progress" /></p>

<h4 id="symbolic-regression---llm-agents-for-empirical-discovery">Symbolic Regression - LLM Agents for Empirical Discovery</h4>

<p>How do we derive a physical law from observed data? Genetic algorithms are often used for symbolic regression. But what if we use an LLM to generate candidate programs, like the cross-over step in evolutionary algos.</p>

<p><img src="../images/llm-agents/keplers-third-law.jpg" alt="alt text" /></p>

<ul>
  <li><strong>LLM-directed evolution</strong> is a powerful tool for empirical scientific discovery.</li>
  <li>Frontier LLMs inject prior world knowledge into mutation/crossover operators.</li>
  <li>LLMs can be used to learn abstract concepts that accelerate evolution.</li>
  <li>All this can be applied to settings with visual inputs as well.</li>
</ul>

<p>Concluding notes: Combinations of agentic LLMs with other machinery are a very powerful tool for discovery.</p>

<h2 id="lecture-12-towards-building-safe-and-secure-agentic-ai">Lecture 12: Towards building safe and secure agentic AI</h2>

<p>Dawn Song, UC Berkeley</p>

<h3 id="attacks-on-agentic-systems">Attacks on Agentic Systems</h3>

<ul>
  <li>SQL injection using LLM</li>
  <li>Remote code execution (RCE) using LLM</li>
  <li>Direct/Indirect Prompt Injection</li>
  <li>Backdoor</li>
</ul>

<h3 id="prompt-injection-attack-surface">Prompt Injection Attack Surface</h3>

<ul>
  <li>Manipulated user input</li>
  <li>Data poisoning: open datasets, documents on public internet</li>
</ul>

<p><img src="../images/llm-agents/indirect-prompt-injection.jpg" alt="Prompt injection attack" /></p>

<p>Decodingtrust.github.io - Comprehensive Assessment of Trustworthiness in GPT Models</p>

<h3 id="defense-principles">Defense Principles</h3>

<ul>
  <li>Defense-in-depth</li>
  <li>Least privilege &amp; privilege separation</li>
  <li>Safe-by-design, secure-by-design, provably secure</li>
</ul>

<h3 id="defense-mechanisms">Defense Mechanisms</h3>

<ul>
  <li>Harden models</li>
  <li>Guardrail for input sanitization</li>
  <li>Policy enforcement on actions</li>
  <li>Privilege management</li>
  <li>Privilege separation</li>
  <li>Monitoring and detection</li>
  <li>Information flow tracking</li>
  <li>Secure-by-design and formal verification</li>
</ul>]]></content><author><name>J. Christopher Bare</name></author><category term="AI, Machine Learning, Deep Learning" /><category term="Learning" /><category term="AI" /><category term="LLMs" /><category term="Classes" /><summary type="html"><![CDATA[Image by jngai58]]></summary></entry><entry><title type="html">Scenius</title><link href="/2025-02-15/scenius.html" rel="alternate" type="text/html" title="Scenius" /><published>2025-02-15T00:00:00+00:00</published><updated>2025-02-15T00:00:00+00:00</updated><id>/2025-02-15/scenius</id><content type="html" xml:base="/2025-02-15/scenius.html"><![CDATA[<p>Now and then, the right mix of creative people come together in favorable conditions and something special happens. They begin riffing off each other, learning from and building on each other’s work. When everything lines up just right, the result is an intellectual and artistic efflorescence, humans at their most creative.</p>

<p><a href="https://www.brian-eno.net/about/">Brian Eno</a> coined a term for this: “Scenius stands for the intelligence and the intuition of a whole cultural scene. It is the communal form of the concept of the genius.”</p>

<p><img src="../images/illustrations/network.jpg" alt="Network" /></p>

<p><a href="https://kk.org/thetechnium/scenius-or-comm/">Kevin Kelly writes</a>, the geography of scenius is nurtured by several factors:</p>

<ul>
  <li><strong>Mutual appreciation</strong> — Risky moves are applauded by the group, subtlety is appreciated, and friendly competition goads the shy. Scenius can be thought of as the best of peer pressure.</li>
  <li><strong>Rapid exchange of tools and techniques</strong> — As soon as something is invented, it is flaunted and then shared. Ideas flow quickly because they are flowing inside a common language and sensibility.</li>
  <li><strong>Network effects of success</strong> — When a record is broken, a hit happens, or breakthrough erupts, the success is claimed by the entire scene. This empowers the scene to further success.</li>
  <li><strong>Local tolerance for novelties</strong> — The local “outside” does not push back too hard against the transgressions of the scene. The renegades and mavericks are protected by this buffer zone.</li>
</ul>

<p>When I was first working in the Bay Area, I found that there were two types of smart people. There were smart people that made you feel dumb and useless. And then, there were smart people that, if only for a moment, lifted you up to their level. You could see further and do more in their proximity. I decided, as much as possible, to gravitate toward the latter type.</p>

<p>A few key individuals of exceptional talent and the right mindset can anchor a scene that grows and sustains itself. In a small way, all you need is a few people being in flow together. The key is that it’s a shared experience. “Genius is individual, scenius is communal.”</p>

<p>Where do you see creative things happening around you that need support or nurturing? We should all look for ways to help virtuous cycles start spinning.</p>

<h2 id="famous-examples">Famous examples</h2>

<ul>
  <li>New York City jazz scene of the 1950s</li>
  <li>Paris in the 1920s</li>
  <li>Mathematics at the University of Göttingen</li>
  <li>Physics in the early 20th century</li>
  <li>The Lunar Society</li>
  <li>The Viennese Classical Period</li>
  <li>Rock climbers at Camp 4 in Yosemite</li>
  <li>The Algonquin Round Table</li>
  <li>The Harlem Renaissance</li>
  <li>Bell Labs</li>
  <li>Xerox PARC</li>
  <li>Silicon Valley</li>
  <li>Florence during the Renaissance</li>
  <li>Baghdad’s House of Wisdom</li>
</ul>]]></content><author><name>J. Christopher Bare</name></author><category term="Ideas" /><summary type="html"><![CDATA[Now and then, the right mix of creative people come together in favorable conditions and something special happens. They begin riffing off each other, learning from and building on each other’s work. When everything lines up just right, the result is an intellectual and artistic efflorescence, humans at their most creative.]]></summary></entry><entry><title type="html">Techniques of Suppression and Counterstrategies</title><link href="/2025-02-02/techniques-of-suppression.html" rel="alternate" type="text/html" title="Techniques of Suppression and Counterstrategies" /><published>2025-02-02T00:00:00+00:00</published><updated>2025-02-02T00:00:00+00:00</updated><id>/2025-02-02/techniques-of-suppression</id><content type="html" xml:base="/2025-02-02/techniques-of-suppression.html"><![CDATA[<p>I’ve worked in lots organizations with fairly typical levels of dysfunction and in one that could in fairness be described as toxic. From that, I took away a personal appreciation for the effect, positive or negative, the social climate of a workplace has on its members.</p>

<p>Human beings are a tribal animal and as such our instincts are to form groups and establish hierarchy within them. Those instincts can work in our favor when they appeal to our better nature or can be exploited to manipulate us and work against our interests.</p>

<figure>
    <img src="/images/illustrations/wisdom-of-the-universe-christi-belcourt.png" alt="Wisdom of the Universe by Christi Belcourt" />
    <figcaption style="font-size: small; font-style: italic; text-align: right; margin-right: 2em;">
      Wisdom of the Universe by Christi Belcourt
    </figcaption>
</figure>

<p>How do you identify and assess toxicity in a workplace or any other group? How and why is that kind environment created and maintained? As individuals, can we actively contribute to a better environment? If <em>the man</em> is keeping us down, we don’t have to passively accept it. We can observe how it works, push back, and try to improve the system in which we operate.</p>

<h2 id="addressing-power-structures-and-changing-social-climates">Addressing Power Structures and Changing Social Climates</h2>

<p>The term “<a href="https://en.wikipedia.org/wiki/Master_suppression_techniques">master suppression techniques</a>” was introduced by Norwegian psychologists Ingjald Nissen and Berit Ås to describe strategies of social manipulation by which a dominant group maintains their position by undermining others.</p>

<p>To some degree, these domination techniques are default human behaviors that we fall into without thinking. It takes conscious effort to push back against the worst in our natures. When leaders practice these dark patterns of behavior and, by example, give others license to do the same, things get ugly.</p>

<p>It’s important to realize that the same environment can be experienced differently by different people. If you’re in the <em>in</em> group, you’re having a different experience from those in the <em>out</em> group and vice versa. Your mileage may vary along dimensions of experience, skillset, gender, ethnicity, personality, etc. An environment that’s great for seniors might be bad for juniors, great for engineering but bad for data science.</p>

<p>The <em>Empowerment Network at Stockholm University</em> proposes <strong>counterstrategies</strong> to combat dominance techniques and <strong>affirmation techniques</strong> to promote healthier social climates. Their work was done in the context of women in the workplace, but really applies to any group of humans. Below is a translation (thanks GPT4o) and summary of their paper <em><a href="https://arligttalat.nu/wp-content/uploads/2024/08/ENSU-bekraftartekniker.pdf">Bekräftartekniker och motstrategier - sätt att bemöta maktstrukturer och förändra sociala klimat</a></em>, lightly edited by me.</p>

<h3 id="dominance-techniques-and-counterstrategies">Dominance Techniques and Counterstrategies</h3>

<ol>
  <li>
    <p><strong>Invisibility</strong></p>

    <ul>
      <li><em>Technique</em>: Marginalizing people by ignoring or diminishing their contributions, not acknowledging their name or ideas, talking over someone in a meeting.</li>
      <li><em>Counterstrategy</em>: <strong>Take Space</strong> – Assert yourself calmly and confidently, address the behavior directly, and demand recognition.</li>
      <li><em>Affirmation Technique</em>: <strong>Visibility</strong> – Actively acknowledge others by listening, responding, and being constructive.</li>
    </ul>
  </li>
  <li>
    <p><strong>Ridicule</strong></p>

    <ul>
      <li><em>Technique</em>: Mocking or belittling.</li>
      <li><em>Counterstrategy</em>: <strong>Question</strong> – Challenge ridicule with calm, logical responses, and directly address demeaning remarks.</li>
      <li><em>Affirmation Technique</em>: <strong>Respect</strong> – Take others seriously. Be supportive and make everyone feel valued.</li>
    </ul>
  </li>
  <li>
    <p><strong>Withholding Information</strong></p>

    <ul>
      <li><em>Technique</em>: Deliberately excluding individuals from access to important information or decision-making processes, limiting their ability to act effectively, e.g., not inviting to important meetings.</li>
      <li><em>Counterstrategy</em>: <strong>Demand Transparency</strong> - call out patterns of exclusion.</li>
      <li><em>Affirmation Technique</em>: <strong>Transparency</strong> – Open and inclusive decision-making processes.</li>
    </ul>
  </li>
  <li>
    <p><strong>Double-bind</strong></p>

    <ul>
      <li><em>Technique</em>: Criticizing individuals no matter their choice. Damned if you do, damned if you don’t.</li>
      <li><em>Counterstrategy</em>: <strong>Break the Pattern</strong> – Own your choices without internalizing the imposed conflict, acknowledge trade-offs, define priorities.</li>
      <li><em>Affirmation Technique</em>: <strong>Double Reward</strong> – Support individual choices. Open many paths to success.</li>
    </ul>
  </li>
  <li>
    <p><strong>Blame and Shame</strong></p>

    <ul>
      <li><em>Technique</em>: Making individuals feel responsible for situations beyond their control, internalizing blame and undermining self-esteem. Public criticism.</li>
      <li><em>Counterstrategy</em>: <strong>Intellectualize</strong> – Reflect on guilt and shame. Identifying external sources. Don’t internalize. Set your own standards and live by them.</li>
      <li><em>Affirmation Technique</em>: <strong>Affirm Yourself and Others</strong> – Be positive and supportive. Emphasize validation and mutual respect. Own success and failure collectively.</li>
    </ul>
  </li>
</ol>

<h3 id="conclusions">Conclusions</h3>

<p>By identifying and countering dominance techniques, individuals can take control of their circumstances and contribute to establishing a healthier workplace. These methods are practical tools to improve interaction patterns and foster more positive norms.</p>

<p>These oppressive strategies exist because they benefit someone. Prestige is a zero-sum game, at least in its shallow forms. Prizes, awards, and titles mean little if everyone gets one. For every winner, there has to be losers - the also-rans, the red shirts. You can stand out by diminishing those around you. But, in doing so, you pollute the environment around you and drive away the best contributors.</p>

<p>In a better form, social reinforcement can be more of a virtuous cycle. The best bring up the rest. Others build on our successes and we on theirs. This kind of shared flourishing results in something deeper than a charade of prestige. We influence and are influenced by those around us. When a group guides its members toward being their best selves, that <a href="https://www.nytimes.com/2025/01/09/opinion/character-building-education.html">character building</a> lifts everyone. In the rare best case, everyone is riffing off of each other like jazz musicians in 1950’s New York or mathematicians at Göttingen. This is what Brian Eno calls <a href="/2025-02-15/scenius.html">scenius</a>, which he defines as “the intelligence and intuition of a whole cultural scene.”</p>

<p>If you find yourself in a toxic environment, do yourself a favor and get out. But, every organization has some level of dysfunction. Creating the kind of working life we want takes effort. If we want to work in a good environment, we have to play a part in making it good. Falling into negative behaviors is easy and contagious. With enlightened self-interest, we have to choose to interact in a positive way and expect the same of those around us.</p>]]></content><author><name>J. Christopher Bare</name></author><category term="Working in Tech" /><summary type="html"><![CDATA[I’ve worked in lots organizations with fairly typical levels of dysfunction and in one that could in fairness be described as toxic. From that, I took away a personal appreciation for the effect, positive or negative, the social climate of a workplace has on its members.]]></summary></entry><entry><title type="html">Orbital by Samantha Harvey</title><link href="/2025-01-31/orbital.html" rel="alternate" type="text/html" title="Orbital by Samantha Harvey" /><published>2025-01-31T00:00:00+00:00</published><updated>2025-01-31T00:00:00+00:00</updated><id>/2025-01-31/orbital</id><content type="html" xml:base="/2025-01-31/orbital.html"><![CDATA[<p><img src="../images/books/orbital.jpeg" alt="Orbital by Samantha Harvey" /></p>

<p><em>“All your dreams of adventure and freedom and discovery culminate…and then you go nowhere but round and round with the same old thoughts going round and round with you.”</em></p>

<p><em>Orbital</em> by Samamtha Harvey is a beautiful and contemplative book. It’s part of a growing subgenre of books in which nothing much happens, but takes to another level by coming to a climax when all the characters are asleep. Even so, the book covers a lot of territory - birth, death, religion, new love blossoming, old love fading, climate change, the insignificance of individuals and even of humanity in general, political division, simple bonds of shared experience… <em>all</em> the important topics.</p>

<p><em>“Our lives here are inexpressibly trivial and momentous at once…”</em></p>

<p><em>“A human being was not made to stand still.”</em></p>

<p>Those looking for a space book brimming with technical detail will not find it here. The focus is on the interior, an examination of our world from the outside that is inside our heads.</p>

<p>For those wondering where the plot is, it’s right here:</p>

<p><img src="../images/books/orbital-plot.png" alt="24 hours of Earth orbits" /></p>

<h2 id="a-book-of-vivid-images">A book of vivid images</h2>

<p>There are a few images that play a role in the book. The first is a 1656 painting by Diego Velázquez called <em>Las Meninas</em>, which is used to discuss perspective.</p>

<p><img src="../images/books/velazquez-las-meninas.png" alt="Las Meninas by Diego Velázquez" /></p>

<p>Michael Collins, the astronaut who took this photo of the Lunar Module from the Apollo 11 mission in 1969, is the only human, alive or dead that isn’t in the frame of this picture.</p>

<p><img src="../images/books/everyone-except-michael-collins.jpg" alt="Lunar Module from the Apollo 11 mission" /></p>

<p>The Earth from the International Space Station.</p>

<p><img src="../images/books/view-from-iss.jpg" alt="View from the International Space Station" /></p>

<p><em>Orbital</em> is a love letter to our home planet, “a celebration of the Earth […] with a pang of loss.” It’s the change of perspective that many of us need right now.</p>

<h2 id="more-about-orbital">More about <em>Orbital</em></h2>

<ul>
  <li><a href="https://thebookerprizes.com/the-booker-library/features/everything-you-need-to-know-about-orbital-booker-prize-2024-winner">Everything you need to know about Orbital by Samantha Harvey, winner of the Booker Prize 2024</a></li>
  <li><a href="https://www.nytimes.com/2023/12/05/books/review/orbital-samantha-harvey.html">It’s Harder to See the World’s Problems From 250 Miles Up</a>, NYTimes</li>
  <li><a href="https://www.theguardian.com/books/2024/nov/13/samantha-harvey-interview-booker-winning-novel-orbital">‘I’m so not an astronaut!’ Samantha Harvey on her Booker-winning space novel – and the anxiety that drove it</a>, The Guardian</li>
  <li><a href="https://www.nytimes.com/2025/01/31/books/review/orbital-samantha-harvey-book-club.html">NYTimes Book Club</a></li>
</ul>]]></content><author><name>J. Christopher Bare</name></author><category term="Books" /><summary type="html"><![CDATA[]]></summary></entry><entry><title type="html">Music 2024</title><link href="/2025-01-26/music-2024.html" rel="alternate" type="text/html" title="Music 2024" /><published>2025-01-26T00:00:00+00:00</published><updated>2025-01-26T00:00:00+00:00</updated><id>/2025-01-26/music-2024</id><content type="html" xml:base="/2025-01-26/music-2024.html"><![CDATA[<figure>
  <img src="/images/illuminated-headphone-guy.png" alt="Tracks listened in 2024" />
  <figcaption style="font-size: small; font-style: italic;">Although few could tell the difference, this is not actually an image of me enjoying some tunes in my study, but rather a nefarious piece of AI slop! Specifically, “A scholarly older gentleman in the style of a medieval illuminated manuscript wearing headphones.” (by DALL·E)</figcaption>
</figure>

<p>What a great year for music, with an abundance of new releases and newly discovered goodies. We recommend queuing up the <a href="https://music.apple.com/us/playlist/2024-playlist/pl.u-76oNl2mTNqRGrx">2024 playlist</a> before reading further.</p>

<figure style="float: right; margin-left: 2em; margin-bottom: 2em; height: 50%; width: 50%; ">
  <a href="https://www.last.fm/user/cbare/library/albums?from=2024-01-01&amp;rangetype=year" target="_blank">
    <img src="/images/music/music-2024-counts.png" alt="Tracks listened in 2024" />
  </a>
</figure>

<p>Streaming services are so good for exploratory listening. Following the threads of “if you like this, you’ll probably like that…” will lead you down some very enjoyable rabbit holes.</p>

<p>On the other hand, it remains to be seen whether streaming music is sustainable for musicians or even technology companies. <a href="https://www.ft.com/content/6fb1602d-a08b-4a8c-bac0-047b7d64aba5">Enshitification</a> is taking hold. Platforms are being flooded with <a href="https://harpers.org/archive/2025/01/the-ghosts-in-the-machine-liz-pelly-spotify-musicians/">ghost music</a>, <a href="https://www.honest-broker.com/p/the-fake-artists-problem-is-much">fake artists</a>, and AI generated dreck. In the race to the bottom, <a href="https://www.vulture.com/article/spotify-mood-music-review.html">you can’t outrun spotify</a>. Funny how tech folks, myself included, spent years preaching “disintermediation” only to devolve into online middlemen and virtual robber barons - Amazon, Spotify, Uber, etc. One day, all will be replaced by open protocols and optimized for human flourishing rather than “engagement” which is a proxy for addiction and ad revenue.</p>

<p>For now, like ocean currents washing up pretty shells onto golden beaches, the algorithms surface plenty of organic hand-crafted tunes and I am grateful to our digital overlords for that.</p>

<h2 id="live-music">Live music</h2>

<p>The best way to be sure you’re getting real human-generated music? See it live. Showing up and dropping a bit of disposable income on tickets, drinks, and snacks helps keep the scene alive and lets creative folks know you value what they do. I’m old and lame and don’t get out much, but I saw some good shows this year.</p>

<p>There were a few pleasant Sunday afternoons spent taking in a jazz set at <a href="https://www.undercurrent.nz/">Undercurrent Books</a>. Esperanza Spalding graced the 2024 Wellington Jazz Festival. Japanese math-rock legends <em>Toe</em> closed out their APAC tour to a packed house at Meow. Louisa Williamson’s <em>Heavy Flow</em> series of shows feature a rotating cast of very talented Wellington musicians having fun. I finally got out to the last one of 2024.</p>

<p><img src="../images/music/toe-at-meow.png" alt="Toe at Meow" /></p>

<p>While visiting <a href="https://cbare.github.io/2024-05-11/toronto.html">Toronto</a>, I briefly became a regular at <a href="https://www.therex.ca/">the Rex</a>. I grooved to a couple of piano trios, one consisting of Duncan Wilson (p.), Chris Parnis (b.), and Petros Anagnostakos (d.), and a second trio led by bassist <a href="https://jessedietschi.com/">Jesse Dietschi</a>. I keep coming across solid bassist-led jazz ensembles, for instance <a href="https://benwolfe.com/">Ben Wolfe</a>, <a href="https://www.michaeljanisch.com/">Michael Janisch</a>, and <a href="https://www.mfbass.com/">Michael Feinberg</a>. You can hear the Jess Dietschi Trio’s thoughtful chamber jazz on their 2023 album <em>Gradient</em>, which I highly recommend.</p>

<p>In Toronto’s lovely Koerner Hall, I took in a recital of Handel, Beethoven, and Prokofiev performed by Vadym Kholodenko, sort of a journey through time from baroque to high classical to modern.</p>

<h2 id="hyperion-records">Hyperion Records</h2>

<p><img src="../images/music/hyperion.png" alt="Hyperion Records" /></p>

<p>Speaking of classical, <a href="https://www.hyperion-records.co.uk/">Hyperion Records</a> was one of the last holdouts against streaming. In February of 2023, Hyperion was acquired by the Universal Music Group and in the later half of that year their deep and wonderful catalog started appearing on streaming platforms.</p>

<p>It’s hard to do justice to this trove of music, but, for me, one highlight is Angela Hewitt’s gorgeous piano playing. She’s known for Bach, but there’s so much more, in particular her sweetening of Ravel’s sometimes harsh piano works. Stephen Hough’s playing of Mompou and Lívia Rév’s of Debussy are also top notch.</p>

<p>Are Universal and the streaming platforms strip-mining a lovingly crafted body of work impoverishing the creators and curators in the bargain? I truly hope an economic model emerges that rewards the best in human creativity and enables ‘musician’ to be a viable profession while ‘music industry executive’ follows the cooper and wheelwright into obsolescence. In the meantime, hearing this music has certainly enriched my small corner of the world.</p>

<h2 id="labels">Labels</h2>

<p>No streaming platform that I know of does a good job of representing record labels, which is a shame. But, <a href="https://www.hyperion-records.co.uk/">Hyperion</a> isn’t the only label putting out great stuff. A good label curates a stable of musicians that cohere. I found drummer, saxophonist, and bandleader Karl-Henrik Ousbäck through <a href="https://www.freshsoundrecords.com/">Fresh Sound Records</a>. They’ve also put out music by Ari Hoenig, Tom Ollendorff, George Colligan, and Simon Moullier among others. Other labels worth checking out include <a href="https://ecmrecords.com/">ECM</a>, <a href="https://www.bluenote.com/">Blue Note</a>, <a href="https://www.crisscrossjazz.com/">Criss Cross</a>, <a href="https://www.sunnysiderecords.com/">Sunnyside Records</a>, <a href="https://originarts.com/about_origin.php">Origin Records</a>, <a href="https://editionrecords.com/">Edition Records</a>, and <a href="https://www.actmusic.com/en/">ACT</a>. If the algorithms don’t serve up the good stuff, go to the source.</p>

<h2 id="new-releases">New releases</h2>

<p>A lot of great music came out this past year. Below is a list of those that, for whatever reason, resonated with me. If an AI apocalypse is coming to destroy music, it hasn’t hit just yet. If we discount the possibility that we’re all living in a simulation, I’m pretty sure all of the following are real live human musicians.</p>

<ul>
  <li><em>Living 12 Strings</em> - Anders Miolin</li>
  <li><em>Mid Spiral</em> - BADBADNOTGOOD</li>
  <li><em>The Understated</em> - Ben Wolfe</li>
  <li><em>HOPE</em> - Bill Laurance</li>
  <li><em>Bloom</em> - Bill Laurance, The Untold Orchestra &amp; Rory Storm</li>
  <li><em>Keeping Company</em> - Bill Laurance &amp; Michael League</li>
  <li><em>Après Fauré</em> - Brad Mehldau</li>
  <li><em>Call For Winter II: Resonance</em> - Daniel Herskedal</li>
  <li><em>Echoes of Solitude</em> - Daniel Herskedal, Mattia Vlad Morleo</li>
  <li><em>To the APhEX</em> - Dorian Dumont</li>
  <li><em>Spirit Box</em> - Flying Lotus</li>
  <li><em>From the North</em> - GoGo Penguin Live in Manchester</li>
  <li><em>The Bounding Line</em> - Greg Reitan</li>
  <li><em>In A Landscape</em> - Max Richter</li>
  <li><em>Moodial</em> - Pat Metheny</li>
  <li><em>Code Derivation</em> - Robert Glasper: <em>Wake Up</em> is a great song.</li>
  <li><em>Fruit Galaxy</em> - standards</li>
  <li><em>Complex Emotions</em> - The Bad Plus: I especially like the song <em>French Horns</em> from the new guitar-driven Bad Plus.</li>
  <li><em>Now I See The Light</em> - Toe</li>
  <li><em>Continuum</em> - Víkingur Ólafsson: Icelandic pianist Víkingur Ólafsson followed up a 2023 recording of Bach’s <em>Goldberg Variations</em> with a 6-song EP of selected Bach pieces. To all who caught Ólafsson’s tour last year, I am deeply envious.</li>
  <li><em>Standards</em> - Yotam Silberstein</li>
</ul>

<h3 id="dorian-dumont">Dorian Dumont</h3>

<p>If you’ve had a years-long obsession with Aphex Twin covers on acoustic instruments (<em>and who hasn’t?</em>) you might have been a bit giddy when Brussels-based pianist <a href="https://ebbmusic.eu/artists/dorian-dumont/">Dorian Dumont</a> released a <em>second</em> album of Aphex Twin covers. Dumont’s lush and meditative version of Rhubarb is a highlight, infused with scattered raindrops of dissonance precipitated from Bill Evan’s Peace Piece. Windowlicker morphs into a banger of a piano prelude. I’m a dedicated tech enthusiast, there’s something satisfying about reclaiming electronic music for the organic. Humans can still hold our own with the machines.</p>

<h2 id="following-threads-new-discoveries">Following threads, new Discoveries</h2>

<p>Tracing connections to discover new music is fun—even if it’s just new to me. For example, Seattle native pianist Aaron Parks played on saxophonist Dayna Stephens’ 2015 album <em>Reminiscent</em> who plays on the tracks <em>Minority</em> and <em>Infant Eyes</em> on Victor Gould’s <a href="https://www.victorgouldmusic.com/product/In-Our-Time">In Our Time</a>, which is an album that keeps growing on me. Victor Gould is in Black Art Jazz Collective who released the very solid <em>Truth to Power</em> in 2024.</p>

<p>Robert Glasper and Nicholas Britell collaborated on the soundtrack to an HBO series called “The Winning Time Sessions”. Apparently, the show is about basketball, a sport I was so bad at, my middleschool coach told me to go back to my skateboard. These bite-sized groove-oriented tracks will help you bang out some code. A short click away, you’ll find Britell’s tender soundtrack for “If Beale Street Could Talk”.</p>

<p>I’ve been a math rock nerd for some time, falling hard for Tricot, Rega, Toe, Covet, Piglet, Floral, Don Caballero, Tortoise, Fago Sepia… So, I a bit flummoxed as to how I missed Japanese math rockers Hyakkei. Luckily, my 17-year-old is developing an ear for good music and said I would like them. Yep, I do. Score one for the human recommender system.</p>

<h3 id="ohiggins--luft">O’Higgins &amp; Luft</h3>

<p>Saxophonist Dave O’Higgins &amp; guitarist Rob Luft recorded an excellent album of Monk and Coltrane covers in 2018 and followed that up with the equally good <em>Pluto</em> in 2022.</p>

<p><img src="../images/music/pluto-ohiggins-and-luft.png" alt="Pluto by O'Higgins &amp; Luft" /></p>

<h3 id="chosen-jazz">Chosen jazz</h3>

<p>Early in the year, guitarist Gilad Hekselman put out an excellent cover of Coltrane’s <em>Equinox</em>. Following the “you might also likes” led to a whole slew of incredible Israeli jazz musicians including guitarist Yotam Silberstein, and pianists Yaron Herman, Nitai Hershkovits and Anat Fort. Fort’s piece “First Rays” from the 2016 release <a href="https://www.anatfort.com/album/birdwatching/"><em>Birdwatching</em> by Anat Fort Trio with Gianluigi Trovesi</a> is quite good.</p>

<p>The <em>Garden Suite</em> by Nitai Hershkovits &amp; Daniel Dor is a unique piece of music. If Frank Zappa and Aphex Twin had collaborated on the soundtrack to a Studio Ghibli film, it might sound something like this.</p>

<h2 id="analysis-paralysis">Analysis paralysis</h2>

<p><a href="https://www.last.fm/user/cbare">Last.fm</a> gives some nice end-of-year listening analysis. Apparently, I had poor listening stamina in January through February and again in July. Next year, I’ll do better.</p>

<p><img src="../images/music/listening-2024.png" alt="Listening 2024" /></p>

<p>Glad to see that I was 9% more obscure in 2024 than my already obscure self of 2023. I just keep moving out into that long tail of “nobody gets that weird shit you listen to.”</p>

<p><img src="../images/music/obscurity-2024.png" alt="The good, the bad, and the obscure" /></p>

<h2 id="happy-2025">Happy 2025</h2>

<p>Whether the coming year finds us hiding underground from the all seeing eye of Skynet or transcending our Earthly bonds to become beings of light in rapturous singularity, happy listening in 2025.</p>]]></content><author><name>J. Christopher Bare</name></author><category term="Music" /><category term="music" /><summary type="html"><![CDATA[Although few could tell the difference, this is not actually an image of me enjoying some tunes in my study, but rather a nefarious piece of AI slop! Specifically, “A scholarly older gentleman in the style of a medieval illuminated manuscript wearing headphones.” (by DALL·E)]]></summary></entry><entry><title type="html">Tongariro Alpine Crossing</title><link href="/2025-01-14/tongariro-alpine-crossing.html" rel="alternate" type="text/html" title="Tongariro Alpine Crossing" /><published>2025-01-14T00:00:00+00:00</published><updated>2025-01-14T00:00:00+00:00</updated><id>/2025-01-14/tongariro-alpine-crossing</id><content type="html" xml:base="/2025-01-14/tongariro-alpine-crossing.html"><![CDATA[<p>The <a href="https://www.doc.govt.nz/parks-and-recreation/places-to-go/central-north-island/places/tongariro-national-park/things-to-do/tracks/tongariro-alpine-crossing/">Tongariro Alpine Crossing</a> is a challenging 20km one-way hike through volcanic landscape. The trail climbs 765m (~2510 ft.) from the trail head at the end of Mangatepopo road up to the Red Crater summit and then down over 1000m to the pickup point at Ketetahi.</p>

<p><img src="../images/tongariro/tongariro-trail-map.png" alt="Togariro crossing trail map" /></p>

<p>Three volcanoes sit at the center of New Zealand’s North Island. <em>Tongariro</em> is farthest North. <em>Ruapehu</em> to the South is the highest at 2,797m (9176 ft.). Between them is conical <em>Ngauruhoe</em>, also known as Mount Doom. See <a href="https://www.google.com/maps/@-39.1634219,175.5839858,83111m/data=!3m1!1e3?entry=ttu&amp;g_ep=EgoyMDI1MDEwMS4wIKXMDSoASAFQAw%3D%3D">Google Maps</a>.</p>

<p><img src="../images/tongariro/ruapehu.jpeg" alt="Ruapehu" /></p>

<p>We took <a href="https://www.dempseybuses.co.nz/Services/Tongariro+Crossing.html">Dempsey Buses</a>, which is a great way to get to and from the trail - much better than having to drive and navigate while exhausted. They’ll pick you up bright and early, aiming to have you on the trail by 7am.</p>

<p>We picked a blue sky day. You’ll want to check <a href="https://weather.niwa.co.nz/parks/Tongariro%20National%20Park/Red%20Crater">NIWA weather forcast for the Red Crater summit</a>. My kiddos age 12 (almost) and 17 easily outpaced their tired old man. The driver said there were about 1500 people on the trail that day while a really busy day might see up to 3000, so don’t expect splendid isolation.</p>

<p><img src="../images/tongariro/red-crater-summit-and-ngauruhoe.jpeg" alt="Red Crater Summit with Ngauruhoe in the background" /></p>

<p>The trail is tough. It’s steep going up and coming down. The lower sections have lots of wood-framed steps. The upper section of trail the leads up to the Red Crater summit, at 1868m (6129 ft.), is crumbly gravel and fine powder dust. My fitbit said I took over 35,000 steps.</p>

<p><img src="../images/tongariro/elevation.png" alt="Elevation" /></p>

<p>At Ketetahi, there’s a shady shelter to wait in. The day I was there, buses came to the pickup at 2:30, 4, and sometime later for the stragglers. If we made the 4 o’clock, you can too. You’ll be showered and sitting down to dinner at a very civilized hour.</p>

<p><img src="../images/tongariro/lake-taupo.jpeg" alt="The descent looking towards Lake Taupo" /></p>

<h2 id="ohakune">Ohakune</h2>

<p>Ohakune is a cool little town. It has great views of snow-capped Ruapehu and a few restaurants - we enjoyed <em>Osteria</em>. The ISite tourist office is friendly and helpful. If you’re not worn out yet, there’s a great little rock wall with autobelays at <a href="https://www.vertigoclimbing.co.nz/">Vertigo Climbing Ohakune</a>.</p>

<p><img src="../images/tongariro/welcome.jpeg" alt="Nau mai, Haere mai ki Tongariro" /></p>]]></content><author><name>J. Christopher Bare</name></author><category term="Travel and Adventures" /><summary type="html"><![CDATA[The Tongariro Alpine Crossing is a challenging 20km one-way hike through volcanic landscape. The trail climbs 765m (~2510 ft.) from the trail head at the end of Mangatepopo road up to the Red Crater summit and then down over 1000m to the pickup point at Ketetahi.]]></summary></entry><entry><title type="html">Books 2024</title><link href="/2025-01-04/books-2024.html" rel="alternate" type="text/html" title="Books 2024" /><published>2025-01-04T00:00:00+00:00</published><updated>2025-01-04T00:00:00+00:00</updated><id>/2025-01-04/books-2024</id><content type="html" xml:base="/2025-01-04/books-2024.html"><![CDATA[<p><img src="/images/henner-liseuse-RF1839-lewandowski.webp" alt="La Liseuse by Jean-Jacques Henner" /></p>

<p>Seneca said, “<em>distringit librorum multitudo</em>”, meaning “the abundance of books is distraction”. But, what a pleasant distraction.</p>

<ul>
  <li>Wildwood - Colin Meloy (parts 2 &amp; 3) (with Henry)</li>
  <li>Liberation Day - George Saunders</li>
  <li>God, Human, Animal, Machine - Meghan O’Gieblyn</li>
  <li>Starter Villain - John Scalzi</li>
  <li>Designing Machine Learning Systems - Chip Huyen</li>
  <li><a href="/2024-05-01/stoner.html">Stoner</a> - John Williams</li>
  <li>She’s a Killer - Kirsten McDougall</li>
  <li>Birnam Wood - Eleanor Catten</li>
  <li>Deep Learning Book - Ian Goodfellow (Ch. 1-5)</li>
  <li>Other Minds - Peter Godfrey-Smith</li>
  <li>Coming Through Slaughter - Michael Ondaatje</li>
  <li><a href="/2025-01-02/wide-wide-sea.html">The Wide Wide Sea</a> - Hampton Sides</li>
  <li>3 Shades of Blue - James Kaplan (started)</li>
  <li>Babel - R.F. Kuang (started)</li>
</ul>

<p>See also, <a href="/2024-01-01/books-2023">Books 2023</a> and <a href="https://www.goodreads.com/user/show/22238686-christopher-bare">GoodReads</a></p>]]></content><author><name>J. Christopher Bare</name></author><category term="Books" /><summary type="html"><![CDATA[]]></summary></entry></feed>