Thursday, April 6, 2017

Big vocabulary, or just big words?

The other day I was reading an article that used a couple of words I hadn't seen in a while, say anodyne or encomium.  I more-or-less remembered what they meant, and it was reasonably clear from context what they meant, but I still ended up looking them up.  I had two feelings about this: on the one hand, did the author really have to drag those out?  Why not just use Plain English?  On the other hand, they were correctly used, and apt, so what's the big deal?  I'm sure I've thrown out a word or two here that I could replaced with something more familiar, maybe with a little rewording.

But I'm not here to critique style.  What stuck in my head about this incident was how conspicuous an unusual word can be (and besides that, unusual words tend to stick out).  The article itself was probably a thousand words or so, maybe more, but it was those two that changed the whole reading experience.

This wasn't just because of the extra time it took to look the words up and make sure I knew what they meant.  That's a speed bump these days, reading an online article with search bar and dictionary app at the ready, maybe an extra minute, if that.  Even if I hadn't had a dictionary handy, I could have gotten the good out of the article without knowing exactly what those words meant.

The real issue lies deeper in human perception: We (and living things with recognizable brains in general) are finely tuned to notice discrepancies.  In a field of green grass it's the shape of that predator, or that prey,  or that particularly tasty plant, or whatever, that stands out.  In an article of a thousand words, it's the unusual ones that stand out.

I could go on and on, but it's worth particularly noting how important this is in social environments.  We can spot an unfamiliar accent in seconds.  We can spot someone dressed differently, or with different features than we usually see, well before we're even aware that we have.  The other night I was watching a TV show with a foreign actor playing an American, and everything was just fine until they said "not" with a British "o".   It didn't ruin the whole show -- this was a single vowel, not Dick Van Dyke in Mary Poppins -- but it was noticeable enough I still recall it out of an hour of tense drama.

(I have to say that dialect coaching has gotten a lot better over the past couple of decades.  Time was, movie stars talked like movie stars, with a kind of over-enunciated diction that didn't sound like anyone in real life, and if a character was meant to sound foreign, pretty much anything would do.   This is doubtless because in the early days of "talking pictures" the medium was still transitioning from the stage, a theatre actor was used to projecting up to the cheap seats and a fake accent was as good as a fake beard since everything was a hand-painted set and there probably weren't that many people in the audience who knew what a true Elbonian accent sounded like anyway.  Today pretty much every part of that is different, and we expect realism -- Billy Bob Thornton's all-too-valid complaint about "that Southern accent that no one in the South actually speaks with" notwithstanding.)

Where was I?

I've argued before that we often seem to care most about distinctions when they matter least. Vocabulary is largely another example of that.  Unless  you're reading Finnegan's Wake or something equally chewy, you're probably OK just skimming over anything you don't know and looking it up later.  Even that blowhard commentator with the two-dollar words is trying to get a point across and isn't going to let the vocabulary get completely in the way.

As a corollary to that, you don't need to know very many unusual words in order to stand out.  If you know a few dozen and use them appropriately, you'll almost certainly draw attention (if you learn a few dozen and use them inappropriately you'll also draw attention, but probably not the kind you want).  This can happen naturally if you run across a rare-ish but useful word or two in your reading from time to time and hold onto it for future use.  There's something nice about, say, cogent that is hard to reword cleanly, the distinction between terse and concise is sometimes worth making, and so on.

Contrast that with the average human vocabulary.  This is a hard thing to measure, but if you've heard something on the order of "uneducated people have a vocabulary of 2000 words while educated people know 20,000", rest assured that's complete bunk.  If we're measuring vocabulary, we have to measure "listemes", that is, things that you just have to learn by rote because you can't work them out from their parts.

This includes all kinds of things:
  • proper names of people and places
  • distinct senses of words, particularly small words like out and by, which can have quite a few, depending on how you count.
  • idioms large and small, like in touch or look up (in its non-literal senses) to classics like red herring, two-dollar word and that's the way the cookie crumbles.
  • Cultural references, which are kind of like names and kind of like idioms
  • Fine points that we don't generally think of as idioms, but are idiomatic nonetheless, like fried egg meaning a particular way of frying an egg, as distinct from scrambling an egg or -- for whatever reason -- trying to fry a whole egg in a pan without removing the shell
I'm not trying to give a full taxonomy of things-that-you-just-have-to-learn, but I hope that gives the general idea.   The main point is that there are lots and lots of these, the categories they might fall into are somewhat arbitrary, and how many you know doesn't have a great deal to do with how many literary classics you've read.

I'm not really familiar with the research on this, but my understanding is that the average person knows somewhere in the hundreds of thousands of listemes, and a large portion of them are commonly understood.  On top of those, we can add a smaller portion of jargon, slang or sesquipedalianisms.  That part, people will notice.  But it's a relatively small part.

Monday, March 20, 2017

Did Dory jump the shark?

I was fortunate enough to attend SIGGRAPH 86 and see the premier of Luxo Jr.   If you haven't seen it, I'd highly recommend you do.  It's only two minutes long.

Luxo Jr. was an eye-opener to me for a number of reasons.  First, and this may be hard to believe now, it was a technical milestone.  At the time, the field of computer graphics was in the process of moving from 3D wireframes like this to something more realistic, and Pixar did a lot of the heavy lifting in that move.

There were a number of problems to be solved at the time.  Some of them had to do with how to render an image of a mathematical model, for example:
  • How to draw exactly what should be visible (hidden-line and hidden-surface removal).  If your model has a cube, an image of that model should only show the faces nearer to you and not the ones on the back -- or anything that's covered by nearer objects in the scene.
  • How to show more realistic textures than just flat polygons.  At first blush you might think that, say, a house is just a few flat walls with windows cut out.  But those walls won't just be flat surfaces.  There might be brick, or siding.  Even a concrete or stucco surface will have little irregularities.  Drawing flat surfaces with uniform colors will convey the overall design, but it won't look like the real thing.
  • How to deal with atmospheric effects.  In real life, there might be smoke or mist in the air.  Even on a clear day distant objects will have more muted colors than nearby ones.
  • How to deal with shiny objects.  Even in the best case, the math for figuring out how bright a particular point on a surface should be is harder for shiny surfaces.  At worst, you have to deal with reflections of other objects, and reflections of reflections, and so on, something like this.
  • How to deal with transparent and translucent objects (which might also be shiny).  Again, this ranges from harder math for the shading to figuring out how the rest of the scene appears when distorted by a curved surface.
  • How to deal with shadows.  If one part of your model is between a light source and another part, that other part will, naturally enough, be darker.
  • A whole slew of subtler optical effects -- color bleeding, depth of field, motion blur, caustics and probably several others I don't remember.  I recall one presenter at a conference half-joking that the whole field had devolved into finding a new optical subtlety and writing a paper about how to render it.
Even if you knew how to render a model accurately, there were thorny questions about modeling:
  • Real scenes contain a whole lot of objects.  Look around next time you're outside -- or inside an average house, office, store or whatever.  A realistic rendering will have to account, somehow, for every blade of grass, every leaf, every feather of every bird, every rock on a gravel path, and so forth.  You don't necessarily have to create a separate object for every detail, but somehow you have to be prepared to render either a green grassy texture or blades of grass, depending on how closely you're looking.  Keep in mind that at that time a typical mobile phone of today would have seemed like a supercomputer (That may seem like hyperbole, but it's not.  The ubiquitous SPARCtation 2, for example, ran at 40MHz with 128MB of RAM)
  • Objects move.  In reality, they obey the laws of physics.  In an entertainment video, they might move in all sorts of non-physical ways, but anything that's supposed to look lifelike had better move more or less like a real-live thing.  Modeling the movement of a piece of clothing, or a full head of hair, or the surface of the ocean, or the flames in a fire, were each good for multiple published papers.
There were (and, I think still are for the most part) two approaches to problems like these:
  • Grinding out exact solutions to the optics (for rendering) and physics (for modeling)
  • Finding Stuff That Works.
At the time, ray-tracing was the state of the art for bashing out the optics, though that would soon be superseded by radiosity -- which had the distinction of being even slower than ray-tracing -- and more sophisticated numerical approaches.  Jim Kajiya laid out a general form for the problem to be solved and demoed an image that used Monte Carlo simulation to produce what he called "a great simulation of film grain" (see the end of this PDF of the paper).  It was a technical tour de force, solving a good chunk of the rendering problems above with one integral equation, using techniques that had been used to model the atomic bomb a generation earlier, among other things.  It was not, however, a very impressive demo unless you knew exactly what to look for.


Pixar took the other, entirely different approach*.  They handled hidden surfaces through what came to be known as "polygon pushing" -- reducing everything to a model with flat sides that was close enough to the real thing.  Flatter parts of surfaces could get by with fewer polygons than curvier parts.  You could then sort those polygons to see which was closest to the eye at any particular point.  Fast sorting algorithms had been around for decades.  Sorting in three dimensions is harder, but it's still possible to do it relatively quickly, even on what was fairly ordinary hardware.

They handled shadows through "shadow mapping", essentially calculating where shadows would fall on a surface and making that a property of the surface.  You could figure out where the shadows would fall by looking at the scene from the point of view of the light source, using the same sorting algorithm as for hidden surfaces.  You only had to re-do the shadow map when things moved, and much of a typical movie scene is background or otherwise not moving.

They handled textures with texture mapping and bump mapping, which treated the surfaces as flat but then modified the color or local orientation used in the actual shading calculations based on what exact part of the surface you were looking at.  That's how the wooden floor in Luxo Jr. was done.

They also developed algorithms for modeling the movement of the lamps and their cords, but I'm less familiar with that.  Overall they built up a library of rendering techniques, modeling techniques and models, some general-purpose and powerful, some specialized to particular tasks.  Just as important, they built a framework to plug it all into harmoniously.

Kajiya's paper was a great example of the scientific approach, and it ended up underpinning a chunk of important work.  It offered only an approximate solution, out of necessity, to the actual problem of putting pixels on the screen but it rigorously defined the exact problem to solve.

Pixar did engineering.  They figured out what mattered and what didn't for the purposes of producing an image that would fool the eye in an entertaining video -- basically which shortcuts people would and wouldn't notice -- and applied their resources to solving the problems that mattered.  They also developed software for managing a server farm doing the rendering and all kinds of tools to support the animators in making their magic.


I suppose I should take a moment to push back against a couple of stereotypes.  It's tempting to write off "the scientific approach" as "of no practical value" or the engineering approach as "just a bunch of hacks".  From what I can tell, though, it's hard to write a useful scientific paper in CS without knowing how to code, and it's hard to come up with a good practical hack without understanding what the full solution looks like.  Both have been done, but most people who've made a difference have a healthy dose of both practical and theoretical knowledge and tend to move back and forth on the deep insight/cheap hack scale as the occasion demands or the mood strikes.


But all this technical discussion leaves out what made, and makes, Pixar truly special.  The Pixar folks didn't just have formidable technical chops and great engineering sense.  They told stories.

This was a conscious decision from the outset.  John Lasseter and the rest of the team paid a lot of attention to the generation of animators before them, particularly the Disney studio.

If you're drawing every single frame of a picture by hand, even if you're using techniques like cel animation to re-use background drawings, you have to make every line count.  The people who we now call the "traditional animators" developed a set of techniques, for example squash and stretch, to illustrate motion without detailing every single movement.  They studied facial expressions in order to make their characters emote in a way we instinctively understand.  They watched how people and animals moved in order to capture the essence of lifelike motion.  They noticed that cute baby animals had (relatively) bigger heads than their adult counterparts, and made countless other observations that went into their work.

If you're just trying to figure out how to shade a model of a teapot by the conference submission deadline you probably won't pay much attention to these things, but the Pixar team did because their goal, from the beginning, was to tell stories with animation.  This is crystal clear from the very start.  The story in Luxo Jr. is pretty simple, but it's clearly a story, with characters with real emotions, even if those characters are metal desk lamps.  In fact, that's the magic: Inanimate, computer-generated desk lamps brought to life -- literally animated.

Watching it at the time was one of those "I didn't realize you could do that" moments, not so much from the technical point of view, though it's technically quite good as well, but because after antiseptic wireframe video games and shiny special effects and endless discussions of ray-tracing vs. polygon pushing it didn't seem like storytelling had much at all to do with the field.


My co-workers and I went to dinner at a steakhouse in Dallas afterward.  I remember talking about what portion of the real-life scene there could be modeled and rendered realistically with the resources available.  Having seen a few papers presented on techniques for rendering transparent objects with curved surfaces I claimed that the wine glasses could be handled OK (not a foregone conclusion at that point).  My boss dipped his thumb in steak juice and smudged it on the glass.  "Render that".  I muttered something about transparency mapping and such, and I might have been right, but the point was made.

With the tools we have these days, that smudge would be a minor obstacle.  Computer-generated scenes still often have that too-clean look to them, but that's more a matter of choice.  Computer imagery can handle grit and grime, but it's often easier to model without it.  If it makes sense for the setting or character, it's there, but otherwise it's usually not.  Also, I suspect, it's easier for an audience to make sense of a scene if the animated main characters look somewhat unnaturally clean and shiny while the trees off in the distance look realistic.


Which brings us to Finding Dory.

In my opinion it's not a bad film, but there's something missing.  Technically, it continues Pixar's upward trend in awesomeness.  The modeling for Hank the Septopus is so seamless you forget all about the huge amount of work that must have gone into it, from the motions of the tentacles to studying enough octopus behavior to make Hank a move like a realistic cephalopod, to knowing enough old-school animation technique to make him expressive within those parameters.  And there's plenty more where that came from.

There are a number of acceptable breaks from reality, starting with talking animals, and on to reading animals, truck-driving animals, aquatic animals spending unlikely amounts of time out of water, and even a plot-convenient echolocation ability that apparently doesn't use ultrasound and works through air as well as water -- not to mention navigating around bends in pipes while still conveying that there are bends at all.  That's all fine.  I mean, if you're OK with talking underwater animals, hard-boiled skepticism is pretty much out the window to start with.

The problem, unfortunately, is the storytelling.

I had to stop here for a bit, partly because, even if I'm a bit of a curmudgeon, I don't really relish the thought of criticizing Dory, Nemo and the gang.  Curmudgeons can still be fans.  Mostly though, I realized that if I wanted to go there, I should at least have a specific reason to go there, and it took me a little while to pinpoint that reason.

In Finding Nemo, one of the best moments, and probably the biggest emotional payoff, is when Dory, the cognitively impaired blue tang who at first seems to have been there for comic relief and to play the role of the wacky, plot-complicating sidekick, realizes "I look at you and…I’m home."**  The setting is as spare as can be, just two characters alone against a plain backdrop, one of them not even speaking, and that's what makes it work: the characters, and their slow realization of what's happened.

Dory didn't see it coming because, well, she's Dory and she had only fleeting hints that she was lost in the first place.  Marlin didn't see it coming because he'd been consumed by his quest to redeem his guilt and remorse over losing Nemo.  The audience didn't see it coming because the rest of the story was zipping along at Pixar's usual frenetic-but-impeccably-timed pace and keeping us engaged with a steady parade of engaging characters.  It also doesn't hurt that Ellen DeGeneres delivers the speech perfectly.

And that's where Finding Dory's trouble begins.  It's just going to be really hard to top a moment like that.  It's probably not a good idea to even try.  If Dory's backstory stays a backstory we can carry it with us however we like.  Probably better to leave that magic alone.  But at the same time, you can't blame Pixar for trying anyway.  "How are you going to top that?" has driven a lot of creative people to a lot of really good work.  I can't imagine there wasn't a little voice in the back of someone's head saying "Challenge accepted."

Meanwhile, rendering and modeling technology march on.  Realistic waves crashing on a beach?  We can do that.  Schools of fish circling in a cylindrical tank?  No problem.  Northern California vegetation in a light mist?  That's the morning commute.  How about some Toy Story-style kids wreaking havoc as they plunge their hands into the touch pool, kicking up clouds of sand?  Done.  It's not that Pixar has ever been shy about pushing the technical envelope.  It just seems a bit -- visible.  Technique is hardly ever meant to be visible.

And of course, the mouse must be fed.  When Dory dodged under Destiny the shark at the last second, I couldn't help thinking "That'll feature somewhere in a Disney ride".  And it's not hard to guess which characters were likely to make for hot-selling plush toys.  Nemo, Marlin, Crush the sea turtle and whoever else have to be there because sequel.

It's not that commercial tie-ins and franchise characters are bad per se.  Those server farms don't run themselves (well, at least not yet).  It's just that, like the technical mastery, the commercial machinery is not supposed to actually jump out at you.


In the end, Finding Dory's weakness boils down to fundamentals: the external constraints are muscling in on the plot, and the plot is driving the characters, when it should be the other way around.  In Luxo Jr., there's hardly any plot at all.  The whole point is to use the technology -- really just a bunch of crunching of a bunch of numbers describing colors, geometric shapes and such -- to show us believable characters.  Character wins, maybe not every single time, but almost always.  That's especially true if you're Pixar, which is why between Luxo Jr. and Finding Dory, that two-minute short is the better film of the two.

Is this the end of Pixar as we know it?  Is it all merchandising and sequels from here on out?  Well, three of the four upcoming Pixar projects with titles are sequels (Cars 3, The Incredibles 2 and Toy Story 4)  Let's hope that Lasseter's pledge that "If we have a great story, we'll do a sequel" holds.  I haven't seen Monsters University or Toy Story 3 (I think), but as I recall Pixar handled Toy Story 2 pretty deftly, sequel though it was.

Really it's impressive that they haven't stumbled any more than they have, all things considered.  But this one definitely feels like a stumble.



* I'm writing most of this from memory, so I'm only mostly confident it's mostly right.  Corrections are welcome.
**Just put Dory home in the search bar, 14 years after Finding Nemo came out, and there it is.

[I still see it on the first page of hits, but there's a lot of Finding Dory mixed in with it now.  Not sure what to make of that --D.H. Mar 2020[

Friday, March 10, 2017

Science on a shoestring

On the other blog I would occasionally put out short notices of neat hacks (as always, "hack" in the "solving problems ingeniously" sense).  I recently ran across one that didn't have much to do with the web, so I thought I'd carry that tradition over to this blog.


Muons are subatomic particles similar to electrons but much heavier.  They are generally produced in high-energy interactions in particle accelerators or from cosmic rays slamming into the atmosphere.  Muons at rest take about 2 microseconds to decay, actually a pretty long time for an unstable particle.  Muons from cosmic ray collisions are moving fast enough that they take measurably longer to decay (in our reference frame), which is one of the many pieces of supporting evidence for special relativity.

The GRAPES-3 detector at Ooty in Tamil Nadu, India detects just such decays using an array of detectors set into a hill 2200m (7200 ft) above sea level.  The detectors themselves are made largely from recycled materials, particularly square metal pipes formerly used in construction projects in Japan.  The total annual budget for the project is under $400,000, but the team has already produced significant results.  Auntie has more details on the construction of the instruments here.

There are a couple of narratives that are often spun around stories like this.  One is a sort of condescending "Isn't that cute?" with maybe a reference to the Professor on Gilligan's Island building a radio out of coconuts.  Another is "Look what people can do without huge budgets.  Why do we need all these multi-billion-dollar projects anyway?"

I'd rather not tell either of those.  What I see here is highly skilled scientists making use of the resources they have available to produce significant results.  Their counterparts at CERN or whatever are making use of different resources to produce different significant results.  Both are moving the ball forward.  There have been plenty of neat hacks at CERN, including something called "HTTP",  but today I wanted to call out GRAPES-3, mainly because it's just plain cool.

Friday, March 3, 2017

Reworking the Drake equation

In speculating about life on other worlds (here and here for example) the Drake Equation provides a useful framework.  This equation multiplies a number of factors to arrive at the number of civilizations in the Milky Way that would be technologically capable of communicating with us.

When it was first formulated, most if not all of the factors had such wide error bars that it's hard to argue that any meaningful number could come out of it.  An answer of the form "2.5 million, but maybe zero and maybe several billion or anything in between", while honest, is not a particularly useful result.  For much of the time the Drake Equation has been around, it's been useful more as a  framework for reasoning about the possibility of alien civilizations (and, in my opinion, a reasonable one) than as a way of producing a meaningful number.

Recently, though, a couple of the error ranges have tightened considerably.  Let's look at the factors in question:
  • the average rate of star formation in our galaxy.  This is currently estimated at 1.5 - 3 stars per year
  • the fraction of formed stars that have planets. This is quite likely near 100%
  • the average number of planets per star that can potentially support life.  There is some dispute over this.  You can find numbers from 0.5 to 4 or 5, and even outside that range.  My personal guess is toward the high end. 
  • the fraction of those planets that actually develop life.  At this point we can only extrapolate from life on Earth, a minimal and biased sample.  It's noteworthy that life now seems to have begun shortly (in geological terms) after suitable conditions arose.
  • the fraction of planets bearing life on which intelligent, civilized life has developed.  Developing intelligent life as we understand it took considerably longer: billions of years.  Again extrapolating from our one known example, this implies that a large fraction of life-bearing planets haven't been around long enough to develop intelligent life.
  • the fraction of these civilizations that have developed technologies that release detectable signals into space.  Still extrapolating, this fraction may be pretty high.   On geological scales, humanity developed radio pretty much instantaneously, suggesting it was nearly inevitable.
  • the length of time, L, over which such civilizations release detectable signals.  I've argued that this is probably quite short (see the links above and the discussion below for a bit more detail).
Looking at the units in those factors, we have
  • civilizations = (stars/time) * (a bunch of fractions that amount to civilizations/star) * time
which is perfectly valid.  However, I'm not sure it's the best match for the problem that we're trying to solve.  I've argued previously that timing is important.  The last factor (length of time a civilization produces detectable signals) takes that into account, but the other time factor, in the rate of star formation, seems less relevant.  There are billions of stars in the galaxy.  At a rate of a couple of stars per year that's not going to change meaningfully over human timescales.

So let's try the same general idea but with different units:
  • expected signal = planets * (expected signal / planet)
First, shift the focus from stars to planets.  For our purposes here that includes objects like planet-sized moons of gas giants.  This cuts out the estimation of star formation and planets per star, since we can now observe planets (in some cases even directly) and get a pretty good count of them.  Or at least we're now guessing about planets directly, instead of guessing about stars and planets.

Then, let's pull back a bit from the details of how a planet would produce a signal of intelligent life, and focus on the signal itself, by estimating how strong a signal we can expect from a given planet.   This consolidates the estimates of life evolving, civilization evolving, civilization developing technology and the duration of any signal into a single factor.

The "expected" means we're looking at weighted probabilities.  To take a familiar example, if you roll a six-sided die and I pay you $10 per pip that comes up, you should expect to get $35 on average and you shouldn't pay more than that to play the game.  This really only holds up if you expect to play the game a number of times.  If you only roll the dice once, you could always just get a bad roll (or a good one).

Likewise, if we say that a planet is producing a signal of a given expected strength, we're saying that's the average strength over all the possibilities for that planet -- maybe it's young with only one-celled life, maybe it's harboring a civilization that's producing radio signals, etc.  We're not claiming that it's actually producing a signal of that strength.  We can get away with this, more or less, because we'll be adding up expectations over a reasonably large number of planets.

Looking at expected signal accounts for a couple of factors.  What a planet emits in the radio spectrum will vary over time.  The raw strength will vary.  Earth has gone from watts to at least gigawatts in the past century or so.  The signal to noise ratio will also vary.  As we make better use of encryption, compression and such, our signal looks more like noise.  Signal strength also accounts for distance.  A radio signal falls off as the square of the distance. 

A given planet will have a particular profile of signal strength over time.  Ours is zero for most of our history, rises significantly as humans develop radio and (I've argued), will drop off significantly as we come to use radio more efficiently and use broadcast less and less.

There are two sources of uncertainty in what strength of signal we would expect to detect, knowing how far away a planet is and how much background noise there is:  We don't know what the signal strength profile for a given planet is, and we don't know where we are in that profile, that is, just how old the planet is at the moment.

For the first uncertainty, the best we can currently do is compare to our experience on earth.  My best guess is that we should expect a very brief blip (brief on planetary scales).  If we expect a blip on the order of hundred years and a planetary age on the order of billions of years, this reduces the expected signal -- again, "expected" in the probabilistic sense -- at any given time to a very low level.  This would be true even if planets occasionally send out strong, targeted transmissions, as ours does.

In the absence of anything better, we can account for the second uncertainty by averaging the signal strength over the expected age of the planet.  That is, we assume the planet could be at any point in its history with equal probability.  In real life, we may be able to do better by looking at factors like the age of the star and the amount of dust around it.

Strictly speaking we should be talking about intervals rather than instants, since listening for a million years is more likely to turn something up than listening for a hundred, but human timescales are tiny enough that this doesn't really affect our calculations of what we should expect with current or near-future technology over our lifetimes.  Either way, we can still define expected signal.

We also need to account for the distribution of planets in space.  If stars were uniformly distributed in space and background noise didn't matter, this would cancel out the effect of decreasing signal strength, since the number of stars at a given distance would increase as the square of the distance.

But they're not.  If they were then the nighttime sky would also be uniformly bright in all directions.  The Milky way is only about a thousand light years thick.  After about half that distance the number of stars increases much more slowly than the square of the distance.  This means we're really looking at a weighted sum of expectations rather than just multiplying planets by expectation per planet, but that doesn't greatly change the overall analysis.

Finally, we should take background noise into account.  As the strength of a signal (actual, not expected strength) drops toward zero, our ability to detect it doesn't drop in tandem.  Once the signal becomes weaker than the general background noise in that part of the sky, our chances of detecting it are already very near zero.  This correction should be applied to the signal profile before averaging over time.

My engineering intuition tells me that the upshot is that we can neglect planets more than a relatively short distance away, say tens of light-years.  At some point background noise will wash everything out.  That's more or less the limit for having a meaningful conversation anyway, since it takes a year for a radio signal to travel a light-year.

So where does that leave us?

Estimating the probability of a detectable signal from a planet requires knowing
  • The distribution of planets as a function of distance.  Our knowledge of this has sharpened dramatically over the past couple of decades.
  • The effect of distance on the strength of a signal we detect.  This is fairly well understood.
  • The background noise for any particular location in the sky.  This is directly observable.
  • The expected strength of the signal emitted by a planet, averaged over its lifetime.  This is where the uncertainty is concentrated.
Essentially we've consolidated all the various fractions of the Drake equation into a single factor and characterized it in terms of signal strength over time (which we then average over time unless we can think of something better).

When searching for life, "signal" doesn't necessarily mean "radio signal".  Soon we will be able to search for signatures such as high levels of oxygen in the atmosphere, which suggest that there is life of a similar form to ours, though not necessarily intelligent, technological or whatever.  This signal would have a much different profile from radio.  In our case it would rapidly jump from zero to full strength relatively early in our history and stay there for billions of years.  It may also be a stronger signal than radio leakage in the sense that we can feasibly detect it from further away.

If we take our experience on earth as a basis, this implies it's quite likely that we'll detect life on other planets, but unlikely that we'll detect radio signals (and probably other smoking-gun signs of civilization as we know it).  Looking for signatures of life in general is probably going to be more informative in any case.  If we don't find any radio signals from other planets, which seems more and more likely, it could just be because even planets with intelligent life don't tend to emit high signal-to-noise radio signals for long.  If we find chemical signatures indicating life on X% of planets with detectable atmospheres, that gives a strong estimate on the probability of life arising in general.  This is true whether X is 0, 100 or something in between.

[Technical note: Somewhat ironically, since I started out talking about unit analysis, the units here are less clear than they might be.  If we're talking about radio, then at any given moment a planet is emitting radio signals at a given power, say X Watts.  Power is energy per unit time.  Probably the most natural way of expressing what we actually detect over time is an amount of energy, say Y Joules -- power times time is energy.  We'd like that to stay the same whether we're talking about an actual measurement or a probabilistic estimate.  So the quantity we're trying to estimate for a given planet is power.

If we assume a particular profile of power over time, and we average it, we're summing up power over time to get total energy, then dividing by the total time span over which we think we might be looking -- the age of the planet -- to get power again.  Accounting for distance still gives power, that is energy we expect to receive per unit time.  Using units of power also accounts for the amount of time we spend looking.  If we look for 100 years we expect to detect 10 times as much signal (energy) as if we look for 10 years.  I tried to gloss over that in the main article on the grounds that the numbers are all likely to be too small to matter.  But it's better to think of a minuscule amount of power over a shorter or longer time than to try to assume everything's an instant.

I've made a few edits to the main article, mainly changing "signal strength" to "signal" in several places to try to reflect this.]

[And having gone through all that, and thought it over a bit more ... the really natural units to use here are bits and bits per second.  At the end of the day, we're trying to glean information from listening to the skies, and information is measured in bits.  This accounts for several troublesome factors:
  • We're trying to estimate detectable information from other planets.  This starts by estimating what information they transmit over time, as measured by an observer in the near vicinity (say, in low Earth orbit or on the Moon in our case)
  • I've argued that as we use compression and encryption more, our signal looks more like noise.  This is quantifiable in terms of bits and bit rates.
  • If a planet is far away or in a noisy area of the sky, we're less likely to detect a signal from it.  There are well-established formulas relating signal power, bandwidth and signal/noise ratios that can be used to translate an estimate of what radio signals a planet emits to an estimate of bits/second we could detect.
  • As above, integrating bits/time over time spent listening gives us the total information we would expect to detect, which is arguably the quantity of interest in the whole exercise.
  • So
    • bits detected = sum over time of the sum over planets of bits per second we expect to detect from each planet
    • leaving out the sums, which don't change the units: bits = (bits/second)/planet * planets * seconds
]


Monday, January 2, 2017

How natural is nature?

Physics has produced several amazingly elegant theories that reduce a huge variety of phenomena to a few basic causes and concepts.  Even if the basic concepts are just a wee bit math-heavy and the results can be a just a wee bit mind-bending, a great number of important discoveries in physics can be reduced to fairly short descriptions.
  • Thermodynamics uses a handful of laws to explain things like why perpetual motion can't happen, how engines work or why Play-Doh™ always ends up looking gray-brown if you mash it together long enough.
  • Newton's laws explain things like why the Moon goes around the Earth, how you can tell if a car in an accident was speeding or how to sink the 8-ball in the corner pocket.
  • Nöther's theorem demonstrates (in a way I've never quite completely grasped) a deep relation between symmetry and conservation -- if, for example, the equations describing motion don't care about direction then angular momentum is conserved and that figure skater spins faster and faster as the arms come in.
  • General relativity holds that, left to themselves, objects travel in a straight line, the simplest possible path.  It just doesn't always look that way because space-time isn't flat, but this is why, for example, Mercury's orbit moves just a bit every time around.
  • Quantum physics ... yeah.  Quantum physics.
It's not that quantum physics lacks elegance.  The idea that all matter and energy, basically everything we can measure, can be explained by equations similar in form to those that describe a vibrating string is pretty astounding if you think about it.  The Standard Model of quantum physics has built on this to make a large number of predictions, including predictions of new particles, that have been confirmed with outstanding accuracy.

You'd think this would be good news.  Instead, a certain uneasiness has developed around the Standard Model.  The basic framework is nice enough, but it can't completely describe what we know until you plug in several parameters.  There are 19 in all, ranging from me  (the mass of the electron, 511 keV), to θ23 (the "CKM 23-mixing angle", 2.4°) to the recently established mH, (the Higgs mass, tentatively 125.36±0.41 GeV).  There aren't just infinitely many other ways to tune the knobs, there are not one, not two but 19 knobs to tune.

Tweak a few of them the wrong way and stars can never form, or worse, no kind of solid matter can form at all.  We seem to be in some sort of special regime where the parameters just happen to have the right values for us to be here to observe them.  Even if you adopt the view that there may be infinitely other universes out there where the knobs aren't tuned right, so where else could we be (the "weak anthropic principle"), it's still all pretty unsatisfying.  Our universe is some point in a 19-dimensional space that's suitable for life forms like us to develop?  That's it?


Particle physicist Sabine Hossenfelder  argues in a piece called The LHC “nightmare scenario” has come true that yep, that's it, get over it.  As I read it she makes two points.  The smaller one is that the Large Hadron Collider which was instrumental in finding the Higgs boson has likely found all the particles it's going to find, and maybe it's time to stop trying to build bigger and bigger particle accelerators.

Fellow particle physicist Matt Strassler argues that there's no nightmare regardless of whether there are any other new particles.  The LHC has produced ridiculous amounts of data which won't be thoroughly examined for years, and it can easily produce more.  There might be, indeed probably are, interesting discoveries to be pulled out of that data now that it's pretty well established that the Higgs exists.

This seems reasonable, but it's more an argument against Hossenfelder's headline than the substance of the article.  Disputes over what experiments to do (and, more to the point, what experiments to fund) are by no means new.  Hossenfelder's and Strassler's are by no means the only views on the subject, and they may not even be particularly divergent, but in any case whether to keep building bigger particle smashers is of greatest concern to particle physicists and those who fund them.

Public policy and the sociology of science are worthy topics, but I won't be conjecturing any further about them here.  I'm more interested in Hossenfelder's larger point, which as I understand it is about what makes a good theory of physics.

When people started taking a close look at Newtonian mechanics, heat transfer and other fields they started to find anomalies under extreme conditions that eventually led to the discovery of relativity and quantum physics.  This is just part of a long history of progress in physics.  For example:
  • Ptolemy explained the motions of the planets with a system of cycles and epicycles centered around the Earth.
  • Copernicus explained those motions more simply with a system of cycles and epicycles centered around the sun.
  • Kepler did away with epicycles using the notion that the planets moved in ellipses, not circles
  • Newton explained elliptical orbits in terms of a universal gravitational force following an inverse square law
  • and Einstein explained gravitation as a property of space-time itself
(I'm always a bit leery about ascribing a particular landmark result to a particular person, as in "Ptolemy explained ...".  There is more to each of these than a single person making a single discovery even when we know a particular person had a particular key insight.  But this will do for now.)

In all these cases, the new theory didn't just explain everything the old theory did, albeit in a new way.  It either made sense of something that had seemed arbitrary in the old theory, explained new things the old theory couldn't, or both.  Copernicus and Kepler dealt with epicycles, first simplifying them and then doing away with them altogether.  Newton's mechanics explained why the planets followed elliptical orbits as described by Kepler's laws and not some other shape.  It also explained why the Moon doesn't actually follow an exactly elliptical orbit, why the daily tides rise and fall, and much more.

Einstein's theory of relativity did away with gravitation as a force.  Objects under the influence of gravity still follow Newton's first law, just in a more subtle form.  It also gave better predictions for the motions of the planets and made a number of new predictions that were later confirmed, such as the direction and frequency of light being affected by gravity and why the orbits of stars in a binary system containing a pulsar can be seen to be slowing.

It's not just that the new theories were more powerful than the old ones.  That's to be expected.  Otherwise why adopt them?  In all these cases, and many others, the new theory was also, in some sense, more elegant than the old.  Elegant, in this sense, largely means simpler.  Fewer epicycles.  One universal force.  No universal force at all.  There is also a sense of reducing seemingly unrelated things to different aspects of the same thing.  The tides and the motions of the planet are both just effects of gravity.  Space and time are just components of a the space-time continuum.



Which brings us back to the Standard Model.


So far no one has come up with a theory-breaking anomaly for the Standard Model analogous to the precession of Mercury's orbit, or some new phenomenon, say an unpredicted particle or force, that the Standard Model could have been expected to predict but didn't.  There are a few candidates, but even after decades of effort nothing has really panned out.  The experiments at the LHC found the Higgs, at an energy consistent with the Standard Model, and nothing, or at least nothing definitive, inconsistent with it.

So the Standard Model is it, right?  We've described the fundamental forces and elementary particles of the natural world.  There's plenty of work, probably an endless amount, to be done working out the ramifications of that, and how it all fits in with relativity, what exactly it means to "measure" a system described by a wavefunction, and on and on, but as to explaining the basis for particle physics, we're done.  Right?

As I understand it, Hossenfelder's answer to that would be "looks like we could be", but that answer doesn't sit well with everyone.  How can such an inelegant theory, with its 19 arbitrary parameters, be the final answer?  "They just do" can't be an adequate answer to "why do those parameters have the values they do?" can it? Hossenfelder would likely say "sure it can".

In the history of physics, power and elegance seem to go hand in hand.  Or at least, after enough anomalies with ad-hoc descriptions turn up, eventually someone comes up with a new framework where it all makes sense again.  The new theory is both more elegant and more powerful.  Some would even say more "natural" and claim that nature is itself elegant, and if it doesn't seem that way we must not understand it properly.

The Standard Model seems ready to be replaced with something better, except it doesn't seem to be producing the sort of "close, but not quite" results that led us from Newton to Einstein.  There may be more elegant theories around -- string theory gets a lot of attention in this regard -- but nothing, so far, clearly more powerful.  If there's a more "natural" theory, nature doesn't seem keen to lead us to it.


This feeling that the world has to be more elegant than our current theories may just be an occupational hazard of physicists, and not necessarily the majority at that.  Plenty of working particle physicists are content to "shut up and calculate" without worrying too much about what it all might "mean" or whether the universe has some deep hidden simplicity.

Many chemists would shake their heads at the whole business.   There are around a hundred elements one can do meaningful chemistry with, each with its own particular properties.  That's not going to change with a new theory of chemistry.  There is a theory, namely the Standard Model, which explains why those elements are the way they are, and quantum effects definitely come into play in chemistry, but from a chemist's point of view it doesn't matter how many parameters the Standard Model has.  It matters what the electrons are going to do in a particular situation.

In my own field there are several models that can define the behavior of computers, and we do refer to them (particularly state machines and stack machines) from time to time, but there is not and is never likely to be a unified theory of software engineering.  And yet the servers still run.  Mostly.

Even mathematics, which can almost be defined as the relentless pursuit of elegance, is full of quirky, inelegant results.  What's so special about manifolds in four dimensions?  Why are there 26 sporadic groups?  Why is the 3N+1 problem so hard?  And let's not even get started on the prime numbers.



Suppose that everything in the universe could be precisely described by three simple rules ... and a table of three quadrillion quadrillion seven-digit numbers.  Even storing such a table would be completely infeasible using today's technology, but suppose we meet up with an alien race with full access to it.  Our best physicists pose them questions, they consult the table and deliver a verifiable answer every time (how to reduce any measurable question and its answer to an invocation of three simple rules is an interesting question, but roll with it).  Would we say the aliens have a good theory?

On the one hand, of course they do.  The hallmark of a good theory is making testable predictions that hold up.  On the other hand, there's something less than satisfying about a planet-sized table of numbers, each essentially its own arbitrary parameter.  What happens if our aliens go away or decide that we're not worthy of True Knowledge?  Maybe we should start asking questions that will reveal the nature of the magic number table and, ideally, allow us to reduce it to something our puny minds and computers can handle.

A good theory doesn't just have to be true in the sense of making true predictions.  It also has to be comprehensible and usable.  To this end, a theory with a thousand fairly simple rules and three or three hundred parameters with values we just have to accept is far better than the one I just described.  But this is not saying anything about nature.  It says something about us.  Our "natural" theories are the ones that work best for us, not just in aligning with nature, but with our resources and the way our minds work.

From that point of view, 19 is not a prohibitive number of parameters the way three quadrillion quadrillion would be.  If that's really how it is, we can probably live with it.  But the distinction is of degree, not kind.  The problem is not with arbitrary parameters themselves, but with having an intractable number of them.  Consulting our hypothetical aliens with knowledge beyond our ability to process is really just another kind of experiment from our point of view.   Consulting the Standard Model with its human-friendly list of parameters is better, and it would be even if its predictions weren't quite as good as they are.  It's certainly better than a more "elegant" theory that doesn't fit experiment as well as it does.

Nature is what it is.  A theory is only "natural" if it fits with our nature in particular as well as nature at large.

[Re-reading this, I realize I neglected to say that, although the basic equation of the standard model is fairly compact -- you can get a T-shirt with the Standard Model Lagrangian on it -- actually finding solutions for all but the simplest conditions is generally far beyond our computing ability.  In one sense this is more than a bit like the aliens-with-the-numbers scenario, but instead of a hidden table of numbers we can't begin to access, we have an equation we can barely begin to compute.  Except maybe with quantum computers ... --D.H.]


Re-reading Hossenfelder's piece, I see one more subtle point.  The main argument doesn't seem to be that there can't possibly be an elegant theory unifying quantum physics with relativity, or even a better way of explaining the results of the Standard Model.  Rather, a search for "elegance" or a "natural" theory is no longer a good way -- if it ever was -- of deciding what particle experiments to run next.  If we do find such a unified theory, it's probably not going to be because we found a more elegant replacement for the Standard Model, or because we found an unexpected particle with a new, more powerful accelerator, but because we found something else entirely and a theory to explain it that happens to subsume the Standard Model.

Thursday, September 1, 2016

Can we prove a dog is happy?

The previous post talked about qualia, or subjective experiences, but why should we care?  This being a matter of philosophy, there are a variety of answers to that, starting with "Why care about anything?" but nonetheless, there seems to be something significant about the question.  At least from my own subjective point of view.

For one thing, it seems like one of those fundamental questions.  How can we come to a complete understanding of the universe without understanding how we experience it?  Perhaps more than that, there are ethical concerns.  If we wish to increase happiness or we do not wish to cause unnecessary suffering in the world, we should understand what happiness and suffering are.  Outward appearances will only tell us so much.  It would be good to have more reliable indicators, or at least to know how reliable the ones we have are.

The problem with subjective experiences, though, is that they are subjective.  I can be well convinced that my own subjective experience is real.  Sentio ergo sum -- I feel, therefore I am.  There are several reasons for me to believe that someone else's feelings are real: I can see their reactions, they can tell me, and we know that humans have, for the most part, essentially the same neural apparatus.

Nonetheless I cannot know for sure what another person's feelings are in the same way that you and I could both put the same object on a balance scale and agree on its mass.  Each of the common-sense indications I just gave can fail.  Someone may not react visibly to a feeling or experience, or I may not catch the reaction.  They may not be able to tell me for any number of reasons.  Different people can have different ranges of feeling -- what seems intense to me might seem like nothing special to you, or vice-versa.

From a purely philosophical point of view we don't know for sure that having the same kind of neural pathway means having the same kinds of experiences.  Perhaps the ability to experience requires both a certain type of pathway and something else intangible that not everyone has.   Even if there is no such intangible, we're still far from knowing what physical pieces are associated with experience, though we do have some clues.  Without knowing just what pathways gives rise to subjective experience we have no way to be sure everyone has it.

When we go beyond human experience to other species, which react differently, can't verbalize their experiences (or at least not in ways we can presently understand), and have clearly different neural circuitry, we have even less to go on.  We can presume that a dog wagging its tail and barking when its human returns is happy, but it's always possible that dogs have simply co-evolved with us for long enough that they are able to act happy when that would be to their advantage (most people with dogs would dispute this, I expect).

Artificial constructs are even more problematic.  If I build a robot that avoids walls even if you push it toward one, it's easy to say "it doesn't like walls" because it's acting like a sentient being that disliked walls would, but it seems a much bigger step to say "it avoids walls because it experiences negative emotions when it's near one", particularly when we can point to the exact code that causes it to avoid walls.

Even if the code for the control system is extremely complex or has gone through some sort of machine learning process to develop an avoidance of walls, so that we couldn't point to exactly what was making it avoid walls, it still seems hard to argue that the robot is feeling emotions.  If incomprehensible code were the basis of sentience, there would be a lot of sentient software around.

When it comes to what we generally refer to as inanimate objects, the best we can say is that we have no reason to believe that a rock feels pain if we smash it with a hammer.  Nothing in our understanding of how we feel pain seems to apply to something like a rock.  Even so, how can we really know?


But how do we know anything?  We have no way of knowing whether we really live in a universe where the laws of physics hold.  It's possible that tomorrow things dropped will fall up instead of down.  Some theories of cosmology assign a non-zero (but still exceedingly small) chance that we live in such a universe.

In the absence of certain knowledge all we can do is try to build a coherent framework and constantly test and adjust the assumptions it rests on, a process we call "science".  From a scientific point of view we can figure out what sort of neural structures correspond with the subjective experiences that people report.  We can assess whether other organisms have such structures and even whether a particular combination of hardware and software has something functionally equivalent.

We can tell whether something's reactions to various stimuli are consistent with it having such capabilities, based on what people have reported.  We can conclude from that that it's likely or unlikely that the organism or construct we're examining is experiencing feelings, but we can never know for sure, no matter what philosophical machinery we develop for understanding qualia.

But this is nothing new.  Recently it was announced that gravitational waves had finally been detected, stemming from the collision of two black holes over a billion years ago.  The chain of inferences that rests on is mind-boggling.  A more accurate statement would have been "In two separate places, specially constructed instruments registered a signal that indicated that test masses had moved, over a distance much less than the size of an atom, in a way that indicated that space-time had been distorted in a way consistent with the collision of two black holes over a billion light-years away.  We feel confident about this because we believe that science works in general and we're convinced by a large web of observations and theoretical conclusions that the observable universe is billions of years old and billions of light-years in extent, black holes exist and, consistent with a distinct but overlapping web of observations and theoretical conclusions, in certain cases they should produce detectable gravitational waves.  We have also done extensive measurements to convince ourselves that the detectors are in fact detecting gravitational waves and not just trucks driving by ..."

And that would be the short version.  The full version fills textbooks and takes entire careers to grasp even a small portion of.

If science can accept that, can it come to accept that a dog is happy?

Not exactly.  The sticking point here is not whether we can accept a long chain of inference like "People report feeling happy when certain neurons are firing in certain ways, they behave in certain ways when this is happening, dogs have analogous neural pathways, and these tend to fire when dogs are engaged in behavior analogous to that of happy people, and/or people report that the dogs seem happy."  That's not a problem, particularly not compared to the detection of gravitational waves.

The problem is that science depends fundamentally on objective, repeatable measurements of numbers.  Happiness is subjective, and happiness is not a number.  Science can get quite close to measuring happiness, but it's up to us to decide where to go from there -- just like with any other scientific result.

Wednesday, August 10, 2016

Qualia, or why do we experience anything at all?

Today I'd like to discuss a topic which has baffled (at least some) philosophers for quite some time and which I am even more ill-qualified to address than usual.  Since I'm giving general impressions from general ignorance I'll be citing a few well-known examples without attribution.  You can find a good summary here, or it least it seemed like a good one to me.  Rest assured I'm not claiming to be doing any original work here, just ... conjecturing.

The term qualia has come to encompass experiences, and in particular subjective experiences.  For example, what is it like to see the color red, or what is it to be a bat.  Such experiences seem to be subjective, in that the experience depends, at least in principle, on who's experiencing it.  To take a very old example, cliche but no less valid for being cliche, I have no obvious way of knowing whether you experience the color red in the way I do.  Perhaps you experience it the way I experience the color blue, and vice versa, or perhaps you experience it some completely different way.

For that matter, how do I know that you experience anything?  If you and I are at an intersection, stopped at a red light, I can see you react to the light turning green, but that doesn't mean that you had the same experience I did of seeing a red light and then a green light.  I assume that you experienced the sensation of something red and then something green, and that the color red seemed essentially the same way to you as it did to me, but how would I know?

Suppose you were actually in a self-driving car browsing the news on your phone.  You didn't see the light at all.  Rather, the car's cameras recorded the light changing and the car's control system caused the car to go when the light turned green.  I'm perfectly comfortable saying "The car saw the light change and drove through the intersection when it turned green", anthropomorphizing the car, but that doesn't mean I think the car experienced the colors red and green in anything like the way you or I would (or at least, I think you would).

Trying to account for distinctions like this in some objective way has been referred to as "the hard problem of consciousness", as opposed to easier, more empirical problems like "How does the brain record memories?" or "To what extent are we conscious of our own decisions?"

In some sense it's quite likely that all experiences are distinct.  If I see a red paint chip today and then again tomorrow, I will almost certainly have different associations each time.  The first time might put me in mind of a stop sign, or blood, or a red apple.  The second time I might be more focused on whether it's the same paint chip I saw yesterday.  Likewise, you will almost certainly have different associations than I will even if we're looking at the same chip.

And yet, we would probably all agree that we are experiencing seeing something red, and that it feels like something to have that experience.   Even if there's no emotional response, you're still having some sort of experience.  How do we account for that?

Suppose we could account for every firing of every neuron in the nervous system (including the optic nerve, which is actually doing quite a bit of processing before the signal even gets to the brain).  Have we accounted for the experience?  Suppose that after decades of research we compile an exhaustive list of experiences and how they correlate to brain activity.  We bring in a new subject and scan their neural activity.  Pointing at a display, we say "That pattern of firing always occurs in response to seeing the color red".  We can say "that person is experiencing the color red", but how, exactly, do we know that for sure?

It's not hard to imagine what kind of data would back this up.  We hook hundreds of subjects from all over the world and all walks of life up to our highly-advanced brain scanner, flash colors at them and note the results.  We may even ask them to describe what they're experiencing.  When we see the same patterns for our new subject it's a reasonable inference that their brain is processing the color red, and it's reasonable to expect that if we ask them what they're experiencing, their answer will involve the color red.

That's probably good enough for a cognitive scientist, but not a philosopher.  The philosopher may well insist that you don't know what the subject experienced, but only how they would answer a question.  They -- and for that matter any of your other subjects -- might just as well be philosophical zombies who exhibit all the expected behaviors and responses without actually experiencing anything.  We may know intuitively, but we can't prove that the test subjects aren't just like the self-driving car, only on a more elaborate level.


There are a couple of ways out of this.  One is to deny that qualia exist in any well-defined way.  From a logical point of view, this seems quite plausible.  We can talk about the abstract concept of redness, but in real life we don't experience redness in the abstract.  We experience a particular something red at a particular place and time.  That feels a particular way at that place and time, and quite possibly nothing has ever felt quite the same before or ever will.  Maybe we should just stick to our knitting and figure out what happens in real brains in response to real stimuli.  We can still generalize and define abstractions, but if we want an objective description of the world we have to start with objective data.

And yet, we still experience things, subjectively, each of us (or at least I'm pretty sure about me).

So how do we distinguish between a person at a stop light and a self-driving car?  Maybe we don't need to make a strong distinction.  Maybe we're ... not so different.

There's no particular reason, beyond our innate sense of specialness, to assume that only human beings can have experiences.  If we see a hungry dog, our intuition tells us the dog is experiencing hunger.  Our intuition is probably right.  The dog may not be having exactly the same kind of experience we do, but there's no reason to assume it's a philosophical zombie that only looks like it's experiencing hunger.

One way of handling this is to assert that along with the physical properties of the world -- mass, position, velocity and so forth -- there is an experiential component that's completely distinct but which we might still be able to reason about.  Perhaps we will even discover laws that govern it and develop a comprehensive theory of experience.

One objection to this approach is that it seems to imply panpsychism, the idea that everything has consciousness.  There are already schools of thought that believe exactly that, but the concept doesn't sit particularly well in materialist circles (materialist in the philosophical sense).

However, this seems misguided.  If consciousness in the sense of being able to experience qualia is a property in a way similar to mass being a property of things, that doesn't mean that everything has to have that property.  Just as photons are massless, there's no contradiction in saying a rock is unconscious.

Rather than stating that everything has consciousness, we are asserting that objects can have consciousness, and we are trying to investigate under what circumstances that happens.  However, we are explicitly punting on the question of how it has consciousness.  We are saying that when the conditions are right "it just does", just as when a particle interacts with the Higgs field it has mass* (I believe physics has a more detailed account of this than "it just does", but at some point even physics has to make some base assumptions).

From that point of view it's still reasonable to say that a rock has no feelings or consciousness, but a human does, a dog does and just possibly a self-driving car has some limited degree of consciousness as well.  Moreover we may be able to prove that in the scientific sense of having a coherent theory and data to support it.  If so, it seems this theory will look a lot like a purely material explanation of memory, attention and other aspects of consciousness, together with an assertion that when certain of these are present, the thing in which they are present experiences qualia.

What is it to be a self-driving car?  Probably not much, but perhaps something.

* [That's not a really rigorous way to phrase that, but I don't know well enough to give a better one --D.H.]

Saturday, June 11, 2016

Doctors Fermi, Drake and Strangelove

By now it's well-accepted that there are large numbers of planets in the universe that could plausibly support life more or less as we know it.  From this, it follows that unless civilizations like ours are exceedingly rare on such planets, there must be a great number of them in the universe, if not now then at least over history.  A recent paper argues that "... as long as the probability that a habitable zone planet develops a technological species is larger than ∼10−24 [that is, about one in a trillion trillion], humanity is not the only time technological intelligence has evolved".

I've argued elsewhere that numbers like that are beyond our ability to understand directly.  For practical purposes, we can call one in a trillion trillion "zero".  The paper is essentially concluding that, based on what we know now, there (practically) certainly have been other intelligent civilizations in the universe.

In evaluating a statement like that it's important to keep in mind the scales involved.  We're talking about the whole universe here, of which our galaxy is only a tiny part, and we're talking about the entire history of the universe, of which human history is only a tiny part.  The authors make a point of not addressing the question of how many such civilizations there might ever have been in our galaxy, much less close enough for communication with Earth to be practical.

They also make a point of not addressing how many such civilizations there might be right now (regardless of where they might be).  I want to get into the significance of that.


Questions of how many intelligent civilizations there might be generally center around the Drake Equation, which is probably best thought of as a framework for breaking down the problem.  The breakdown is that the number of civilizations we could communicate with must be the product of
  • Three factors representing the rate at which planets form that might support life appear (we're assuming here, for better or worse, that life lives on planets)
  • Three factors representing what portion of those actually produce life that would put out a detectable signal
  • How long those civilizations actually put out a detectable signal (the 'L' factor, for 'lifetime').
We now have a pretty good handle on the first bullet point above.  On the other hand, we don't really know how likely it is that a planet that could support life actually develops life or how likely it is that such life actually puts out a detectable signal.  I've previously argued that, because of the distances involved there's a big difference between "detectable" and "detectable by us" and that the last factor, how long there would be a detectable signal, could be very, very short on a cosmic scale.

The paper I referenced sidesteps these questions by considering everything everywhere and over all time, regardless of whether we could hope to make contact or would even be around to try.  That's fine, but in doing so it shifts from the practical question of "Are we alone?", or Fermi's "Where is everyone?", to the more philosophical question of "Are we unique?".  That's an interesting question, but it somehow lacks the emotional resonance of the other two.



I grew up during the Cold War.  I remember the electricity of the Berlin Wall opening, and the profound feeling of disorientation that came with it.  All my life the East and West had been locked in a permanent stalemate with no sign of an end.  And then it ended.  Now what?

For the most part, life went on.  That's not to say that the transition was smooth, particularly if you had lived in the Soviet Union or its satellites.  My point is more that the "western" developed world, at least, went on more or less as it was.  McDonalds is still McDonalds, Hollywood still makes films, football (or soccer, if you prefer) is still the world's sport, the US still doesn't care greatly that it is, and so forth.  MTV is still the place to go for music videos ... oh, wait ...

Except for nukes.

The amount of nuclear weaponry developed during the Cold War is staggering.  The only two nuclear weapons that have actually been used militarily, the ones dropped on Hiroshima and Nagasaki, yielded under 150TJ (or if you prefer, around 35 kilotons) .  We saw what that did.

Modern nuclear warheads are generally in the thousands of TJ, and tens of thousands of those have been made.  While you can't just multiply numbers and say "Ten thousand times as many bombs each yielding ten times as much means a hundred thousand times as many people killed," it was really no exaggeration, at all, to say that humanity now had the means to cause much, much more destruction than had ever been possible before.

This was a fact of life growing up in the cold war.  My high school newspaper once had a debate in the editorial columns about whether a nuclear war could be survived, at all, and if so whether you should even try.  The bidding started at "The US government would no longer exist" and from there it wasn't far to "Industrial civilization would collapse, bringing about a new Dark Age lasting centuries" or "All humans would die as nuclear winter wiped out agriculture and plunged temperatures by 20 degrees Celsius for decades".  It wasn't completely outlandish to speculate that multicellular life would be wiped out.

This colored our outlook on the world.

Today, not so much, which is interesting since there are still thousands of extremely powerful nuclear weapons in the world and it's not clear that they're as tightly controlled now as they had been.  Just why attitudes might have changed is for another discussion.  For now, let's just take it as a given that "nukes could kill us all" is not nearly as prominent a thought in the early 21st century as it was in the mid to late 20th.



That L factor of the Drake equation represents the amount of time during which an intelligent civilization puts out a detectable signal.  This could be a very short time, on cosmic scales, if only because unless you're actually trying to be detected, putting out radio or other signals that could be detected dozens or hundreds of light years away is a large waste of energy.

If you're streaming video over the internet, for example, no one has to broadcast a signal from a tower.  Even if radio signals are involved they are more likely beamed from one microwave station to another or otherwise narrowly focused.  An intelligent species could quite likely get along just fine for almost all of its existence without producing a detectable signal, if it so chose.

When the Drake equation was first developed, however, this wasn't the interpretation that people tended to use.

At the time, we had no idea whether there were many habitable planets out there, but we had made a few efforts to contact other stars and to listen for signs of life on them (including Drake's own Project Ozma), without any clear success.  That suggested that the factors of the Drake equation must multiply out to a small number.

Since we knew even less then than we know now, most of the factors of the equation were little more than wild guesses.  But we did have at least one data point for an intelligent species (at least by our own definition of "intelligent"), and there was one ready explanation that fit with our understanding of that species and the lack of signs of other species like it: Intelligent species didn't last long.

There was ample reason to believe that.  Perhaps it was inevitable that, at least on the cosmic scale, it would not be long between a species developing technology that could have a major impact on its planet and that species destroying itself.  In 1961, when Frank Drake put forth his equation, it had been less than 20 years since the end of World War II and nuclear weapons testing was in full swing.  It was the most natural thing in the world to wonder if we would make it another 20 years.



Now that we've made it over fifty years since then, it may be more natural to assume that we'll still be here in another fifty, or thousand, or whatever, and either to assume that the L factor could be small for any number of non-lethal reasons or to neglect it altogether on the assumption that we'll be around and detectable forever.  What strikes me here is how much room, within the broad limit that our theories need to be consistent with the facts as we know them, there is for them to reflect who we are at the moment. Then as well as now.

Saturday, May 28, 2016

What is syntax and how much does it matter?

From a computing point of view, when we say "syntax" we're largely talking about "parse trees".  A parse tree breaks a text into components, which are in turn broken down into sub-components, and so forth down to basic pieces analogous to words and punctuation in natural languages.  The largest unit is the root of the tree, and the tree branches wherever you break a larger component into smaller.  As I've said before, this is just like breaking a sentence down into, say, a noun phrase and a verb phrase, breaking the noun phrase into a determiner and a noun, and so forth.

I've also noted that this isn't the only way to break sentences down.  In fact, if you search for sentence diagramming, you're more likely to turn up material on the Reed-Kellog system, and there has been quite a bit of research on dependency grammars.  Both of these have tree structures implicit in them, but you could argue that pretty much any formal system does.  The more relevant point is that they don't emphasize constituency, that is, what's a part of what.  They're more interested in what modifies what, or more generally, what depends on what.

So, what is this syntax that we speak of?  I previously defined it as "the study of how words fit together in sentences".  Wikipedia has it as "the set of rules, principles, and processes that govern the structure of sentences in a given language, specifically word order", which seems pretty similar except for the emphasis on word order.  What sparked this post, however, was a statement in an Nat Geo blog post on killer whales (a.k.a. orcas, but that's a separate discussion), that
Language in the strict sense means syntax, which means that word placement determines meaning. So, “Put the blue pillow on the red pillow” means something different than, “Put the red pillow on the blue pillow.” Same exact words, different order. That’s language. Some dolphins and some apes have the ability to understand human syntax.
Killer whales are dolphins—the biggest ones. I am not aware of whether they understand human syntax. 
Initially I was struck by the simplicity of "word placement determines meaning" followed by a convincing example.  Later, I wondered how well that notion (or "specifically word order" in the Wikipedia definition) applies to languages with free word order.  Certainly order matters in narrating a story, or in figuring out which noun a pronoun might refer to, but in many languages ordering is more a matter of emphasis than meaning.

But now what strikes me about this passage is the emphasis on understanding.  This tends toward a more operational definition of syntax, for example, can you understand the difference between Put the blue pillow on the red pillow and Put the red pillow on the blue pillow.

Intuitively it seems like understanding the difference between Canis hominem mordet (dog bites man) and Canem homo mordet (man bites dog) would be much the same task, even though the word order is the same for both of those sentences.  So what are we really after here?

Fundamentally the problem to solve is communicating information reasonably efficiently and accurately.  I almost said "communicating concepts", but this depends on what concepts the parties involved can understand.  I may have a perfectly concise way to say "The square of the hypotenuse is equal to the sum of the squares of the legs", but that's not going to help much if my listener doesn't know what a hypotenuse is.

There's one other piece here, though.  Many species are capable of communicating a repertoire of messages, and even of learning new messages for that repertoire.  Vervets famously have different alarm calls for their main predators (leopards, eagles, pythons, and baboons).  They can also adjust to individuals that consistently make the wrong call, recognize their offspring by their calls and possibly invent new calls for new dangers.  Some dogs can be taught names for dozens of different objects which they can then retrieve by name.  Neither, however, seems to have language in the same way we do.

To establish that something unusual is going on, as with theories of mind, we need some sort of combinatorial explosion, that is, a situation in which a small number of basic pieces generate a very large number of possibilities.

For example, if we have a red pillow, a blue pillow, a red box and a blue box, and any one of them can be put to the left of, to the right of, in front of, behind, on top of or under any of the others, there 72 different combinations (red pillow to the left of blue pillow, red pillow to the left of red box ... blue box under red box), though since "red pillow to the left of blue pillow" is the same as "blue pillow to the right of red pillow" there are really only 36 possibilities, but 72 ways of expressing them.

The number of possibilities increases as the square of the number of objects.  If you double the number of objects, there are four times as many possibilities.  Similarly, if you add a new directional relation, say "to the left of and in front of", you've added as many possibilities as there are pairs of objects.  If you add a new kind of relation, say "close to" vs. "far from" (leaving aside whether you can place a red pillow far above a blue box), you've multiplied the total number of possibilities by a new factor.

For example, if you have ten objects, twelve directional relations and "touching", "close" and "far apart", you now have 1620 possibilities.  You haven't added much to the original setup, but there are now 45 times as many possibilities as before.  It's easy to see how you could make this much, much bigger just by adding more different kinds of distinctions.

Imagine an experiment where your subjects are (somehow) taught signs for the four objects and six directional relations, and then (somehow) required to communicate a particular arrangement.  Say subject 1 is shown an arrangement that subject 2 can't see, and if it can convince subject 2 to create the same arrangement they both get a reward.

If your test subjects can handle the original setup of 36 possibilities, it's possible that they learned the examples you gave by rote and guessed on ones they hadn't already seen.  You could control for that by making sure the two subjects are shown different examples, but if you want to run several trials and there are only 36 possibilities to choose from, it's hard to be sure that any significant syntax is involved.

On the other hand, suppose you have a pair of subjects that can handle the small setup, and then you add a new object.  After they see a couple of examples involving the new object they can handle unfamiliar setups involving it about as well as they can handle the originals.  You then give a few examples of a new relation (say, diagonal as above) and their performance doesn't suffer.  You then show a new kind of relation (say, distance as above) and they can still handle it.  You've now got a reasonably large space of arrangements to choose from and you can easily do repeated trials without repeating the exact arrangements.

At that point, I'd say you can infer that the communication system has some way not only of distinguishing "red pillow on top of blue pillow" from "blue pillow on top of red pillow", but distinguishing "A on top of B" from "B on top of A" in general.  I'll claim that at that point you can reasonably say there is syntax in some form, as well as some form of "abstract relation".


This is not the same as saying the experimental subjects have the same kind of language as we do.  You can solve the problem in the experiment with any way of selecting an directional relation, a first object, a second object and an distance relation.  That could be as simple as listing the four in order, as "red-pillow blue-pillow in-front-of close".

Handling new kinds of relations or constraints (e.g., put the pillow fuzzy side up) doesn't require much more syntax.  If the system can distinguish one relation/constraint from another, then something like "direction: red-pillow in-front-of blue-pillow, distance: close, orientation: red-pillow fuzzy-side-up" packs in a lot of information, and it's easy to see how you would extend it.


Where does that leave constructs that we tend to think are unique to human language, including dependent clauses like that I saw yesterday in The movie that I saw yesterday was two hours long?  I'm not sure how to set up an experiment like the previous one that could distinguish a language with dependent clauses from one without.  After all, I could just as well say I saw a movie yesterday.   That movie was two hours long.  This requires using that in its sense as a determiner to link the sentences together in a particular way.  This is still a pretty powerful construct, but it doesn't require tucking I saw the movie yesterday in as a direct modifier to movie.

From this point of view, the distinction between having dependent clauses and not having them is not particularly important.  This is in contrast to the computer science-y view that I've been most familiar with, where there is a huge distinction between recursive structures -- ones that can contain sub-parts of the same general form as the structure they're part of, such as sentences acting as clauses inside larger sentences -- and non-recursive structures, which can't.  One important distinction from that point of view is that there are in principle infinitely many possible structures -- sentences, say -- if recursion is allowed but only finitely many if it's not.

This is true in the mathematical world, but it's less important when considering real communication.  On the one hand, there are only finitely many sentences that are short enough for a real person to say or understand.  In practice, we rarely nest more than a few levels deep.  When we do, the result is often pretty hard to understand.

On the other hand, "finite" as a mathematical concept includes numbers large enough to be infinite for any practical purpose.  In fact, I've argued, almost all numbers are vastly too big for us to comprehend, let alone to occur in any natural context.  In practice, this means that even if you have only a handful of template sentences to fill in and you can't nest sentences within sentences, you can still end up with a gargantuan number of possible sentences -- and there's no reason you can't use more than one sentence in a conversation (technically, stringing sentences together can be expressed as recursion, but let's not get into that).



What if you can't do a controlled experiment to figure out how complex a communication system is?  What if all the data you have is from observations in the wild?  What if you're not sure what part of the noises, gestures or whatever else you observe are or aren't significant?  The task is certainly harder, then, but maybe not infeasible.  You're still looking for signs of combinatorial explosion, particularly the ability to deal with novel combinations of factors in a way that requires communication, that is, where
  • Different individuals have different information,
  • they need to share that information,
  • the exact information to share varies within a combinatorially large space of possibilities, and
  • the individuals involved are able to act usefully in ways they couldn't have without sharing the information.
The first two and the last are easy to find in any number of situations (arguably the second and last points are just different ways to say the same thing).  When a vervet sees a baboon, it shrieks out the alarm call for baboons and all the vervets skedaddle, you've met all but the third point.  From observation, it's reasonably clear that there isn't a combinatorially large space of possibilities.  There is a relatively small and constant set of calls.

Human communication clearly satisfies all four points.  Most of the sentences in this post, for example, are not only unique to the post but most likely unique to all human communication (I'm going to guess that the phrase "vervets skedaddle" is fairly rare in its own right -- it didn't turn up when I googled it with quotes, though that should soon change ...).  This is not something I consciously aimed for, just a natural consequence of writing reasonably long sentences in English (or any other natural language for that matter).

The interesting question is whether anyone else meets the third point.