Showing posts with label nerd. Show all posts
Showing posts with label nerd. Show all posts

Saturday, March 26, 2016

Tay bot

The most interesting thing about the Tay bot (the chat-bot started by Microsoft, which was promptly seduced by trolls and trained to be a Nazi), or at least the aspect of this story that I find most interesting and troubling, is how people immediately started talking about it as about a person. If you google for "Miscrosoft Tay", you can find all kinds of titles, from "Microsoft kills its first sentient AI" to "Microsoft deletes a teen girl for racist tweets". And even when the title itself is more objective, it seems to me that the language tends to antropomorphize this programming experiment a lot.

Which is actually not that surprising. Humans are really good in ascribing agency to everything, from earthworms, to cars, to weather. No wonder an AI bot that was marketed as a model for a "teenage girl", and was given an avatar-like userpic, registered in the collective subconsciousness as a kind-of-sentient "somebody" rather than "something".

And I think it's both cool and troubling. Cool because it means that humans are, in a way, ready for AI: they are ready to interact with AI as with another being. Which is good, as it means that human-robot interfaces are really easy to build: humans like to be gullible; they jump at the opportunity. But it's also bad, as it means that the ethical nightmare may start much earlier than one could have expected. I may be overreacting, but from posts about Tay it seems that people may be opposed to "unplugging robots" years before any AI passes a Turing test.

And that's a fun thought. How do you even troubleshoot a sentient AI, from the ethical point of view? How do you troubleshoot an AI that learns and "develops" psychologically, similar to a human child? It does not have to be exactly like a human child, and the process may be much faster, but there almost bound to be some similarities. The only way to troubleshoot a program is to run it, look at its performance, kill it (stop it), change something, and then try again. Can this approach be applied to an AI? Or to a project like a "Blue Brain", where a human cortex will be modeled? Or to an "uploaded personality" (another recent fad)? At what point troubleshooting "virtual humans" will become unethical? Or, on a more practical note, at which point will the human community rebel against this troubleshooting?

And here is a really nice youtube video, also post-Tay, but with a twist. Still extremely relevant:
https://www.youtube.com/watch?v=dLRLYPiaAoA

Wednesday, March 6, 2013

The Wheel of Time book series: the dynamics of sequel ratings

I am reading The Wheel of Time series. I've just finished volume 3, and by now I am somewhat tired, but not quite tired yet to quit. Still I am kind of unsure and undecided about whether I should go further or not. Or maybe take a break. Or maybe skip a volume or two.

To answer this question I downloaded book ratings from GoodReads, and visualized them. So for those of you who care, let me share the results =)

Most books are rated by quite a few people (about 30 thousands at least), so in terms of the spread these values should be quite tolerable. The biggest methodological problem with these numbers is that the further into the series, the more faithful and fantasy-oriented the readers in the pool would become, and it should certainly introduce a bias. I prefer to ignore this bias however, as I have no idea about its direction! More faithful readers may score the books slightly higher (because they are faithful, and so like them!), but at the same time they are also humans, and so they should gradually get tired, and thus score the books lower compared to the first volume. Also faithful readers may have higher standards for the books of this kind, as presumably they read dozens of them; unlike those who only "tried" the series... So, I don't know how to correct for this bias. Let it be.

Another thing we could look at in the GoodReads data is the "Readers retention score": share of people who managed to read book #i+1 after finishing the book #i. There's a pretty stable decline in reader numbers through the series, with the first book scored by 96 thousand people, and the twelve-st scored "only" by 38 thousands. At the same time, surprisingly, if you calculate the retaining index, it doesn't change that much across the series, except for a huge outlier at the book #11: the last one R. Jordan managed to write before he succumbed to cancer. I don't yet know whether the book is really that good, or whether it is just extremely intriguing, or maybe fresh, or maybe people paid attention to this whole real-life story around the fantasy world, with one author dying, but leaving extensive notes to his colleagues to finish the series... It may be. But it means that at least this book should probably be read, even if I decide to skip a few in the middle.


I can not use this index to measure books #13 and 14, unfortunately, as book #14 is the last one (i+1 doesn't exist), while book #13 was published too recently, and so has a relatively low number of readers. I guess, it also means that this plot has an even stronger positive bias just because of unequal exposure of books to time, so to say. It does probably also have a positive bias due to the "self-selection of faithful readers" described previously... Still it is funny that the "retention values" don't correlate with the rating at all (r = -0.2; p = 0.5). It's kind of weird.

Anyway, for me personally this data probably means that I'll try the fourth book. But if it doesn't quite work, I'll skip straight to book #11.

Thursday, December 20, 2012

Guns and probability

Let's solve a simple (but unpleasant) probabilistic problem.

  • You are in a room with 19 other people (so 20 in total). One of them turns to be a "freak".
  • If a freak has a gun - they start shooting people until nobody is left.
  • If a "normal person" has a gun, they shoot the freak, and save everybody.
What is the probability of dying in this situation, as a function of gun availability in the country?

Let's assume that the probability of having a gun is the same for everyone in the room, and equals p. Then the probability of the freak being the only armed person in the room is given by the formula d = p*((1-p)^(n-1)), where n=20. If everybody carry their guns openly, and the freak is rational enough; or if "normal people" manage to always kill the freak before the freak kills anybody, this formula will describe the probability of death in this situation. It will obviously go through a maximum, and then decline back to zero:


Let's assume however that "normal citizens" don't shoot the freak until they are 100% sure that this guy is actually a freak. So the freak always succeeds in killing one person, and only then they are stopped by a "militia" member. Then the curve would look slightly differently, because now the probability of death is 1 (for sure) if there's no other armed person in the room, but it is still 1/20 if there are militia members there: d = p*((1-p)^(n-1)*1 + (1-(1-p)^(n-1))*1/n). This is assuming that you are always a "good citizen", and never a freak.


And this formula suddenly makes some sense. It is possible to decrease the probability of shooting sprees by increasing gun ownership. But at some point the shootings will become that frequent, that even if each of them is stopped almost immediately, they will still take a toll. Because in each of them at least one innocent person will be killed. You change the assumptions, and the parameters, and the curve will move around, but the idea will stay the same.

- "Well", - the right-wing person would say, - "but people never turn freaks right in the room; they usually turn mad while at home, and take their time to prepare. What if a freak is 5 times more likely to find a gun than a "normal person", because a freak is actively looking for one?" In this case, indeed, the only way to stop the freaks is to give everybody a gun, because d = (1-(1-p)^5)*((1-p)^(n-1)*1 + (1-(1-p)^(n-1))*1/n).


In reality however all freaks are different, and while there are some who will sale their belongings and prepare for years, most of them will probably kill other people only if given an opportunity. The harder it is to get a gun, the fewer freaks capable of doing so you will find. For example, if on top of "purely opportunistic freaks", as described above, you'll also find 1/2 as many freaks that are twice more persistent in getting a gun, 1/4 as many freaks that are three times as persistent, etc., you'll end up with this curve:


And here basically, in essense, we return to the curve #2. If everybody has a gun - people die all the time. If you reduce gun ownership, rate of murders go down. At some point however you may feel helpless, because if 10% of people walk around with a gun in their pocket, sprees will still happen regularly, and they'll be already quite deadly. That is essentially the situation in any school, or any mall, where the majority of public obey the "gun free zone" laws. However, once you drop the average gun ownership rate below a certain point, gun control becomes the only efficient way to further reduce the casualties.

Wednesday, December 12, 2012

Ideal number of PhDs: is it better to die early, or not to be born?


Job market is like weather: not that it changes as frequently, but as weather it makes a nice and safe discussion topic. You met another postdoc, and don't know what to talk about? Just whine together about the bleakness of job opportunities. You'll both get depressed, as a side effect, but at least you'll avoid the awkward silence.

When talking to people, I like asking them about what would they do to improve the academia, if they had the power to do so. Here are the axioms (the rules of the game):
  1. The funding is fixed (increasing funding is an entirely separate topic)
  2. Number of people willing to do science is fixed (it's not actually, but again, for the sake of simplicity)
  3. You want to increase the scientific output (or at least keep it at the current level)
  4. ...while increasing the "average happiness" (whatever it means)
So, what would you do?

Surprisingly, there's no common theme among the answers I receive. The only pattern I could spot is that people generally call for making the bottleneck they have just crossed a bit tighter, while loosing the one they are facing. Thus grad students call for decreasing grad school enrollment, while making graduation more "guaranteed"; postdocs think that "we need fewer PhDs", to reduce competition for the TT positions, and so on. I also follow this pattern by the way.

But this made me think about the "best theoretical solution" to this "bottlenecks distribution" problem. Does it exist at all? If you follow a reductionist approach, and, for the sake of simplicity, concentrate on the "selection process" for future TT faculty, what would be the best "extinction process" to use? If you were the King of NIH, when would you get rid of them lazy bastards, people who will never become PIs? Of all those who foolishly dream of becoming TT faculty, how many would you push out of the system at each respective year of their evolution?

According to my estimations, the current actual "Extinciton chart" for Neuroscience looks somewhat like that:

About 50% of applicants get accepted to grad schools (I assume acceptance rates within each school of ~10%, and each person applying to ~5 schools). 5 years in grad school (I should have assumed more actually); 50% graduate with PhD; then 7 years of post-doc, 20% of postdocs get a TT position.

Is it optimal? Obviously, the answer depends on your definition of "optimal". If you try to increase scientific output (without restructuring job descriptions), you would have to keep them all till the last moment, and then suddenly fire. If you want to decrease spending, you'd have to admit to the grad school only ~5% of applicants, thus making the tenure track more or less guaranteed. If you want "productivity" in terms of "Impact-factor-per-buck", you'll have a complex interplay of different factors, and lots of assumptions about salaries, talent distributions, education investments, etc.

But this dichotomy is obvious. What I find much more interesting is another type of an inherent contradiction here: that between Happiness and Fairness.

The "average happiness among the young folks in academia" would obviously decrease, as you increase the competition at the later stages. If you keep everybody in the system for 15 years, and then perform one giant massacre, people will be extremely unhappy about that. You may think of unhappiness being generated when people are forced to leave academia: the more of their life-time they invested into this thing, the more they sacrificed for it, the more unhappy they will be. Or you may think of it as of frustration that is linearly generated over time, in view of the decimation bottleneck to come. The math is the same in both cases: the earlier you fire people, the less they lose. Thus the system in which only 5% of applicants are accepted into grad schools would produce the most "happy" (in terms of being relaxed) academia.

But this system would also be the least fair one! Because 5% admission at the level of grad school would mean that the admissions would be quite arbitrary. What would you base your decisions on? GPA? Undergraduate education? Scholarships and early publications? All these points would essentially translate into one: "pure luck of being born in a wealthy family with good connections". Older applicants, women with kids, foreigners, lower-class applicants would all be judged against, just because they would be perceived as "more risky" investments.

It is kind of similar to the heritability of IQ issue: the later in life you measure the IQ, the more heritable it becomes. In elementary school kids IQ is almost entirely explained by the environment that is "forced" upon them (bad school, good teacher, etc.), but as we move on, to older subject, IQ gradually starts to become more and more "heritable", with up to ~75% heritability in adults. The common interpretation of this fact is that as you move on, more and more aspects of your life become a result of your personal choice. We all gradually become self-made people, in both good and bad. Granted enough time, we settle kinda where we deserve to be. At the age of 50 your pre-school experiences are largely irrelevant for your success.

And that's why the later you decimate the postdocs - the more fair the system becomes. If a person doesn't have a Nature paper by their 3d postdoc position, it's not just "pure luck" anymore. They had a chance to choose a  grad school; a PI there; and then, say, 3 different labs. They had a chance to either upscale, or downshift. The luck is still important, but while having 1 failed project is quite normal, having 10 of 10 projects failed over a course of 10 years would probably reveal some kind of a pattern.

This being said, if you think that the grad-school-to-postdoc environment is unhappy and depressing, please, do realize that it means that it is at least decently fair. Trying to make everybody in the system "more happy" at the expense of decreasing the in-flow is likely to make the system less fair, less productive, and more frustrating for those worthy people who would be left behind due to their suboptimal early life experiences. Your gambling on your future, and your uncertain career perspectives right now, are a reflection of the fact that you have the liberty, the chance to take a risk. In a no-risk environment, you probably would not had a chance to try.