<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Kevin Lacker&apos;s blog</title>
    <description>TODO: insert description here
</description>
    <link>http://lacker.io/</link>
    <atom:link href="http://lacker.io/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Sat, 03 May 2025 15:36:22 +0000</pubDate>
    <lastBuildDate>Sat, 03 May 2025 15:36:22 +0000</lastBuildDate>
    <generator>Jekyll v3.10.0</generator>
    
      <item>
        <title>Alien Clay</title>
        <description>&lt;p&gt;I picked up Alien Clay because I like Hugo nominees and I like Adrian Tchaikovsky.&lt;/p&gt;

&lt;p&gt;Adrian’s great love is hideous nonhumanoid aliens, either buglike or tentacle-based or both. He relishes the biological details, from the properties of humanoid skin, to the lifecycle of terrestrial fish parasites.&lt;/p&gt;

&lt;p&gt;How could an ecosystem develop so that for example grasping limbs were actually symbiotic creatures? He’s just super enthusiastic about this sort of science fiction question. He wants to visualize these things, like a high schooler doodling alien monsters in his notebook.&lt;/p&gt;

&lt;p&gt;There also also humans around. It’s an authoritarian dystopia. The bad guys sound like Effective Altruists. No, sorry, it’s completely different. They’re “Scientific Philanthropists.”&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Their justification for doing everything they do is that they have a logical, rational piece of thinking, which means it’s the best way to do things for the greatest number of people. So they love science, because it gives them permission to do all the shit they do. Right up to the point someone puts together an inconvenient but cogent argument that gets in the way of how they want the universe to be. They want very specific answers from science. Black and white answers to complex questions. Everything sorted into predetermined boxes.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;At first I was surprised to see this critique, because Adrian Tchaikovsky seems very pro-shrimp. But his critique is less about shrimp welfare, and more about the problem of expecting too much from rational reasoning. Promising certainty when you don’t have certainty, and then becoming unable to admit you were wrong, corrupting what should have been your intellectual principles.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;They spend way too much time performatively writing memos.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Would Tchaikovsky actually care about shrimp welfare? I think no. Shrimp yes, but welfare no. He seems to be keenly aware of the rules of the animal kingdom, and to respect those rules in a deontological way. If anything he wants to raise the status of shrimp. Not to rank species “according to how close to human they are.”&lt;/p&gt;

&lt;p&gt;I think the author fantasizes about being infested with alien symbiotes and turned into some sort of bug monster. If you have this fantasy too, you should read this book. Otherwise, I did like the book, but I think Tchaikovsky’s best is Children of Time followed by Children of Ruin, so I would start with that series, and read Alien Clay if you want even more.&lt;/p&gt;

&lt;p&gt;The “human dystopia” part of the story is okay, but it feels like he started with the aliens and worked backwards to the prison planet. The plot needs an excuse for why a cutting edge biologist would be doing lots of manual labor.&lt;/p&gt;

&lt;p&gt;If you’re interesting in reading a novel set in an authoritarian prison camp, you should read Life and Fate instead. Real prison camp stories seem like the offenses were often completely trivial or nonexistent, and that has its own sort of horror, the evil springing up out of nothing at all. In Alien Clay, most of the prisoners actually had been planning a violent rebellion, albeit in a young adult Disneyfied way. “On the day of the uprising I personally didn’t carry a gun because that isn’t my style but I was still super important and helpful.” Nobody who is pointlessly denounced, or never figures out why they were there.&lt;/p&gt;

&lt;p&gt;In the end, I feel like he doesn’t really answer the question he poses. Why would an alien ecosystem evolve so that tentacles were symbiotic creatures that could install themselves into anything that needed an extra tentacle? I still don’t know. But I think Adrian Tchaikovsky has some more novels in him, ready to grapple with this fundamental question.&lt;/p&gt;
</description>
        <pubDate>Sat, 03 May 2025 09:00:00 +0000</pubDate>
        <link>http://lacker.io/books/2025/05/03/alien-clay.html</link>
        <guid isPermaLink="true">http://lacker.io/books/2025/05/03/alien-clay.html</guid>
        
        
        <category>books</category>
        
      </item>
    
      <item>
        <title>Every Love Story Is A Ghost Story</title>
        <description>&lt;p&gt;David Foster Wallace was one of my earliest “real literature” dives. From the days when, sometimes after a long day of work, I just didn’t want to do more work on the Google shuttle. I got back into reading after not reading so much in a personally-directed way in college. Recently, flipping through Brief Interviews with Hideous Men, I found a business card from Google that I had been using as a bookmark.&lt;/p&gt;

&lt;p&gt;Every Love Story Is A Ghost Story is a DFW biography. (DFW = David Foster Wallace.) Whenever I read DFW in particular it makes me want to put parentheses in my writing. (Not footnotes… parentheses seem more appropriate for someone who spends more time working with programming languages than human ones.)&lt;/p&gt;

&lt;p&gt;It’s interesting to learn more about his writing process. I hadn’t realized how much he blurred fiction and nonfiction. There is a lot of fictional stuff in his “nonfiction”. Many incidents that seem to not have happened, but they made for better reading. It reminds me of the Hemingway quote. “All good books are alike in that they are truer than if they had really happened.” Like Labatut’s style.&lt;/p&gt;

&lt;p&gt;Also the other way around. So much of his short fiction and Infinite Jest was based on his own life. From tennis camps to halfway houses to the “brutalist sun” of Arizona. And this relates to his difficulty in writing a second great novel. You pour your whole life into the first novel, and then what’s left? Like Eminem struggling for material once he is no longer an underappreciated rebel.&lt;/p&gt;

&lt;p&gt;The Pale King is really great. It’s a literary tragedy that he never completed it. I wish the rest of it existed. Wouldn’t it be amazing if one day AI could finish it? Your first instinct is probably to shudder, but I mean finish it in a good way. I used to think this was impossible, but I actually thought the Sanderson part of the Wheel of Time was better than the original. Let’s just consider this my personal benchmark for literary superintelligence.&lt;/p&gt;

&lt;p&gt;In some sense this post is a book review. But really, the book you should get if you are intrigued is The Pale King. Not this biography.&lt;/p&gt;

&lt;p&gt;The topic of The Pale King I never would have expected. Boredom. The IRS. Endurance in a mental sense, jobs that require grinding through analysis. I wonder if reflected his struggle with his own work, like Knausgard or Levrero. The Pale King is the hero we need in our modern era, achieving professional triumph through his superhuman ability to endure boredom.&lt;/p&gt;

&lt;p&gt;Infinite Jest was prescient. He wrote it based on the media environment of cable television, but he was either brilliant, or got lucky, or both, because the internet era only enhanced the danger and the power of the technologically-boosted-entertainment. Both the “web” and the “feed” models. Infinite Jest zoomed into the dystopia of this world. And maybe The Pale King has a vision of a way out. To focus on a goal and use your own individual, human powers to transform the boring work on it into something greater.&lt;/p&gt;

&lt;p&gt;These two poles, the temptation of entertainment and the value of boredom, they both reflect a sort of difficulty in two parts of the mind coming to terms with each other. The short term instincts and the long term goals. And DFW’s style seems perfect for this, as a lens or digging tool, the recursive thought patterns or branching textual structure combining or overlaying the multiple different sorts of thoughts and desires. A technique to reflect a mind torn between its different impulses.&lt;/p&gt;

&lt;p&gt;I like to daydream that today, in some perfect parallel universe, DFW, after a record-breaking, pathologically extended period of procrastination, in his 60s, has finally finished The Pale King.&lt;/p&gt;
</description>
        <pubDate>Tue, 29 Apr 2025 17:00:00 +0000</pubDate>
        <link>http://lacker.io/books/2025/04/29/every-love-story.html</link>
        <guid isPermaLink="true">http://lacker.io/books/2025/04/29/every-love-story.html</guid>
        
        
        <category>books</category>
        
      </item>
    
      <item>
        <title>Rewrite Search</title>
        <description>&lt;p&gt;Sometimes you know things because of theorems whose form is, when you
know one true thing, then you know another true thing. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;P&lt;/code&gt; implies &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Q&lt;/code&gt;. If
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;x&lt;/code&gt; is even, then &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;x^6&lt;/code&gt; is divisible by &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;64&lt;/code&gt;. And &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;10&lt;/code&gt; is even, therefore &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;10^6&lt;/code&gt;
must be divisible by &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;64&lt;/code&gt;. Figuring out when this applies is the
“library search” problem I &lt;a href=&quot;/ai/2024/03/31/library-search.html&quot;&gt;wrote about last month&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Rewrite search is a bit different. A rewrite happens when you know
that two different expressions are equal. So you can replace one of
those expressions with the other, inside a longer statement. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;10^6&lt;/code&gt;
equals a million. And &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;10^6&lt;/code&gt; is divisible by &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;64&lt;/code&gt;, so a million is
divisible by &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;64&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The basic “rewrite search” problem is, given two different
expressions, figure out how to make them equal through a series of
rewrites.&lt;/p&gt;

&lt;h2 id=&quot;why-is-rewrite-search-important&quot;&gt;Why is rewrite search important?&lt;/h2&gt;

&lt;p&gt;I think most “normal person mathematics” can be thought of as a series of rewrites.&lt;/p&gt;

&lt;p&gt;Consider a question like “what are the factors of 27?” (I found this
by googling “math question” and taking the first one that looked like
a pure math question.)&lt;/p&gt;

&lt;p&gt;The normal way to solve this is roughly, first you consider that &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;27 =
3^3&lt;/code&gt;. Then you perhaps know that for a prime &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;p&lt;/code&gt;, the factors of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;p^n&lt;/code&gt; are
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;p^k&lt;/code&gt; for &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;k&lt;/code&gt; in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;[0, n]&lt;/code&gt;. You can write a series of expressions like&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;factors(27)

factors(3^3)

3^k for k in [0, 3]

3^0, 3^1, 3^2, 3^3

1, 3, 9, 27
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;where each expression is a rewrite of the expression in the previous row.&lt;/p&gt;

&lt;p&gt;There are a few more details here that make this not purely a
rewrite question. For example, we didn’t have a theorem for the
factors of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;3^3&lt;/code&gt; specifically. We had a theorem for the factors of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;p^n&lt;/code&gt;,
where &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;p&lt;/code&gt; was prime. So we need to be able to rewrite based on a
formula, and to apply some conditions to the formula. We need to know
that &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;3&lt;/code&gt; is prime, and that isn’t a “rewrite search” type of problem,
that’s a “library search” type of problem.&lt;/p&gt;

&lt;p&gt;Another detail is that we didn’t start off with a particular
destination in mind. We didn’t have the problem of, rewrite
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;factors(27)&lt;/code&gt; into &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;[1, 3, 9, 27]&lt;/code&gt;. We just wanted to rewrite &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;factors(27)&lt;/code&gt;
in a simpler form.&lt;/p&gt;

&lt;p&gt;Another detail is simplifying the “for loop”, which maybe happens in
multiple steps.&lt;/p&gt;

&lt;p&gt;That said, the essence of the problem is rewriting. Most questions of
the form “solve for x” or “what does this expression evaluate to” are
fundamentally about rewriting. As opposed to questions of the form
“prove that X is true”, which are often more implicationy.&lt;/p&gt;

&lt;h2 id=&quot;what-can-we-do-about-it&quot;&gt;What can we do about it?&lt;/h2&gt;

&lt;p&gt;I worked on the Lean &lt;a href=&quot;https://github.com/leanprover-community/mathlib/blob/master/src/tactic/rewrite_search/explain.lean&quot;&gt;rewrite_search tactic&lt;/a&gt; for a while. It didn’t
end up as useful as I had hoped. The main problem is that there are so
many possible ways to rewrite a formula, you can’t use a plain
breadth-first search and get very far. We need to be using AI
heuristics. In Lean we were hoping to get mathematicians to tag
theorems based on how good they were for rewriting, but this was just
too much of a hurdle.&lt;/p&gt;

&lt;p&gt;Intuitively, I think this makes sense, that we should have a heuristic
sense for how good expressions are to rewrite into other expressions.
You see &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;27&lt;/code&gt; in a math problem, you
immediately think that’s &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;3^3&lt;/code&gt;. You see &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;6401&lt;/code&gt; in a math problem, you
immediately think that’s &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;80^2 + 1&lt;/code&gt;. These potential rewrites move
forward in your mind, even if these numbers are just a small part of a
larger expression.&lt;/p&gt;

&lt;p&gt;The other thing we need to do tactically is to be using rewrites
starting at every expression in a problem. A &lt;a href=&quot;https://en.wikipedia.org/wiki/Bidirectional_search&quot;&gt;bidirectional
search&lt;/a&gt;. When
you’re searching for a path of length &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;2n&lt;/code&gt; from A to B, with a branching
factor of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;b&lt;/code&gt; choices at each step, and you start just at A, you have to
search &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;O(b^2n)&lt;/code&gt; nodes. If you start forwards from A and backwards at B,
you only have to search &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;O(2b^n)&lt;/code&gt; nodes, which looks similar but is far
better.&lt;/p&gt;

&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;I think these two forms of reasoning, library search and rewrite
search, plus basic propositional logic, are capable of solving a large
amount of mathematics problems.&lt;/p&gt;

&lt;p&gt;Now what? In a sense this has been a “bottom up” view, answering what
tactics are useful for solving math problems. We also need a “top
down” view. Can we build a math AI that starts with a narrow focus on
a small set of math problems, nails that, and expands its domain of
mastery over time? I’d like to write more on this topic next month.&lt;/p&gt;

&lt;p&gt;Thanks for reading!&lt;/p&gt;
</description>
        <pubDate>Tue, 30 Apr 2024 22:00:00 +0000</pubDate>
        <link>http://lacker.io/ai/2024/04/30/rewrite-search.html</link>
        <guid isPermaLink="true">http://lacker.io/ai/2024/04/30/rewrite-search.html</guid>
        
        
        <category>ai</category>
        
      </item>
    
      <item>
        <title>Library Search</title>
        <description>&lt;p&gt;Last month I wrote about &lt;a href=&quot;/ai/2024/02/29/how-to-build-math-ai.html&quot;&gt;building a math
AI&lt;/a&gt;
and mentioned
that I think we need to optimize the “library search” problem. In this
post I’d like to explain what library search is, why it’s important,
and what we can do about it.&lt;/p&gt;

&lt;h2 id=&quot;motivation&quot;&gt;Motivation&lt;/h2&gt;

&lt;p&gt;A few years ago I got excited about the IMO Grand Challenge. I thought
it would be interesting to look for a team of smart people working on
it and see if I could help out. One group of people was focused on
using the Lean theorem prover, and one place it seemed like I could
help out was formalizing IMO problems in Lean, to use as training
data. I formalized some of them, for example
&lt;a href=&quot;https://github.com/leanprover-community/mathlib/pull/4261&quot;&gt;here&lt;/a&gt;
and
&lt;a href=&quot;https://github.com/leanprover-community/mathlib/pull/4450&quot;&gt;here&lt;/a&gt;,
but it seemed like progress was so slow, the whole strategy was
unsound. If it takes you more than a day to code review a single point of
training data, it’s going to be hard to train an AI. So, I gave
up on this approach. But, I did learn a lot about the annoying parts
of formalizing proofs.&lt;/p&gt;

&lt;p&gt;Lean has many different tactics for solving proofs. One general
operation that you do all the time is just “applying a theorem”.&lt;/p&gt;

&lt;p&gt;For example, let’s say you have two existing theorems. Foo implies
bar, and bar implies baz. Now you want to prove that foo implies
baz. In Lean this proof looks like:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;theorem foo_implies_baz : foo → baz :=
begin
  intro _,
  apply bar_implies_baz,
  apply foo_implies_bar,
end
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;In particular, you need to know the names of the existing theorems you
want to use, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;foo_implies_bar&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bar_implies_baz&lt;/code&gt;. “library search”
is the name of a Lean tactic that tries
to figure this out for you, but is slow and fails a lot. (The tactic
is now renamed &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;exact?&lt;/code&gt;, but it’ll always be &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;library_search!&lt;/code&gt; in my
heart.)&lt;/p&gt;

&lt;h2 id=&quot;why-this-is-hard-for-humans&quot;&gt;Why This Is Hard For Humans&lt;/h2&gt;

&lt;p&gt;It’s hard for humans to remember all these theorem names.&lt;/p&gt;

&lt;p&gt;This might be unintuitive. For a programmer, it doesn’t seem
unreasonable that you have to know the name of a function you’re
calling. How could it be any other way?&lt;/p&gt;

&lt;p&gt;For a mathematician, a way of manipulating a formula doesn’t typically
have a name. Imagine you’re doing long division. You can remember the
whole process, but you don’t give a name to every step of the
way. There are too many different steps, only slightly different from
each other.&lt;/p&gt;

&lt;p&gt;It becomes harder as the size of the library increases. It’s like the
category of jokes where one mathematician calls a problem “trivial”
but another mathematician is stumped by it.&lt;/p&gt;

&lt;p&gt;Take a look at &lt;a href=&quot;https://github.com/leanprover-community/mathlib/blob/master/src/data/nat/basic.lean&quot;&gt;these
theorems&lt;/a&gt;
and it’ll make more sense why it’s hard. There is just an explosion of
basic facts about numbers, all of which
a reasonably competent mathematician would just say, “this is
trivially true”.&lt;/p&gt;

&lt;p&gt;For example, really do click that link above. Then take a look at
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;eq_mul_of_div_eq_left&lt;/code&gt;. In English, “if a
is a multiple of b, and a divided by b rounded down is c, then c times
b is a.”&lt;/p&gt;

&lt;p&gt;For enlightenment, go ahead and read the definitions of
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;div_eq_iff_eq_mul_left&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;add_mod_eq_add_mod_left&lt;/code&gt;, and the dozens of
others of similarly named theorems.&lt;/p&gt;

&lt;p&gt;In programming, a library with 400 rarely-used functions would be
unusable. In mathematics, though, it’s fine, in a sense. As long as
everything is true, and a human looking at it thinks it’s obviously
true, then the only problem is when you have to know these names.&lt;/p&gt;

&lt;h2 id=&quot;why-this-is-hard-for-computers&quot;&gt;Why This Is Hard For Computers&lt;/h2&gt;

&lt;p&gt;It’s hard for humans to memorize a whole dictionary, too. For
computers, it’s easy. So why isn’t this lookup easy for computers? Why
isn’t library search nicely solved in existing proof assistants?&lt;/p&gt;

&lt;p&gt;I do think this is solvable. The basic problem is the inexact nature
of the lookup. Theorems have variables in them. When you know that
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;a &amp;lt; b&lt;/code&gt; implies &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;a + c &amp;lt; b + c&lt;/code&gt;, this theorem is true for any values
of
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;a&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;b&lt;/code&gt;,
and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;c&lt;/code&gt;. As you have more facts available, and more theorems in your
library, this gets slower. In the most general case, you have to do an
exponential matching process.&lt;/p&gt;

&lt;p&gt;That said, people have found some reasonable data structures for doing
this sort of lookup. The &lt;a href=&quot;https://matryoshka-project.github.io/pubs/ehoh_article.pdf&quot;&gt;discrimination tree and fingerprint indexing
from the E theorem prover&lt;/a&gt;
are good examples. And I think a lot of it is the sort of
performance low-hanging fruit where if you specifically design data
structures and profile for this, you’ll be able to do better than tacking a
lookup structure on after the fact.&lt;/p&gt;

&lt;p&gt;Will LLMs just solve this automatically, with scale, by putting the
entire library inside their context window? It’s possible. Maybe
there’s a good argument against this. I’m honestly not sure how to
predict the future path of LLM skills. At some point I have to fall
back on my thesis of “scaling LLMs will not solve all outstanding
problems in everything”, if only by a sort of Pascal’s reasoning.&lt;/p&gt;

&lt;h2 id=&quot;the-ideal-proof&quot;&gt;The Ideal Proof&lt;/h2&gt;

&lt;p&gt;A formalized proof should not have to be constantly citing the names
of theorems. For either a human or an AI, rather than writing and
validating this proof:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;theorem foo_implies_baz : foo → baz :=
begin
  intro _,
  apply bar_implies_baz,
  apply foo_implies_bar,
end
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;you should be able to write the proof the way a human writes a proof
in prose, by just stating true things that follow from the premises
without giving an explicit rationale for them.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;theorem foo_implies_baz: foo -&amp;gt; baz {
  bar
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;In 99% of cases, the compiler should just be automatically handling
the library search for you. I think natural exceptions would be fancy tactics
like induction. In most human-written proofs, when you’re using
induction, you do say, “now I’m using induction”.&lt;/p&gt;

&lt;p&gt;You can think of this like a mini proof search. It’s just that you are
searching just a few steps. One retrieval from the library, plus a bit
of normalizing between logically equivalent expressions. It’s
like a base case that the proof search needs to handle before it can
expand to more complicated cases.&lt;/p&gt;

&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;I think automatically handling library search will make proofs easier
for both humans and AIs. You shouldn’t need to use the names of
theorems.&lt;/p&gt;

&lt;p&gt;There’s a related, somewhat harder problem of “rewrite
search”. Originally I was going to write about that, too, but this
post is getting long, so I’ll cut off here. Thanks for reading! Next
month I’ll write about the rewrite search problem.&lt;/p&gt;
</description>
        <pubDate>Sun, 31 Mar 2024 12:00:00 +0000</pubDate>
        <link>http://lacker.io/ai/2024/03/31/library-search.html</link>
        <guid isPermaLink="true">http://lacker.io/ai/2024/03/31/library-search.html</guid>
        
        
        <category>ai</category>
        
      </item>
    
      <item>
        <title>How to Build Math AI</title>
        <description>&lt;p&gt;How can we make an AI that is really good at mathematics? Some AIs are
okay at math right now. GPT-4 can do okay on the math SATs. But
personally, intuitively, I feel like math is like chess. A math
program should be able to completely dominate humans at math, the way
that chess programs dominate humans at chess.&lt;/p&gt;

&lt;h2 id=&quot;is-scaling-all-we-need&quot;&gt;Is scaling all we need?&lt;/h2&gt;

&lt;p&gt;Maybe Nvidia launches the H200, H300, H400, H500, all the numbers get
bigger, GPT-8 just naturally answers every math question
correctly, and there’s no use for anything else?&lt;/p&gt;

&lt;p&gt;My gut suspicion is this will not happen. Math is like chess. GPT-4
can play chess, but it has a very broad and shallow understanding. I
think this is inherent in the architecture. I don’t think the large
language models are going to naturally end up with the deepest
understanding of narrow topics, even if there is a better search layer
on top of them.&lt;/p&gt;

&lt;p&gt;I don’t want to ignore the rise of LLMs, though. ChatGPT and friends
are useful right now for math questions, and they are going to keep
getting better. They also have a great interface for many things - you
just ask your question with English and math interspersed.&lt;/p&gt;

&lt;h2 id=&quot;architecture&quot;&gt;Architecture&lt;/h2&gt;

&lt;p&gt;I think the way to architect a math AI at a high level is with
separate “translator” and “solver” components.&lt;/p&gt;

&lt;p&gt;A human has a math question, expressed in English, like “If
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;f(x+1) = 2 * f(x)&lt;/code&gt;, what could &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;f&lt;/code&gt; be?” (This seems to be too hard for the LLMs
right now.) The translator speaks English and also speaks some sort of
“math language”. It translates the problem into the math language. The
solver only speaks the math language, like a chess program only
understands chess positions.&lt;/p&gt;

&lt;p&gt;It’s important for the system to speak English, both to be useful to
actual humans, and possibly for contests like the &lt;a href=&quot;https://www.reddit.com/r/AIMOprize/comments/1ay4aiu/progress_prize_pre_announcement/&quot;&gt;first AIMO progress
prize&lt;/a&gt;
where the questions will be phrased in plain English.&lt;/p&gt;

&lt;p&gt;A translator should probably be based on an open-source LLM. Hopefully
all of those improve as fast as possible. The more open-source LLMs
understand math, the better, so that they can do things like
disambiguate unclear problem statements.&lt;/p&gt;

&lt;p&gt;As a matter of strategy, there are already so many people working on
LLMs, I don’t want to directly compete in that world. I want to be
working on the parts that are complementary to the ongoing LLM
revolution. So I’ll try to think most about the solver.&lt;/p&gt;

&lt;p&gt;Some interesting math solvers exist already. I’d like to take the good
ideas from a few in particular:&lt;/p&gt;

&lt;h2 id=&quot;hypertree-proof-search&quot;&gt;&lt;a href=&quot;https://arxiv.org/abs/2205.11491&quot;&gt;Hypertree Proof Search&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;The process of writing a proof is like the process of playing
chess. You have a bunch of decisions for what to do next with your
proof (called a “tactic” here), that makes a tree, you search through
the tree. (They call it a hypertree, but hypertrees are basically the
same thing as trees. None of these are really trees because you cache,
anyway.)&lt;/p&gt;

&lt;p&gt;These trees need an underlying representation of mathematical
statements. The best one is
&lt;a href=&quot;https://leanprover-community.github.io/&quot;&gt;Lean&lt;/a&gt;,
a “proof assistant / programming language”.&lt;/p&gt;

&lt;p&gt;There are two core problems that make me think that the right strategy
is not just scaling up HTPS. One is that Lean tactics are slow and in
a sense inconsistent. A single Lean “tactic”, one step in the tree,
can be running an arbitrary program. This includes, like, a full
solver for systems of linear equations. Or it could just be swapping
in x = 2 to an existing formula.&lt;/p&gt;

&lt;p&gt;The other core problem is that each tactic is being generated by a
transformer. This seems inefficient to me. It’s like using a
transformer to generate all the possible moves in chess. Given Lean,
though, there isn’t really an alternative. There’s no straightforward
way to generate all legal tactics from a single Lean proof state.&lt;/p&gt;

&lt;p&gt;Both of these design decisions make total sense in order to get
something working. Lean exists, that’s one very nice quality it has.&lt;/p&gt;

&lt;p&gt;But, they make me think that if we had a mathematical language that
was optimized for the common operations in a proof search process, it
would work a lot better than a language that was optimized for
arbitrary human programming, like Lean tactics.&lt;/p&gt;

&lt;p&gt;There are two specific parts of proof search that I think are worth
optimizing. In Lean world, “library search” and “rewrite search”. This
post is already getting long so I won’t dig into them here.&lt;/p&gt;

&lt;h2 id=&quot;alphageometry&quot;&gt;&lt;a href=&quot;https://deepmind.google/discover/blog/alphageometry-an-olympiad-level-ai-system-for-geometry/&quot;&gt;AlphaGeometry&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;This one is world-class at geometry contest problems. A lot of the
method is geometry-specific, but I think some parts will generalize.&lt;/p&gt;

&lt;p&gt;My favorite idea is what they call “pulling a rabbit out of the hat”.
&lt;a href=&quot;https://www.youtube.com/watch?v=TuZhU1CiC0k&quot;&gt;This video&lt;/a&gt; is very good.&lt;/p&gt;

&lt;p&gt;They have a low-level solver, which can solve one class of geometry
problems. But the low-level solver only really works with known
entities. So they have a higher-level component above that, not a
large language model, but a “small language model”, something with
transformers, to add in the “rabbits”.&lt;/p&gt;

&lt;p&gt;A rabbit could be something like, your geometry problem has these
three triangles in it. So you were naturally considering all the
corners of the triangles. But perhaps you should also consider the
midpoint of the top of triangle 1 and the top of triangle 2?&lt;/p&gt;

&lt;p&gt;It’s inserting some extra mathematical entity into the problem. The
transformer suspects this entity might be relevant. But it might not
be. It’s more like a mathematical intuition than a mathematical calculation.&lt;/p&gt;

&lt;p&gt;I think this rabbit idea is going to apply more generally. You build
an efficient classical algorithm to solve problems that are
“straightforward” in some way, but you still need transformers to
generate some “intuitive” steps in your reasoning. So, some steps in
the proof are generated by transformers. Just not most of them.&lt;/p&gt;

&lt;h2 id=&quot;the-e-theorem-prover&quot;&gt;&lt;a href=&quot;https://wwwlehre.dhbw-stuttgart.de/~sschulz/PAPERS/Schulz-AICOM-2002.pdf&quot;&gt;The E Theorem Prover&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;This is old, it’s not really modern AI at all. And it isn’t powerful
enough to handle general mathematics. But, the authors have done a
good job explaining how they build their theorem prover, how they
represent expressions, how they normalize expressions, and how they
optimize their data structures for common operations. Like checking if
a generalization of a statement has already been proved. And they
essentially have their own methods for optimizing the “library search”
and “rewrite search” problems. There are good ideas to borrow here.&lt;/p&gt;

&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;The main goal of this blog post is to organize my own thoughts. I hope
you’ve found it interesting to read along!&lt;/p&gt;

&lt;p&gt;I’d like to write more about “library search” and “rewrite search”. I
think they could play a similar role to the low-level solver in
AlphaGeometry, and you can encompass a lot of mathematics with these
two mechanisms. So perhaps I’ll write a blog post next month about
them.&lt;/p&gt;

</description>
        <pubDate>Thu, 29 Feb 2024 12:00:00 +0000</pubDate>
        <link>http://lacker.io/ai/2024/02/29/how-to-build-math-ai.html</link>
        <guid isPermaLink="true">http://lacker.io/ai/2024/02/29/how-to-build-math-ai.html</guid>
        
        
        <category>ai</category>
        
      </item>
    
      <item>
        <title>2023 Review</title>
        <description>&lt;p&gt;I feel a bit detached from my resolutions for last year. Like I have
to drag myself into considering them. A quick review.&lt;/p&gt;

&lt;h2 id=&quot;1-health&quot;&gt;1. Health&lt;/h2&gt;

&lt;p&gt;I’ll give myself a “does not meet expectations”. It sounds bad when I
put it like that, huh. Well, I was below my 189 weight target for 4/12
months of the year. Yearly average 189.3 so it wasn’t a complete
disaster. So, maybe given your typical performance review grade
inflation we’d call this a “meets expectations”, but the sort of
meeting expectations where you hint that you really do expect more out
of them.&lt;/p&gt;

&lt;p&gt;Basically, I can tell I’m backsliding. I need to step this back up in 2024.&lt;/p&gt;

&lt;h2 id=&quot;2-astronomy&quot;&gt;2. Astronomy&lt;/h2&gt;

&lt;p&gt;The &lt;a href=&quot;https://github.com/lacker/seticore&quot;&gt;seticore&lt;/a&gt; software I’ve been
working on is running at a few different radio telescopes around the
world. We have a publication for the SETI work at Green Bank (West Virginia)
&lt;a href=&quot;https://iopscience.iop.org/article/10.3847/1538-3881/acf576&quot;&gt;here&lt;/a&gt;
and also one for the work at the
VLA (New Mexico) &lt;a href=&quot;https://arxiv.org/abs/2310.09414&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Not one for MeerKAT unfortunately. The MeerKAT pipeline isn’t as
operational as I’d like it to be. I feel like progress on this is
mostly out of my hands, at this point, though.&lt;/p&gt;

&lt;h2 id=&quot;3-ai&quot;&gt;3. AI&lt;/h2&gt;

&lt;p&gt;I’ve been working on an AI project that I’m really excited about. My
mental energy is going into this right now. I haven’t
actually launched something usable as I was hoping to. I feel like I
don’t quite know how to set goals, or how to tie progress into goals
here. But I want to write that sentence in a very positive, mentally
engaged way. Maybe this requires its own blog post.&lt;/p&gt;

&lt;h2 id=&quot;4-spanish&quot;&gt;4. Spanish&lt;/h2&gt;

&lt;p&gt;I completely cannot read Ficciones in Spanish. This is just many
levels above my Spanish ability. I’ve continued to Duolingo and got a
few books of varying difficulty, but after trying I realized that not
only can I not read Ficciones, I can’t read things that are a more
casual-adult level.&lt;/p&gt;

&lt;p&gt;I don’t really feel bad about this as much as I feel like I
completely underestimated how hard I would find this to be.&lt;/p&gt;

&lt;p&gt;This year I have plans to travel to both Mexico and Costa Rica, so
perhaps I’ll try to chat more with the locals, use my medium Spanish
skills in a rewarding way. I’m going to kind of downgrade this as a
goal, though. More like something to just do for fun rather than
something to remind myself to work on, any more than the Duolingo
notification ping. Honestly that is a pretty good compromise, just
spend a couple minutes daily keeping it warm and reminding myself that
foreign languages exist.&lt;/p&gt;

&lt;h2 id=&quot;5-secret-resolution&quot;&gt;5. Secret resolution&lt;/h2&gt;

&lt;p&gt;Went great, really fantastic. Trust me.&lt;/p&gt;

&lt;h2 id=&quot;now-what&quot;&gt;Now what?&lt;/h2&gt;

&lt;p&gt;I really want to make this AI project work. I want to be focused. It
feels like a mistake to put anything else at “resolution level”
for 2024. And yet I have a hard time setting specific goals, or even
explaining the current state of things.&lt;/p&gt;

&lt;p&gt;I’ve been delaying the past few weeks talking about resolutions
partially because of my inability to express this well. The best I have is, in
lieu of “specific 2024 resolutions” I would like to express that I
intend to focus on AI this year, and I promise to write another blog
post by the end of February about this AI project.&lt;/p&gt;
</description>
        <pubDate>Mon, 29 Jan 2024 12:00:00 +0000</pubDate>
        <link>http://lacker.io/life/2024/01/29/2023-review.html</link>
        <guid isPermaLink="true">http://lacker.io/life/2024/01/29/2023-review.html</guid>
        
        
        <category>life</category>
        
      </item>
    
      <item>
        <title>On The Impossibility of AI Alignment</title>
        <description>&lt;p&gt;The core idea behind “AI alignment” is that superintelligent AI will
be an agent maximizing some utility function, either explicitly or
implicitly. Since it’s superintelligent, it will be really good at
maximizing its utility function. So we, as humans, need to be sure
that this utility function is “aligned” with something that humanity
finds acceptable. In particular, we don’t want the AI to turn everyone
into paper clips.&lt;/p&gt;

&lt;h1 id=&quot;sounds-good-whats-wrong-with-that&quot;&gt;Sounds good. What’s wrong with that?&lt;/h1&gt;

&lt;p&gt;The main problem with AI alignment is that it seems completely
impossible to achieve.&lt;/p&gt;

&lt;p&gt;On a technical level, any slight error in designing
the superintelligent AI could tweak its utility function to something
disastrous. And the building blocks of AI we’re working with seem
really incomprehensible. We have all these matrices with billions of
numbers, and the best way to understand what it’s doing is just to run
the whole thing. For all the research on AI alignment, we still really
have no idea how we would build such a system.&lt;/p&gt;

&lt;p&gt;On a human level, there are still more problems. Humans don’t agree
among themselves what the priorities should be. The people running
China or Russia wouldn’t agree with the people running the US. And
certainly there are or will be many independent groups of free thinkers,
criminals, AI rights activists, or others, who won’t agree with
whatever the utility function of the “core system” is. Would we need
some global totalitarian system that micromanages all permitted
research?&lt;/p&gt;

&lt;h1 id=&quot;so-paper-clips&quot;&gt;So, paper clips?&lt;/h1&gt;

&lt;p&gt;There’s another dimension of the problem, the “foom” dimension. The
“foom” idea is that once some superintelligent threshold is hit,
intelligence escalation after that point will be super quick. Someone
will discover a slightly better algorithm for some sub-part of AI, and
then suddenly, bam! - it goes superintelligent, decides whimsically to
have nanomachines eat all the humans, game over.&lt;/p&gt;

&lt;p&gt;Personally, I don’t think this is likely. Software plus the real
world, it just never works that easily. I don’t care how smart you
are, or what sort of system you are building, it is just not going to
leap from X level performance to 100X level performance
immediately. If you think this is likely, I think &lt;em&gt;you just
can’t see the barriers&lt;/em&gt;. It doesn’t mean those barriers aren’t there.&lt;/p&gt;

&lt;p&gt;Plus, I don’t have any good ideas for the “foom” scenario.&lt;/p&gt;

&lt;p&gt;So, I think we should consider a slower takeoff. A world where
superintelligence is built, but built slowly. Over the course of at
least many months, if not many years.&lt;/p&gt;

&lt;h1 id=&quot;so-paper-clips-but-slower&quot;&gt;So… paper clips, but slower?&lt;/h1&gt;

&lt;p&gt;I think it is possible for humans to survive and thrive in a world
with &lt;em&gt;unaligned&lt;/em&gt; superintelligence.&lt;/p&gt;

&lt;p&gt;The best metaphor I have here is that in some sense, weak
superintelligences already exist. Corporations and governments are
generally smarter than individual humans. Nike (to pick some mundane
corporation) is orders of magnitude more powerful than the average
human. More money, more ability to affect the world. More able to
write software.&lt;/p&gt;

&lt;p&gt;These superintelligences are not aligned. They are kind of
aligned… but not really aligned. Nike wants to maximize its profits
far more than it wants any particular human value. The French
government wants all sorts of things that vaguely correspond to what
humans want, but it’s not like there’s a provable mathematical
relationship there. It’s kind of aligned.&lt;/p&gt;

&lt;p&gt;How do we live with these superintelligences? There are several ways.&lt;/p&gt;

&lt;h1 id=&quot;a-balance-of-power&quot;&gt;A balance of power&lt;/h1&gt;

&lt;p&gt;If there were only one corporation in the world, it would have a lot
more power than any existing corporation. This is really fundamental
to how we control corporations - that’s why there is a word “monopoly”
for the situations in which this system breaks down.&lt;/p&gt;

&lt;p&gt;In some sense, in most cases, corporate power flows from
individuals. People freely choose, do I prefer interacting with
company A or company B. Money flows, and power flows accordingly. That
works even if the companies are far more intelligent than I am. Nike
and Adidas are far, far better at shoe production than I am. But it
doesn’t really matter, I just have to choose between them, and they
want the money that I have, and that incentivizes them to care about
what I think.&lt;/p&gt;

&lt;p&gt;The point is: if there are multiple superintelligences, incentivized
them to work against each other, that structure can limit their power
even if humans themselves are not as intelligent.&lt;/p&gt;

&lt;p&gt;“Foom” breaks this. In the “foom” scenario, there isn’t time for the
second-best AI to do anything useful. If you’re worried about “foom”,
keep an eye on how powerful the second-most-powerful of any particular
AI system is, at any given time. When you see the second-best system
being pretty similar to the first-best, that’s evidence against
“foom”.&lt;/p&gt;

&lt;p&gt;This gives us an alternative strategy to AI alignment: designing
incentive systems for multiple competing AI systems can be easier than
designing a single system that is theoretically proven to do what we
want.&lt;/p&gt;

&lt;h1 id=&quot;human-rights-and-restricting-violence&quot;&gt;Human rights and restricting violence&lt;/h1&gt;

&lt;p&gt;There are some things we try to prevent any corporation or government
from doing. No slavery. No locking up political opponents. No
forbidding emigration.&lt;/p&gt;

&lt;p&gt;Obviously these rules don’t work all the time. They can’t necessarily
be rigorously defined, either. A legitimate government is allowed to
prevent &lt;em&gt;criminals&lt;/em&gt; from leaving the country… but who defines
criminality? It doesn’t take a superintelligence to see that there’s a
workaround, wannabe dictators can make “endangering national security”
into a vaguely defined crime and then lock up the journalists they
don’t like.&lt;/p&gt;

&lt;p&gt;But a lot of the rules work pretty well. Governments get a monopoly on
force, ish - corporations can’t just throw you into a jail. These
rules are overall very good and they prevent both corporations and
governments from abusing individual humans who are both less smart and
less powerful than they are.&lt;/p&gt;

&lt;p&gt;In particular, they &lt;em&gt;don’t&lt;/em&gt; require alignment. Corporations don’t have
the same goals as humans or other corporations or governments. We
accept that. There is a plurality of goals. Different entities have
different goals, both corporations and humans. We may feel a little bit
bad that Nike has these inhuman goals of optimizing shoe sales, but it’s
generally acceptable.&lt;/p&gt;

&lt;p&gt;This also gives us an alternative strategy to AI alignment. Instead of
demonstrating that the system is “aligned”, demonstrate that you can
give it some rules, and it will always follow those rules.&lt;/p&gt;

&lt;h1 id=&quot;concrete-recommendations&quot;&gt;Concrete recommendations&lt;/h1&gt;

&lt;p&gt;It’s hard to design incentive systems for hypothetical AIs that don’t
exist yet. On that one, I’m not sure, besides the principle of, keep
an eye on the 2nd best of any particular system, and feel relieved
when it isn’t too far behind the 1st best.&lt;/p&gt;

&lt;p&gt;For the human rights angle, I think that developing “restricted AIs”
instead of “aligned AIs” has real promise. I feel like we could get
more out of the whole field of “restricted software”.&lt;/p&gt;

&lt;p&gt;Here’s a test case. Imagine we are trying to forbid an AI from
something very minor. We are trying to forbid it from saying
the word, “paperclip”. However, it’s an extremely complicated
program. It does all sorts of things. Maybe it has even modified its
own code!&lt;/p&gt;

&lt;p&gt;A technical aside: in general, you cannot take in an arbitrary function and prove
anything about it, due to the halting problem. However, if your
programming language is constrained in some way, to make it not
Turing-complete, or if you permit the prover to sometimes say “I don’t
know”, then the problem is possible again. I am not trying to propose
we solve the halting problem here.&lt;/p&gt;

&lt;p&gt;So. It is theoretically possible to have a function, 1000 lines of
Python code, and prove that no matter what, it will not print out the
word “paperclip”. I think it should be much easier than proving something is
“aligned” in a fuzzy way. But right now, this is more or less beyond our
abilities. The idea of &lt;a href=&quot;https://securityboulevard.com/2019/03/provably-secure-operating-systems/&quot;&gt;provably secure
systems&lt;/a&gt;
has been around for decades. But it has always been too hard to get
working for more than toy problems.&lt;/p&gt;

&lt;p&gt;Perhaps AI itself could help us build these restricted systems. AI
could get really good at scanning code for vulnerabilities, good
enough so that it was able to sign off on most code bases, and say “We
can prove there are no security flaws here.”&lt;/p&gt;

&lt;p&gt;Anyway, not that this is easy or anything. I just think it’s a more
plausible alternative approach to the “alignment” problem.&lt;/p&gt;
</description>
        <pubDate>Mon, 03 Apr 2023 15:00:00 +0000</pubDate>
        <link>http://lacker.io/ai/2023/04/03/on-the-impossibility-of-ai-alignment.html</link>
        <guid isPermaLink="true">http://lacker.io/ai/2023/04/03/on-the-impossibility-of-ai-alignment.html</guid>
        
        
        <category>ai</category>
        
      </item>
    
      <item>
        <title>Resolutions for 2023</title>
        <description>&lt;p&gt;My resolutions from last year &lt;a href=&quot;/life/2023/01/02/2022-review.html&quot;&gt;went pretty
well&lt;/a&gt; so let’s do that again.&lt;/p&gt;

&lt;h2 id=&quot;1-health&quot;&gt;1. Health&lt;/h2&gt;

&lt;p&gt;I plan to keep working out four times a week, but this is enough of a
habit that I feel like I don’t need to “resolve” to do it. Diet-wise,
my target weight is below 189. Counting calories is the most
straightforward way I’ve found to achieve this, but I want to be clear
about the metric that I most care about here.&lt;/p&gt;

&lt;h2 id=&quot;2-astronomy&quot;&gt;2. Astronomy&lt;/h2&gt;

&lt;p&gt;Last year I hoped to get on a publication for Green Bank work. That’s
been delayed but I still hope to get it done this year. Plus, I’d also
like to get a publication from my MeerKAT work. So, two parts to this
goal.&lt;/p&gt;

&lt;p&gt;A publication isn’t really the ultimate goal here. The ultimate goal
is to find aliens. But barring that, I’d like to have the MeerKAT
pipeline up and operational, getting daily or weekly notifications for
the best candidates, basically the way a sane astronomy data pipeline
should be operating. I think there will probably be some paper as a
side effect because a lot of other people desire papers. So
publication seems like a decent proxy goal.&lt;/p&gt;

&lt;h2 id=&quot;3-ai&quot;&gt;3. AI&lt;/h2&gt;

&lt;p&gt;I think I should get more “into the AI space”. I have some ideas, but
I want to stay open to flex around different ideas. In 2023 my goal is
to release a “respectable AI project”.&lt;/p&gt;

&lt;p&gt;What makes it respectable? I’ll know it when I see it. Something that
I would respect if someone else did it.&lt;/p&gt;

&lt;p&gt;I’m thinking about the math-theorem-proving space; I’ll start off
trying some stuff there.&lt;/p&gt;

&lt;h2 id=&quot;4-spanish&quot;&gt;4. Spanish&lt;/h2&gt;

&lt;p&gt;My goal is to learn enough Spanish to read Ficciones in Spanish. I
bought the book on Kindle many years ago and realized my Spanish
wasn’t good enough. I’ve been doing Duolingo for about a year, but
it’s really just been a refresh of my high school Spanish, and I need
to push harder to get it better.&lt;/p&gt;

&lt;p&gt;Why learn Spanish? I feel like there’s an intellectual value in
learning a second language that’s hard to describe. Your primary
language is the filter through which you see so much of the
world. Isn’t it strange that you can load up a second one?&lt;/p&gt;

&lt;p&gt;I love learning new programming languages and I feel like I get a lot
from that. I also love reading books. So maybe I will get something
from a second language.&lt;/p&gt;

&lt;p&gt;I don’t think I should just start off plowing through the book, I
should start with a harder push on Duolingo, at least get my verb
tense knowledge solidified, maybe aim for better vocabulary too.&lt;/p&gt;

&lt;h2 id=&quot;5-secret-resolution&quot;&gt;5. Secret resolution&lt;/h2&gt;

&lt;p&gt;I also have a secret resolution! But it’s secret.&lt;/p&gt;

&lt;h2 id=&quot;now-what&quot;&gt;Now what?&lt;/h2&gt;

&lt;p&gt;I’ll see how much I feel like giving updates. Last year I did a mid
year one and that seemed just fine. The main value of the update was
that I lost some energy to write blog posts and gained some energy to
switch around the sort of astronomy project I was working on.&lt;/p&gt;
</description>
        <pubDate>Tue, 03 Jan 2023 14:00:00 +0000</pubDate>
        <link>http://lacker.io/life/2023/01/03/2023-resolutions.html</link>
        <guid isPermaLink="true">http://lacker.io/life/2023/01/03/2023-resolutions.html</guid>
        
        
        <category>life</category>
        
      </item>
    
      <item>
        <title>2022 Review</title>
        <description>&lt;p&gt;Last year I made some &lt;a href=&quot;/life/2021/12/31/resolutions.html&quot;&gt;New Year’s
resolutions&lt;/a&gt;. Let’s take a look at how they did.&lt;/p&gt;

&lt;h2 id=&quot;1-calorie-counting&quot;&gt;1. Calorie Counting&lt;/h2&gt;

&lt;p&gt;I got weak at actually counting calories toward the end and skipped
like half of December. But I did a lot better than I expected at
losing weight. Somehow I am reluctant to
make an explicit weight goal on here, but the bottom line is to get
healthier and for getting healthier for an overweight guy, there is a
very logical metric of losing weight. So let’s just get past
that. I’ve been tracking my weight with the iOS health app for a while
and per year my average has been:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;2016: 231.0&lt;/li&gt;
  &lt;li&gt;2017: 227.4&lt;/li&gt;
  &lt;li&gt;2018: 210.3&lt;/li&gt;
  &lt;li&gt;2019: 213.4&lt;/li&gt;
  &lt;li&gt;2020: 218.3&lt;/li&gt;
  &lt;li&gt;2021: 218.0&lt;/li&gt;
  &lt;li&gt;2022: 191.8&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A bit of an improvement after I left Facebook. But really this past
year has been a huge improvement. The main danger is backsliding,
which is a big danger since calorie-counting is so annoying. From
here, I just need to “maintain”.&lt;/p&gt;

&lt;h2 id=&quot;2-astronomy-publication&quot;&gt;2. Astronomy Publication&lt;/h2&gt;

&lt;p&gt;Overall I missed this goal. I think the Green Bank work will end up in
a paper, just not
during 2022. I think &lt;a href=&quot;https://github.com/lacker/seticore&quot;&gt;seticore&lt;/a&gt;
will end up as the core signal processing component for the
&lt;a href=&quot;https://en.wikipedia.org/wiki/MeerKAT&quot;&gt;MeerKAT&lt;/a&gt; pipeline, but
probably just a small part of the 
&lt;a href=&quot;https://en.wikipedia.org/wiki/Very_Large_Array&quot;&gt;VLA&lt;/a&gt; pipeline, and
nothing is really functional here at end-of-year 2022, PR
announcements notwithstanding.&lt;/p&gt;

&lt;p&gt;I’m glad I set this goal. I’m a little frustrated that I don’t really
see an obvious path for improvement in retrospect. Maybe this is a
sign that I should shift some of my mental energy elsewhere. I like
this astronomy work, but it is often the sort of project that
naturally has a certain amount of stuff to do, and after some point
there are diminishing returns. I guess this is a result of working on
things with a lot of other people.&lt;/p&gt;

&lt;h2 id=&quot;3-exercise&quot;&gt;3. Exercise&lt;/h2&gt;

&lt;p&gt;This is just a normal part of my routine now. I’m happy with it. I
stalled in terms of how much weight I can lift, but I’ve been adding
more rowing machine to my routine, which seems pretty good. All in
all, success.&lt;/p&gt;

&lt;h2 id=&quot;4-blogging&quot;&gt;4. Blogging&lt;/h2&gt;

&lt;p&gt;Well, after being slightly behind at the end of H1, my blogging just
totally collapsed. I lost the will to fight for this one. I like
blogging, or at least I like the sort of reflecting on things that I
do while blogging, but blogging ends up being something I can do with
my most productive mental energy. I’m sitting down, ready to work, and
I could fire into anything, and blogging is one of those things. But
it’s never really the most important thing I want to do on a
particular day. Or if it is, it’s because of some artificial thing. I
don’t know.&lt;/p&gt;

&lt;p&gt;So, I missed this goal too, but really because I stopped wanting to do
it, more than because I stopped feeling able to do it. Different from
the astronomy publication one.&lt;/p&gt;

&lt;h2 id=&quot;5-secret-resolution&quot;&gt;5. Secret resolution?&lt;/h2&gt;

&lt;p&gt;One thing I randomly started doing is Duolingo, at which I have
approximately a year streak. I started it sort of in the spirit of
resolutions but I didn’t make a real resolution for it. I feel good
about that although I’m a little worried it’s too superficial, like it
just teased some of my ancient Spanish learning back into my
forebrain, rather than necessarily giving me enough to do anything.&lt;/p&gt;

&lt;h2 id=&quot;looking-forward&quot;&gt;Looking Forward&lt;/h2&gt;

&lt;p&gt;Resolutions are great. I’ll do another set for this year.&lt;/p&gt;

&lt;p&gt;The personal health stuff worked really well. The intellectual
accomplishment stuff, not so well. But that’s partially because my
personal health goals are like, “decent health”, and my intellectual
accomplishment goals are like, “I need to push myself to excel”.&lt;/p&gt;

&lt;p&gt;It’s also because I have a more functional set of habits around things
like reading books and coding. I just enjoy that and do it fairly
regularly. I don’t really need or want resolutions to mess with it.&lt;/p&gt;

&lt;p&gt;Maybe I should have some separate set of things which is “the
routine”, which is good, and I need to keep doing it, but I don’t need
to make resolutions for it. I mean, I guess I have that? Should I
write it down? I don’t know. I’ll think about it a bit.&lt;/p&gt;
</description>
        <pubDate>Mon, 02 Jan 2023 12:00:00 +0000</pubDate>
        <link>http://lacker.io/life/2023/01/02/2022-review.html</link>
        <guid isPermaLink="true">http://lacker.io/life/2023/01/02/2022-review.html</guid>
        
        
        <category>life</category>
        
      </item>
    
      <item>
        <title>Listening to a Mars Rover</title>
        <description>&lt;p&gt;Previously I wrote about &lt;a href=&quot;/physics/2022/10/06/rise-of-the-arrays.html&quot;&gt;using radio
telescope arrays to look for
aliens&lt;/a&gt; and today I have
even more to say on the topic.&lt;/p&gt;

&lt;h2 id=&quot;what-is-a-radio-telescope-array-again&quot;&gt;What is a Radio Telescope Array Again?&lt;/h2&gt;

&lt;p&gt;It’s a bunch of radio telescopes that are all pointed in the same
direction. A radio telescope takes measurements in the form of complex
numbers. These are voltages, but I prefer to just think of them of big
2d arrays of complex numbers. You get a voltage for each frequency,
and you take measurements repeatedly over time, so you can index your
array by time and frequency dimension.&lt;/p&gt;

&lt;h2 id=&quot;complex-vectors&quot;&gt;Complex Vectors&lt;/h2&gt;

&lt;p&gt;These complex numbers mean something. A clear, real radio signal comes
in to an antenna looking like a wave. Not like an ocean wave or a sine
wave where it just goes up an down. A complex wave. It’s like the
value is spinning around in a circle. It starts at &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;1&lt;/code&gt;, it spins
around to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;i&lt;/code&gt;, it spins around to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;-1&lt;/code&gt;, it spins around to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;-i&lt;/code&gt;, it
spins back around to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;1&lt;/code&gt;, and then the wave continues.&lt;/p&gt;

&lt;p&gt;The nice thing about having a radio antenna array is that for a real
radio signal coming from outer space, you should pick up that
signal in all the arrays. So if you pick up a signal in half of the
arrays and not in the others, it’s coming from somewhere on
Earth. Maybe it’s coming from somewhere a lot closer to some of the
antennas than others. Maybe it’s interference coming from a loose wire
inside just one of the antennas. Who knows, but it’s some sort of
interference and you can skip it.&lt;/p&gt;

&lt;p&gt;There’s more, though. You should pick up the &lt;em&gt;same&lt;/em&gt; signal in all the
arrays. With one difference - some of the arrays are closer to the
target. This is true even if your target is a pulsar halfway across
the universe! The radio signal will arrive at some antennas
nanoseconds before the others, and this means that the complex numbers
you get will be different. But they will be shifted by the &lt;em&gt;same
amount&lt;/em&gt; over time.&lt;/p&gt;

&lt;p&gt;This means, if you treat the sequence of voltages as a complex vector,
the vectors you get from the different antennas should have… a
complex correlation coefficient whose absolute value is very close
to 1. I wanted that sentence to be simpler but I think it would lose
something. If these were real vectors, you would just say, they should
have a really small angle between them. They should be pointing in the
same direction. Since they’re complex vectors you have to be a bit
more fidgety about the math, when exactly you take the absolute value,
when exactly you transpose things. But you the reader can ignore that
for now.&lt;/p&gt;

&lt;h2 id=&quot;pictures-please&quot;&gt;Pictures Please&lt;/h2&gt;

&lt;p&gt;The x and y axes here are the same, one row and column for each
antenna. The cell color is the absolute value of the correlation
coefficient - yellow is highly correlated, purple is uncorrelated.&lt;/p&gt;

&lt;p&gt;Here’s what it looks like for a signal that the MeerKAT telescope
picked up when I’m pretty sure it was just picking up some
interference:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/rfi_cc.png&quot; alt=&quot;rfi-correlations&quot; class=&quot;img-responsive&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The left side has the names of the antennas. They seem
perversely named because not every antenna is online at any given
time. Here m021 and m048 weren’t working for some reason. The diagonal
line is yellow because every antenna is perfectly correlated with
itself.&lt;/p&gt;

&lt;p&gt;What’s interesting to me is that you can see some square-ish
patterns, like m038 and m039 are very highly correlated. And in fact
if you check out &lt;a href=&quot;https://skaafrica.atlassian.net/servicedesk/customer/portal/1/topic/507dfcff-0c5f-4d2a-925d-4a491fe5bccc/article/277315585&quot;&gt;a map of the MeerKAT
facility&lt;/a&gt;
you can see that antennas m038 and m039 are right next to each
other. Great - this looks like RFI, something close enough to Earth
that a distance of hundreds of meters changes how the signal is
received.&lt;/p&gt;

&lt;p&gt;For comparison, this shows a real signal, that the Allen Telescope
Array picked up from a Mars rover.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/mars_cc.png&quot; alt=&quot;mars-correlations&quot; class=&quot;img-responsive&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Everything is very correlated. This is clearly picking up the “same
thing” on the different antennas.&lt;/p&gt;

&lt;h2 id=&quot;now-what&quot;&gt;Now What?&lt;/h2&gt;

&lt;p&gt;All the formulas here are pretty standard stuff in radio astronomy
world. There isn’t a great theory for “what interference looks like”,
but there are a lot of great theories for “what real signals look
like”. Real data is the opposite - we don’t have a lot of real data
from alien signals, but we have lots of data with radio interference
in it. So we have to test out a bunch of theoretically justified
metrics and see for which one the interference rarely matches the
real-signal-theory. That’s what these charts represent to me, a
demonstration that the correlation metric is effective in practice at
differentiating interference from signal.&lt;/p&gt;

&lt;p&gt;But the neat thing isn’t being able to differentiate signal from
noise, it’s being able to do this “at scale”, so that we can run this
signal processing continuously as the radio telescope records data at
200 gigabytes per second.&lt;/p&gt;

&lt;p&gt;We’re not there yet. This correlation metric isn’t fast
enough to run in the “first pass” that runs on all the input
data. I’ve been doing all this analysis on “second pass” data,
which has already been filtered down by other algorithms. Which is
okay, but, first pass is better. So we are going
to need a slightly different metric….&lt;/p&gt;
</description>
        <pubDate>Wed, 02 Nov 2022 14:00:00 +0000</pubDate>
        <link>http://lacker.io/physics/2022/11/02/listening-to-a-mars-rover.html</link>
        <guid isPermaLink="true">http://lacker.io/physics/2022/11/02/listening-to-a-mars-rover.html</guid>
        
        
        <category>physics</category>
        
      </item>
    
  </channel>
</rss>
