Thursday, March 30, 2023

if you're scared of AI, you should be scared of smart humans too

The AI apocalypse argument is hitting the mainstream.  In a nutshell, AI is advancing very quickly and as we have no idea how to instill it with human values, it is likely to destroy all that we value in pursuit of some goal we have given it.

I don't want to say this is impossible.  Janelle Shane has compiled a fun Twitter thread of AI agents achieving goals in unexpected ways, exploiting aspects of the environment that most humans would consider off-limits.  These exploits remind me of an apocryphal test for psychopathy:

Question: A woman meets and engages in extended conversation with an attractive man at her mother's funeral.  However, he leaves before she can get his contact information.  A few days later, the woman kills her own sister.  Why?

Answer (supposedly only deducible by psychopaths): She is hoping the attractive man will also show up at her sister's funeral.

You could imagine an AI system also coming up with that answer.  "Hey, you didn't tell me I couldn't kill my own sister, you just told me to try to meet the attractive guy."  The AI apocalypse argument is the idea that one day an AI system will say "hey, you didn't tell me I couldn't kill all humans, you just told me to make a bunch of paperclips".

And so I like to think of AI systems, at least the current batch, as psychopaths.

But... we already have human psychopaths.  And some of them are quite intelligent.  Some of the most intelligent ones are probably able to conceal their psychopathy enough to successfully further their own goals.  Certain CEOs come to mind.  And to a lesser extent, we're all psychopaths in that we're "unaligned" with prosocial values; most people would be willing to inflict some amount of harm on society if their own well-being or that of their loved ones were at stake.

Secondarily, the AI apocalypse argument appeals by analogy to historical examples of lesser intelligences encountering greater intelligences.  Homo sapiens drove extinct earlier hominids, as well as many other mammalian species.

What's noteworthy about these examples is that the differences in intelligence are relatively small.  Humans haven't driven cockroaches extinct, or ants.  The intelligences of those creatures are different enough from our own that the competition for resources is limited to our pantries.

The scariest creature is a psychopathic human (or group thereof), a little bit smarter than us and competing with us for resources.

Wednesday, April 21, 2021

how to do well in grad school

I wrote this blog post 10 years ago but didn't publish it.  It's directed at incoming PhD students to the University of Washington Computer Science & Engineering department (now the Allen School).  My sense from talking to recent CS undergrads is that I would have zero chance of being accepted to this program nowadays.


This is a list of things I didn't do, but should have.  I graduated in 8 years, the last in my cohort.  Follow these rules if you want to do better.

1.  Start doing research right away, and spend most of your time on it.  In fact, you should have done this already.  It's even possible to arrive at the beginning of the summer and start working on a project then.  The sooner you do this, the better, because doing research and writing a dissertation are the main bottleneck in grad school.  Everything else is secondary.

2.  For one, your classes don't matter.  Well, they barely matter.  If you haven't started doing research yet, I suppose extending a class project is one way to get started, but you're better off doing research to the detriment of your class performance.  The classes outside your research area really don't matter.  Do the minimum amount of work required to not embarrass yourself.  And don't take too many classes at a time.  Again, this is never the bottleneck.

3.  Similarly, TAing does not matter.  Do the minimum amount required.  We have something called the Bob Bandes Memorial Award for Excellence in Teaching.  If you get this award, it's a sure sign that you're doing something wrong.  I won it my first year, and it felt good but had zero lasting positive consequences.

4. No one knows what it really means to do research in computer science, in some deep sense.  Don't get hung up on this, and just try to make cool stuff.

5. Don't work in your office, work in your group's lab, and socialize with those people.  Hanging around smart people in your area is extremely important.  Don't become friends with the rest of your cohort or your officemates.

6. If, after a few years, things aren't working out, LEAVE.  There's no shame in leaving with a Master's.  If you wait too long, though, there will be shame in leaving, and you'll be stuck in no man's land.

7. There are lots of things to do in Seattle.  It's silly to say don't do them, but don't do something else that's really time consuming or difficult, as it will eat up your willpower.  Getting a PhD takes all the willpower you have and then some.

8. Be married when you arrive, or be single and stay that way.  Having tumultuous relationships is extremely distracting.  Everyone I know who showed up married finished in 5 years.  This advice may apply only to men.

Don't think you're too good for this advice.  I thought that, too.  I thought I could simultaneously do research, take martial arts classes 5 days a week, and play in an '80s cover band.  I also thought I could work alone, in my office.  If you think you're good, you can try breaking some of these rules, but be warned that everyone else in your position also has reason to think they're good, and I guarantee that the majority of you can't get away with breaking these rules.

Finally, remember that even if you are the worst, the outcome isn't that bad.  You're not going to leave worse than you are now (though you'll be older), and you must be pretty good already if you got accepted.  You won't be unemployed when you leave, and at worst you can get a job programming interesting things.

chords I like

Below is an email I sent to a group of music nerd friends, including The Doctor of Rock.

Here are the two main qualities that make a good chord:

1. At least one note from outside the song's key.  This includes chords like II, VI, VII in one direction and bIII, bVI, bVII (and I suppose iv) in the other.
2. Somewhat unexpected given the preceding context.  So the bVII in a song that just goes back and forth between I and bVII is not as good as the bVII in Flashdance, which is pretty close to the ideal chord.  And the III in a song that's obviously minor is not as good as the III in the chorus of Glory of Love.

Sometimes an entire song section can be chock full of good chords, to the point where it's hard for me to assign "good chord" credit to individual chords.   Like the prechorus and chorus of Borderline.  This is also a case where the sequencing of the chords helps a lot; the chorus *starts and ends on the V*.

Another thing I like is when II-like chords and bVII-like chords appear in close proximity.  Like the bVII and III in the prechorus to Starlight.  More generally I'd say the weakest use of II is in a II - V, and the weakest use of III is in a III - vi.  Not weak, just weaker than other uses of II and III.

Sometimes a song has a chord that I think I can improve on.  Are You Happy Now by Michelle Branch is a pretty good song, but the ii in the chorus should *clearly* be a II.  Dream a Little Dream has a bVI that should *clearly* be a iiø7.

Friday, January 31, 2014

where I mostly write

It's been a while since I updated this blog, mainly because I've been using Facebook as a mini-blog. (You don't need to friend me in order to read my posts.)

I've also been contributing to many of the posts on Dan Morris's music theory blog.

Saturday, November 03, 2012

Hotelling's Law

Hotelling's Law is often cited as the reason politicians running against each other end up taking similar positions.  For example, look at Obama and Romney on this chart.  The classical example is two vendors selling ice cream to patrons along a boardwalk, where each patron will buy ice cream from the nearest vendor.  In this scenario, each vendor is incentivized to move right next to the other, towards the middle of the boardwalk, in order to maximize profit.

I started thinking about some extensions to this.  Namely, what happens if you add more vendors, and what happens in different spaces.  You might guess that if you add more vendors, they all cluster at the middle, but you would be wrong.

(I should add that I ran simulations but didn't work out any of the math, so it's possible some of my results here are not correct.)

Three Vendors
What happens with three vendors?  The middle vendor has no incentive to do anything and takes a random walk, but the outer vendors want to squeeze the middle one.  Once they all meet, they move around together, and don't necessarily stay at the center.

Four Vendors
It's tempting to think that four vendors would also fight over the same spot, but this did not happen in my simulations.  I instead got two vendors sitting right next to each other at 1/4, and the two others at 3/4.  Each vendor then gets 1/4 of the patrons, and none has any incentive to move.

N Vendors for Even N
This plays out just like four vendors, with two vendors at 1/N, two vendors at 3/N, two vendors at 5/N, etc., with each vendors getting 1/N of the patrons.

N Vendors for Odd N
This seems pretty chaotic.  I can't come up with any simple way to describe what happens, and it's not always the same.

Two Vendors, Circular Boardwalk
Now imagine a circular boardwalk.  In this scenario the vendors' positions do not matter at all, as they will split the profits equally.

Three Vendors, Circular Boardwalk
Eventually, you get a stable situation where two vendors are right next to each other serving 1/4 of the patrons each, and the other vendor is on the other side of the circle serving the other 1/2 of the patrons.

N Vendors for Even N, Circular Boardwalk
Plays out just like it does on a linear boardwalk, with pairs of vendors at N/2 equally spaced positions on the circle.

Two Vendors, Two Dimensions
Just like in one dimension, they move to the center.

Two Vendors on a Sphere
Same as a circle, position doesn't matter.

If I get a chance I'll try to get some of these simulations running on the web somewhere.  Also, someone please address this more rigorously than I just did.

Thursday, May 17, 2012

RescueTime productivity feedback

RescueTime is a useful tool for tracking your computer time, but it would be nice to get constant real-time feedback so you can see your scores plummet as you surf Facebook all day.

I hacked together a simple Windows application that lives in the system tray and shows your RescueTime productivity, updating every minute.  You can get it here.  You'll also need to install Python and PyWin32.  You also need to enable a RescueTime API key here and then add that key on line 16 of productivity_feedback.py.  If you want the application to run all the time, create a shortcut and set it as a startup task.

Yeah, I didn't make it easy for you.  If I get a chance I'll put together a simplified cross-platform version.

Tuesday, November 15, 2011

don't break the only way to do something

It is impossible to stay up-to-date with all of the blogs and news sites I read.  For infrequently-updated sites with a high percentage of good stuff, RSS solves the problem.  For frequently-updated sites with a lower percentage, it does not.  I don't want to sift through hundreds or thousands of articles manually each day.

Up until a few weeks ago, I knew of exactly one solution to this problem: "sort by magic" in Google Reader, which sorted the RSS entries in my feed by, well, magic.  Unfortunately, Google's much-maligned Reader update has killed the magic.  The "sort by magic" option is still there, but they should probably change its name to "sort by angry illiterate moose".  I used to see a nice mixture of posts from all of my followed sites, where posts from infrequently-updated sites usually showed up near the top, along with only the "best" posts from frequently-updated sites.  (I don't know what "best" means, but it seemed to do just fine.)  Now, I just see hundreds of posts from TechCrunch.  This is not magic.

So, now I have zero solutions to this problem.  I can no longer follow blogs like Marginal Revolution with several posts per day.  TechCrunch is out of the question.

Any suggestions?

Sunday, October 30, 2011

does playlist order matter?

Does playlist order matter?  Many people seem to think so (see High Fidelity), but I remain unconvinced.  I was inspired to resolve this issue in my mind after seeing a poster at ISMIR 2011 evaluating several algorithms for automatic playlist generation.  It turns out that there's a free dataset containing around 30,000 actual user-created playlists, covering over 200,000 songs.

What does it mean for playlist order to matter?  There are a few simple things we could look for:

  1. Some pairs of songs should occur frequently in one order, but not the other.
  2. Some pairs of songs should occur close together (in either order) more frequently than predicted by chance alone.
There's a problem with looking at pairs of songs, though: the above dataset contains over 47 billion possible song transitions and only 30,000 playlists, containing around 20 songs on average.  Possibly worse, only 9627 of the 545,867 pairs of consecutive songs (1.8%) appear more than once.
To address this lack-of-common-pairs issue, we can think about modeling a playlist as a list of artists rather than a list of songs, as this should increase the amount of repetition.  Now, instead of counting the number of times Even Flow by Pearl Jam comes after Rusty Cage by Soundgarden, we count the number of times any Pearl Jam song comes after any Soundgarden song.  This ameliorates the problem somewhat, as there are 128,778 consecutive artist pairs (23.6%) that occur at least twice in the data set.

Now, let's address #1: are there pairs of artists for which one is more likely to come first?  Here's a simple way to test this:
  • For each pair of artists, compute the probability that they appear in one order (say, Pearl Jam then Soundgarden) when they appear consecutively.  Then find the pairs of artists for which this probability is highest.  (It's necessary to use something akin to Bayesian Rating here, to avoid pairs of artists that appear a few times in one direction and zero in the other.)

  • Randomly shuffle each playlist and recompute the probabilities, again looking at the highest-probability pairs.  Do this several times.  The highest probabilities you see will give you a good sense of what can happen based on chance alone, since there is obviously no meaningful order to the randomly shuffled playlists.

  • Are there any pairs of artists with ordering probability higher than anything you saw when using the randomly shuffled playlists?  If so, we can say this pair of artists is likely to appear in one order over the other with some degree of significance.
It turns out that running this experiment yields no pair of artists that are significantly likely to appear in one order over the other.  There's still a possibility of some asymmetry, however — maybe Pearl Jam is likely to appear two songs before Soundgarden, or three, etc.  To address this, we can re-run the above test, but without the requirement that the songs are adjacent.  That is, we can compute the probability that Pearl Jam occurs earlier than Soundgarden in a playlist where both appear.  When we do this, we find that there's still no pair of artists with a preferred ordering.

Let's look at #2, then: are there pairs of artists that appear next to each other more than chance would predict?  We can adapt our above experiment for this case: just compute the probability that two artists appear consecutively (in either order) when they both show up in the same playlist, and do the same for the randomly shuffled playlists.  It turns out that now there are a few pairs of artists that tend to appear consecutively with some significance (keep in mind these playlists are from the early 2000s):
  • Ben Folds Five and Barenaked Ladies
  • Radiohead and Björk
  • Blink 182 and Weezer
  • Radiohead and Pink Floyd
So, I guess I will have to acknowledge that playlist ordering is something, and not nothing.