Ineffective Theory

Links for February 2023

Hanson on modern bandits.

Cowen on the Twitter files. Straussian, although of course I’m not sure it was intended that way.

Between 1940 and 1962, somewhere between one-third and one-half of adult deaths among the Gebusi in New Guinea were due to homicide. From 1989 to 2017, there were no recorded homicides at all. Buckner details the causes with a focus on economics and culture, and noting the absence of police presence among the Gebusi. See also the original paper, which concludes in part:

In rural areas of many developing nations, modern cultural development includes increasingly explicit demands for monetary compensation in cases of dispute, along with de-collectivized individuation of grievances.

Comments from 2021 on UFOs, in which Tyler Rogoway claims:

it is clear that a very terrestrial adversary is toying with us in our own backyard using relatively simple technologies—drones and balloons—and making off with what could be the biggest intelligence haul of a generation.

I believe this is what’s referred to as “calling it”.

Zvi’s notes on Bing/Sidney are solidly hilarious. It’s also worth skimming the whole thing just to learn that yes, this is happening. My only comment is that after seeing both ChatGPT and Sidney in action, I am now less worried about doomsday-like AGI scenarios. At least, I think there is a low probability that any serious harm comes out of LLMs, even if scaling continues for the next decade. I am also more worried than I used to be about the potential for missing good things, from fear of (and eventually regulation of) AIs.

jax: Initialize an array from a function

(I’m writing this so that I can dig it up later when I’ve inevitably forgotten the trick in half a year.)

You want to initialize an \(N \times M\) array in jax. You already have a routine for computing the desired value at index (i,j). Normally you might use a nested for-loop like so:

import jax
import jax.numpy as jnp

N,M = 8,5  # Or whatever

def f(i,j):
    return 2**i + 3**j  # For example

ary = jnp.zeros((N,M))
for i in range(N):
    for j in range(M):
        ary[i,j] = f(i,j)

Alas, jax.jit will see only the unrolled loop, so compilation is guaranteed to be horrendously slow.

As usual, the loops may be profitably replaced with calls to jnp.vectorize. But jnp.vectorize(f) expects to be called on two arrays. They can be generated by jnp.indices, which takes a desired shape, and outputs arrays listing their own indices. As an example, after a call a,b = jnp.indices((3,5)), a is an array of shape (3,5) obeying a[i,j]==i, and b is an array of shape (3,5) obeying a[i,j]==j.

Putting it all together (as a one-liner):

import jax
import jax.numpy as jnp

N,M = 8,5  # Or whatever

def f(i,j):
    return 2**i + 3**j  # For example

ary = jnp.vectorize(f)(*jnp.indices((N,M)))

Links for January 2023

Musings from China on expert failure.

There is much qualitative evidence for “democratic backsliding” around the world, but quantitative evidence is harder to come by, even when you’re looking:

The simplest explanation is that recent declines in average democracy scores are driven by changes in coder bias.

Cyanide, famously, smells like almonds. Doesn’t that seem strange? Well, it turns out it’s not true; or at least, if you say to yourself “cyanide smells like almonds”, you are probably making your mental model of the world worse.