Tick, tock, tick, tock…

I recently read about IBM’s Sequoia supercomputer that will be operational in 2011.  It will perform 20 Peta FLOPS and have 1.6 Peta bytes of RAM.  To put that in perspective: if it were to attempt to simulation a human cerebral cortex it would be able to allocate 50 bytes of RAM and 700 calculations per second to every synapse in the model.  Unless the human brain is doing something pretty weird, the quest to build a computer with comparable raw processing power is almost over.

As I do at the start of each year, I’ve spent some time reconsidering when I think roughly human level AGI will exist.  I’ve again decided to leave it at 2025, but now with a reduced standard deviation of 5 years.  Computer power is a limitation as researchers typically have limited hardware budgets, unlike the DOD guys and their monster supercomputers.  From what I’ve read, computer power should continue to grow exponentially for at least the next 5 years, and probably the next 10.  So I don’t see this as being too much of an issue in the coming decade.  On the algorithm side, I think things are progressing really well.  I know a number of very talented people who are working on what I think are the key building blocks required before the construction of a basic AGI can begin.  I’m certain these problems are solvable, but whether it takes 2 years or 10 years is hard to guess.  This is my main source of uncertainty.

Continue reading

Posted in Uncategorized | Tagged , , , , | 28 Comments

Learning to predict the future

One of the things I’ve been thinking about recently is the prediction of the future.  Many people really enjoy doing this and come up with all sorts of wild speculations.  It’s kind of like having the liberty to write your own science fiction, but then taking it a step further by convincing yourself to actually believe it.  Sooner or later the future arrives, and many of the recorded predictions look rather silly.  More cautions people take note of this and often avoid easily falsifiable predictions.  That’s all very well as it avoids them ending up looking like a fool, however it also makes becoming a better predictor problematic as they’re never really forced to contemplate their mistakes.  My preference is to make an honest attempt at specific predictions, along with the reasoning behind them.  Then when the time comes, go back over them and try to work out what went right, what went wrong, and mostly importantly why.  Was it bad luck?  Was I overconfident?  Under confident?  Was some kind of systematic bias at work?

One example of this has been trying to predict the medium term direction of the stock market over the last 15 years.  The evidence so far shows that I’m consistently good at predicting what will happen, but that I predict that it will happen much sooner than it actually does; I roughly need to double my time estimates.  I’m now trying to mentally correct for this bias in the trades I make, but it will take some years to see if this is working.

Continue reading

Posted in Uncategorized | Tagged , , , , | 6 Comments

Give me presents!

Today is my birthday and as such I’ve decided to demand presents!  Lots of presents!  Gimme gimme gimme!

Now, I don’t have much use for material things, so they don’t interest me.  (Ok, so a life long stipend to allow me to work on what I think really needs to be done would be useful…)  Besides, from a purely practical perspective, I don’t want more heavy things to have to cart with me to London next year.  No, I want something more valuable and enlightening (and light).  I want your wisdom.

Here’s the deal: Give me a suggestion, a pearl of wisdom, or just something you think I really should consider doing, or changing, or what ever.  It can be as specific or general as you like.  It could be something I’ve never heard before, or something you’ve told me a million times but I always seem to ignore.  But just one thing!  My part of the deal is that over the next two months while I’m in New Zealand I will do my best to put my prior beliefs aside and seriously consider each of your gifts.  That’s the deal.

I’ve already sent a similar request to a few friends and have received some gifts, but I thought I’d also throw it out to a wider audiance.

Posted in Life | 13 Comments

An imitation test for moral capacity

Yudkowsky has been posting a lot on Overcoming Bias recently about his theory of metaethics.  Today he posted a summary of sorts.  Essentially he seems to be saying that morality is a big complex function computed by our brain that doesn’t derive from any single unifying principle.  Rather, this function is a mishmash of things and even we don’t really know what our own function is, in the sense that we are unable to write down an exact and complete formulation.  It’s just something that we intuitively use.

I’m not convinced that ethics can’t be derived from some deeper unifying principle.  I’m also not convinced that it can, lest you misunderstand me.  What I do accept is that if this is possible then finding such a principle and convincingly arguing for it is likely to be difficult in the extreme, and probably not something that is likely to happen before the singularity.  Nevertheless, I haven’t yet seen any argument so devastating to this possibility that I’m willing to move it from being extremely difficult to certainly impossible.  Any system of ethics that does derive from some unifying metaethical principle is almost certainly going to be different to our present (western?) ethical notions.  I think some degree of this is acceptable, given that our ethical ideas do change a bit over time.  Furthermore, no matter how human we try to make the ethical system of a powerful AGI, post-singularity we are still going to be faced with ethical challenges that our pre-singularity ethics were never set up to deal with.  Thus, our ethics are going to have to be modified and updated in order to remain somewhat consistent and viable, otherwise we’ll end up with this kind of nonsense.

Continue reading

Posted in Uncategorized | Tagged , , , | 11 Comments

LaTeX and lulu.com

So you’ve finished writing your thesis, your magnum opus. Next step, get it printed as a book for the world to admire. Of course, being the misunderstood genius that you are, no professional publisher will want to touch your great achievement.  Never fear, the internet age is here! So you gather up your LaTeX  files and head off to lulu.com, only to find that lulu has no idea about LaTeX. A search of the lulu help system literal returns no results.  Google returns fragmented and in many cases possibly out of date suggestions. If this sounds like you, read on.

Continue reading

Posted in Uncategorized | Tagged , | 9 Comments

Kolmogorov, Solomonoff, AIXI etc. questions

Many people seem to have questions about Kolmogorov complexity, Solomonoff induction, algorithmic probability theory, AIXI, the universal intelligence measure and so on.  I don’t always have time to watch all the email lists where these things get discussed, but if you do have any questions, concerns, etc. that you’d like to put to me, feel free to post a question below and I’ll try to answer it.

Posted in Uncategorized | Tagged , , | 47 Comments

SIAI Canada Academic Prize for 2008

This morning I received the wonderful news that I’ve won the Singularity Institute for Artificial Intelligence – Canada Academic Prize for 2008!

The award is in “recognition of [my] efforts to improve AI theory” and is worth CAD $10,000.  This will certainly help my budget over the next two years while I study at the Gatsby Unit in London.  So, thank you to SIAI Canada, and to all the Canadians whose donations made this money available!

Speaking of my research, after a long weekend of final edits, corrections, formatting, indexing, embedding fonts and other complexity (I’ll write a blog post about what I had to do at some point), I’ve finally uploaded my thesis “Machine Super Intelligence” to lulu.com and have ordered a test copy.  Once I’ve checked that everything is ok I’ll let you know where copies can be ordered.  Copies should be USD $18 plus shipping for a 200 page casewrap hardcover.  Probably about in a month…

Posted in Uncategorized | Tagged , , , , , | 4 Comments

Roadrunner reaches a Petaflop

According to this article the Roadrunner supercomputer has now reached a Petaflop.  Although it doesn’t sound like an official benchmark result yet, given that the International Supercomputing Conference starts in a week I guess the timing of the article is deliberate and an official position on the Top 500 supercomputers list will follow.

Next milestone…. 1016 FLOPS.  Perhaps in 2012?

Posted in Uncategorized | 1 Comment

SciPy – some more thoughts

With over 20,000 visitors in 2 days I discovered what my poor web server’s maximum capacity is: about 70 visitors a minute.  It doesn’t sound like that much to me, but a number of times I had to ask my ISP to resuscitate the thing.  I guess all the interpreted PHP code and database access required to build each page is quite computationally expensive.    Anyway, I thought I’d write a short addendum for anybody who is still interested.

First of all, things like SciPy are obviously good tools for certain types of problems. If you’re writing a front end system for a corporate database system or a text editor — forget about it.  That said, plain Python is a pretty good way to code most things in terms of being a language that is somehow both concise and simple.  In my opinion the only real downside is speed: it’s about 100 times slower than C, or around 50 times slower than java.  Anyway, that’s another topic, here I’m more focused on using Python in combination with SciPy.  If you’re dealing with complex transformations on data that has many dimensions, for example simulating networks or machine learning, SciPy is likely to be good tool for the job.

One of the most popular comments on reddit basically said that while writing a program to use matrices can produce very short code, it’s far too difficult to debug. I don’t buy this. Firstly, in my experience, if you get the matrix computations wrong the output is normally complete junk. That’s good news, because the really hard bugs to fix are ones where the output is almost right, or is right most of the time. You also can be pretty confident that all the fancy algorithms doing efficient matrix multiplications etc. are correct. Furthermore, because the code is so short there are only a few places where you have to look to work out what you’re doing wrong. Finally, if you’re working in areas such as machine learning or finance then the normal way to describe things is already matrix notation. If you want to, say, construct a non-parametric density estimate by using a multivariate Gaussian kernel, then your starting point is going to be a set of matrix equations.

What are the problems with SciPy?  As pointed out by one of the commenters to my last post, one major problem is documentation.  This is common with open source projects it seems: people like to write code but they don’t like to write documentation.  The basics seem to be covered ok, but as you get further into the libraries it’s not so good.  And it’s not just that the documentation is missing, but rather the structure of the whole SciPy system is confusing.  For example, let’s say you want to interpolate in multiple dimensions.  You go to the interpolate module and what you find is that it only does up to 2 dimensions.  So you’re out of luck, right?  No, the trick is to look in the image processing library ndarray which has interpolation is as many dimensions as you want.  For a new user this is all really confusing.  Hopefully, as the whole system matures these things will improve.  As the documentation is wiki style, once I’m a bit more knowledgable I’m going to do my part and help out in a few places.  It’s really the least I can do.

Then there is the question of performance.  I’ve been told that the standard Ubuntu SciPy package doesn’t use matrix libraries that are all that efficient.  If you want to have fast SciPy then you need to install BLAS, LAPACK and ATLAS yourself.  Using ATLAS you can then compile the libraries so that they will be automatically optimised for your particular CPU, memory cache sizes etc.  You can then get SciPy to use these optimised libraries.  Just look under the installing SciPy for all the instructions.  I haven’t done this yet but people who have report significant speed increases.

If your code makes relatively few calls (say tens of thousands or less) on relatively big matrices (say with thousands of elements) then (depending on what calls you’re making) your code will probably spend most of its time busy in the matrix library.  With an optimised library you’re then doing pretty well in terms of performance.  You might want to look at things like Parallel Python to take the performance to the next level.

Where performance becomes a problem is when you have the reverse situation: many calls (millions) on relatively small matrices (hundreds of elements or less).  When what tends to happen then is that all the computation time is spent going from Python into the library and back out again. The time spent actually inside the library doing computations is negligible. In this case your code would be much faster if it was written in C++ and directly called the BLAS libraries. Other than trying to rethink your algorithm so that each matrix operation does a bigger chunk of the total work, I’m not sure what to do about this. Using something like Pyrex doesn’t really help all that much (Pyrex takes Python with a few extras and compiles it into C that can then be compiled into a binary library that Python can use). The problem is that even in Pyrex code you still have the overhead of going into and back out of the SciPy library. You can directly access matrices (ndarrays) from within Pyrex in a way which is very efficient, however you’re then left writing the matrix code yourself — ok if you want to do something trivial, but not a good idea if you need to efficiently multiply two matrices.  So in short, if you need to make a large number of calls on relatively small matrices then I’m not sure how you can do this in a way that can compare to C++ used with BLAS.  If I ever find a solution, I’ll let you know.

Posted in Uncategorized | Tagged , | 7 Comments

SciPy – the embarrassing way to code

I’ve programmed in many languages before, indeed I’ve spent at least a year working in Basic, C, C++, C#, java, assembler, modula-2, powerhouse and prolog.  One thing I’ve never done before is Matlab, well except a few basic exercises for some course I did way back.  A couple of years ago I started using python and more recently I’ve started to use the scipy libraries which essentially provide something similar to Matlab.  The experience has been unlike anything I’ve coded in before.  The development cycle has gone like this:

1) Write the code in python like I would write it in, say, java.  I have data stored in some places, then I have algorithms that iterate over these data structures computing stuff, calling methods, changing values and doing various complex things in order to implement the desired algorithm.  10 pages of code, somewhat general.

2) Then I realise that in a few places I don’t need to iterate over something, I can just use some vectors and work with those directly.  7 pages of code, a little more general.

3) Then I realise that part of my code is really just running an optimisation algorithm, so I can replace it with a call to an optimiser in one of the scipy libraries.  5 pages of code, and a bit faster now.

4) Then I try to further generalise my system and in the process I realise that really what I’m doing is taking a Cartesian space, building a multi-dimensional matrix and then applying some kind of optimiser to the space.  3 pages of code, very general.

5) Finally I’m like, hey, how far can I push this?  With some more thought and spending a few days trying to get my head around all the powerful scipy libraries, I finally figure out that the core of my entire algorithm can be implemented in an extremely general and yet fast way in just a few lines.  It’s really just a matrix with some flexible number of dimensions to which I am applying some kind of n-dimensional filter, followed by an n-dimensional non-linear optimiser on top of an n-dimensional interpolation and finally coordinate mapping back out of the space to produce the end results.  2 pages of code, of which half is comments, over a quarter is trivial supporting stuff like creating the necessary matrices, and just a few lines make the necessary calls to implement the algorithm.  And it’s all super general.

Now this is great in a sense. You end up throwing away most of your code now that all the real computation work is being done by sophisticated mathematical functions which are using optimised matrix computation libraries. The bottleneck in writing code isn’t in the writing of the code, it’s in understanding and conceptualising what needs to be done. Once you’ve done that, i.e. come up with mathematical objects and equations that describe your algorithm, you simply express these in a few lines of scipy and hit go.

It’s not just with my financial software either. I recently implemented a certain kind of neural network using nothing but scipy and found that the core of the algorithm was just one line of code — a few matrix transformations and calls to scipy functions.  I hear that one of the IDSIA guys working on playing Go recently collapsed the code he’s been working on for six months down to two pages.

The downside to all this is that you spend months developing your complex algorithms and when you’re done you show somebody the result of all your efforts — a page or two of code.  It looks like something that somebody could have written in an afternoon.  Even worse, you start to suspect that if you had really known scipy and spent a few days carefully thinking about the problem to start with, then you probably could have coded it in an afternoon.  It’s a little embarrassing.

Posted in Uncategorized | Tagged , , , | 53 Comments